From 608541a9a9cdb76a7ecd411b104662e2fb1e3072 Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Mon, 12 Feb 2024 19:56:15 +0800 Subject: [PATCH 01/10] button and caption can inherit theme styles --- plugin.php | 2 ++ src/block-components/button/index.js | 3 +- src/block/button/index.php | 35 ++++++++++++++++++++++ src/block/image/edit.js | 8 +++-- src/block/image/index.php | 32 ++++++++++++++++++++ src/editor-settings.php | 15 +++++++++- src/styles/block-design-system-blocks.scss | 4 +-- src/welcome/admin.js | 15 ++++++++++ 8 files changed, 107 insertions(+), 7 deletions(-) create mode 100644 src/block/button/index.php create mode 100644 src/block/image/index.php diff --git a/plugin.php b/plugin.php index b7292714c..4f48d53bb 100644 --- a/plugin.php +++ b/plugin.php @@ -212,10 +212,12 @@ function stackable_deactivation_cleanup() { if ( ! is_admin() ) { require_once( plugin_dir_path( __FILE__ ) . 'src/lightbox/index.php' ); require_once( plugin_dir_path( __FILE__ ) . 'src/block/accordion/index.php' ); + require_once( plugin_dir_path( __FILE__ ) . 'src/block/button/index.php' ); require_once( plugin_dir_path( __FILE__ ) . 'src/block/carousel/index.php' ); require_once( plugin_dir_path( __FILE__ ) . 'src/block/count-up/index.php' ); require_once( plugin_dir_path( __FILE__ ) . 'src/block/countdown/index.php' ); require_once( plugin_dir_path( __FILE__ ) . 'src/block/expand/index.php' ); + require_once( plugin_dir_path( __FILE__ ) . 'src/block/image/index.php' ); require_once( plugin_dir_path( __FILE__ ) . 'src/block/notification/index.php' ); require_once( plugin_dir_path( __FILE__ ) . 'src/block/video-popup/index.php' ); require_once( plugin_dir_path( __FILE__ ) . 'src/block/table-of-contents/index.php' ); diff --git a/src/block-components/button/index.js b/src/block-components/button/index.js index 561529d61..7ea886dde 100644 --- a/src/block-components/button/index.js +++ b/src/block-components/button/index.js @@ -3,6 +3,7 @@ */ import classnames from 'classnames' import { useBlockAttributesContext } from '~stackable/hooks' +import { settings } from 'stackable' /** * Internal dependencies @@ -33,7 +34,7 @@ export const Button = props => { return ( diff --git a/src/block/button/index.php b/src/block/button/index.php new file mode 100644 index 000000000..dfbf657f6 --- /dev/null +++ b/src/block/button/index.php @@ -0,0 +1,35 @@ +next_tag( 'a' ) ) { + $img_classname = $html_tag->get_attribute( 'class' ); + + if ( strpos( $img_classname, 'stk-button') !== false ) { + $html_tag->add_class( 'wp-element-button' ); + } + } + + return $html_tag->get_updated_html(); + } + + } + + add_filter( 'render_block_stackable/button', 'stackable_add_inherit_button_theme_class', 1, 2 ); +} + diff --git a/src/block/image/edit.js b/src/block/image/edit.js index 498da3647..43e8267c7 100644 --- a/src/block/image/edit.js +++ b/src/block/image/edit.js @@ -7,7 +7,9 @@ import BlockStyles from './style' * External dependencies */ import classnames from 'classnames' -import { version as VERSION, i18n } from 'stackable' +import { + version as VERSION, i18n, settings, +} from 'stackable' import { InspectorTabs, AlignButtonsControl } from '~stackable/components' import { useBlockContext } from '~stackable/hooks' import { @@ -55,8 +57,8 @@ const Edit = props => { const figcaptionClassnames = classnames( getTypographyClasses( props.attributes, 'figcaption%s' ), - 'stk-img-figcaption' - + 'stk-img-figcaption', + settings.stackable_inherit_styles_from_theme && 'wp-element-caption', ) const blockAlignmentClass = getAlignmentClasses( props.attributes ) diff --git a/src/block/image/index.php b/src/block/image/index.php new file mode 100644 index 000000000..5629a8cfc --- /dev/null +++ b/src/block/image/index.php @@ -0,0 +1,32 @@ +next_tag( 'figcaption' ) ) { + $img_classname = $html_tag->get_attribute( 'class' ); + + if ( strpos( $img_classname, 'stk-img-figcaption') !== false ) { + $html_tag->add_class( 'wp-element-caption' ); + } + } + + return $html_tag->get_updated_html(); + } + + } + + add_filter( 'render_block_stackable/image', 'stackable_add_inherit_figcaption_theme_class', 1, 2 ); +} diff --git a/src/editor-settings.php b/src/editor-settings.php index a757421b4..e7f01e5bf 100644 --- a/src/editor-settings.php +++ b/src/editor-settings.php @@ -160,7 +160,19 @@ public function register_settings() { 'stackable_enable_carousel_lazy_loading', array( 'type' => 'boolean', - 'description' => __( 'Disables image lazy loading when using images inside carousel-type blocks to prevent space or layout issues .', STACKABLE_I18N ), + 'description' => __( 'Disables image lazy loading when using images inside carousel-type blocks to prevent space or layout issues.', STACKABLE_I18N ), + 'sanitize_callback' => 'sanitize_text_field', + 'show_in_rest' => true, + 'default' => true, + ) + ); + + register_setting( + 'stackable_editor_settings', + 'stackable_inherit_styles_from_theme', + array( + 'type' => 'boolean', + 'description' => __( 'Inherits the button styles created by the theme.', STACKABLE_I18N ), 'sanitize_callback' => 'sanitize_text_field', 'show_in_rest' => true, 'default' => true, @@ -187,6 +199,7 @@ public function add_settings( $settings ) { $settings['stackable_auto_collapse_panels'] = get_option( 'stackable_auto_collapse_panels' ); $settings['stackable_enable_block_linking'] = get_option( 'stackable_enable_block_linking' ); $settings['stackable_enable_carousel_lazy_loading'] = get_option( 'stackable_enable_carousel_lazy_loading' ); + $settings['stackable_inherit_styles_from_theme'] = get_option( 'stackable_inherit_styles_from_theme' ); return $settings; } diff --git a/src/styles/block-design-system-blocks.scss b/src/styles/block-design-system-blocks.scss index a752413f6..4f1aed362 100644 --- a/src/styles/block-design-system-blocks.scss +++ b/src/styles/block-design-system-blocks.scss @@ -18,8 +18,8 @@ } :is(.stk-block-button, .stk-block-icon-button, .stk-block-pagination) { - &:not(.is-style-link) { - .stk-button { + &:not(.is-style-link, .wp-element-button) { + .stk-button:not(.wp-element-button) { background: cssvar(button-background-color); padding: cssvar(button-padding); diff --git a/src/welcome/admin.js b/src/welcome/admin.js index e11eb6dec..84f374c84 100644 --- a/src/welcome/admin.js +++ b/src/welcome/admin.js @@ -238,6 +238,7 @@ const EditorSettings = () => { 'stackable_auto_collapse_panels', 'stackable_enable_block_linking', 'stackable_enable_carousel_lazy_loading', + 'stackable_inherit_styles_from_theme', ] ) ) } ) } ) @@ -401,6 +402,20 @@ const EditorSettings = () => { } } help={ __( 'Disable this if you encounter layout or spacing issues when using images inside carousel-type blocks because of image lazy loading.', i18n ) } /> + { + setIsBusy( true ) + const model = new models.Settings( { stackable_inherit_styles_from_theme: value } ) // eslint-disable-line camelcase + model.save().then( () => setIsBusy( false ) ) + setSettings( { + ...settings, + stackable_inherit_styles_from_theme: value, // eslint-disable-line camelcase + } ) + } } + help={ __( 'Enable this if you want certain elements in your site to be styled by the theme.', i18n ) } + /> { isBusy &&
From 0d730b793b5f7102812aa458d43278ed8f4e0636 Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Tue, 13 Feb 2024 13:11:49 +0800 Subject: [PATCH 02/10] fixed typo --- src/editor-settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor-settings.php b/src/editor-settings.php index e7f01e5bf..185ac7ac9 100644 --- a/src/editor-settings.php +++ b/src/editor-settings.php @@ -172,7 +172,7 @@ public function register_settings() { 'stackable_inherit_styles_from_theme', array( 'type' => 'boolean', - 'description' => __( 'Inherits the button styles created by the theme.', STACKABLE_I18N ), + 'description' => __( 'Inherits the styles created by the theme.', STACKABLE_I18N ), 'sanitize_callback' => 'sanitize_text_field', 'show_in_rest' => true, 'default' => true, From f100be5fd07d0b3e98d6a3cd80ba18e6d6cf79f0 Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Mon, 19 Feb 2024 17:47:04 +0800 Subject: [PATCH 03/10] separated button and caption options --- src/block-components/button/index.js | 2 +- src/block/button/index.php | 4 +--- src/block/image/edit.js | 2 +- src/block/image/index.php | 2 +- src/editor-settings.php | 17 +++++++++++++++-- src/welcome/admin.js | 27 +++++++++++++++++++++------ 6 files changed, 40 insertions(+), 14 deletions(-) diff --git a/src/block-components/button/index.js b/src/block-components/button/index.js index 7ea886dde..3900d3fd5 100644 --- a/src/block-components/button/index.js +++ b/src/block-components/button/index.js @@ -34,7 +34,7 @@ export const Button = props => { return ( diff --git a/src/block/button/index.php b/src/block/button/index.php index dfbf657f6..8f68328e8 100644 --- a/src/block/button/index.php +++ b/src/block/button/index.php @@ -5,9 +5,7 @@ exit; } -var_dump(get_option( 'stackable_inherit_styles_from_theme' )); - -if ( get_option( 'stackable_inherit_styles_from_theme' ) === '1' ) { +if ( get_option( 'stackable_inherit_button_styles_from_theme' ) === '1' ) { if ( ! function_exists( 'stackable_add_inherit_button_theme_class' ) ) { function stackable_add_inherit_button_theme_class( $block_content, $block ) { diff --git a/src/block/image/edit.js b/src/block/image/edit.js index 43e8267c7..3650820f3 100644 --- a/src/block/image/edit.js +++ b/src/block/image/edit.js @@ -58,7 +58,7 @@ const Edit = props => { const figcaptionClassnames = classnames( getTypographyClasses( props.attributes, 'figcaption%s' ), 'stk-img-figcaption', - settings.stackable_inherit_styles_from_theme && 'wp-element-caption', + settings.stackable_inherit_caption_styles_from_theme && 'wp-element-caption', ) const blockAlignmentClass = getAlignmentClasses( props.attributes ) diff --git a/src/block/image/index.php b/src/block/image/index.php index 5629a8cfc..bd68c7ee1 100644 --- a/src/block/image/index.php +++ b/src/block/image/index.php @@ -5,7 +5,7 @@ exit; } -if ( get_option( 'stackable_inherit_styles_from_theme' ) === '1' ) { +if ( get_option( 'stackable_inherit_caption_styles_from_theme' ) === '1' ) { if ( ! function_exists( 'stackable_add_inherit_figcaption_theme_class' ) ) { function stackable_add_inherit_figcaption_theme_class( $block_content, $block ) { diff --git a/src/editor-settings.php b/src/editor-settings.php index 185ac7ac9..fef3a3da2 100644 --- a/src/editor-settings.php +++ b/src/editor-settings.php @@ -169,7 +169,19 @@ public function register_settings() { register_setting( 'stackable_editor_settings', - 'stackable_inherit_styles_from_theme', + 'stackable_inherit_button_styles_from_theme', + array( + 'type' => 'boolean', + 'description' => __( 'Inherits the styles created by the theme.', STACKABLE_I18N ), + 'sanitize_callback' => 'sanitize_text_field', + 'show_in_rest' => true, + 'default' => true, + ) + ); + + register_setting( + 'stackable_editor_settings', + 'stackable_inherit_caption_styles_from_theme', array( 'type' => 'boolean', 'description' => __( 'Inherits the styles created by the theme.', STACKABLE_I18N ), @@ -199,7 +211,8 @@ public function add_settings( $settings ) { $settings['stackable_auto_collapse_panels'] = get_option( 'stackable_auto_collapse_panels' ); $settings['stackable_enable_block_linking'] = get_option( 'stackable_enable_block_linking' ); $settings['stackable_enable_carousel_lazy_loading'] = get_option( 'stackable_enable_carousel_lazy_loading' ); - $settings['stackable_inherit_styles_from_theme'] = get_option( 'stackable_inherit_styles_from_theme' ); + $settings['stackable_inherit_caption_styles_from_theme'] = get_option( 'stackable_inherit_caption_styles_from_theme' ); + $settings['stackable_inherit_button_styles_from_theme'] = get_option( 'stackable_inherit_button_styles_from_theme' ); return $settings; } diff --git a/src/welcome/admin.js b/src/welcome/admin.js index 84f374c84..cbce9336d 100644 --- a/src/welcome/admin.js +++ b/src/welcome/admin.js @@ -238,7 +238,8 @@ const EditorSettings = () => { 'stackable_auto_collapse_panels', 'stackable_enable_block_linking', 'stackable_enable_carousel_lazy_loading', - 'stackable_inherit_styles_from_theme', + 'stackable_inherit_button_styles_from_theme', + 'stackable_inherit_caption_styles_from_theme', ] ) ) } ) } ) @@ -403,18 +404,32 @@ const EditorSettings = () => { help={ __( 'Disable this if you encounter layout or spacing issues when using images inside carousel-type blocks because of image lazy loading.', i18n ) } /> { setIsBusy( true ) - const model = new models.Settings( { stackable_inherit_styles_from_theme: value } ) // eslint-disable-line camelcase + const model = new models.Settings( { stackable_inherit_button_styles_from_theme: value } ) // eslint-disable-line camelcase model.save().then( () => setIsBusy( false ) ) setSettings( { ...settings, - stackable_inherit_styles_from_theme: value, // eslint-disable-line camelcase + stackable_inherit_button_styles_from_theme: value, // eslint-disable-line camelcase } ) } } - help={ __( 'Enable this if you want certain elements in your site to be styled by the theme.', i18n ) } + help={ __( 'Enable this if you want buttons in your site to be styled by the theme.', i18n ) } + /> + { + setIsBusy( true ) + const model = new models.Settings( { stackable_inherit_caption_styles_from_theme: value } ) // eslint-disable-line camelcase + model.save().then( () => setIsBusy( false ) ) + setSettings( { + ...settings, + stackable_inherit_caption_styles_from_theme: value, // eslint-disable-line camelcase + } ) + } } + help={ __( 'Enable this if you want captions in your site to be styled by the theme.', i18n ) } /> { isBusy &&
From 1aeb2c2d87da6ef45577ce6a2ea5f73d20e8bbb6 Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Wed, 28 Feb 2024 05:33:32 +0800 Subject: [PATCH 04/10] fixed settings description --- src/editor-settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/editor-settings.php b/src/editor-settings.php index fef3a3da2..247aa764a 100644 --- a/src/editor-settings.php +++ b/src/editor-settings.php @@ -160,7 +160,7 @@ public function register_settings() { 'stackable_enable_carousel_lazy_loading', array( 'type' => 'boolean', - 'description' => __( 'Disables image lazy loading when using images inside carousel-type blocks to prevent space or layout issues.', STACKABLE_I18N ), + 'description' => __( 'Disables image lazy loading when using images inside carousel-type blocks to prevent space or layout issues .', STACKABLE_I18N ), 'sanitize_callback' => 'sanitize_text_field', 'show_in_rest' => true, 'default' => true, @@ -172,7 +172,7 @@ public function register_settings() { 'stackable_inherit_button_styles_from_theme', array( 'type' => 'boolean', - 'description' => __( 'Inherits the styles created by the theme.', STACKABLE_I18N ), + 'description' => __( 'If enabled, the button styles from your theme will be inherited by the button block.', STACKABLE_I18N ), 'sanitize_callback' => 'sanitize_text_field', 'show_in_rest' => true, 'default' => true, @@ -184,7 +184,7 @@ public function register_settings() { 'stackable_inherit_caption_styles_from_theme', array( 'type' => 'boolean', - 'description' => __( 'Inherits the styles created by the theme.', STACKABLE_I18N ), + 'description' => __( 'If enabled, the caption styles from your theme will be inherited by the image block\'s caption.', STACKABLE_I18N ), 'sanitize_callback' => 'sanitize_text_field', 'show_in_rest' => true, 'default' => true, From f0c1a15403f81a36f54579e6719f9ac753633cb0 Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Wed, 28 Feb 2024 05:33:49 +0800 Subject: [PATCH 05/10] fixed spacing --- src/block/button/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/block/button/index.php b/src/block/button/index.php index 8f68328e8..f54b9e514 100644 --- a/src/block/button/index.php +++ b/src/block/button/index.php @@ -18,7 +18,7 @@ function stackable_add_inherit_button_theme_class( $block_content, $block ) { while ( $html_tag->next_tag( 'a' ) ) { $img_classname = $html_tag->get_attribute( 'class' ); - if ( strpos( $img_classname, 'stk-button') !== false ) { + if ( strpos( $img_classname, 'stk-button' ) !== false ) { $html_tag->add_class( 'wp-element-button' ); } } From 50630b6a48e85e11d0f0767faeca5e8cdcfb8b0e Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Wed, 28 Feb 2024 05:35:33 +0800 Subject: [PATCH 06/10] changed description in admin settings --- src/welcome/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/welcome/admin.js b/src/welcome/admin.js index cbce9336d..ee6774557 100644 --- a/src/welcome/admin.js +++ b/src/welcome/admin.js @@ -415,7 +415,7 @@ const EditorSettings = () => { stackable_inherit_button_styles_from_theme: value, // eslint-disable-line camelcase } ) } } - help={ __( 'Enable this if you want buttons in your site to be styled by the theme.', i18n ) } + help={ __( 'If enabled, the button styles from your theme will be inherited by the button block.', i18n ) } /> { stackable_inherit_caption_styles_from_theme: value, // eslint-disable-line camelcase } ) } } - help={ __( 'Enable this if you want captions in your site to be styled by the theme.', i18n ) } + help={ __( 'If enabled, the caption styles from your theme will be inherited by the image block\'s caption.', i18n ) } /> { isBusy &&
From 12cc2643839365099ea8135b1c0b4169a863f66c Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Wed, 28 Feb 2024 15:46:01 +0800 Subject: [PATCH 07/10] refactored implementation --- src/block-components/button/index.js | 6 +++++- src/block/button/edit.js | 8 +++++++- src/block/button/index.php | 2 +- src/block/image/edit.js | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/block-components/button/index.js b/src/block-components/button/index.js index 3900d3fd5..21b8384d6 100644 --- a/src/block-components/button/index.js +++ b/src/block-components/button/index.js @@ -34,7 +34,11 @@ export const Button = props => { return ( diff --git a/src/block/button/edit.js b/src/block/button/edit.js index 2b4acbb83..ec7154b61 100644 --- a/src/block/button/edit.js +++ b/src/block/button/edit.js @@ -2,7 +2,9 @@ * External dependencies */ import classnames from 'classnames' -import { version as VERSION, i18n } from 'stackable' +import { + version as VERSION, i18n, settings, +} from 'stackable' import { InspectorTabs } from '~stackable/components' import { getTypographyClasses, @@ -69,6 +71,10 @@ const Edit = props => { { [ `is-style-${ blockStyle }` ]: blockStyle, }, + // Kadence theme's css selector for their buttons are different compared to other themes + { + 'wp-block-button': settings.stackable_inherit_button_styles_from_theme && document.body.classList.contains( 'stk--is-kadence-theme' ), + }, ] ) const typographyInnerClassNames = classnames( [ diff --git a/src/block/button/index.php b/src/block/button/index.php index f54b9e514..6cf4aff91 100644 --- a/src/block/button/index.php +++ b/src/block/button/index.php @@ -19,7 +19,7 @@ function stackable_add_inherit_button_theme_class( $block_content, $block ) { $img_classname = $html_tag->get_attribute( 'class' ); if ( strpos( $img_classname, 'stk-button' ) !== false ) { - $html_tag->add_class( 'wp-element-button' ); + $html_tag->add_class( 'wp-block-button__link wp-element-button' ); } } diff --git a/src/block/image/edit.js b/src/block/image/edit.js index 3650820f3..c4d04f11e 100644 --- a/src/block/image/edit.js +++ b/src/block/image/edit.js @@ -58,7 +58,7 @@ const Edit = props => { const figcaptionClassnames = classnames( getTypographyClasses( props.attributes, 'figcaption%s' ), 'stk-img-figcaption', - settings.stackable_inherit_caption_styles_from_theme && 'wp-element-caption', + { 'wp-element-caption': settings.stackable_inherit_caption_styles_from_theme }, ) const blockAlignmentClass = getAlignmentClasses( props.attributes ) From aa70e56a42a9cc078d76ebf0f459da3483e1c66b Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Wed, 17 Apr 2024 17:37:55 +0800 Subject: [PATCH 08/10] added another class to exclude --- src/styles/block-design-system-blocks.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/block-design-system-blocks.scss b/src/styles/block-design-system-blocks.scss index 4f1aed362..d6a725559 100644 --- a/src/styles/block-design-system-blocks.scss +++ b/src/styles/block-design-system-blocks.scss @@ -19,7 +19,7 @@ :is(.stk-block-button, .stk-block-icon-button, .stk-block-pagination) { &:not(.is-style-link, .wp-element-button) { - .stk-button:not(.wp-element-button) { + .stk-button:not(.wp-element-button, .wp-block-button__link) { background: cssvar(button-background-color); padding: cssvar(button-padding); From 8f7108941cb60bf58cdf160cbbf44e31bb53bf39 Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Fri, 19 Apr 2024 07:49:05 +0800 Subject: [PATCH 09/10] prevent style from being to theme styled buttons --- src/styles/block-transitions.scss | 2 +- src/styles/editor-block-transitions.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles/block-transitions.scss b/src/styles/block-transitions.scss index 1f0e1f8be..5a004dbe1 100644 --- a/src/styles/block-transitions.scss +++ b/src/styles/block-transitions.scss @@ -13,7 +13,7 @@ body.stk--anim-init { .stk-block-heading__bottom-line, .stk-block-posts__item-hide, // For posts transitions .stk-block-posts__title > a, // For posts title - .stk-button, // Buttons + .stk-button:not(.wp-block-button__link), // Buttons .stk-button__inner-text, // Button text .stk-block li, // For icon list texts .stk-block p, diff --git a/src/styles/editor-block-transitions.scss b/src/styles/editor-block-transitions.scss index aa2b7600d..6421d5bdf 100644 --- a/src/styles/editor-block-transitions.scss +++ b/src/styles/editor-block-transitions.scss @@ -10,7 +10,7 @@ .stk-block-heading__bottom-line, .stk-block-posts__item-hide, // For posts transitions .stk-block-posts__title > a, // For posts title - .stk-button, // Buttons + .stk-button:not(.wp-block-button__link), // Buttons .stk-button__inner-text, // Button text .stk-block li, // For icon list texts .stk-block p, From f3d5697f07369f03d5bc9641c157524a69835946 Mon Sep 17 00:00:00 2001 From: prconcepcion Date: Fri, 19 Apr 2024 14:14:18 +0800 Subject: [PATCH 10/10] added an extra class --- src/block-components/button/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/block-components/button/index.js b/src/block-components/button/index.js index 21b8384d6..a62ff31d5 100644 --- a/src/block-components/button/index.js +++ b/src/block-components/button/index.js @@ -37,7 +37,7 @@ export const Button = props => { className={ classnames( [ className, getButtonClasses( attributes ), - { 'wp-block-button__link': settings.stackable_inherit_button_styles_from_theme }, //Check if body contains stk--is-kadence-theme + { 'wp-block-button__link wp-element-button': settings.stackable_inherit_button_styles_from_theme }, //Check if body contains stk--is-kadence-theme ] ) } linkProps={ buttonProps } linkTrigger={ linkTrigger }