comment_reply_link() WordPress Function

The comment_reply_link() function allows a user to reply to a comment on a WordPress post. The function automatically generates a URL for the user to click on to reply to the comment. The function can optionally take a few parameters, including the URL of the post the comment is on, the ID of the comment, and the ID of the user.

comment_reply_link( array $args = array(), int|WP_Comment $comment = null, int|WP_Post $post = null ) #

Displays the HTML content for reply to comment link.


Description

Top ↑

See also


Top ↑

Parameters

$args

(array)(Optional) Override default options.

Default value: array()

$comment

(int|WP_Comment)(Optional)Comment being replied to. Default current comment.

Default value: null

$post

(int|WP_Post)(Optional)Post ID or WP_Post object the comment is going to be displayed on. Default current post.

Default value: null


Top ↑

Source

File: wp-includes/comment-template.php

function comment_reply_link( $args = array(), $comment = null, $post = null ) {
	echo get_comment_reply_link( $args, $comment, $post );
}


Top ↑

Changelog

Changelog
VersionDescription
2.7.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
Show More