get_page_of_comment

过滤钩子
apply_filters( 'get_page_of_comment', (int)
参数
  • (int) $page Comment page.
    Required:
  • (array) $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`. @type string $type Type of comments to count. @type int $page Calculated current page. @type int $per_page Calculated number of comments per page. @type int $max_depth Maximum comment threading depth allowed. }
    Required:
  • (array) $original_args { Array of arguments passed to the function. Some or all of these may not be set. @type string $type Type of comments to count. @type int $page Current comment page. @type int $per_page Number of comments per page. @type int $max_depth Maximum comment threading depth allowed. }
    Required:
  • (int) $comment_ID ID of the comment.
    Required:
定义位置
相关勾子
get_page_of_comment_query_argsget_commentrest_pre_insert_commentrest_preprocess_commentedit_page_form
相关方法
get_page_of_commentget_commentget_commentsget_approved_commentsthe_commentget_date_from_gmt
引入
4.7.0
弃用
-

get_page_of_comment是一个WordPress的函数,用来确定一个评论出现在一个分页的评论集中的哪一页: 该函数接受一个评论ID作为参数,并返回评论出现的页面编号。

过滤显示注释的计算页面。

return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args, $comment_ID );

常见问题

FAQs
查看更多 >