Skip to content

Commit

Permalink
Merge pull request #622 from tomusborne/tweak/woo-button-live-preview
Browse files Browse the repository at this point in the history
Tweak: Add customizer color live preview to woo buttons
  • Loading branch information
tomusborne committed Jul 2, 2024
2 parents 8a51e3c + 1fb6402 commit d604160
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/customizer/fields/buttons.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit d604160

Please sign in to comment.