Skip to content

Commit 60ea373

Browse files
committed
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
1 parent 58aad38 commit 60ea373

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -699,24 +699,6 @@ public function get_collection_params() {
699699
return $params;
700700
}
701701

702-
/**
703-
* Validates whether the user can query private statuses.
704-
*
705-
* @since 4.7.0
706-
*
707-
* @param mixed $value Status value.
708-
* @param WP_REST_Request $request Request object.
709-
* @param string $parameter Additional parameter to pass for validation.
710-
* @return WP_Error|bool True if the user may query, WP_Error if not.
711-
*/
712-
public function validate_user_can_query_private_statuses( $value, $request, $parameter ) {
713-
if ( 'inherit' === $value ) {
714-
return true;
715-
}
716-
717-
return parent::validate_user_can_query_private_statuses( $value, $request, $parameter );
718-
}
719-
720702
/**
721703
* Handles an upload via multipart/form-data ($_FILES).
722704
*

0 commit comments

Comments
 (0)