On this page
apply_filters( 'post_password_required', bool $required, WP_Post $post )
Filters whether a post requires the user to supply a password.
Parameters
$requiredbool-
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.
$postWP_Post-
Post object.
Source
File: wp-includes/post-template.php. View all references
return apply_filters( 'post_password_required', $required, $post );
Related
Used By
| Used By | Description |
|---|---|
| post_password_required() wp-includes/post-template.php | Determines whether the post requires password and whether a correct password has been provided. |
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/post_password_required