diff --git a/package-lock.json b/package-lock.json index a5db819..e8575a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "replace-social-services-icons", - "version": "0.1.1", + "version": "0.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "replace-social-services-icons", - "version": "0.1.1", + "version": "0.2.0", "devDependencies": { "@wordpress/scripts": "^24.6.0" }, diff --git a/package.json b/package.json index 5136a62..3934b3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "replace-social-services-icons", - "version": "0.1.1", + "version": "0.2.0", "author": "Evans Hunt", "description": "", "scripts": { diff --git a/replace-social-services-icons.php b/replace-social-services-icons.php index 1cf707c..2b72459 100644 --- a/replace-social-services-icons.php +++ b/replace-social-services-icons.php @@ -2,12 +2,12 @@ /** * Plugin Name: Replace Social Services Icons - * Version: 0.1.1 + * Version: 0.2.0 */ class Replace_Social_Services_Icons { - private static $version = '0.1.1'; + private static $version = '0.2.0'; private static function replace_icons(string $block_content, array $block, string $dir, $settings) { @@ -89,7 +89,10 @@ public static function render_block_hook(string $block_content, array $block) return $block_content; } - if ($block['blockName'] === 'core/social-link') { + if (in_array($block['blockName'], [ + 'core/social-link', + 'outermost/social-sharing-link', + ])) { return self::replace_icons($block_content, $block, $dir, $settings); } diff --git a/src/replace-icons.js b/src/replace-icons.js index 2be51d0..2a0669b 100644 --- a/src/replace-icons.js +++ b/src/replace-icons.js @@ -8,7 +8,11 @@ function replaceIcon(variations, serviceName, icon) { } function filterSocialLinkIcons(settings, name) { - if (name === 'core/social-link') { + if ([ + 'core/social-link', + 'outermost/social-sharing-link', + ].includes(name) + ) { const { variations } = settings; const services = themeData?.settings?.services; for (const service in services) {