首页 WordPress函数大全 get_page_of_comment()

get_page_of_comment()

2020-05-01 / 4039阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_page_of_comment( int $comment_ID, array $args = array() )

Calculate what page number a comment will appear>

Contents

  • Description
    • Parameters
    • Return
    • Source
    • Changelog
  • Related
    • Uses
    • Used By
  • User Contributed Notes

描述

参数

$comment_ID

(int)
(Required)
Comment ID.

$args

(array)
(Optional)
Array of optional arguments.

  • 'type'
    (string) Limit paginated comments to those matching a given type. Accepts 'comment', 'trackback', 'pingback', 'pings' (trackbacks and pingbacks), or 'all'. Default is 'all'.
  • 'per_page'
    (int) Per-page count to use when calculating pagination. Defaults to the value of the 'comments_per_page' option.
  • 'max_depth'
    (int|string) If greater than 1, comment page will be determined for the top-level parent of $comment_ID. Defaults to the value of the 'thread_comments_depth' option.

Default value: array()

返回

(int|null) Comment page number or null on error.

大家谈论
    我的见解