From 1ca1a92a7b8fc4df2365370fae151793d44c276f Mon Sep 17 00:00:00 2001 From: Scott Adrian Date: Thu, 14 Sep 2023 14:09:53 -0400 Subject: [PATCH] add color selector --- CHANGELOG.md | 4 +++ Helper/Config.php | 2 +- .../Config/Source/InlineColorSelect.php | 36 +++++++++++++++++++ composer.json | 2 +- etc/adminhtml/system.xml | 4 +++ etc/config.xml | 1 + registration.php | 2 +- 7 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 Model/System/Config/Source/InlineColorSelect.php diff --git a/CHANGELOG.md b/CHANGELOG.md index ab456d6..73ad328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.1.0 + +Addition of Inline Share Button color selection. + ## 1.0.0 Initial stable release. \ No newline at end of file diff --git a/Helper/Config.php b/Helper/Config.php index ec80ea2..eb759a6 100644 --- a/Helper/Config.php +++ b/Helper/Config.php @@ -138,7 +138,7 @@ public function getInlineButtonsLanguage(): string */ public function getInlineButtonsColor(): string { - return 'social'; + return $this->getConfigValue('sharethis_inline_sharebuttons/general/color', 'social'); } /** diff --git a/Model/System/Config/Source/InlineColorSelect.php b/Model/System/Config/Source/InlineColorSelect.php new file mode 100644 index 0000000..c593bea --- /dev/null +++ b/Model/System/Config/Source/InlineColorSelect.php @@ -0,0 +1,36 @@ + __('Social'), + self::WHITE => __('White'), + self::GRAY => __('Gray'), + self::BLACK => __('Black'), + ]; + } +} diff --git a/composer.json b/composer.json index 8f24925..e08fd81 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "sharethis/magento-sharethis-sharebuttons", "description": "ShareThis Share Buttons for Magento", "type": "magento2-module", - "version": "1.0.0", + "version": "1.1.0", "license": "proprietary", "authors": [ { diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 2ccc126..1cf4aa3 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -37,6 +37,10 @@ ShareThis\ShareButtons\Model\System\Config\Source\InlineAlignmentSelect + + + ShareThis\ShareButtons\Model\System\Config\Source\InlineColorSelect + ShareThis\ShareButtons\Model\System\Config\Source\LanguageSelect diff --git a/etc/config.xml b/etc/config.xml index b8370e3..245e423 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -7,6 +7,7 @@ center + social 0 1 small diff --git a/registration.php b/registration.php index 4415f9c..464c1dd 100644 --- a/registration.php +++ b/registration.php @@ -4,7 +4,7 @@ * @copyright Copyright (c) 2022 ShareThis (https://sharethis.com) * @license https://www.gnu.org/licenses/gpl-3.0.html * @package ShareThis_ShareButtons - * @version 1.0.0 + * @version 1.1.0 */ declare( strict_types=1 );