Docs: Remove an empty line between `@param` and `@return` tags in some newly added REST API methods, per the documentation standards.
Follow-up to [48242], [49925], [51003], [51021]. See #52628, #53461. Built from https://develop.svn.wordpress.org/trunk@51289 git-svn-id: http://core.svn.wordpress.org/trunk@50898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9e3049477c
commit
1b749d971a
|
@ -1080,7 +1080,6 @@ class WP_REST_Server {
|
||||||
* @param array $handler The matched route handler.
|
* @param array $handler The matched route handler.
|
||||||
* @param string $route The matched route regex.
|
* @param string $route The matched route regex.
|
||||||
* @param WP_Error|null $response The current error object if any.
|
* @param WP_Error|null $response The current error object if any.
|
||||||
*
|
|
||||||
* @return WP_REST_Response
|
* @return WP_REST_Response
|
||||||
*/
|
*/
|
||||||
protected function respond_to_request( $request, $route, $handler, $response ) {
|
protected function respond_to_request( $request, $route, $handler, $response ) {
|
||||||
|
|
|
@ -49,7 +49,6 @@ class WP_REST_Block_Directory_Controller extends WP_REST_Controller {
|
||||||
* @since 5.5.0
|
* @since 5.5.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 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 ) {
|
public function get_items_permissions_check( $request ) {
|
||||||
|
@ -70,7 +69,6 @@ class WP_REST_Block_Directory_Controller extends WP_REST_Controller {
|
||||||
* @since 5.5.0
|
* @since 5.5.0
|
||||||
*
|
*
|
||||||
* @param WP_REST_Request $request Full details about the request.
|
* @param WP_REST_Request $request Full details about the request.
|
||||||
*
|
|
||||||
* @return WP_REST_Response|WP_Error 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 ) {
|
public function get_items( $request ) {
|
||||||
|
@ -114,7 +112,6 @@ class WP_REST_Block_Directory_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* @param array $plugin The plugin metadata.
|
* @param array $plugin The plugin metadata.
|
||||||
* @param WP_REST_Request $request Request object.
|
* @param WP_REST_Request $request Request object.
|
||||||
*
|
|
||||||
* @return WP_REST_Response|WP_Error 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 prepare_item_for_response( $plugin, $request ) {
|
public function prepare_item_for_response( $plugin, $request ) {
|
||||||
|
@ -156,7 +153,6 @@ class WP_REST_Block_Directory_Controller extends WP_REST_Controller {
|
||||||
* @since 5.5.0
|
* @since 5.5.0
|
||||||
*
|
*
|
||||||
* @param array $plugin The plugin data from WordPress.org.
|
* @param array $plugin The plugin data from WordPress.org.
|
||||||
*
|
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function prepare_links( $plugin ) {
|
protected function prepare_links( $plugin ) {
|
||||||
|
@ -184,7 +180,6 @@ class WP_REST_Block_Directory_Controller extends WP_REST_Controller {
|
||||||
* @since 5.5.0
|
* @since 5.5.0
|
||||||
*
|
*
|
||||||
* @param string $slug The WordPress.org directory slug for a plugin.
|
* @param string $slug The WordPress.org directory slug for a plugin.
|
||||||
*
|
|
||||||
* @return string The plugin file found matching it.
|
* @return string The plugin file found matching it.
|
||||||
*/
|
*/
|
||||||
protected function find_plugin_for_slug( $slug ) {
|
protected function find_plugin_for_slug( $slug ) {
|
||||||
|
|
|
@ -56,7 +56,6 @@ class WP_REST_Pattern_Directory_Controller extends WP_REST_Controller {
|
||||||
* @since 5.8.0
|
* @since 5.8.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 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 ) {
|
public function get_items_permissions_check( $request ) {
|
||||||
|
@ -83,7 +82,6 @@ class WP_REST_Pattern_Directory_Controller extends WP_REST_Controller {
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param WP_REST_Request $request Full details about the request.
|
* @param WP_REST_Request $request Full details about the request.
|
||||||
*
|
|
||||||
* @return WP_REST_Response|WP_Error 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 ) {
|
public function get_items( $request ) {
|
||||||
|
@ -204,7 +202,6 @@ class WP_REST_Pattern_Directory_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* @param object $raw_pattern A pattern from api.wordpress.org, before any changes.
|
* @param object $raw_pattern A pattern from api.wordpress.org, before any changes.
|
||||||
* @param WP_REST_Request $request Request object.
|
* @param WP_REST_Request $request Request object.
|
||||||
*
|
|
||||||
* @return WP_REST_Response
|
* @return WP_REST_Response
|
||||||
*/
|
*/
|
||||||
public function prepare_item_for_response( $raw_pattern, $request ) {
|
public function prepare_item_for_response( $raw_pattern, $request ) {
|
||||||
|
|
|
@ -679,7 +679,6 @@ class WP_REST_Plugins_Controller extends WP_REST_Controller {
|
||||||
* @param string $plugin The plugin file to update.
|
* @param string $plugin The plugin file to update.
|
||||||
* @param string $new_status The plugin's new status.
|
* @param string $new_status The plugin's new status.
|
||||||
* @param string $current_status The plugin's current status.
|
* @param string $current_status The plugin's current status.
|
||||||
*
|
|
||||||
* @return true|WP_Error
|
* @return true|WP_Error
|
||||||
*/
|
*/
|
||||||
protected function plugin_status_permission_check( $plugin, $new_status, $current_status ) {
|
protected function plugin_status_permission_check( $plugin, $new_status, $current_status ) {
|
||||||
|
@ -789,7 +788,6 @@ class WP_REST_Plugins_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* @param WP_REST_Request $request The request to require the plugin matches against.
|
* @param WP_REST_Request $request The request to require the plugin matches against.
|
||||||
* @param array $item The plugin item.
|
* @param array $item The plugin item.
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function does_plugin_match_request( $request, $item ) {
|
protected function does_plugin_match_request( $request, $item ) {
|
||||||
|
|
|
@ -268,7 +268,6 @@ class WP_REST_Sidebars_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* @param array $raw_sidebar Sidebar instance.
|
* @param array $raw_sidebar Sidebar instance.
|
||||||
* @param WP_REST_Request $request Full details about the request.
|
* @param WP_REST_Request $request Full details about the request.
|
||||||
*
|
|
||||||
* @return WP_REST_Response Prepared response object.
|
* @return WP_REST_Response Prepared response object.
|
||||||
*/
|
*/
|
||||||
public function prepare_item_for_response( $raw_sidebar, $request ) {
|
public function prepare_item_for_response( $raw_sidebar, $request ) {
|
||||||
|
@ -344,7 +343,6 @@ class WP_REST_Sidebars_Controller extends WP_REST_Controller {
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param array $sidebar Sidebar.
|
* @param array $sidebar Sidebar.
|
||||||
*
|
|
||||||
* @return array Links for the given widget.
|
* @return array Links for the given widget.
|
||||||
*/
|
*/
|
||||||
protected function prepare_links( $sidebar ) {
|
protected function prepare_links( $sidebar ) {
|
||||||
|
|
|
@ -145,7 +145,6 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param WP_REST_Request $request The request instance.
|
* @param WP_REST_Request $request The request instance.
|
||||||
*
|
|
||||||
* @return WP_REST_Response
|
* @return WP_REST_Response
|
||||||
*/
|
*/
|
||||||
public function get_items( $request ) {
|
public function get_items( $request ) {
|
||||||
|
@ -156,6 +155,7 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
||||||
if ( isset( $request['area'] ) ) {
|
if ( isset( $request['area'] ) ) {
|
||||||
$query['area'] = $request['area'];
|
$query['area'] = $request['area'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$templates = array();
|
$templates = array();
|
||||||
foreach ( get_block_templates( $query, $this->post_type ) as $template ) {
|
foreach ( get_block_templates( $query, $this->post_type ) as $template ) {
|
||||||
$data = $this->prepare_item_for_response( $template, $request );
|
$data = $this->prepare_item_for_response( $template, $request );
|
||||||
|
@ -183,7 +183,6 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param WP_REST_Request $request The request instance.
|
* @param WP_REST_Request $request The request instance.
|
||||||
*
|
|
||||||
* @return WP_REST_Response|WP_Error
|
* @return WP_REST_Response|WP_Error
|
||||||
*/
|
*/
|
||||||
public function get_item( $request ) {
|
public function get_item( $request ) {
|
||||||
|
@ -405,7 +404,6 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* @param WP_Block_Template $template Template instance.
|
* @param WP_Block_Template $template Template instance.
|
||||||
* @param WP_REST_Request $request Request object.
|
* @param WP_REST_Request $request Request object.
|
||||||
*
|
|
||||||
* @return WP_REST_Response $data
|
* @return WP_REST_Response $data
|
||||||
*/
|
*/
|
||||||
public function prepare_item_for_response( $template, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
|
public function prepare_item_for_response( $template, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
|
||||||
|
|
|
@ -349,7 +349,6 @@ class WP_REST_Themes_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* @param WP_Theme $theme_a First theme to compare.
|
* @param WP_Theme $theme_a First theme to compare.
|
||||||
* @param WP_Theme $theme_b Second theme to compare.
|
* @param WP_Theme $theme_b Second theme to compare.
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function is_same_theme( $theme_a, $theme_b ) {
|
protected function is_same_theme( $theme_a, $theme_b ) {
|
||||||
|
|
|
@ -424,7 +424,6 @@ class WP_REST_Widgets_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* @param WP_REST_Request $request Full details about the request.
|
* @param WP_REST_Request $request Full details about the request.
|
||||||
* @param string $sidebar_id ID of the sidebar the widget belongs to.
|
* @param string $sidebar_id ID of the sidebar the widget belongs to.
|
||||||
*
|
|
||||||
* @return string|WP_Error The saved widget ID.
|
* @return string|WP_Error The saved widget ID.
|
||||||
*/
|
*/
|
||||||
protected function save_widget( $request, $sidebar_id ) {
|
protected function save_widget( $request, $sidebar_id ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.9-alpha-51288';
|
$wp_version = '5.9-alpha-51289';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue