From 1fb64026c2e048116fbd7accb2db1db6e9adeff6 Mon Sep 17 00:00:00 2001 From: Tom Usborne Date: Tue, 2 Jul 2024 10:29:06 -0600 Subject: [PATCH] Tweak: Add customizer color live preview to woo buttons --- inc/customizer/fields/buttons.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/customizer/fields/buttons.php b/inc/customizer/fields/buttons.php index ad49392c..a49f9962 100644 --- a/inc/customizer/fields/buttons.php +++ b/inc/customizer/fields/buttons.php @@ -38,6 +38,11 @@ $buttons_selector = 'button, html input[type="button"], input[type="reset"], input[type="submit"], a.button, a.button:visited, a.wp-block-button__link:not(.has-background)'; $buttons_hover_selector = 'button:hover, html input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, a.button:hover, button:focus, html input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus, a.button:focus, a.wp-block-button__link:not(.has-background):active, a.wp-block-button__link:not(.has-background):focus, a.wp-block-button__link:not(.has-background):hover'; +if ( defined( 'GP_PREMIUM_VERSION' ) && version_compare( GP_PREMIUM_VERSION, '2.4.1', '>' ) ) { + $buttons_selector .= ', .wc-block-components-button'; + $buttons_hover_selector .= ', .wc-block-components-button:hover'; +} + GeneratePress_Customize_Field::add_field( 'generate_settings[form_button_background_color]', 'GeneratePress_Customize_Color_Control',