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

		}

		if ( in_array( 'mime_type', $fields, true ) ) {
			$data['mime_type'] = $post->post_mime_type;
		}

		if ( in_array( 'media_details', $fields, true ) ) {

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.