WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
фильтр не описан

post_password_required хук-фильтр . WP 4.7.0

Filters whether a post requires the user to supply a password.

Ищем WP-разработчика! Фулл-тайм, удаленка, хорошая зарплата, соц. пакет. Подробности.
Компания Boosta.

Использование

add_filter( 'post_password_required', 'filter_function_name_2170', 10, 2 );
function filter_function_name_2170( $required, $post ){
	// filter...

	return $required;
}
$required(true|false)
Whether the user needs to supply a password. True if password has not been provided or is incorrect, false if password has been supplied or is not required.
$post(WP_Post)
Post object.

Список изменений

С версии 4.7.0 Введена.

Где вызывается хук

post_password_required()
post_password_required
wp-includes/post-template.php 881
return apply_filters( 'post_password_required', $required, $post );
wp-includes/post-template.php 854
return apply_filters( 'post_password_required', false, $post );
wp-includes/post-template.php 859
return apply_filters( 'post_password_required', true, $post );

Где используется хук в ядре WordPress

wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php 1769
add_filter( 'post_password_required', '__return_false' );
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php 1781
remove_filter( 'post_password_required', '__return_false' );
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 1779
add_filter( 'post_password_required', array( $this, 'check_password_required' ), 10, 2 );
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 1817
remove_filter( 'post_password_required', array( $this, 'check_password_required' ) );
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 357
add_filter( 'post_password_required', array( $this, 'check_password_required' ), 10, 2 );
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 373
remove_filter( 'post_password_required', array( $this, 'check_password_required' ) );
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 488
add_filter( 'post_password_required', array( $this, 'check_password_required' ), 10, 2 );