WordPress.org

Make WordPress Core

Ticket #48943: 48943.diff

File 48943.diff, 717 bytes (added by audrasjb, 2 years ago)

Refreshed patch against trunk

  • src/wp-includes/comment-template.php

    diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php
    index 6f28e2bdb4..f065791acd 100644
    a b function comment_form( $args = array(), $post_id = null ) { 
    24332433        $args = array_merge( $defaults, $args );
    24342434
    24352435        // Remove aria-describedby from the email field if there's no associated description.
    2436         if ( false === strpos( $args['comment_notes_before'], 'id="email-notes"' ) ) {
     2436        if ( ! empty( $args['fields']['email'] ) && false === strpos( $args['comment_notes_before'], 'id="email-notes"' ) ) {
    24372437                $args['fields']['email'] = str_replace(
    24382438                        ' aria-describedby="email-notes"',
    24392439                        '',