From e12f866db238150b90aa17616d4105ea7ff75c7a Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 7 Dec 2019 13:21:07 +0000 Subject: [PATCH] Docs: Further docblock corrections and improvements. See #48303 git-svn-id: https://develop.svn.wordpress.org/trunk@46826 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/nav-menu.php | 2 +- src/wp-admin/includes/post.php | 4 ++-- src/wp-admin/includes/screen.php | 8 ++++---- src/wp-admin/includes/user.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php index 08ca3781a0..97514b695b 100644 --- a/src/wp-admin/includes/nav-menu.php +++ b/src/wp-admin/includes/nav-menu.php @@ -970,7 +970,7 @@ function wp_save_nav_menu_items( $menu_id = 0, $menu_data = array() ) { * @access private * * @param object $object The post type or taxonomy meta-object. - * @return object The post type of taxonomy object. + * @return object The post type or taxonomy object. */ function _wp_nav_menu_meta_box_object( $object = null ) { if ( isset( $object->name ) ) { diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 8b76c6022e..075edb159e 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -15,7 +15,7 @@ * * @param bool $update Are we updating a pre-existing post? * @param array $post_data Array of post data. Defaults to the contents of $_POST. - * @return object|bool WP_Error on failure, true on success. + * @return array|WP_Error Array of post data on success, WP_Error on failure. */ function _wp_translate_postdata( $update = false, $post_data = null ) { @@ -201,7 +201,7 @@ function _wp_translate_postdata( $update = false, $post_data = null ) { * @since 5.0.1 * * @param array $post_data Array of post data. Defaults to the contents of $_POST. - * @return object|bool WP_Error on failure, true on success. + * @return array|WP_Error Array of post data on success, WP_Error on failure. */ function _wp_get_allowed_postdata( $post_data = null ) { if ( empty( $post_data ) ) { diff --git a/src/wp-admin/includes/screen.php b/src/wp-admin/includes/screen.php index 6a2ccb742a..1abaa023da 100644 --- a/src/wp-admin/includes/screen.php +++ b/src/wp-admin/includes/screen.php @@ -48,7 +48,7 @@ function get_column_headers( $screen ) { * @since 2.7.0 * * @param string|WP_Screen $screen The screen you want the hidden columns for - * @return array + * @return string[] Array of IDs of hidden columns. */ function get_hidden_columns( $screen ) { if ( is_string( $screen ) ) { @@ -67,7 +67,7 @@ function get_hidden_columns( $screen ) { * * @since 4.4.0 * - * @param array $hidden An array of columns hidden by default. + * @param string[] $hidden Array of IDs of columns hidden by default. * @param WP_Screen $screen WP_Screen object of the current screen. */ $hidden = apply_filters( 'default_hidden_columns', $hidden, $screen ); @@ -79,8 +79,8 @@ function get_hidden_columns( $screen ) { * @since 4.4.0 * @since 4.4.1 Added the `use_defaults` parameter. * - * @param array $hidden An array of hidden columns. - * @param WP_Screen $screen WP_Screen object of the current screen. + * @param string[] $hidden Array of IDs of hidden columns. + * @param WP_Screen $screen WP_Screen object of the current screen. * @param bool $use_defaults Whether to show the default columns. */ return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults ); diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php index 8f40723e67..172dd2a7c9 100644 --- a/src/wp-admin/includes/user.php +++ b/src/wp-admin/includes/user.php @@ -551,7 +551,7 @@ jQuery(document).ready( function($) { * * @since 2.7.0 * - * @param object $user User data object. + * @param WP_User $user User data object. */ function use_ssl_preference( $user ) { ?>