WP_REST_Attachments_Controller::validate_user_can_query_private_statuses( mixed $value, WP_REST_Request $request, string $parameter )

Validates whether the user can query private statuses.


Parameters Parameters

$value

(mixed) (Required) Status value.

$request

(WP_REST_Request) (Required) Request object.

$parameter

(string) (Required) Additional parameter to pass for validation.


Top ↑

Return Return

(WP_Error|bool) True if the user may query, WP_Error if not.


Top ↑

Source Source

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

	 * @param WP_REST_Request $request Request object.
	 * @return WP_REST_Response Response object.
	 */
	public function prepare_item_for_response( $post, $request ) {
		$response = parent::prepare_item_for_response( $post, $request );
		$fields   = $this->get_fields_for_response( $request );
		$data     = $response->get_data();

Top ↑

Changelog 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.