comment_link

Display the link to the comments.

Description

comment_link( (null) $comment = null ); 

Parameters (1)

0. $comment — Optional. (null) => null
Comment object or id. Defaults to global comment object.

Usage

  1. if ( !function_exists( 'comment_link' ) ) { 
  2. require_once ABSPATH . WPINC . '/feed.php'; 
  3.  
  4. // Optional. Comment object or id. Defaults to global comment object. 
  5. $comment = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = comment_link($comment); 
  9.  

Defined (1)

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

/wp-includes/feed.php  
  1. function comment_link( $comment = null ) { 
  2. /** 
  3. * Filters the current comment's permalink. 
  4. * @since 3.6.0 
  5. * @see get_comment_link() 
  6. * @param string $comment_permalink The current comment permalink. 
  7. */