post_reply_link

Displays the HTML content for reply to post link.

Description

(string|bool|null) post_reply_link( (array) $args = array(), (constant) $post = null ); 

Returns (string|bool|null)

Link to show comment form, if successful. False, if comments are closed.

Parameters (2)

0. $args — Optional. (array) => array()
Override default options,
1. $post — Optional. (constant) => null
Post ID or WP_Post object the comment is going to be displayed on. Default current post.

Usage

  1. if ( !function_exists( 'post_reply_link' ) ) { 
  2. require_once ABSPATH . WPINC . '/comment-template.php'; 
  3.  
  4. // Optional. Override default options, 
  5. $args = array(); 
  6.  
  7. // Post ID or WP_Post object the comment is going to be displayed on. 
  8. // Default current post. 
  9. $post = null; 
  10.  
  11. // NOTICE! Understand what this does before running. 
  12. $result = post_reply_link($args, $post); 
  13.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/comment-template.php  
  1. function post_reply_link($args = array(), $post = null) { 
  2. echo get_post_reply_link($args, $post);