From c138f3616a4c63e838adf0e103eaa0dee6ab2742 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Fri, 7 Oct 2016 18:31:51 +0000 Subject: [PATCH] Comments: Pass `$comment` to the `comment_max_links_url` filter. Props rachelbaker. Fixes #37955. git-svn-id: https://develop.svn.wordpress.org/trunk@38748 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 220c45b14b..54a6fe1256 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -54,11 +54,13 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $ * Filters the number of links found in a comment. * * @since 3.0.0 + * @since 4.7.0 Added the `$comment` parameter. * * @param int $num_links The number of links found. * @param string $url Comment author's URL. Included in allowed links total. + * @param string $comment Content of the comment. */ - $num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); + $num_links = apply_filters( 'comment_max_links_url', $num_links, $url, $comment ); /* * If the number of links in the comment exceeds the allowed amount,