post_password_required

This filter is documented in wp-includes/post.php.

Description

remove_filter( 'post_password_required', (string) $return_false ); 

Parameters (1)

0. $return_false (string) => '__return_false'
The return false.

Usage

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

Defined (3)

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

/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php  
  1. remove_filter( 'post_password_required', '__return_false' ); 
  1. remove_filter( 'post_password_required', '__return_false' ); 
/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php  
  1. remove_filter( 'post_password_required', '__return_false' );