Filter hook 'post_password_required'

in WP Core File wp-includes/post-template.php at line 877

Description

Determines whether the post requires password and whether a correct password has been provided.

Occurrences

Filename Line Number
wp-includes/post-template.php 877
wp-includes/post-template.php 882
wp-includes/post-template.php 904

Parameters

Type Name Description
int|WP_Post|null $post An optional post. Global $post used if not provided.

PHP Doc

/**
 * Determines whether the post requires password and whether a correct password has been provided.
 *
 * @since 2.7.0
 *
 * @param int|WP_Post|null $post An optional post. Global $post used if not provided.
 * @return bool false if a password is not required or the correct password cookie is present, true otherwise.
 */