apply_filters( 'get_page_of_comment', int $page, array $args, array $original_args, int $comment_id )

Filters the calculated page on which a comment appears.


Parameters

$page

Comment page.

$args

Arguments used to calculate pagination. These include arguments auto-detected by the function, based on query vars, system settings, etc. For pristine arguments passed to the function, see $original_args.<br>

  • 'type'
    (string) Type of comments to count.<br>
  • 'page'
    (int) Calculated current page.<br>
  • 'per_page'
    (int) Calculated number of comments per page.<br>
  • 'max_depth'
    (int) Maximum comment threading depth allowed.<br>

$original_args

Array of arguments passed to the function. Some or all of these may not be set.<br>

  • 'type'
    (string) Type of comments to count.<br>
  • 'page'
    (int) Current comment page.<br>
  • 'per_page'
    (int) Number of comments per page.<br>
  • 'max_depth'
    (int) Maximum comment threading depth allowed.<br>

$comment_id

ID of the comment.


Source

File: wp-includes/comment.php

View on GitHub



Changelog

Changelog
Version Description
4.7.0 Introduced the $comment_id parameter.
4.4.0 Introduced.