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

Retrieves the link to a given comment.


Description

Top ↑

See also


Top ↑

Parameters

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

Default: null

$args array Optional
An array of optional arguments to override the defaults.
  • typestring
  • pageint
    Current page of comments, for calculating comment pagination.
  • per_pageint
    Per-page value for comment pagination.
  • max_depthint
  • cpageint|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.
More Arguments from get_page_of_comment( ... $args ) Array of optional arguments.
  • typestring
    Limit paginated comments to those matching a given type.
    Accepts 'comment', 'trackback', 'pingback', 'pings' (trackbacks and pingbacks), or 'all'. Default 'all'.
  • per_pageint
    Per-page count to use when calculating pagination.
    Defaults to the value of the 'comments_per_page' option.
  • max_depthint|string
    If greater than 1, comment page will be determined for the top-level parent $comment_ID.
    Defaults to the value of the 'thread_comments_depth' option.