WordPress.org

Make WordPress Core

Changeset 40664


Ignore:
Timestamp:
05/14/2017 03:05:11 AM (4 years ago)
Author:
rachelbaker
Message:

Comments: Update arguments passed to the 'comment_text' filter in check_comment().

Pass null or empty values for the missing $comment and $args parameters of the 'check_comment' filter in check_comment().

Props boonebgorges, vaishu.agola27, SergeyBiryukov.
Fixes #38314.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r39753 r40664  
    989989     * @see Walker_Comment::comment()
    990990     *
    991      * @param string     $comment_text Text of the current comment.
    992      * @param WP_Comment $comment      The comment object.
    993      * @param array      $args         An array of arguments.
     991     * @param string          $comment_text Text of the current comment.
     992     * @param WP_Comment|null $comment      The comment object.
     993     * @param array           $args         An array of arguments.
    994994     */
    995995    echo apply_filters( 'comment_text', $comment_text, $comment, $args );
  • trunk/src/wp-includes/comment.php

    r40128 r40664  
    4545
    4646    /** This filter is documented in wp-includes/comment-template.php */
    47     $comment = apply_filters( 'comment_text', $comment );
     47    $comment = apply_filters( 'comment_text', $comment, null, array() );
    4848
    4949    // Check for the number of external links if a max allowed number is set.
Note: See TracChangeset for help on using the changeset viewer.