REST API: Remove unused attachments controller method.
The `validate_user_can_query_private_statuses` method is itself unused, and calls a parent class method previously removed in r39104. Props dlh. Fixes #45611. git-svn-id: https://develop.svn.wordpress.org/trunk@44934 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
58aad3837f
commit
60ea373df9
@ -699,24 +699,6 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
|||||||
return $params;
|
return $params;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Validates whether the user can query private statuses.
|
|
||||||
*
|
|
||||||
* @since 4.7.0
|
|
||||||
*
|
|
||||||
* @param mixed $value Status value.
|
|
||||||
* @param WP_REST_Request $request Request object.
|
|
||||||
* @param string $parameter Additional parameter to pass for validation.
|
|
||||||
* @return WP_Error|bool True if the user may query, WP_Error if not.
|
|
||||||
*/
|
|
||||||
public function validate_user_can_query_private_statuses( $value, $request, $parameter ) {
|
|
||||||
if ( 'inherit' === $value ) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return parent::validate_user_can_query_private_statuses( $value, $request, $parameter );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles an upload via multipart/form-data ($_FILES).
|
* Handles an upload via multipart/form-data ($_FILES).
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user