From fe927e2df51f3e23fe1fa2635ae003d507be17ed Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Tue, 28 Jan 2025 17:55:48 +0000 Subject: [PATCH] Subscriptions: Adjust the button width when the button is not on a new line (#41156) --- projects/plugins/jetpack/changelog/fix-31063 | 4 ++++ .../jetpack/extensions/blocks/subscriptions/subscriptions.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/fix-31063 diff --git a/projects/plugins/jetpack/changelog/fix-31063 b/projects/plugins/jetpack/changelog/fix-31063 new file mode 100644 index 0000000000000..2a75752d26abf --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-31063 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Bug fix for Subscriptions block button diff --git a/projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php b/projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php index ec3b6f1d915aa..9a67b43588365 100644 --- a/projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php +++ b/projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php @@ -483,8 +483,8 @@ function get_element_styles_from_attributes( $attributes ) { // Account for custom margins on inline forms. $submit_button_styles .= true === get_attribute( $attributes, 'buttonOnNewLine' ) - ? sprintf( 'width: calc(100%% - %dpx);', get_attribute( $attributes, 'spacing', DEFAULT_SPACING_VALUE ) ) - : 'width: 100%;'; + ? 'width: 100%;' + : sprintf( 'width: calc(100%% - %dpx);', get_attribute( $attributes, 'spacing', DEFAULT_SPACING_VALUE ) ); } $font_size = get_attribute( $attributes, 'customFontSize', DEFAULT_FONTSIZE_VALUE );