mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 07:37:44 +02:00
Comments: Avoid a PHP notice in comment_form()
if the email
field is not set.
Follow-up to [46090]. Props mat-lipe. Merges [46885] to the 5.3 branch. Fixes #48943. Built from https://develop.svn.wordpress.org/branches/5.3@46886 git-svn-id: http://core.svn.wordpress.org/branches/5.3@46686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9e38fc8259
commit
c7d610fb02
@ -2433,7 +2433,7 @@ function comment_form( $args = array(), $post_id = null ) {
|
|||||||
$args = array_merge( $defaults, $args );
|
$args = array_merge( $defaults, $args );
|
||||||
|
|
||||||
// Remove aria-describedby from the email field if there's no associated description.
|
// Remove aria-describedby from the email field if there's no associated description.
|
||||||
if ( false === strpos( $args['comment_notes_before'], 'id="email-notes"' ) ) {
|
if ( isset( $args['fields']['email'] ) && false === strpos( $args['comment_notes_before'], 'id="email-notes"' ) ) {
|
||||||
$args['fields']['email'] = str_replace(
|
$args['fields']['email'] = str_replace(
|
||||||
' aria-describedby="email-notes"',
|
' aria-describedby="email-notes"',
|
||||||
'',
|
'',
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3.1-RC1-46884';
|
$wp_version = '5.3.1-RC1-46886';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user