From 62ab2fe431189130d6c671184c879e1e6837a6ea Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Wed, 15 May 2024 07:51:27 +0530 Subject: [PATCH 01/21] code revision --- README.md | 4 +- composer.lock | 134 ++++++++------ includes/options.php | 300 ++++++++++++++++++++++++++++++++ ocean-social-sharing.php | 367 ++------------------------------------- readme.txt | 4 +- 5 files changed, 404 insertions(+), 405 deletions(-) create mode 100644 includes/options.php diff --git a/README.md b/README.md index bbc9919..6364b57 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ **Contributors:** Nick **Requires at least:** WordPress 5.6 -**Tested up to:** WordPress 6.4.2 -**Stable tag:** 2.0.6 +**Tested up to:** WordPress 6.5.2 +**Stable tag:** 2.0.7 **License:** GPLv2 or later **License URI:** https://www.gnu.org/licenses/gpl-2.0.html diff --git a/composer.lock b/composer.lock index dcc4014..33b3863 100644 --- a/composer.lock +++ b/composer.lock @@ -297,16 +297,16 @@ }, { "name": "mck89/peast", - "version": "v1.15.4", + "version": "v1.16.2", "source": { "type": "git", "url": "https://github.com/mck89/peast.git", - "reference": "1df4dc28a6b5bb7ab117ab073c1712256e954e18" + "reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mck89/peast/zipball/1df4dc28a6b5bb7ab117ab073c1712256e954e18", - "reference": "1df4dc28a6b5bb7ab117ab073c1712256e954e18", + "url": "https://api.github.com/repos/mck89/peast/zipball/2791b08ffcc1862fe18eef85675da3aa58c406fe", + "reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe", "shasum": "" }, "require": { @@ -319,7 +319,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15.4-dev" + "dev-master": "1.16.2-dev" } }, "autoload": { @@ -340,9 +340,9 @@ "description": "Peast is PHP library that generates AST for JavaScript code", "support": { "issues": "https://github.com/mck89/peast/issues", - "source": "https://github.com/mck89/peast/tree/v1.15.4" + "source": "https://github.com/mck89/peast/tree/v1.16.2" }, - "time": "2023-08-12T08:29:29+00:00" + "time": "2024-03-05T09:16:03+00:00" }, { "name": "mustache/mustache", @@ -396,16 +396,16 @@ }, { "name": "php-parallel-lint/php-parallel-lint", - "version": "v1.3.2", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", - "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de" + "reference": "6db563514f27e19595a19f45a4bf757b6401194e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6483c9832e71973ed29cf71bd6b3f4fde438a9de", - "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6db563514f27e19595a19f45a4bf757b6401194e", + "reference": "6db563514f27e19595a19f45a4bf757b6401194e", "shasum": "" }, "require": { @@ -443,13 +443,17 @@ "email": "ahoj@jakubonderka.cz" } ], - "description": "This tool check syntax of PHP files about 20x faster than serial check.", + "description": "This tool checks the syntax of PHP files about 20x faster than serial check.", "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", + "keywords": [ + "lint", + "static analysis" + ], "support": { "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", - "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.3.2" + "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.4.0" }, - "time": "2022-02-21T12:50:22+00:00" + "time": "2024-03-27T12:14:49+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -627,16 +631,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.9.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", + "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", "shasum": "" }, "require": { @@ -646,11 +650,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -665,42 +669,65 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-03-31T21:03:09+00:00" }, { "name": "symfony/finder", - "version": "v6.3.5", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" + "reference": "11d736e97f116ac375a81f96e662911a34cd50ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", + "url": "https://api.github.com/repos/symfony/finder/zipball/11d736e97f116ac375a81f96e662911a34cd50ce", + "reference": "11d736e97f116ac375a81f96e662911a34cd50ce", "shasum": "" }, "require": { "php": ">=8.1" }, "require-dev": { - "symfony/filesystem": "^6.0" + "symfony/filesystem": "^6.0|^7.0" }, "type": "library", "autoload": { @@ -728,7 +755,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.5" + "source": "https://github.com/symfony/finder/tree/v6.4.0" }, "funding": [ { @@ -744,20 +771,20 @@ "type": "tidelift" } ], - "time": "2023-09-26T12:56:25+00:00" + "time": "2023-10-31T17:30:12+00:00" }, { "name": "wp-cli/i18n-command", - "version": "v2.4.4", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/wp-cli/i18n-command.git", - "reference": "7d82e675f271359b1af614e6325d8eeaeb7d7474" + "reference": "7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/7d82e675f271359b1af614e6325d8eeaeb7d7474", - "reference": "7d82e675f271359b1af614e6325d8eeaeb7d7474", + "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1", + "reference": "7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1", "shasum": "" }, "require": { @@ -785,6 +812,7 @@ "i18n make-pot", "i18n make-json", "i18n make-mo", + "i18n make-php", "i18n update-po" ] }, @@ -810,9 +838,9 @@ "homepage": "https://github.com/wp-cli/i18n-command", "support": { "issues": "https://github.com/wp-cli/i18n-command/issues", - "source": "https://github.com/wp-cli/i18n-command/tree/v2.4.4" + "source": "https://github.com/wp-cli/i18n-command/tree/2.6.1" }, - "time": "2023-08-30T18:00:10+00:00" + "time": "2024-02-28T11:27:34+00:00" }, { "name": "wp-cli/mustangostang-spyc", @@ -867,16 +895,16 @@ }, { "name": "wp-cli/php-cli-tools", - "version": "v0.11.21", + "version": "v0.11.22", "source": { "type": "git", "url": "https://github.com/wp-cli/php-cli-tools.git", - "reference": "b3457a8d60cd0b1c48cab76ad95df136d266f0b6" + "reference": "a6bb94664ca36d0962f9c2ff25591c315a550c51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/php-cli-tools/zipball/b3457a8d60cd0b1c48cab76ad95df136d266f0b6", - "reference": "b3457a8d60cd0b1c48cab76ad95df136d266f0b6", + "url": "https://api.github.com/repos/wp-cli/php-cli-tools/zipball/a6bb94664ca36d0962f9c2ff25591c315a550c51", + "reference": "a6bb94664ca36d0962f9c2ff25591c315a550c51", "shasum": "" }, "require": { @@ -924,22 +952,22 @@ ], "support": { "issues": "https://github.com/wp-cli/php-cli-tools/issues", - "source": "https://github.com/wp-cli/php-cli-tools/tree/v0.11.21" + "source": "https://github.com/wp-cli/php-cli-tools/tree/v0.11.22" }, - "time": "2023-09-29T15:28:10+00:00" + "time": "2023-12-03T19:25:05+00:00" }, { "name": "wp-cli/wp-cli", - "version": "v2.9.0", + "version": "v2.10.0", "source": { "type": "git", "url": "https://github.com/wp-cli/wp-cli.git", - "reference": "8a3befba2d947fbf5cc6d1941edf2dd99da4d4b7" + "reference": "a339dca576df73c31af4b4d8054efc2dab9a0685" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/8a3befba2d947fbf5cc6d1941edf2dd99da4d4b7", - "reference": "8a3befba2d947fbf5cc6d1941edf2dd99da4d4b7", + "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/a339dca576df73c31af4b4d8054efc2dab9a0685", + "reference": "a339dca576df73c31af4b4d8054efc2dab9a0685", "shasum": "" }, "require": { @@ -969,7 +997,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.9.x-dev" + "dev-main": "2.10.x-dev" } }, "autoload": { @@ -996,7 +1024,7 @@ "issues": "https://github.com/wp-cli/wp-cli/issues", "source": "https://github.com/wp-cli/wp-cli" }, - "time": "2023-10-25T09:06:37+00:00" + "time": "2024-02-08T16:52:43+00:00" }, { "name": "wp-coding-standards/wpcs", diff --git a/includes/options.php b/includes/options.php new file mode 100644 index 0000000..81fbd6a --- /dev/null +++ b/includes/options.php @@ -0,0 +1,300 @@ + [ + 'title' => __( 'Social Sharing', 'ocean-social-sharing' ), + 'priority' => 13, + 'options' => [ + 'oss_top_quick_links' => [ + 'type' => 'ocean-links', + 'label' => 'Quick Menu', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'class' => 'top-quick-links', + 'linkIcon' => 'link-2', + 'titleIcon' => 'three-dot-menu', + 'active_callback' => 'ocean_is_oe_active', + 'links' => [ + 'website_layout' => [ + 'label' => esc_html__('Website Layout', 'ocean-social-sharing'), + 'url' => '#' + ], + 'scroll_top' => [ + 'label' => esc_html__('Scroll To Top', 'ocean-social-sharing'), + 'url' => '#' + ], + 'pagination' => [ + 'label' => esc_html__('Pagination', 'ocean-social-sharing'), + 'url' => '#' + ] + ] + ], + + 'oss_divider_after_top_quick_links' => [ + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'top' => 10, + 'bottom' => 10 + ], + + 'oss_social_share_sites' => [ + 'label' => esc_html__( 'Sharing Buttons', 'ocean-social-sharing' ), + 'type' => 'ocean-sortable', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'refresh', + 'priority' => 10, + 'default' => ['twitter', 'facebook', 'pinterest', 'linkedin', 'viber', 'vk', 'reddit', 'tumblr', 'viadeo', 'whatsapp'], + 'hideLabel' => false, + 'choices' => [ + 'twitter' => 'Twitter', + 'facebook' => 'Facebook', + 'pinterest' => 'Pinterest', + 'linkedin' => 'LinkedIn', + 'viber' => 'Viber', + 'vk' => 'VK', + 'reddit' => 'Reddit', + 'tumblr' => 'Tumblr', + 'viadeo' => 'Viadeo', + 'whatsapp' => 'WhatsApp', + ] + ], + + 'oss_divider_after_social_share_sites' => [ + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'top' => 1, + 'bottom' => 1 + ], + + 'oss_social_share_position' => [ + 'type' => 'ocean-select', + 'label' => esc_html__('Position', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'refresh', + 'default' => 'after', + 'priority' => 10, + 'hideLabel' => false, + 'multiple' => false, + 'choices' => [ + 'before' => esc_html__('Before the Content', 'ocean-social-sharing'), + 'after' => esc_html__('After the Content', 'ocean-social-sharing'), + 'both' => esc_html__('Before & After the Content', 'ocean-social-sharing'), + 'none' => esc_html__('No Buttons in the Content', 'ocean-social-sharing'), + ] + ], + + 'oss_social_share_name' => [ + 'type' => 'ocean-switch', + 'label' => esc_html__('Add Social Name', 'ocean-social-sharing'), + 'section' => 'ocean_social_sharing_settings', + 'default' => false, + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + ], + + 'oss_social_share_heading' => [ + 'label' => esc_html__( 'Sharing Heading', 'ocean-social-sharing' ), + 'type' => 'ocean-text', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'default' => esc_html__('Please Share This', 'ocean-social-sharing'), + 'priority' => 10, + 'hideLabel' => false, + 'sanitize_callback' => 'wp_kses_post' + ], + + 'oss_social_share_heading_position' => [ + 'id' => 'oss_social_share_heading_position', + 'type' => 'ocean-buttons', + 'label' => esc_html__('Heading Position', 'ocean-social-sharing'), + 'section' => 'ocean_social_sharing_settings', + 'default' => 'side', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'wrap' => false, + 'choices' => [ + 'side' => [ + 'id' => 'side', + 'label' => esc_html__('Side', 'ocean-social-sharing'), + 'content' => esc_html__('Side', 'ocean-social-sharing'), + ], + 'top' => [ + 'id' => 'top', + 'label' => esc_html__('Top', 'ocean-social-sharing'), + 'content' => esc_html__('Top', 'ocean-social-sharing'), + ] + ] + ], + + 'oss_social_share_twitter_handle' => [ + 'label' => esc_html__( 'Twitter Username', 'ocean-social-sharing' ), + 'type' => 'ocean-text', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'default' => '', + 'priority' => 10, + 'hideLabel' => false, + 'sanitize_callback' => 'wp_filter_nohtml_kses' + ], + + 'oss_social_share_style' => [ + 'type' => 'ocean-select', + 'label' => esc_html__('Style', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'default' => 'minimal', + 'priority' => 10, + 'hideLabel' => false, + 'multiple' => false, + 'choices' => [ + 'minimal' => esc_html__('Minimal', 'ocean-social-sharing'), + 'colored' => esc_html__('Colored', 'ocean-social-sharing'), + 'dark' => esc_html__('Dark', 'ocean-social-sharing'), + ] + ], + + 'oss_divider_after_social_share_style_setting' => [ + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'top' => 10, + 'bottom' => 10 + ], + + 'oss_social_share_style_border_radius' => [ + 'id' => 'oss_social_share_style_border_radius', + 'label' => esc_html__( 'Border Radius', 'ocean-social-sharing' ), + 'type' => 'ocean-range-slider', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'isUnit' => true, + 'isResponsive' => false, + 'min' => 1, + 'max' => 100, + 'step' => 1, + 'setting_args' => [ + 'desktop' => [ + 'id' => 'oss_social_share_style_border_radius', + 'label' => 'Desktop', + 'attr' => [ + 'transport' => 'postMessage', + ], + ], + 'unit' => [ + 'id' => 'oss_social_share_style_border_radius_unit', + 'label' => 'Unit', + 'attr' => [ + 'transport' => 'postMessage', + 'default' => 'px', + ], + ], + ], + 'preview' => 'queryWithType', + 'css' => [ + '.entry-share ul li a' => 'border-radius' + ] + ], + + 'oss_divider_after_style_border_radius_setting' => [ + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'top' => 1, + 'bottom' => 10 + ], + + 'oss_sharing_borders_color' => [ + 'type' => 'ocean-color', + 'label' => esc_html__( 'Minimal Style Borders', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'showAlpha' => true, + 'showPalette' => true, + 'setting_args' => [ + 'normal' => [ + 'id' => 'oss_sharing_borders_color', + 'key' => 'normal', + 'label' => esc_html__( 'Select Color', 'ocean-social-sharing' ), + 'selector' => [ + '.entry-share.minimal ul li a' => 'border-color' + ], + 'attr' => [ + 'transport' => 'postMessage', + ], + ] + ] + ], + + 'oss_sharing_icons_bg' => [ + 'type' => 'ocean-color', + 'label' => esc_html__( 'Minimal Style Background', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'showAlpha' => true, + 'showPalette' => true, + 'setting_args' => [ + 'normal' => [ + 'id' => 'oss_sharing_icons_bg', + 'key' => 'normal', + 'label' => esc_html__( 'Select Color', 'ocean-social-sharing' ), + 'selector' => [ + '.entry-share.minimal ul li a' => 'background-color' + ], + 'attr' => [ + 'transport' => 'postMessage', + ], + ] + ] + ], + + 'oss_sharing_icons_color' => [ + 'type' => 'ocean-color', + 'label' => esc_html__( 'Minimal Style Color', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'showAlpha' => true, + 'showPalette' => true, + 'setting_args' => [ + 'normal' => [ + 'id' => 'oss_sharing_icons_color', + 'key' => 'normal', + 'label' => esc_html__( 'Select Color', 'ocean-social-sharing' ), + 'selector' => [ + '.entry-share.minimal ul li a' => 'color', + '.entry-share.minimal ul li a .oss-icon' => 'fill' + ], + 'attr' => [ + 'transport' => 'postMessage', + ], + ] + ] + ], + ] + ] +]; diff --git a/ocean-social-sharing.php b/ocean-social-sharing.php index 30b2a1b..9bff017 100644 --- a/ocean-social-sharing.php +++ b/ocean-social-sharing.php @@ -3,11 +3,11 @@ * Plugin Name: Ocean Social Sharing * Plugin URI: https://oceanwp.org/extension/ocean-social-sharing/ * Description: A simple plugin to add social share buttons to your posts. - * Version: 2.0.6 + * Version: 2.0.7 * Author: OceanWP * Author URI: https://oceanwp.org/ * Requires at least: 5.6 - * Tested up to: 6.4.2 + * Tested up to: 6.5.2 * * Text Domain: ocean-social-sharing * Domain Path: /languages @@ -258,352 +258,23 @@ public function customizer_register( $wp_customize ) } - /** - * Add a new section - */ - $wp_customize->add_section( - 'oss_sharing_section', - array( - 'title' => esc_html__('Social Sharing', 'ocean-social-sharing'), - 'priority' => 210, - ) - ); - - /** - * Sharing sites - */ - $wp_customize->add_setting( - 'oss_social_share_sites', - array( - 'default' => array( - 'twitter', - 'facebook', - 'pinterest', - 'linkedin', - 'viber', - 'vk', - 'reddit', - 'tumblr', - 'viadeo', - 'whatsapp', - ), - 'sanitize_callback' => 'oceanwp_sanitize_multi_choices', - ) - ); - - $wp_customize->add_control( - new OceanWP_Customizer_Sortable_Control( - $wp_customize, - 'oss_social_share_sites', - array( - 'label' => esc_html__('Sharing Buttons', 'ocean-social-sharing'), - 'section' => 'oss_sharing_section', - 'settings' => 'oss_social_share_sites', - 'priority' => 10, - 'choices' => array( - 'twitter' => 'Twitter', - 'facebook' => 'Facebook', - 'pinterest' => 'Pinterest', - 'linkedin' => 'LinkedIn', - 'viber' => 'Viber', - 'vk' => 'VK', - 'reddit' => 'Reddit', - 'tumblr' => 'Tumblr', - 'viadeo' => 'Viadeo', - 'whatsapp' => 'WhatsApp', - ), - ) - ) - ); - - /** - * Position - */ - $wp_customize->add_setting( - 'oss_social_share_position', - array( - 'default' => 'after', - 'sanitize_callback' => 'oceanwp_sanitize_select', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Control( - $wp_customize, - 'oss_social_share_position', - array( - 'label' => esc_html__('Position', 'ocean-social-sharing'), - 'type' => 'select', - 'section' => 'oss_sharing_section', - 'settings' => 'oss_social_share_position', - 'priority' => 10, - 'choices' => array( - 'before' => esc_html__('Before the Content', 'ocean-social-sharing'), - 'after' => esc_html__('After the Content', 'ocean-social-sharing'), - 'both' => esc_html__('Before & After the Content', 'ocean-social-sharing'), - 'none' => esc_html__('No Buttons in the Content', 'ocean-social-sharing'), - ), - ) - ) - ); - - /** - * Social Name - */ - $wp_customize->add_setting( - 'oss_social_share_name', - array( - 'transport' => 'postMessage', - 'default' => false, - 'sanitize_callback' => 'oceanwp_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Control( - $wp_customize, - 'oss_social_share_name', - array( - 'label' => esc_html__('Add Social Name', 'ocean-social-sharing'), - 'type' => 'checkbox', - 'section' => 'oss_sharing_section', - 'settings' => 'oss_social_share_name', - 'priority' => 10, - ) - ) - ); - - /** - * Heading - */ - $wp_customize->add_setting( - 'oss_social_share_heading', - array( - 'default' => esc_html__('Please Share This', 'ocean-social-sharing'), - 'transport' => 'postMessage', - 'sanitize_callback' => 'wp_kses_post', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Control( - $wp_customize, - 'oss_social_share_heading', - array( - 'label' => esc_html__('Sharing Heading', 'ocean-social-sharing'), - 'section' => 'oss_sharing_section', - 'settings' => 'oss_social_share_heading', - 'type' => 'text', - 'priority' => 10, - ) - ) - ); - - /** - * Heading Position - */ - $wp_customize->add_setting( - 'oss_social_share_heading_position', - array( - 'transport' => 'postMessage', - 'default' => 'side', - 'sanitize_callback' => 'oceanwp_sanitize_select', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Control( - $wp_customize, - 'oss_social_share_heading_position', - array( - 'label' => esc_html__('Heading Position', 'ocean-social-sharing'), - 'type' => 'select', - 'section' => 'oss_sharing_section', - 'settings' => 'oss_social_share_heading_position', - 'priority' => 10, - 'choices' => array( - 'side' => esc_html__('Side', 'ocean-social-sharing'), - 'top' => esc_html__('Top', 'ocean-social-sharing'), - ), - ) - ) - ); - - /** - * Twitter Handle - */ - $wp_customize->add_setting( - 'oss_social_share_twitter_handle', - array( - 'default' => '', - 'sanitize_callback' => 'wp_filter_nohtml_kses', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Control( - $wp_customize, - 'oss_social_share_twitter_handle', - array( - 'label' => esc_html__('Twitter Username', 'ocean-social-sharing'), - 'section' => 'oss_sharing_section', - 'settings' => 'oss_social_share_twitter_handle', - 'type' => 'text', - 'priority' => 10, - ) - ) - ); - - /** - * Heading Styling - */ - $wp_customize->add_setting( - 'oss_social_share_styling_heading', - array( - 'sanitize_callback' => 'wp_kses', - ) - ); - - $wp_customize->add_control( - new OceanWP_Customizer_Heading_Control( - $wp_customize, - 'oss_social_share_styling_heading', - array( - 'label' => esc_html__('Styling', 'ocean-social-sharing'), - 'section' => 'oss_sharing_section', - 'priority' => 10, - ) - ) - ); - - /** - * Style - */ - $wp_customize->add_setting( - 'oss_social_share_style', - array( - 'transport' => 'postMessage', - 'default' => 'minimal', - 'sanitize_callback' => 'oceanwp_sanitize_select', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Control( - $wp_customize, - 'oss_social_share_style', - array( - 'label' => esc_html__('Style', 'ocean-social-sharing'), - 'type' => 'select', - 'section' => 'oss_sharing_section', - 'settings' => 'oss_social_share_style', - 'priority' => 10, - 'choices' => array( - 'minimal' => esc_html__('Minimal', 'ocean-social-sharing'), - 'colored' => esc_html__('Colored', 'ocean-social-sharing'), - 'dark' => esc_html__('Dark', 'ocean-social-sharing'), - ), - ) - ) - ); - - /** - * Border Radius - */ - $wp_customize->add_setting( - 'oss_social_share_style_border_radius', - array( - 'transport' => 'postMessage', - 'sanitize_callback' => 'wp_kses_post', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Control( - $wp_customize, - 'oss_social_share_style_border_radius', - array( - 'label' => esc_html__('Border Radius', 'ocean-social-sharing'), - 'description' => esc_html__('Add a custom border radius. px - em - %.', 'ocean-social-sharing'), - 'type' => 'text', - 'section' => 'oss_sharing_section', - 'settings' => 'oss_social_share_style_border_radius', - 'priority' => 10, - ) - ) - ); - - /** - * Borders color - */ - $wp_customize->add_setting( - 'oss_sharing_borders_color', - array( - 'transport' => 'postMessage', - 'sanitize_callback' => 'oceanwp_sanitize_color', - ) - ); - - $wp_customize->add_control( - new OceanWP_Customizer_Color_Control( - $wp_customize, - 'oss_sharing_borders_color', - array( - 'label' => esc_html__('Minimal Style: Borders Color', 'ocean-social-sharing'), - 'section' => 'oss_sharing_section', - 'settings' => 'oss_sharing_borders_color', - 'priority' => 10, - ) - ) - ); - - /** - * Icons background color - */ - $wp_customize->add_setting( - 'oss_sharing_icons_bg', - array( - 'transport' => 'postMessage', - 'sanitize_callback' => 'oceanwp_sanitize_color', - ) - ); - - $wp_customize->add_control( - new OceanWP_Customizer_Color_Control( - $wp_customize, - 'oss_sharing_icons_bg', - array( - 'label' => esc_html__('Minimal Style: Background Color', 'ocean-social-sharing'), - 'section' => 'oss_sharing_section', - 'settings' => 'oss_sharing_icons_bg', - 'priority' => 10, - ) - ) - ); - - /** - * Icons color - */ - $wp_customize->add_setting( - 'oss_sharing_icons_color', - array( - 'transport' => 'postMessage', - 'sanitize_callback' => 'oceanwp_sanitize_color', - ) - ); - - $wp_customize->add_control( - new OceanWP_Customizer_Color_Control( - $wp_customize, - 'oss_sharing_icons_color', - array( - 'label' => esc_html__('Minimal Style: Color', 'ocean-social-sharing'), - 'section' => 'oss_sharing_section', - 'settings' => 'oss_sharing_icons_color', - 'priority' => 10, - ) - ) - ); + $path = $this->plugin_path . 'includes/'; + $options = ocean_customize_options('options', false, $path); + + foreach ( $options as $section_key => $section_options ) { + + $section_args = [ + 'title' => $section_options['title'], + 'priority' => $section_options['priority'] + ]; + + $wp_customize->add_section( + $section_key, + $section_args + ); + + OceanWP_Customizer_Init::register_options_recursive($wp_customize, $section_key, $section_options['options'] ); + } } diff --git a/readme.txt b/readme.txt index 2a07a9d..5612ff8 100644 --- a/readme.txt +++ b/readme.txt @@ -2,9 +2,9 @@ Contributors: oceanwp, apprimit, wpfleek Tags: social, social sharing, social share, share, oceanwp Requires at least: 5.6 -Tested up to: 6.4.2 +Tested up to: 6.5.2 Requires PHP: 7.2 -Stable tag: 2.0.6 +Stable tag: 2.0.7 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html From a35de6a188d0af2e3dd43b0fa412c58a7b3e3f0b Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Mon, 20 May 2024 16:13:18 +0530 Subject: [PATCH 02/21] version --- README.md | 2 +- ocean-social-sharing.php | 2 +- readme.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8113f42..d6e9536 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Contributors:** Nick **Requires at least:** WordPress 5.6 **Tested up to:** WordPress 6.5.3 -**Stable tag:** 2.0.7 +**Stable tag:** 2.0.8 **License:** GPLv2 or later **License URI:** https://www.gnu.org/licenses/gpl-2.0.html diff --git a/ocean-social-sharing.php b/ocean-social-sharing.php index fb7c748..0bce1c0 100644 --- a/ocean-social-sharing.php +++ b/ocean-social-sharing.php @@ -3,7 +3,7 @@ * Plugin Name: Ocean Social Sharing * Plugin URI: https://oceanwp.org/extension/ocean-social-sharing/ * Description: A simple plugin to add social share buttons to your posts. - * Version: 2.0.7 + * Version: 2.0.8 * Author: OceanWP * Author URI: https://oceanwp.org/ * Requires at least: 5.6 diff --git a/readme.txt b/readme.txt index e5e3f5e..35adf94 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: oceanwp, apprimit, wpfleek Tags: social, social sharing, social share, share, oceanwp Requires at least: 5.6 Tested up to: 6.5.3 -Requires PHP: 7.2 -Stable tag: 2.0.7 +Requires PHP: 7.4 +Stable tag: 2.0.8 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html From 8f5084779b18437f591966c5a58792e0609523a7 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Tue, 21 May 2024 14:59:59 +0530 Subject: [PATCH 03/21] bug fixes --- includes/options.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/options.php b/includes/options.php index 81fbd6a..a585ea2 100644 --- a/includes/options.php +++ b/includes/options.php @@ -210,7 +210,7 @@ ], 'preview' => 'queryWithType', 'css' => [ - '.entry-share ul li a' => 'border-radius' + '.entry-share ul li a' => ['border-radius'] ] ], From 7d1b5a535ac7fd53f11fa43f6c16d0c78d242d04 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Thu, 23 May 2024 07:38:24 +0530 Subject: [PATCH 04/21] sharing title character decode - 8407 --- changelog.txt | 3 +++ template/social-share.php | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index e85428a..642322f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ == Changelog == += 2.0.8 - XXX XX 2024 = +- Fixed: Special Character decode of title for X, LinkedIn and Reddit. + = 2.0.7 - MAY 20 2024 = - Updated: Compatibility: WordPress version number. diff --git a/template/social-share.php b/template/social-share.php index a3769e8..49319a0 100644 --- a/template/social-share.php +++ b/template/social-share.php @@ -97,7 +97,7 @@ $handle = str_replace( '@' , '' , trim( $handle ) ); ?>
  • - +
  • - +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + ', + '' + ); + ?> +
    +
    +
    + plugin_update_content(); + + } + + } + + /** + * Enqueue scripts + * + * @since 2.2.9 + */ + public function ms_plugin_update_message( $file, $plugin ) { + + if ( is_multisite() && version_compare( $plugin['Version'], $plugin['new_version'], '<') ) { + + $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); + + printf( + ' + %s + ', + $wp_list_table->get_column_count(), + $this->plugin_update_content() + ); + } + + } + + /** + * Script + */ + public function plugin_update_asset() { + $screen = get_current_screen(); + + if ( 'plugins' === $screen->id ) { + wp_enqueue_style( + 'oss-plugin-update', + plugins_url( '/assets/css/pluginUpdateMessage.min.css', __DIR__ ), + array(), + OSS_VERSION + ); + } + } + + } + +endif; + +new OSS_Plugin_Update_Message(); diff --git a/ocean-social-sharing.php b/ocean-social-sharing.php index 9bff017..e20c7e9 100644 --- a/ocean-social-sharing.php +++ b/ocean-social-sharing.php @@ -3,7 +3,7 @@ * Plugin Name: Ocean Social Sharing * Plugin URI: https://oceanwp.org/extension/ocean-social-sharing/ * Description: A simple plugin to add social share buttons to your posts. - * Version: 2.0.7 + * Version: 2.0.6 * Author: OceanWP * Author URI: https://oceanwp.org/ * Requires at least: 5.6 @@ -121,6 +121,8 @@ public function __construct( $widget_areas = array() ) $this->plugin_data = get_file_data( __FILE__, array( 'Version' => 'Version' ), false ); $this->version = $this->plugin_data['Version']; + define( 'OSS_VERSION', $this->version ); + register_activation_hook(__FILE__, array( $this, 'install' )); add_action('init', array( $this, 'oss_load_plugin_textdomain' )); @@ -232,11 +234,18 @@ public function oss_setup() include_once $this->plugin_path . '/includes/helpers.php'; add_action('customize_register', array( $this, 'customizer_register' )); add_action('customize_preview_init', array( $this, 'customize_preview_js' )); + add_filter( 'ocean_customize_options_data', array( $this, 'local_customize_options') ); add_action('wp_enqueue_scripts', array( $this, 'get_scripts' ), 999); add_action('ocean_before_single_post_content', array( $this, 'before_content' )); add_action('ocean_social_share', array( $this, 'after_content' )); add_filter('ocean_head_css', array( $this, 'head_css' )); add_filter( 'oe_theme_panels', array( $this, 'oe_theme_panels' ) ); + + $theme_version = $theme['version']; + + // if ( $theme_version <= '3.6.0' && ! class_exists( 'Ocean_Extra' ) ) { + // include_once $this->plugin_path . '/includes/update-message.php'; + // } } } @@ -278,6 +287,18 @@ public function customizer_register( $wp_customize ) } + /** + * Added localize in customizer js + */ + public function local_customize_options($options) { + $path = $this->plugin_path . 'includes/'; + $optiondata = ocean_customize_options('options', false, $path); + + $options['ocean-social-sharing'] = $optiondata; + + return $options; + } + /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. * diff --git a/readme.txt b/readme.txt index 5612ff8..e8daf14 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: social, social sharing, social share, share, oceanwp Requires at least: 5.6 Tested up to: 6.5.2 Requires PHP: 7.2 -Stable tag: 2.0.7 +Stable tag: 2.0.6 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html From db7854d17bfd18175678a25315d50ac9999534e2 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Mon, 17 Jun 2024 13:31:54 +0530 Subject: [PATCH 08/21] live preview --- includes/helpers.php | 4 ++++ includes/options.php | 15 +++++++++++---- ocean-social-sharing.php | 41 ++++++---------------------------------- 3 files changed, 21 insertions(+), 39 deletions(-) diff --git a/includes/helpers.php b/includes/helpers.php index 39fc22f..26f59f3 100644 --- a/includes/helpers.php +++ b/includes/helpers.php @@ -30,6 +30,10 @@ function oss_social_share_sites() { // Get socials from Customizer $socials = get_theme_mod( 'oss_social_share_sites', $socials ); + if (is_string($socials)) { + $socials = json_decode($socials, true); + } + // Turn into array if string if ( $socials && ! is_array( $socials ) ) { $socials = explode( ',', $socials ); diff --git a/includes/options.php b/includes/options.php index 4f21566..88b7897 100644 --- a/includes/options.php +++ b/includes/options.php @@ -9,8 +9,12 @@ exit; } -$options = [ - 'ocean_social_sharing_settings' => [ +/** + * Customizer Options + */ +function oss_customizer_options() { + + $options = [ 'title' => __( 'Social Sharing', 'ocean-social-sharing' ), 'priority' => 13, 'options' => [ @@ -304,5 +308,8 @@ ] ], ] - ] -]; + ]; + + return apply_filters( 'oss_customizer_options', $options ); + +} diff --git a/ocean-social-sharing.php b/ocean-social-sharing.php index e20c7e9..6aed0c2 100644 --- a/ocean-social-sharing.php +++ b/ocean-social-sharing.php @@ -232,9 +232,9 @@ public function oss_setup() if ('OceanWP' == $theme->name || 'oceanwp' == $theme->template ) { include_once $this->plugin_path . '/includes/helpers.php'; - add_action('customize_register', array( $this, 'customizer_register' )); + //add_action('customize_register', array( $this, 'customizer_register' )); add_action('customize_preview_init', array( $this, 'customize_preview_js' )); - add_filter( 'ocean_customize_options_data', array( $this, 'local_customize_options') ); + add_filter( 'ocean_customize_options_data', array( $this, 'register_customize_options') ); add_action('wp_enqueue_scripts', array( $this, 'get_scripts' ), 999); add_action('ocean_before_single_post_content', array( $this, 'before_content' )); add_action('ocean_social_share', array( $this, 'after_content' )); @@ -250,13 +250,9 @@ public function oss_setup() } /** - * Customizer Controls and settings - * - * @param WP_Customize_Manager $wp_customize Theme Customizer object. - * @since 1.0.0 + * Register customizer options */ - public function customizer_register( $wp_customize ) - { + public function register_customize_options($options) { if ( OCEAN_EXTRA_ACTIVE && class_exists( 'Ocean_Extra_Theme_Panel' ) ) { @@ -267,34 +263,9 @@ public function customizer_register( $wp_customize ) } - $path = $this->plugin_path . 'includes/'; - $options = ocean_customize_options('options', false, $path); - - foreach ( $options as $section_key => $section_options ) { - - $section_args = [ - 'title' => $section_options['title'], - 'priority' => $section_options['priority'] - ]; - - $wp_customize->add_section( - $section_key, - $section_args - ); - - OceanWP_Customizer_Init::register_options_recursive($wp_customize, $section_key, $section_options['options'] ); - } - - } - - /** - * Added localize in customizer js - */ - public function local_customize_options($options) { - $path = $this->plugin_path . 'includes/'; - $optiondata = ocean_customize_options('options', false, $path); + include_once $this->plugin_path . '/includes/options.php'; - $options['ocean-social-sharing'] = $optiondata; + $options['ocean_social_sharing_settings'] = oss_customizer_options(); return $options; } From d862e47216e50ba44d532de5102f1b14e4aeea11 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Wed, 19 Jun 2024 18:11:17 +0530 Subject: [PATCH 09/21] code refactor --- ocean-social-sharing.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocean-social-sharing.php b/ocean-social-sharing.php index 6aed0c2..e73b293 100644 --- a/ocean-social-sharing.php +++ b/ocean-social-sharing.php @@ -258,7 +258,7 @@ public function register_customize_options($options) { && class_exists( 'Ocean_Extra_Theme_Panel' ) ) { if ( empty( Ocean_Extra_Theme_Panel::get_setting( 'ocean_social_sharing_panel' ) ) ) { - return false; + return $options; } } From f245c53016aecd8a4d34d84147f49ff0173a4134 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Thu, 27 Jun 2024 11:52:49 +0530 Subject: [PATCH 10/21] minor change --- includes/options.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/options.php b/includes/options.php index 88b7897..a008f65 100644 --- a/includes/options.php +++ b/includes/options.php @@ -98,7 +98,7 @@ function oss_customizer_options() { 'before' => esc_html__('Before the Content', 'ocean-social-sharing'), 'after' => esc_html__('After the Content', 'ocean-social-sharing'), 'both' => esc_html__('Before and After the Content', 'ocean-social-sharing'), - 'none' => esc_html__('No Buttons in the Content', 'ocean-social-sharing'), + 'none' => esc_html__('Disabled', 'ocean-social-sharing'), ] ], From 86b4aa836a6420bbb1a27c7f2d6f7220db93283d Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Wed, 3 Jul 2024 17:47:58 +0530 Subject: [PATCH 11/21] section restructure and bugs fixing --- includes/options.php | 108 +++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 50 deletions(-) diff --git a/includes/options.php b/includes/options.php index a008f65..b76359a 100644 --- a/includes/options.php +++ b/includes/options.php @@ -16,43 +16,8 @@ function oss_customizer_options() { $options = [ 'title' => __( 'Social Sharing', 'ocean-social-sharing' ), - 'priority' => 13, + 'priority' => 6, 'options' => [ - 'oss_top_quick_links' => [ - 'type' => 'ocean-links', - 'label' => esc_html__( 'Quick Menu', 'ocean-social-sharing' ), - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'priority' => 10, - 'class' => 'top-quick-links', - 'linkIcon' => 'link-2', - 'titleIcon' => 'three-dot-menu', - 'active_callback' => 'ocean_is_oe_active', - 'links' => [ - 'website_layout' => [ - 'label' => esc_html__('Website Layout', 'ocean-social-sharing'), - 'url' => '#' - ], - 'scroll_top' => [ - 'label' => esc_html__('Scroll To Top', 'ocean-social-sharing'), - 'url' => '#' - ], - 'pagination' => [ - 'label' => esc_html__('Pagination', 'ocean-social-sharing'), - 'url' => '#' - ] - ] - ], - - 'oss_divider_after_top_quick_links' => [ - 'type' => 'ocean-divider', - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'priority' => 10, - 'top' => 10, - 'bottom' => 10 - ], - 'oss_social_share_sites' => [ 'label' => esc_html__( 'Sharing Buttons', 'ocean-social-sharing' ), 'type' => 'ocean-sortable', @@ -84,6 +49,37 @@ function oss_customizer_options() { 'bottom' => 1 ], + 'oss_social_share_name' => [ + 'type' => 'ocean-switch', + 'label' => esc_html__('Display Social Name', 'ocean-social-sharing'), + 'section' => 'ocean_social_sharing_settings', + 'default' => false, + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'sanitize_callback' => 'oceanwp_sanitize_checkbox', + ], + + 'oss_divider_after_social_share_name' => [ + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'top' => 10, + 'bottom' => 10 + ], + + 'oss_social_share_twitter_handle' => [ + 'label' => esc_html__( 'Twitter Username', 'ocean-social-sharing' ), + 'type' => 'ocean-text', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'default' => '', + 'priority' => 10, + 'hideLabel' => false, + 'sanitize_callback' => 'wp_filter_nohtml_kses' + ], + 'oss_social_share_position' => [ 'type' => 'ocean-select', 'label' => esc_html__('Position', 'ocean-social-sharing' ), @@ -102,15 +98,13 @@ function oss_customizer_options() { ] ], - 'oss_social_share_name' => [ - 'type' => 'ocean-switch', - 'label' => esc_html__('Add Social Name', 'ocean-social-sharing'), + 'oss_divider_after_social_share_position' => [ + 'type' => 'ocean-divider', 'section' => 'ocean_social_sharing_settings', - 'default' => false, 'transport' => 'postMessage', 'priority' => 10, - 'hideLabel' => false, - 'sanitize_callback' => 'oceanwp_sanitize_checkbox', + 'top' => 10, + 'bottom' => 10 ], 'oss_social_share_heading' => [ @@ -149,20 +143,18 @@ function oss_customizer_options() { ] ], - 'oss_social_share_twitter_handle' => [ - 'label' => esc_html__( 'Twitter Username', 'ocean-social-sharing' ), - 'type' => 'ocean-text', - 'section' => 'ocean_social_sharing_settings', + 'oss_divider_after_social_share_heading_position' => [ + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'default' => '', 'priority' => 10, - 'hideLabel' => false, - 'sanitize_callback' => 'wp_filter_nohtml_kses' + 'top' => 10, + 'bottom' => 10 ], 'oss_social_share_style' => [ 'type' => 'ocean-select', - 'label' => esc_html__('Style', 'ocean-social-sharing' ), + 'label' => esc_html__('Social Buttons Style', 'ocean-social-sharing' ), 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', 'default' => 'minimal', @@ -307,6 +299,22 @@ function oss_customizer_options() { ] ] ], + + 'oss_sharing_divider_for_need_help_link' => [ + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + ], + + 'oss_sharing_need_help_link' => [ + 'type' => 'ocean-content', + 'isContent' => sprintf( esc_html__( '%1$s Need Help? %2$s', 'oceanwp' ), '', '' ), + 'class' => 'need-help', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + ] ] ]; From b7eb8550ac2d99a399ac3e567ce000af96de4de1 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Fri, 5 Jul 2024 10:43:13 +0530 Subject: [PATCH 12/21] code refactor --- includes/options.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/options.php b/includes/options.php index b76359a..7819a0a 100644 --- a/includes/options.php +++ b/includes/options.php @@ -309,7 +309,7 @@ function oss_customizer_options() { 'oss_sharing_need_help_link' => [ 'type' => 'ocean-content', - 'isContent' => sprintf( esc_html__( '%1$s Need Help? %2$s', 'oceanwp' ), '', '' ), + 'isContent' => ocean_render_content_need_help(), 'class' => 'need-help', 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', From e79f5f30b975c49c231eca50961638ce63340646 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Thu, 11 Jul 2024 13:14:36 +0530 Subject: [PATCH 13/21] section restructure --- includes/options.php | 56 +++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/includes/options.php b/includes/options.php index 7819a0a..88e82ca 100644 --- a/includes/options.php +++ b/includes/options.php @@ -49,6 +49,33 @@ function oss_customizer_options() { 'bottom' => 1 ], + 'oss_social_share_position' => [ + 'type' => 'ocean-select', + 'label' => esc_html__('Position', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'refresh', + 'default' => 'after', + 'priority' => 10, + 'hideLabel' => false, + 'multiple' => false, + 'sanitize_callback' => 'sanitize_key', + 'choices' => [ + 'before' => esc_html__('Before the Content', 'ocean-social-sharing'), + 'after' => esc_html__('After the Content', 'ocean-social-sharing'), + 'both' => esc_html__('Before and After the Content', 'ocean-social-sharing'), + 'none' => esc_html__('Disabled', 'ocean-social-sharing'), + ] + ], + + 'oss_divider_after_social_share_position' => [ + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'top' => 1, + 'bottom' => 1 + ], + 'oss_social_share_name' => [ 'type' => 'ocean-switch', 'label' => esc_html__('Display Social Name', 'ocean-social-sharing'), @@ -65,7 +92,7 @@ function oss_customizer_options() { 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', 'priority' => 10, - 'top' => 10, + 'top' => 1, 'bottom' => 10 ], @@ -80,25 +107,7 @@ function oss_customizer_options() { 'sanitize_callback' => 'wp_filter_nohtml_kses' ], - 'oss_social_share_position' => [ - 'type' => 'ocean-select', - 'label' => esc_html__('Position', 'ocean-social-sharing' ), - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'refresh', - 'default' => 'after', - 'priority' => 10, - 'hideLabel' => false, - 'multiple' => false, - 'sanitize_callback' => 'sanitize_key', - 'choices' => [ - 'before' => esc_html__('Before the Content', 'ocean-social-sharing'), - 'after' => esc_html__('After the Content', 'ocean-social-sharing'), - 'both' => esc_html__('Before and After the Content', 'ocean-social-sharing'), - 'none' => esc_html__('Disabled', 'ocean-social-sharing'), - ] - ], - - 'oss_divider_after_social_share_position' => [ + 'oss_divider_after_social_share_twitter_handle' => [ 'type' => 'ocean-divider', 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', @@ -300,13 +309,6 @@ function oss_customizer_options() { ] ], - 'oss_sharing_divider_for_need_help_link' => [ - 'type' => 'ocean-divider', - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'priority' => 10, - ], - 'oss_sharing_need_help_link' => [ 'type' => 'ocean-content', 'isContent' => ocean_render_content_need_help(), From d881350821a5f92e700e4cbbcd73cf40651a1b1d Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Tue, 23 Jul 2024 10:14:06 +0530 Subject: [PATCH 14/21] sections reorder --- includes/options.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/options.php b/includes/options.php index 88e82ca..ad0b201 100644 --- a/includes/options.php +++ b/includes/options.php @@ -16,7 +16,7 @@ function oss_customizer_options() { $options = [ 'title' => __( 'Social Sharing', 'ocean-social-sharing' ), - 'priority' => 6, + 'priority' => 15, 'options' => [ 'oss_social_share_sites' => [ 'label' => esc_html__( 'Sharing Buttons', 'ocean-social-sharing' ), From 594af76f271fb84bdf1864159fe8434229a544e1 Mon Sep 17 00:00:00 2001 From: markhollo Date: Fri, 30 Aug 2024 09:15:52 +0200 Subject: [PATCH 15/21] label changes / help link --- includes/options.php | 324 +++++++++++++++++++++---------------------- 1 file changed, 162 insertions(+), 162 deletions(-) diff --git a/includes/options.php b/includes/options.php index ad0b201..9176047 100644 --- a/includes/options.php +++ b/includes/options.php @@ -1,6 +1,6 @@ __( 'Social Sharing', 'ocean-social-sharing' ), + 'title' => __( 'Social Sharing', 'ocean-social-sharing' ), 'priority' => 15, - 'options' => [ + 'options' => [ 'oss_social_share_sites' => [ - 'label' => esc_html__( 'Sharing Buttons', 'ocean-social-sharing' ), - 'type' => 'ocean-sortable', - 'section' => 'ocean_social_sharing_settings', + 'label' => esc_html__( 'Sharing Buttons', 'ocean-social-sharing' ), + 'type' => 'ocean-sortable', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'refresh', - 'priority' => 10, - 'default' => ['twitter', 'facebook', 'pinterest', 'linkedin', 'viber', 'vk', 'reddit', 'tumblr', 'viadeo', 'whatsapp'], + 'priority' => 10, + 'default' => ['twitter', 'facebook', 'pinterest', 'linkedin', 'viber', 'vk', 'reddit', 'tumblr', 'viadeo', 'whatsapp'], 'hideLabel' => false, - 'choices' => [ - 'twitter' => 'Twitter', + 'choices' => [ + 'twitter' => 'X (ex Twitter)', 'facebook' => 'Facebook', 'pinterest' => 'Pinterest', 'linkedin' => 'LinkedIn', @@ -41,25 +41,25 @@ function oss_customizer_options() { ], 'oss_divider_after_social_share_sites' => [ - 'type' => 'ocean-divider', - 'section' => 'ocean_social_sharing_settings', + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'priority' => 10, - 'top' => 1, - 'bottom' => 1 + 'priority' => 10, + 'top' => 1, + 'bottom' => 1, ], 'oss_social_share_position' => [ - 'type' => 'ocean-select', - 'label' => esc_html__('Position', 'ocean-social-sharing' ), - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'refresh', - 'default' => 'after', - 'priority' => 10, - 'hideLabel' => false, - 'multiple' => false, + 'type' => 'ocean-select', + 'label' => esc_html__('Position', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'refresh', + 'default' => 'after', + 'priority' => 10, + 'hideLabel' => false, + 'multiple' => false, 'sanitize_callback' => 'sanitize_key', - 'choices' => [ + 'choices' => [ 'before' => esc_html__('Before the Content', 'ocean-social-sharing'), 'after' => esc_html__('After the Content', 'ocean-social-sharing'), 'both' => esc_html__('Before and After the Content', 'ocean-social-sharing'), @@ -68,84 +68,84 @@ function oss_customizer_options() { ], 'oss_divider_after_social_share_position' => [ - 'type' => 'ocean-divider', - 'section' => 'ocean_social_sharing_settings', + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'priority' => 10, - 'top' => 1, - 'bottom' => 1 + 'priority' => 10, + 'top' => 1, + 'bottom' => 1, ], 'oss_social_share_name' => [ - 'type' => 'ocean-switch', - 'label' => esc_html__('Display Social Name', 'ocean-social-sharing'), - 'section' => 'ocean_social_sharing_settings', - 'default' => false, - 'transport' => 'postMessage', - 'priority' => 10, - 'hideLabel' => false, + 'type' => 'ocean-switch', + 'label' => esc_html__('Display Social Name', 'ocean-social-sharing'), + 'section' => 'ocean_social_sharing_settings', + 'default' => false, + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, 'sanitize_callback' => 'oceanwp_sanitize_checkbox', ], 'oss_divider_after_social_share_name' => [ - 'type' => 'ocean-divider', - 'section' => 'ocean_social_sharing_settings', + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'priority' => 10, - 'top' => 1, - 'bottom' => 10 + 'priority' => 10, + 'top' => 1, + 'bottom' => 10, ], 'oss_social_share_twitter_handle' => [ - 'label' => esc_html__( 'Twitter Username', 'ocean-social-sharing' ), - 'type' => 'ocean-text', - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'default' => '', - 'priority' => 10, - 'hideLabel' => false, + 'label' => esc_html__( 'X (ex Twitter) Username', 'ocean-social-sharing' ), + 'type' => 'ocean-text', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'default' => '', + 'priority' => 10, + 'hideLabel' => false, 'sanitize_callback' => 'wp_filter_nohtml_kses' ], 'oss_divider_after_social_share_twitter_handle' => [ - 'type' => 'ocean-divider', - 'section' => 'ocean_social_sharing_settings', + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'priority' => 10, - 'top' => 10, - 'bottom' => 10 + 'priority' => 10, + 'top' => 10, + 'bottom' => 10, ], 'oss_social_share_heading' => [ - 'label' => esc_html__( 'Sharing Heading', 'ocean-social-sharing' ), - 'type' => 'ocean-text', - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'default' => esc_html__('Please Share This', 'ocean-social-sharing'), - 'priority' => 10, - 'hideLabel' => false, + 'label' => esc_html__( 'Sharing Heading', 'ocean-social-sharing' ), + 'type' => 'ocean-text', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'default' => esc_html__('Please Share This', 'ocean-social-sharing'), + 'priority' => 10, + 'hideLabel' => false, 'sanitize_callback' => 'wp_kses_post' ], 'oss_social_share_heading_position' => [ - 'id' => 'oss_social_share_heading_position', - 'type' => 'ocean-buttons', - 'label' => esc_html__('Heading Position', 'ocean-social-sharing'), - 'section' => 'ocean_social_sharing_settings', - 'default' => 'side', - 'transport' => 'postMessage', - 'priority' => 10, - 'hideLabel' => false, - 'wrap' => false, + 'id' => 'oss_social_share_heading_position', + 'type' => 'ocean-buttons', + 'label' => esc_html__('Heading Position', 'ocean-social-sharing'), + 'section' => 'ocean_social_sharing_settings', + 'default' => 'side', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'wrap' => false, 'sanitize_callback' => 'sanitize_key', - 'choices' => [ + 'choices' => [ 'side' => [ - 'id' => 'side', + 'id' => 'side', 'label' => esc_html__('Side', 'ocean-social-sharing'), 'content' => esc_html__('Side', 'ocean-social-sharing'), ], 'top' => [ - 'id' => 'top', + 'id' => 'top', 'label' => esc_html__('Top', 'ocean-social-sharing'), 'content' => esc_html__('Top', 'ocean-social-sharing'), ] @@ -153,25 +153,25 @@ function oss_customizer_options() { ], 'oss_divider_after_social_share_heading_position' => [ - 'type' => 'ocean-divider', - 'section' => 'ocean_social_sharing_settings', + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'priority' => 10, - 'top' => 10, - 'bottom' => 10 + 'priority' => 10, + 'top' => 10, + 'bottom' => 10, ], 'oss_social_share_style' => [ - 'type' => 'ocean-select', - 'label' => esc_html__('Social Buttons Style', 'ocean-social-sharing' ), - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'default' => 'minimal', - 'priority' => 10, - 'hideLabel' => false, - 'multiple' => false, + 'type' => 'ocean-select', + 'label' => esc_html__('Social Buttons Style', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'default' => 'minimal', + 'priority' => 10, + 'hideLabel' => false, + 'multiple' => false, 'sanitize_callback' => 'sanitize_key', - 'choices' => [ + 'choices' => [ 'minimal' => esc_html__('Minimal', 'ocean-social-sharing'), 'colored' => esc_html__('Colored', 'ocean-social-sharing'), 'dark' => esc_html__('Dark', 'ocean-social-sharing'), @@ -179,79 +179,79 @@ function oss_customizer_options() { ], 'oss_divider_after_social_share_style_setting' => [ - 'type' => 'ocean-divider', - 'section' => 'ocean_social_sharing_settings', + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'priority' => 10, - 'top' => 10, - 'bottom' => 10 + 'priority' => 10, + 'top' => 10, + 'bottom' => 10, ], 'oss_social_share_style_border_radius' => [ - 'id' => 'oss_social_share_style_border_radius', - 'label' => esc_html__( 'Border Radius', 'ocean-social-sharing' ), - 'type' => 'ocean-range-slider', - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'priority' => 10, - 'hideLabel' => false, - 'isUnit' => true, - 'isResponsive' => false, - 'min' => 1, - 'max' => 100, - 'step' => 1, + 'id' => 'oss_social_share_style_border_radius', + 'label' => esc_html__( 'Border Radius', 'ocean-social-sharing' ), + 'type' => 'ocean-range-slider', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'isUnit' => true, + 'isResponsive' => false, + 'min' => 1, + 'max' => 100, + 'step' => 1, 'sanitize_callback' => 'oceanwp_sanitize_number_blank', - 'setting_args' => [ + 'setting_args' => [ 'desktop' => [ - 'id' => 'oss_social_share_style_border_radius', + 'id' => 'oss_social_share_style_border_radius', 'label' => esc_html__( 'Desktop', 'ocean-social-sharing' ), - 'attr' => [ + 'attr' => [ 'transport' => 'postMessage', ], ], 'unit' => [ - 'id' => 'oss_social_share_style_border_radius_unit', + 'id' => 'oss_social_share_style_border_radius_unit', 'label' => esc_html__( 'Unit', 'ocean-social-sharing' ), - 'attr' => [ + 'attr' => [ 'transport' => 'postMessage', - 'default' => 'px', + 'default' => 'px', ], ], ], 'preview' => 'queryWithType', - 'css' => [ + 'css' => [ '.entry-share ul li a' => ['border-radius'] ] ], 'oss_divider_after_style_border_radius_setting' => [ - 'type' => 'ocean-divider', - 'section' => 'ocean_social_sharing_settings', + 'type' => 'ocean-divider', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'priority' => 10, - 'top' => 1, - 'bottom' => 10 + 'priority' => 10, + 'top' => 1, + 'bottom' => 10, ], 'oss_sharing_borders_color' => [ - 'type' => 'ocean-color', - 'label' => esc_html__( 'Minimal Style Borders', 'ocean-social-sharing' ), - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'priority' => 10, - 'hideLabel' => false, - 'showAlpha' => true, - 'showPalette' => true, + 'type' => 'ocean-color', + 'label' => esc_html__( 'Minimal Style Borders', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'showAlpha' => true, + 'showPalette' => true, 'sanitize_callback' => 'wp_kses_post', - 'setting_args' => [ + 'setting_args' => [ 'normal' => [ - 'id' => 'oss_sharing_borders_color', - 'key' => 'normal', - 'label' => esc_html__( 'Select Color', 'ocean-social-sharing' ), + 'id' => 'oss_sharing_borders_color', + 'key' => 'normal', + 'label' => esc_html__( 'Select Color', 'ocean-social-sharing' ), 'selector' => [ - '.entry-share.minimal ul li a' => 'border-color' + '.entry-share.minimal ul li a' => 'border-color', ], - 'attr' => [ + 'attr' => [ 'transport' => 'postMessage', ], ] @@ -259,24 +259,24 @@ function oss_customizer_options() { ], 'oss_sharing_icons_bg' => [ - 'type' => 'ocean-color', - 'label' => esc_html__( 'Minimal Style Background', 'ocean-social-sharing' ), - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'priority' => 10, - 'hideLabel' => false, - 'showAlpha' => true, - 'showPalette' => true, + 'type' => 'ocean-color', + 'label' => esc_html__( 'Minimal Style Background', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'showAlpha' => true, + 'showPalette' => true, 'sanitize_callback' => 'wp_kses_post', - 'setting_args' => [ + 'setting_args' => [ 'normal' => [ - 'id' => 'oss_sharing_icons_bg', - 'key' => 'normal', - 'label' => esc_html__( 'Select Color', 'ocean-social-sharing' ), + 'id' => 'oss_sharing_icons_bg', + 'key' => 'normal', + 'label' => esc_html__( 'Select Color', 'ocean-social-sharing' ), 'selector' => [ - '.entry-share.minimal ul li a' => 'background-color' + '.entry-share.minimal ul li a' => 'background-color', ], - 'attr' => [ + 'attr' => [ 'transport' => 'postMessage', ], ] @@ -284,25 +284,25 @@ function oss_customizer_options() { ], 'oss_sharing_icons_color' => [ - 'type' => 'ocean-color', - 'label' => esc_html__( 'Minimal Style Color', 'ocean-social-sharing' ), - 'section' => 'ocean_social_sharing_settings', - 'transport' => 'postMessage', - 'priority' => 10, - 'hideLabel' => false, - 'showAlpha' => true, - 'showPalette' => true, + 'type' => 'ocean-color', + 'label' => esc_html__( 'Minimal Style Color', 'ocean-social-sharing' ), + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + 'hideLabel' => false, + 'showAlpha' => true, + 'showPalette' => true, 'sanitize_callback' => 'wp_kses_post', - 'setting_args' => [ + 'setting_args' => [ 'normal' => [ - 'id' => 'oss_sharing_icons_color', - 'key' => 'normal', - 'label' => esc_html__( 'Select Color', 'ocean-social-sharing' ), + 'id' => 'oss_sharing_icons_color', + 'key' => 'normal', + 'label' => esc_html__( 'Select Color', 'ocean-social-sharing' ), 'selector' => [ '.entry-share.minimal ul li a' => 'color', - '.entry-share.minimal ul li a .oss-icon' => 'fill' + '.entry-share.minimal ul li a .oss-icon' => 'fill', ], - 'attr' => [ + 'attr' => [ 'transport' => 'postMessage', ], ] @@ -310,12 +310,12 @@ function oss_customizer_options() { ], 'oss_sharing_need_help_link' => [ - 'type' => 'ocean-content', - 'isContent' => ocean_render_content_need_help(), - 'class' => 'need-help', - 'section' => 'ocean_social_sharing_settings', + 'type' => 'ocean-content', + 'isContent' => sprintf( esc_html__( '%1$s Need Help? %2$s', 'oceanwp' ), '', '' ), + 'class' => 'need-help', + 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'priority' => 10, + 'priority' => 10, ] ] ]; From d518db4744da8c6ecd68665be9f6e8f5e4a5be0d Mon Sep 17 00:00:00 2001 From: markhollo Date: Fri, 30 Aug 2024 09:46:21 +0200 Subject: [PATCH 16/21] label changes --- includes/options.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/options.php b/includes/options.php index 9176047..074e328 100644 --- a/includes/options.php +++ b/includes/options.php @@ -189,7 +189,7 @@ function oss_customizer_options() { 'oss_social_share_style_border_radius' => [ 'id' => 'oss_social_share_style_border_radius', - 'label' => esc_html__( 'Border Radius', 'ocean-social-sharing' ), + 'label' => esc_html__( 'Buttons Border Radius', 'ocean-social-sharing' ), 'type' => 'ocean-range-slider', 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', @@ -285,7 +285,7 @@ function oss_customizer_options() { 'oss_sharing_icons_color' => [ 'type' => 'ocean-color', - 'label' => esc_html__( 'Minimal Style Color', 'ocean-social-sharing' ), + 'label' => esc_html__( 'Minimal Style Icon', 'ocean-social-sharing' ), 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', 'priority' => 10, From 3966374005dd2f8df456835b692a5aab6ce5342b Mon Sep 17 00:00:00 2001 From: markhollo Date: Fri, 30 Aug 2024 12:31:30 +0200 Subject: [PATCH 17/21] control spacing adjustments --- includes/options.php | 56 +++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/includes/options.php b/includes/options.php index 074e328..5358ffa 100644 --- a/includes/options.php +++ b/includes/options.php @@ -18,6 +18,13 @@ function oss_customizer_options() { 'title' => __( 'Social Sharing', 'ocean-social-sharing' ), 'priority' => 15, 'options' => [ + 'oss_spacer_before_sharing_options' => [ + 'type' => 'ocean-spacer', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + ], + 'oss_social_share_sites' => [ 'label' => esc_html__( 'Sharing Buttons', 'ocean-social-sharing' ), 'type' => 'ocean-sortable', @@ -45,13 +52,13 @@ function oss_customizer_options() { 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', 'priority' => 10, - 'top' => 1, - 'bottom' => 1, + 'top' => 20, + 'bottom' => 10, ], 'oss_social_share_position' => [ 'type' => 'ocean-select', - 'label' => esc_html__('Position', 'ocean-social-sharing' ), + 'label' => esc_html__( 'Position', 'ocean-social-sharing' ), 'section' => 'ocean_social_sharing_settings', 'transport' => 'refresh', 'default' => 'after', @@ -60,10 +67,10 @@ function oss_customizer_options() { 'multiple' => false, 'sanitize_callback' => 'sanitize_key', 'choices' => [ - 'before' => esc_html__('Before the Content', 'ocean-social-sharing'), - 'after' => esc_html__('After the Content', 'ocean-social-sharing'), - 'both' => esc_html__('Before and After the Content', 'ocean-social-sharing'), - 'none' => esc_html__('Disabled', 'ocean-social-sharing'), + 'before' => esc_html__( 'Before the Content', 'ocean-social-sharing' ), + 'after' => esc_html__( 'After the Content', 'ocean-social-sharing' ), + 'both' => esc_html__( 'Before and After the Content', 'ocean-social-sharing' ), + 'none' => esc_html__( 'Disabled', 'ocean-social-sharing' ), ] ], @@ -72,13 +79,13 @@ function oss_customizer_options() { 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', 'priority' => 10, - 'top' => 1, + 'top' => 10, 'bottom' => 1, ], 'oss_social_share_name' => [ 'type' => 'ocean-switch', - 'label' => esc_html__('Display Social Name', 'ocean-social-sharing'), + 'label' => esc_html__( 'Display Social Name', 'ocean-social-sharing' ), 'section' => 'ocean_social_sharing_settings', 'default' => false, 'transport' => 'postMessage', @@ -121,16 +128,23 @@ function oss_customizer_options() { 'type' => 'ocean-text', 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', - 'default' => esc_html__('Please Share This', 'ocean-social-sharing'), + 'default' => esc_html__( 'Please Share This', 'ocean-social-sharing' ), 'priority' => 10, 'hideLabel' => false, 'sanitize_callback' => 'wp_kses_post' ], + 'oss_spacer_before_heading_position' => [ + 'type' => 'ocean-spacer', + 'section' => 'ocean_social_sharing_settings', + 'transport' => 'postMessage', + 'priority' => 10, + ], + 'oss_social_share_heading_position' => [ 'id' => 'oss_social_share_heading_position', 'type' => 'ocean-buttons', - 'label' => esc_html__('Heading Position', 'ocean-social-sharing'), + 'label' => esc_html__( 'Heading Position', 'ocean-social-sharing' ), 'section' => 'ocean_social_sharing_settings', 'default' => 'side', 'transport' => 'postMessage', @@ -141,13 +155,13 @@ function oss_customizer_options() { 'choices' => [ 'side' => [ 'id' => 'side', - 'label' => esc_html__('Side', 'ocean-social-sharing'), - 'content' => esc_html__('Side', 'ocean-social-sharing'), + 'label' => esc_html__( 'Side', 'ocean-social-sharing' ), + 'content' => esc_html__( 'Side', 'ocean-social-sharing' ), ], 'top' => [ 'id' => 'top', - 'label' => esc_html__('Top', 'ocean-social-sharing'), - 'content' => esc_html__('Top', 'ocean-social-sharing'), + 'label' => esc_html__( 'Top', 'ocean-social-sharing' ), + 'content' => esc_html__( 'Top', 'ocean-social-sharing' ), ] ] ], @@ -157,13 +171,13 @@ function oss_customizer_options() { 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', 'priority' => 10, - 'top' => 10, + 'top' => 1, 'bottom' => 10, ], 'oss_social_share_style' => [ 'type' => 'ocean-select', - 'label' => esc_html__('Social Buttons Style', 'ocean-social-sharing' ), + 'label' => esc_html__( 'Social Buttons Style', 'ocean-social-sharing' ), 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', 'default' => 'minimal', @@ -172,9 +186,9 @@ function oss_customizer_options() { 'multiple' => false, 'sanitize_callback' => 'sanitize_key', 'choices' => [ - 'minimal' => esc_html__('Minimal', 'ocean-social-sharing'), - 'colored' => esc_html__('Colored', 'ocean-social-sharing'), - 'dark' => esc_html__('Dark', 'ocean-social-sharing'), + 'minimal' => esc_html__( 'Minimal', 'ocean-social-sharing' ), + 'colored' => esc_html__( 'Colored', 'ocean-social-sharing' ), + 'dark' => esc_html__( 'Dark', 'ocean-social-sharing' ), ] ], @@ -230,7 +244,7 @@ function oss_customizer_options() { 'transport' => 'postMessage', 'priority' => 10, 'top' => 1, - 'bottom' => 10, + 'bottom' => 25, ], 'oss_sharing_borders_color' => [ From b523b8a8306095a46627be0e90058218782a1708 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Fri, 20 Sep 2024 10:42:23 +0530 Subject: [PATCH 18/21] code refactor + version --- README.md | 6 +- languages/ocean-social-sharing.pot | 99 +++++++++++++++++------------- ocean-social-sharing.php | 4 +- readme.txt | 4 +- 4 files changed, 63 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index d6e9536..8d5548c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Ocean Social Sharing [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) -**Contributors:** Nick +**Contributors:** Nick, [Amit Singh](https://profiles.wordpress.org/apprimit/) **Requires at least:** WordPress 5.6 -**Tested up to:** WordPress 6.5.3 -**Stable tag:** 2.0.8 +**Tested up to:** WordPress 6.6.2 +**Stable tag:** 2.2.0 **License:** GPLv2 or later **License URI:** https://www.gnu.org/licenses/gpl-2.0.html diff --git a/languages/ocean-social-sharing.pot b/languages/ocean-social-sharing.pot index e4b3e1c..b382b41 100644 --- a/languages/ocean-social-sharing.pot +++ b/languages/ocean-social-sharing.pot @@ -2,133 +2,146 @@ # This file is distributed under the same license as the Ocean Social Sharing plugin. msgid "" msgstr "" -"Project-Id-Version: Ocean Social Sharing 2.0.7\n" +"Project-Id-Version: Ocean Social Sharing 2.2.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ocean-social-sharing\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-05-20T05:06:07+00:00\n" +"POT-Creation-Date: 2024-09-20T01:33:52+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.9.0\n" +"X-Generator: WP-CLI 2.10.0\n" "X-Domain: ocean-social-sharing\n" #. Plugin Name of the plugin +#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php msgid "Ocean Social Sharing" msgstr "" #. Plugin URI of the plugin +#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php msgid "https://oceanwp.org/extension/ocean-social-sharing/" msgstr "" #. Description of the plugin +#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php msgid "A simple plugin to add social share buttons to your posts." msgstr "" #. Author of the plugin +#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php msgid "OceanWP" msgstr "" #. Author URI of the plugin +#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php msgid "https://oceanwp.org/" msgstr "" -#: ocean-social-sharing.php:267 -#: ocean-social-sharing.php:753 +#: includes/options.php:18 +#: ocean-social-sharing.php:416 msgid "Social Sharing" msgstr "" -#: ocean-social-sharing.php:299 +#: includes/options.php:29 msgid "Sharing Buttons" msgstr "" -#: ocean-social-sharing.php:335 +#: includes/options.php:61 msgid "Position" msgstr "" -#: ocean-social-sharing.php:341 +#: includes/options.php:70 msgid "Before the Content" msgstr "" -#: ocean-social-sharing.php:342 +#: includes/options.php:71 msgid "After the Content" msgstr "" -#: ocean-social-sharing.php:343 -msgid "Before & After the Content" +#: includes/options.php:72 +msgid "Before and After the Content" msgstr "" -#: ocean-social-sharing.php:344 -msgid "No Buttons in the Content" +#: includes/options.php:73 +msgid "Disabled" msgstr "" -#: ocean-social-sharing.php:367 -msgid "Add Social Name" +#: includes/options.php:88 +msgid "Display Social Name" msgstr "" -#: ocean-social-sharing.php:382 -msgid "Please Share This" +#: includes/options.php:107 +msgid "X (ex Twitter) Username" msgstr "" -#: ocean-social-sharing.php:393 +#: includes/options.php:127 msgid "Sharing Heading" msgstr "" -#: ocean-social-sharing.php:419 +#: includes/options.php:131 +msgid "Please Share This" +msgstr "" + +#: includes/options.php:147 msgid "Heading Position" msgstr "" -#: ocean-social-sharing.php:425 +#: includes/options.php:158 +#: includes/options.php:159 msgid "Side" msgstr "" -#: ocean-social-sharing.php:426 +#: includes/options.php:163 +#: includes/options.php:164 msgid "Top" msgstr "" -#: ocean-social-sharing.php:448 -msgid "Twitter Username" +#: includes/options.php:180 +msgid "Social Buttons Style" msgstr "" -#: ocean-social-sharing.php:472 -msgid "Styling" +#: includes/options.php:189 +msgid "Minimal" msgstr "" -#: ocean-social-sharing.php:496 -msgid "Style" +#: includes/options.php:190 +msgid "Colored" msgstr "" -#: ocean-social-sharing.php:502 -msgid "Minimal" +#: includes/options.php:191 +msgid "Dark" msgstr "" -#: ocean-social-sharing.php:503 -msgid "Colored" +#: includes/options.php:206 +msgid "Buttons Border Radius" msgstr "" -#: ocean-social-sharing.php:504 -msgid "Dark" +#: includes/options.php:221 +msgid "Desktop" msgstr "" -#: ocean-social-sharing.php:526 -msgid "Border Radius" +#: includes/options.php:228 +msgid "Unit" msgstr "" -#: ocean-social-sharing.php:527 -msgid "Add a custom border radius. px - em - %." +#: includes/options.php:252 +msgid "Minimal Style Borders" msgstr "" -#: ocean-social-sharing.php:552 -msgid "Minimal Style: Borders Color" +#: includes/options.php:264 +#: includes/options.php:289 +#: includes/options.php:314 +msgid "Select Color" msgstr "" -#: ocean-social-sharing.php:576 -msgid "Minimal Style: Background Color" +#: includes/options.php:277 +msgid "Minimal Style Background" msgstr "" -#: ocean-social-sharing.php:600 -msgid "Minimal Style: Color" +#: includes/options.php:302 +msgid "Minimal Style Icon" msgstr "" #: template/social-share.php:69 diff --git a/ocean-social-sharing.php b/ocean-social-sharing.php index f265f17..013be5a 100644 --- a/ocean-social-sharing.php +++ b/ocean-social-sharing.php @@ -3,11 +3,11 @@ * Plugin Name: Ocean Social Sharing * Plugin URI: https://oceanwp.org/extension/ocean-social-sharing/ * Description: A simple plugin to add social share buttons to your posts. - * Version: 2.0.8 + * Version: 2.2.0 * Author: OceanWP * Author URI: https://oceanwp.org/ * Requires at least: 5.6 - * Tested up to: 6.5.3 + * Tested up to: 6.6.2 * * Text Domain: ocean-social-sharing * Domain Path: /languages diff --git a/readme.txt b/readme.txt index 35adf94..acf005a 100644 --- a/readme.txt +++ b/readme.txt @@ -2,9 +2,9 @@ Contributors: oceanwp, apprimit, wpfleek Tags: social, social sharing, social share, share, oceanwp Requires at least: 5.6 -Tested up to: 6.5.3 +Tested up to: 6.6.2 Requires PHP: 7.4 -Stable tag: 2.0.8 +Stable tag: 2.2.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html From 8c60c41e98e851a6e0b3afbd6fd17502ff545192 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Tue, 24 Sep 2024 12:25:18 +0530 Subject: [PATCH 19/21] sanitize callback --- includes/options.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/options.php b/includes/options.php index 5358ffa..9166804 100644 --- a/includes/options.php +++ b/includes/options.php @@ -33,6 +33,7 @@ function oss_customizer_options() { 'priority' => 10, 'default' => ['twitter', 'facebook', 'pinterest', 'linkedin', 'viber', 'vk', 'reddit', 'tumblr', 'viadeo', 'whatsapp'], 'hideLabel' => false, + 'sanitize_callback' => 'ocean_sanitize_sortable_control', 'choices' => [ 'twitter' => 'X (ex Twitter)', 'facebook' => 'Facebook', From e2c49ce3b0ea55d6b8db39ee0187792971acf309 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Mon, 14 Oct 2024 13:46:03 +0530 Subject: [PATCH 20/21] code cleanup --- Gruntfile.js | 8 +- assets/css/pluginUpdateMessage.css | 34 ------- assets/css/pluginUpdateMessage.min.css | 1 - assets/css/pluginUpdateMessage.scss | 30 ------ composer.lock | 130 ++++++++++++++--------- includes/options.php | 2 +- includes/update-message.php | 136 ------------------------- languages/ocean-social-sharing.pot | 70 +++++++------ ocean-social-sharing.php | 7 -- 9 files changed, 119 insertions(+), 299 deletions(-) delete mode 100644 assets/css/pluginUpdateMessage.css delete mode 100644 assets/css/pluginUpdateMessage.min.css delete mode 100644 assets/css/pluginUpdateMessage.scss delete mode 100644 includes/update-message.php diff --git a/Gruntfile.js b/Gruntfile.js index 2392d98..5d7b607 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -55,7 +55,6 @@ module.exports = function ( grunt ) { }, files: { 'assets/css/style.css': 'assets/css/style.scss', - 'assets/css/pluginUpdateMessage.css': 'assets/css/pluginUpdateMessage.scss', } }, prod: { @@ -64,9 +63,7 @@ module.exports = function ( grunt ) { outputStyle: 'compressed', sourceMap: false }, - files: { - 'assets/css/pluginUpdateMessage.min.css': 'assets/css/pluginUpdateMessage.scss', - } + files: {} } }, @@ -81,8 +78,6 @@ module.exports = function ( grunt ) { files: { 'assets/css/style.css': 'assets/css/style.css', 'assets/css/style.min.css': 'assets/css/style.min.css', - 'assets/css/pluginUpdateMessage.css': 'assets/css/pluginUpdateMessage.css', - 'assets/css/pluginUpdateMessage.min.css': 'assets/css/pluginUpdateMessage.min.css', } } }, @@ -95,7 +90,6 @@ module.exports = function ( grunt ) { main: { files: { 'assets/css/style.css': [ 'assets/css/style.css' ], - 'assets/css/pluginUpdateMessage.css': [ 'assets/css/pluginUpdateMessage.css' ], } } }, diff --git a/assets/css/pluginUpdateMessage.css b/assets/css/pluginUpdateMessage.css deleted file mode 100644 index 955533d..0000000 --- a/assets/css/pluginUpdateMessage.css +++ /dev/null @@ -1,34 +0,0 @@ -.owp-update-warning__separator { - margin: 15px -12px; - border: 1px solid #ffb900; -} - -.owp-update-warning { - display: -ms-flexbox; - display: flex; - -webkit-margin-after: 10px; - margin-block-end: 10px; - max-width: 980px; -} - -.owp-update-warning .warning-info-icon { - color: #f56e28; - -webkit-margin-start: 2px; - margin-inline-start: 2px; - -webkit-margin-end: 9px; - margin-inline-end: 9px; -} - -.owp-update-warning .warning-info-icon.green { - color: #00bb18; -} - -.owp-update-warning .warning__title { - font-weight: 600; - -webkit-margin-after: 10px; - margin-block-end: 10px; -} - -.owp-update-warning + p { - display: none; -} \ No newline at end of file diff --git a/assets/css/pluginUpdateMessage.min.css b/assets/css/pluginUpdateMessage.min.css deleted file mode 100644 index b886450..0000000 --- a/assets/css/pluginUpdateMessage.min.css +++ /dev/null @@ -1 +0,0 @@ -.owp-update-warning__separator{margin:15px -12px;border:1px solid #ffb900}.owp-update-warning{display:-ms-flexbox;display:flex;-webkit-margin-after:10px;margin-block-end:10px;max-width:980px}.owp-update-warning .warning-info-icon{color:#f56e28;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:9px;margin-inline-end:9px}.owp-update-warning .warning-info-icon.green{color:#00bb18}.owp-update-warning .warning__title{font-weight:600;-webkit-margin-after:10px;margin-block-end:10px}.owp-update-warning+p{display:none} \ No newline at end of file diff --git a/assets/css/pluginUpdateMessage.scss b/assets/css/pluginUpdateMessage.scss deleted file mode 100644 index 4c385b8..0000000 --- a/assets/css/pluginUpdateMessage.scss +++ /dev/null @@ -1,30 +0,0 @@ - -.owp-update-warning__separator { - margin: 15px -12px; - border: 1px solid #ffb900; -} - -.owp-update-warning { - display: flex; - margin-block-end: 10px; - max-width: 980px; -} - -.owp-update-warning .warning-info-icon { - color: #f56e28; - margin-inline-start: 2px; - margin-inline-end: 9px; -} - -.owp-update-warning .warning-info-icon.green { - color: #00bb18; -} - -.owp-update-warning .warning__title { - font-weight: 600; - margin-block-end: 10px; -} - -.owp-update-warning+p { - display: none; -} diff --git a/composer.lock b/composer.lock index 33b3863..2edb6a9 100644 --- a/composer.lock +++ b/composer.lock @@ -142,16 +142,16 @@ }, { "name": "gettext/gettext", - "version": "v4.8.11", + "version": "v4.8.12", "source": { "type": "git", "url": "https://github.com/php-gettext/Gettext.git", - "reference": "b632aaf5e4579d0b2ae8bc61785e238bff4c5156" + "reference": "11af89ee6c087db3cf09ce2111a150bca5c46e12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/b632aaf5e4579d0b2ae8bc61785e238bff4c5156", - "reference": "b632aaf5e4579d0b2ae8bc61785e238bff4c5156", + "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/11af89ee6c087db3cf09ce2111a150bca5c46e12", + "reference": "11af89ee6c087db3cf09ce2111a150bca5c46e12", "shasum": "" }, "require": { @@ -203,7 +203,7 @@ "support": { "email": "oom@oscarotero.com", "issues": "https://github.com/oscarotero/Gettext/issues", - "source": "https://github.com/php-gettext/Gettext/tree/v4.8.11" + "source": "https://github.com/php-gettext/Gettext/tree/v4.8.12" }, "funding": [ { @@ -219,7 +219,7 @@ "type": "patreon" } ], - "time": "2023-08-14T15:15:05+00:00" + "time": "2024-05-18T10:25:07+00:00" }, { "name": "gettext/languages", @@ -297,16 +297,16 @@ }, { "name": "mck89/peast", - "version": "v1.16.2", + "version": "v1.16.3", "source": { "type": "git", "url": "https://github.com/mck89/peast.git", - "reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe" + "reference": "645ec21b650bc2aced18285c85f220d22afc1430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mck89/peast/zipball/2791b08ffcc1862fe18eef85675da3aa58c406fe", - "reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe", + "url": "https://api.github.com/repos/mck89/peast/zipball/645ec21b650bc2aced18285c85f220d22afc1430", + "reference": "645ec21b650bc2aced18285c85f220d22afc1430", "shasum": "" }, "require": { @@ -319,7 +319,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16.2-dev" + "dev-master": "1.16.3-dev" } }, "autoload": { @@ -340,9 +340,9 @@ "description": "Peast is PHP library that generates AST for JavaScript code", "support": { "issues": "https://github.com/mck89/peast/issues", - "source": "https://github.com/mck89/peast/tree/v1.16.2" + "source": "https://github.com/mck89/peast/tree/v1.16.3" }, - "time": "2024-03-05T09:16:03+00:00" + "time": "2024-07-23T14:00:32+00:00" }, { "name": "mustache/mustache", @@ -519,28 +519,28 @@ }, { "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.3.2", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26" + "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", - "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/293975b465e0e709b571cbf0c957c6c0a7b9a2ac", + "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac", "shasum": "" }, "require": { "phpcompatibility/php-compatibility": "^9.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "paragonie/random_compat": "dev-master", "paragonie/sodium_compat": "dev-master" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, "type": "phpcodesniffer-standard", @@ -570,22 +570,37 @@ ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", + "security": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/security/policy", "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" }, - "time": "2022-10-25T01:46:02+00:00" + "funding": [ + { + "url": "https://github.com/PHPCompatibility", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-04-24T21:30:46+00:00" }, { "name": "phpcompatibility/phpcompatibility-wp", - "version": "2.1.4", + "version": "2.1.5", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", - "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5" + "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", - "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/01c1ff2704a58e46f0cb1ca9d06aee07b3589082", + "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082", "shasum": "" }, "require": { @@ -593,10 +608,10 @@ "phpcompatibility/phpcompatibility-paragonie": "^1.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7" + "dealerdirect/phpcodesniffer-composer-installer": "^1.0" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, "type": "phpcodesniffer-standard", @@ -625,22 +640,37 @@ ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", + "security": "https://github.com/PHPCompatibility/PHPCompatibilityWP/security/policy", "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" }, - "time": "2022-10-24T09:00:36+00:00" + "funding": [ + { + "url": "https://github.com/PHPCompatibility", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-04-24T21:37:59+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.1", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -707,20 +737,20 @@ "type": "open_collective" } ], - "time": "2024-03-31T21:03:09+00:00" + "time": "2024-09-18T10:38:58+00:00" }, { "name": "symfony/finder", - "version": "v6.4.0", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "11d736e97f116ac375a81f96e662911a34cd50ce" + "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/11d736e97f116ac375a81f96e662911a34cd50ce", - "reference": "11d736e97f116ac375a81f96e662911a34cd50ce", + "url": "https://api.github.com/repos/symfony/finder/zipball/d7eb6daf8cd7e9ac4976e9576b32042ef7253453", + "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453", "shasum": "" }, "require": { @@ -755,7 +785,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.0" + "source": "https://github.com/symfony/finder/tree/v6.4.11" }, "funding": [ { @@ -771,20 +801,20 @@ "type": "tidelift" } ], - "time": "2023-10-31T17:30:12+00:00" + "time": "2024-08-13T14:27:37+00:00" }, { "name": "wp-cli/i18n-command", - "version": "2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/wp-cli/i18n-command.git", - "reference": "7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1" + "reference": "53518a11f314119e320597c7a8274f11b1295bdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1", - "reference": "7538d684d4f06b0e10c8a0166ce4e6d9e1687aa1", + "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/53518a11f314119e320597c7a8274f11b1295bdc", + "reference": "53518a11f314119e320597c7a8274f11b1295bdc", "shasum": "" }, "require": { @@ -838,9 +868,9 @@ "homepage": "https://github.com/wp-cli/i18n-command", "support": { "issues": "https://github.com/wp-cli/i18n-command/issues", - "source": "https://github.com/wp-cli/i18n-command/tree/2.6.1" + "source": "https://github.com/wp-cli/i18n-command/tree/v2.6.2" }, - "time": "2024-02-28T11:27:34+00:00" + "time": "2024-07-03T12:50:00+00:00" }, { "name": "wp-cli/mustangostang-spyc", @@ -958,16 +988,16 @@ }, { "name": "wp-cli/wp-cli", - "version": "v2.10.0", + "version": "v2.11.0", "source": { "type": "git", "url": "https://github.com/wp-cli/wp-cli.git", - "reference": "a339dca576df73c31af4b4d8054efc2dab9a0685" + "reference": "53f0df112901fcf95099d0f501912a209429b6a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/a339dca576df73c31af4b4d8054efc2dab9a0685", - "reference": "a339dca576df73c31af4b4d8054efc2dab9a0685", + "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/53f0df112901fcf95099d0f501912a209429b6a9", + "reference": "53f0df112901fcf95099d0f501912a209429b6a9", "shasum": "" }, "require": { @@ -997,7 +1027,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.10.x-dev" + "dev-main": "2.11.x-dev" } }, "autoload": { @@ -1024,7 +1054,7 @@ "issues": "https://github.com/wp-cli/wp-cli/issues", "source": "https://github.com/wp-cli/wp-cli" }, - "time": "2024-02-08T16:52:43+00:00" + "time": "2024-08-08T03:04:55+00:00" }, { "name": "wp-coding-standards/wpcs", diff --git a/includes/options.php b/includes/options.php index 9166804..70c187a 100644 --- a/includes/options.php +++ b/includes/options.php @@ -326,7 +326,7 @@ function oss_customizer_options() { 'oss_sharing_need_help_link' => [ 'type' => 'ocean-content', - 'isContent' => sprintf( esc_html__( '%1$s Need Help? %2$s', 'oceanwp' ), '', '' ), + 'isContent' => sprintf( esc_html__( '%1$s Need Help? %2$s', 'ocean-social-sharing' ), '', '' ), 'class' => 'need-help', 'section' => 'ocean_social_sharing_settings', 'transport' => 'postMessage', diff --git a/includes/update-message.php b/includes/update-message.php deleted file mode 100644 index 9077fcb..0000000 --- a/includes/update-message.php +++ /dev/null @@ -1,136 +0,0 @@ - -
    -
    -
    - -
    -
    -
    - -
    -
    - ', - '' - ); - ?> -
    -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    - ', - '' - ); - ?> -
    -
    -
    - plugin_update_content(); - - } - - } - - /** - * Enqueue scripts - * - * @since 2.2.9 - */ - public function ms_plugin_update_message( $file, $plugin ) { - - if ( is_multisite() && version_compare( $plugin['Version'], $plugin['new_version'], '<') ) { - - $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); - - printf( - ' - %s - ', - $wp_list_table->get_column_count(), - $this->plugin_update_content() - ); - } - - } - - /** - * Script - */ - public function plugin_update_asset() { - $screen = get_current_screen(); - - if ( 'plugins' === $screen->id ) { - wp_enqueue_style( - 'oss-plugin-update', - plugins_url( '/assets/css/pluginUpdateMessage.min.css', __DIR__ ), - array(), - OSS_VERSION - ); - } - } - - } - -endif; - -new OSS_Plugin_Update_Message(); diff --git a/languages/ocean-social-sharing.pot b/languages/ocean-social-sharing.pot index b382b41..64826d5 100644 --- a/languages/ocean-social-sharing.pot +++ b/languages/ocean-social-sharing.pot @@ -9,38 +9,38 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-09-20T01:33:52+00:00\n" +"POT-Creation-Date: 2024-10-14T08:15:40+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.10.0\n" +"X-Generator: WP-CLI 2.11.0\n" "X-Domain: ocean-social-sharing\n" #. Plugin Name of the plugin -#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php +#: ocean-social-sharing.php msgid "Ocean Social Sharing" msgstr "" #. Plugin URI of the plugin -#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php +#: ocean-social-sharing.php msgid "https://oceanwp.org/extension/ocean-social-sharing/" msgstr "" #. Description of the plugin -#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php +#: ocean-social-sharing.php msgid "A simple plugin to add social share buttons to your posts." msgstr "" #. Author of the plugin -#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php +#: ocean-social-sharing.php msgid "OceanWP" msgstr "" #. Author URI of the plugin -#: C:/laragon/www/owp.ws/wp-content/plugins/ocean-social-sharing/ocean-social-sharing.php +#: ocean-social-sharing.php msgid "https://oceanwp.org/" msgstr "" #: includes/options.php:18 -#: ocean-social-sharing.php:416 +#: ocean-social-sharing.php:409 msgid "Social Sharing" msgstr "" @@ -48,102 +48,106 @@ msgstr "" msgid "Sharing Buttons" msgstr "" -#: includes/options.php:61 +#: includes/options.php:62 msgid "Position" msgstr "" -#: includes/options.php:70 +#: includes/options.php:71 msgid "Before the Content" msgstr "" -#: includes/options.php:71 +#: includes/options.php:72 msgid "After the Content" msgstr "" -#: includes/options.php:72 +#: includes/options.php:73 msgid "Before and After the Content" msgstr "" -#: includes/options.php:73 +#: includes/options.php:74 msgid "Disabled" msgstr "" -#: includes/options.php:88 +#: includes/options.php:89 msgid "Display Social Name" msgstr "" -#: includes/options.php:107 +#: includes/options.php:108 msgid "X (ex Twitter) Username" msgstr "" -#: includes/options.php:127 +#: includes/options.php:128 msgid "Sharing Heading" msgstr "" -#: includes/options.php:131 +#: includes/options.php:132 msgid "Please Share This" msgstr "" -#: includes/options.php:147 +#: includes/options.php:148 msgid "Heading Position" msgstr "" -#: includes/options.php:158 #: includes/options.php:159 +#: includes/options.php:160 msgid "Side" msgstr "" -#: includes/options.php:163 #: includes/options.php:164 +#: includes/options.php:165 msgid "Top" msgstr "" -#: includes/options.php:180 +#: includes/options.php:181 msgid "Social Buttons Style" msgstr "" -#: includes/options.php:189 +#: includes/options.php:190 msgid "Minimal" msgstr "" -#: includes/options.php:190 +#: includes/options.php:191 msgid "Colored" msgstr "" -#: includes/options.php:191 +#: includes/options.php:192 msgid "Dark" msgstr "" -#: includes/options.php:206 +#: includes/options.php:207 msgid "Buttons Border Radius" msgstr "" -#: includes/options.php:221 +#: includes/options.php:222 msgid "Desktop" msgstr "" -#: includes/options.php:228 +#: includes/options.php:229 msgid "Unit" msgstr "" -#: includes/options.php:252 +#: includes/options.php:253 msgid "Minimal Style Borders" msgstr "" -#: includes/options.php:264 -#: includes/options.php:289 -#: includes/options.php:314 +#: includes/options.php:265 +#: includes/options.php:290 +#: includes/options.php:315 msgid "Select Color" msgstr "" -#: includes/options.php:277 +#: includes/options.php:278 msgid "Minimal Style Background" msgstr "" -#: includes/options.php:302 +#: includes/options.php:303 msgid "Minimal Style Icon" msgstr "" +#: includes/options.php:329 +msgid "%1$s Need Help? %2$s" +msgstr "" + #: template/social-share.php:69 msgid "Share this content" msgstr "" diff --git a/ocean-social-sharing.php b/ocean-social-sharing.php index 013be5a..0bb53c2 100644 --- a/ocean-social-sharing.php +++ b/ocean-social-sharing.php @@ -232,7 +232,6 @@ public function oss_setup() if ('OceanWP' == $theme->name || 'oceanwp' == $theme->template ) { include_once $this->plugin_path . '/includes/helpers.php'; - //add_action('customize_register', array( $this, 'customizer_register' )); add_action('customize_preview_init', array( $this, 'customize_preview_js' )); add_filter( 'ocean_customize_options_data', array( $this, 'register_customize_options') ); add_action('wp_enqueue_scripts', array( $this, 'get_scripts' ), 999); @@ -240,12 +239,6 @@ public function oss_setup() add_action('ocean_social_share', array( $this, 'after_content' )); add_filter('ocean_head_css', array( $this, 'head_css' )); add_filter( 'oe_theme_panels', array( $this, 'oe_theme_panels' ) ); - - $theme_version = $theme['version']; - - // if ( $theme_version <= '3.6.0' && ! class_exists( 'Ocean_Extra' ) ) { - // include_once $this->plugin_path . '/includes/update-message.php'; - // } } } From 315999b8cdbfc83f7edb686ecc33ccd1543bb82d Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Wed, 16 Oct 2024 15:40:04 +0530 Subject: [PATCH 21/21] version + changelog --- README.md | 2 +- changelog.txt | 7 ++++- languages/ocean-social-sharing.pot | 43 ++++++++++++++++++++++++++++-- ocean-social-sharing.php | 2 +- readme.txt | 10 ++++++- 5 files changed, 58 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8d5548c..f46cdbb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Contributors:** Nick, [Amit Singh](https://profiles.wordpress.org/apprimit/) **Requires at least:** WordPress 5.6 -**Tested up to:** WordPress 6.6.2 +**Tested up to:** WordPress 6.6 **Stable tag:** 2.2.0 **License:** GPLv2 or later **License URI:** https://www.gnu.org/licenses/gpl-2.0.html diff --git a/changelog.txt b/changelog.txt index d71f304..b9683db 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,12 @@ == Changelog == -= 2.2.0 - XXX XX 2024 = += 2.2.0 - OCT 16 2024 = +- NEW: Customizer: Library upgraded to default WordPress ReactJS. +- NEW: Customizer: Customizer Controls. +- NEW: Customizer: User Interface. +- NEW: Customizer: Reorganized settings for improved user experience. - Fixed: Special Character decode of title for X, LinkedIn and Reddit. +- Removed: Customizer: Legacy PHP Controls. = 2.0.8 - OCT 11 2024 = - Added: Conditional checks for future updates. diff --git a/languages/ocean-social-sharing.pot b/languages/ocean-social-sharing.pot index 64826d5..2cfdcdf 100644 --- a/languages/ocean-social-sharing.pot +++ b/languages/ocean-social-sharing.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-10-14T08:15:40+00:00\n" +"POT-Creation-Date: 2024-10-16T09:42:27+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: ocean-social-sharing\n" @@ -31,6 +31,7 @@ msgstr "" #. Author of the plugin #: ocean-social-sharing.php +#: includes/update-message.php:85 msgid "OceanWP" msgstr "" @@ -40,7 +41,7 @@ msgid "https://oceanwp.org/" msgstr "" #: includes/options.php:18 -#: ocean-social-sharing.php:409 +#: ocean-social-sharing.php:432 msgid "Social Sharing" msgstr "" @@ -148,6 +149,44 @@ msgstr "" msgid "%1$s Need Help? %2$s" msgstr "" +#: includes/update-message.php:40 +msgid "Backup recommended before plugin update." +msgstr "" + +#. translators: %1$s Link open tag, %2$s: Link close tag. +#: includes/update-message.php:46 +msgid "The latest update introduces significant improvements and changes to various plugin features. For a smooth update process, it's crucial to %1$s backup your website beforehand %2$s and test the update in a staging or test environment if available." +msgstr "" + +#: includes/update-message.php:62 +msgid "What's new?" +msgstr "" + +#. translators: %1$s Link open tag, %2$s: Link close tag. +#: includes/update-message.php:68 +msgid "Revamped Customizer for enhanced experience! This update delivers a completely redesigned Customizer with a focus on improved user interface (UI), user experience (UX), and performance. Enjoy a faster and more intuitive way to personalize your website with a wider range of options at your fingertips. Learn %1$s how to properly update your websites and transition to OceanWP 4 %4$s, view %2$s OceanWP 4 New Customizer details %4$s or check out the %3$s OceanWP 4 Customizer documentation %4$s." +msgstr "" + +#: includes/update-message.php:81 +msgid "Items" +msgstr "" + +#: includes/update-message.php:82 +msgid "Required Version" +msgstr "" + +#: includes/update-message.php:86 +msgid "4.0.0" +msgstr "" + +#: includes/update-message.php:89 +msgid "Ocean Extra" +msgstr "" + +#: includes/update-message.php:90 +msgid "2.4.0" +msgstr "" + #: template/social-share.php:69 msgid "Share this content" msgstr "" diff --git a/ocean-social-sharing.php b/ocean-social-sharing.php index 3f5cb4a..fbbe9da 100644 --- a/ocean-social-sharing.php +++ b/ocean-social-sharing.php @@ -7,7 +7,7 @@ * Author: OceanWP * Author URI: https://oceanwp.org/ * Requires at least: 5.6 - * Tested up to: 6.6.2 + * Tested up to: 6.6 * * Text Domain: ocean-social-sharing * Domain Path: /languages diff --git a/readme.txt b/readme.txt index 4095b80..39d3445 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: oceanwp, apprimit, wpfleek Tags: social, social sharing, social share, share, oceanwp Requires at least: 5.6 -Tested up to: 6.6.2 +Tested up to: 6.6 Requires PHP: 7.4 Stable tag: 2.2.0 License: GPLv2 or later @@ -64,6 +64,14 @@ This plugin will only function with the [OceanWP](https://oceanwp.org/) theme. == Changelog == += 2.2.0 - OCT 16 2024 = +- NEW: Customizer: Library upgraded to default WordPress ReactJS. +- NEW: Customizer: Customizer Controls. +- NEW: Customizer: User Interface. +- NEW: Customizer: Reorganized settings for improved user experience. +- Fixed: Special Character decode of title for X, LinkedIn and Reddit. +- Removed: Customizer: Legacy PHP Controls. + = 2.0.8 - OCT 11 2024 = - Added: Conditional checks for future updates. - Updated: Compatibility: WordPress version number.