From 32086d74fcf58f578892d882b78e6190e9b9971f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 5 Sep 2019 22:58:50 +0000 Subject: [PATCH] Docs: Correct DocBlocks for `WP_REST_Posts_Controller::get_available_actions()` and `WP_REST_Revisions_Controller::get_parent()`. Props dkarfa. Fixes #47966. git-svn-id: https://develop.svn.wordpress.org/trunk@46068 602fd350-edb4-49c9-b593-d223f7449a82 --- .../endpoints/class-wp-rest-posts-controller.php | 13 ++++++------- .../class-wp-rest-revisions-controller.php | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index 8b4dfef229..e53ff4b910 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -131,7 +131,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { * * @since 4.7.0 * - * @param WP_REST_Request $request Full details about the request. + * @param WP_REST_Request $request Full details about the request. * @return true|WP_Error True if the request has read access, WP_Error object otherwise. */ public function get_items_permissions_check( $request ) { @@ -1809,9 +1809,8 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { * * @since 4.9.8 * - * @param WP_Post $post Post object. - * @param WP_REST_Request Request object. - * + * @param WP_Post $post Post object. + * @param WP_REST_Request $request Request object. * @return array List of link relations. */ protected function get_available_actions( $post, $request ) { @@ -2562,9 +2561,9 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { * * @since 4.7.0 * - * @param string|array $statuses One or more post statuses. - * @param WP_REST_Request $request Full details about the request. - * @param string $parameter Additional parameter to pass to validation. + * @param string|array $statuses One or more post statuses. + * @param WP_REST_Request $request Full details about the request. + * @param string $parameter Additional parameter to pass to validation. * @return array|WP_Error A list of valid statuses, otherwise WP_Error object. */ public function sanitize_post_statuses( $statuses, $request, $parameter ) { diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php index 0a0a88106b..5c61026de9 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php @@ -130,7 +130,7 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller { * * @since 4.7.2 * - * @param int $id Supplied ID. + * @param int $parent Supplied ID. * @return WP_Post|WP_Error Post object if ID is valid, WP_Error otherwise. */ protected function get_parent( $parent ) {