Make WordPress Core

Ticket #48943: comment-template.php.diff

File comment-template.php.diff, 701 bytes (added by Mat Lipe, 2 years ago)

Patch the /wp-includes/comment-template.php file

  • wp-includes/comment-template.php

    diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php
    index 9f945a9e3e..8375fee4a6 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                        '',