From 60ea373df97acc2901bfcf1de8adbebed465e4f7 Mon Sep 17 00:00:00 2001 From: "K. Adam White" Date: Tue, 19 Mar 2019 03:27:45 +0000 Subject: [PATCH] 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 --- .../class-wp-rest-attachments-controller.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php index 22a9483550..fe7bd06ee0 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php @@ -699,24 +699,6 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { 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). *