From 526cecc4cdfab6da1154e54eb5634f636da09d1d Mon Sep 17 00:00:00 2001 From: Matthias Kittsteiner Date: Sun, 1 Sep 2024 20:53:07 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=EF=B8=8F=20Move=20required=20fields?= =?UTF-8?q?=20notice=20on=20top=20of=20the=20form.=20See=20#53?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/blocks/class-form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/blocks/class-form.php b/inc/blocks/class-form.php index 84c7e5b..09ccbd7 100644 --- a/inc/blocks/class-form.php +++ b/inc/blocks/class-form.php @@ -174,7 +174,7 @@ public function add_method( string $block_content, array $block ): string { */ public function add_required_notice( string $block_content, array $block ): string { /* translators: an asterisk sign */ - $notice = '

' . sprintf( esc_html__( 'Required fields are marked with %s', 'form-block' ), '' ) . '

'; + $notice = ''; /** * Filter the form required notice. @@ -185,7 +185,7 @@ public function add_required_notice( string $block_content, array $block ): stri */ $notice = apply_filters( 'form_block_form_required_notice', $notice, $block_content, $block ); - return str_replace( '', '' . $notice, $block_content ); + return str_replace( '