post_password_required
post_password_required ( $post = null )
Parameters:- (int|WP_Post|null) post An optional post. Global $post used if not provided.
Returns:- (bool) false if a password is not required or the correct password cookie is present, true otherwise.
Defined at: - Introduced in WordPress: 2.7.0
- Deprecated in WordPress: —
Description
Determines whether the post requires password and whether a correct password has been provided.