首页 WordPress函数大全 get_comment_link()

get_comment_link()

2020-05-01 / 2000阅 / 悠然

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

get_comment_link( WP_Comment|int|null $comment = null, array $args = array() )

Retrieves the link to a given comment.

描述

See also See also

  • get_page_of_comment()

Top ↑

参数

$comment

(WP_Comment|int|null)
(Optional)
Comment to retrieve. Default current comment.

Default value: null

$args

(array)
(Optional)
An array of optional arguments to override the defaults.

  • 'type'
    (string) Passed to get_page_of_comment().
  • 'page'
    (int) Current page of comments, for calculating comment pagination.
  • 'per_page'
    (int) Per-page value for comment pagination.
  • 'max_depth'
    (int) Passed to get_page_of_comment().
  • 'cpage'
    (int|string) Value to use for the comment's "comment-page" or "cpage" value. If provided, this value overrides any value calculated from $page and $per_page.

Default value: array()

返回

(string) The permalink to the given comment.

大家谈论
    我的见解