Overrides the result of the post password check for REST requested posts.
Description
Allow users to read the content of password protected posts if they have previously passed a permission check or if they have the edit_post capability for the post being checked.
Parameters
$requiredbool
Whether the post requires a password check.
$postWP_Post
The post been password checked.
Return
bool
Result of password check taking into account REST API considerations.
Uses · 2
get_post()Retrieves post data given a post ID or post object.
current_user_can()Returns whether the current user has the specified capability.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.