WP_REST_Posts_Controller::can_access_password_content

Advertisement

Summery Summery

Checks if the user can access password-protected content.

Syntax Syntax

WP_REST_Posts_Controller::can_access_password_content( WP_Post $post, WP_REST_Request $request )

Description Description

This method determines whether we need to override the regular password check in core with a filter.

Parameters Parameters

$post

(WP_Post) (Required) Post to check against.

$request

(WP_REST_Request) (Required) Request data to check.

Return Return

(bool) True if the user can access password-protected content, otherwise false.

Source Source

File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.