From cc807d5a9158af195232ba42065af1fd0ed1b39a Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sun, 25 Sep 2016 17:32:37 +0000 Subject: [PATCH] Pass comment ID to `get_page_of_comment` filter. Introduced in [34808]. Props zhildzik. Fixes #38155. git-svn-id: https://develop.svn.wordpress.org/trunk@38650 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 58ffb03d25..27524c54ec 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -945,6 +945,7 @@ function get_page_of_comment( $comment_ID, $args = array() ) { * Filters the calculated page on which a comment appears. * * @since 4.4.0 + * @since 4.7.0 Introduced the `$comment_ID` parameter. * * @param int $page Comment page. * @param array $args { @@ -965,8 +966,9 @@ function get_page_of_comment( $comment_ID, $args = array() ) { * @type int $per_page Number of comments per page. * @type int $max_depth Maximum comment threading depth allowed. * } + * @param int $comment_ID ID of the comment. */ - return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args ); + return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args, $comment_ID ); } /**