From 5ba6590801248a39dda0583f82cffd93046849ef Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 23 Sep 2023 17:35:33 +0200 Subject: [PATCH] Newsletter::newsletter_signup_form(): bug fix The `wp_nonce_field()` function by default _displays_ the field. This means that, as things were, the nonce field would be echo'd out when the function was called + would add a `1` to the `$html` string being created. The resulting `$html` string would not contain the nonce field and the nonce field would not be between the `
` tags. Fixed by setting the `$display` parameter to `false`. Ref: https://developer.wordpress.org/reference/functions/wp_nonce_field/ --- src/ui/newsletter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/newsletter.php b/src/ui/newsletter.php index 7b6f6dd2b..81ed3b8c7 100644 --- a/src/ui/newsletter.php +++ b/src/ui/newsletter.php @@ -49,7 +49,7 @@ public static function newsletter_signup_form() { $html = ' - ' . \wp_nonce_field( 'newsletter', 'newsletter_nonce' ) . ' + ' . \wp_nonce_field( 'newsletter', 'newsletter_nonce', true, false ) . '

' . $copy . '