Comments: Avoid a PHP notice in `comment_form()` if the `email` field is not set.
Follow-up to [46090]. Props mat-lipe. Fixes #48943. Built from https://develop.svn.wordpress.org/trunk@46885 git-svn-id: http://core.svn.wordpress.org/trunk@46685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eb38423e22
commit
c87fccd74f
|
@ -2433,7 +2433,7 @@ function comment_form( $args = array(), $post_id = null ) {
|
|||
$args = array_merge( $defaults, $args );
|
||||
|
||||
// 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(
|
||||
' aria-describedby="email-notes"',
|
||||
'',
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.4-alpha-46883';
|
||||
$wp_version = '5.4-alpha-46885';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue