Docs: List the expected type first instead of WP_Error in some REST API methods added in 5.8.

Follow-up to [46696], [49929], [50995], [51021].

See #52628, #53461.

git-svn-id: https://develop.svn.wordpress.org/trunk@51286 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-06-30 17:58:03 +00:00
parent f6f73c48ee
commit 4ada6a40e7
2 changed files with 7 additions and 7 deletions
@@ -57,7 +57,7 @@ class WP_REST_Pattern_Directory_Controller extends WP_REST_Controller {
*
* @param WP_REST_Request $request Full details about the request.
*
* @return WP_Error|bool True if the request has permission, WP_Error object otherwise.
* @return true|WP_Error True if the request has permission, WP_Error object otherwise.
*/
public function get_items_permissions_check( $request ) {
if ( current_user_can( 'edit_posts' ) ) {
@@ -84,7 +84,7 @@ class WP_REST_Pattern_Directory_Controller extends WP_REST_Controller {
*
* @param WP_REST_Request $request Full details about the request.
*
* @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
*/
public function get_items( $request ) {
/*