get_comment_link WordPress Filter Hook

The get_comment_link WordPress hook is used to retrieve the URL for a specific comment. This hook can be used in conjunction with the get_comments() function to create a custom comments feed.

apply_filters( 'get_comment_link', string $link, WP_Comment $comment, array $args, int $cpage ) #

Filters the returned single comment permalink.


Description

Top ↑

See also


Top ↑

Parameters

$link

(string)The comment permalink with '#comment-$id' appended.

$comment

(WP_Comment)The current comment object.

$args

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

$cpage

(int)The calculated 'cpage' value.


Top ↑

Source

File: wp-includes/comment-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Added the $cpage parameter.
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More