wp_comment_reply

Filters the in-line comment reply-to form output in the Comments list table.

Description

apply_filters( 'wp_comment_reply', (string) $var, (callback) $array ); 

Returning a non-empty value here will short-circuit display of the in-line comment-reply form in the Comments list table, echoing the returned value instead.

Parameters (2)

0. $var (string) => ''
The reply-to form content.
1. $array — Optional. (callback) => array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode )
An array of default args.

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( 'wp_comment_reply', $var, $array ); 
  2.  
  3. if ( !empty( $var ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wp_comment_reply callback 
  2. function filter_wp_comment_reply( $var, $array ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wp_comment_reply', 'filter_wp_comment_reply', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wp_comment_reply', 'filter_wp_comment_reply', 10, 2 ); 

Defined (1)

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

/wp-admin/includes/template.php  
  1. $content = apply_filters( 'wp_comment_reply', '', array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode ) );