From 868312d995797875c2630bc273c8081c0cef60fe Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Sun, 14 May 2017 03:06:45 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@40664 git-svn-id: http://core.svn.wordpress.org/trunk@40527 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 6 +++--- wp-includes/comment.php | 2 +- wp-includes/version.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index e97229f5f6..e4815ec714 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -988,9 +988,9 @@ function comment_text( $comment_ID = 0, $args = array() ) { * * @see Walker_Comment::comment() * - * @param string $comment_text Text of the current comment. - * @param WP_Comment $comment The comment object. - * @param array $args An array of arguments. + * @param string $comment_text Text of the current comment. + * @param WP_Comment|null $comment The comment object. + * @param array $args An array of arguments. */ echo apply_filters( 'comment_text', $comment_text, $comment, $args ); } diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 7398f99dd9..0fb9f01093 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -44,7 +44,7 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $ return false; /** This filter is documented in wp-includes/comment-template.php */ - $comment = apply_filters( 'comment_text', $comment ); + $comment = apply_filters( 'comment_text', $comment, null, array() ); // Check for the number of external links if a max allowed number is set. if ( $max_links = get_option( 'comment_max_links' ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index da90d0cd7a..15e073f7ae 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-beta1-40663'; +$wp_version = '4.8-beta1-40664'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.