apply_filters( 'post_password_required', bool $required, WP_Post $post )

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

Parameters Parameters


(bool) 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.


(WP_Post) Post object.

Top ↑

Source Source

File: wp-includes/post-template.php

View on Trac

Top ↑

Changelog Changelog

Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.