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