Commit c16ae60deb for wordpress.org

commit c16ae60debcd2ac6a1730d216c34bd7a76f31031
Author: John Blackbourn <johnbillion@git.wordpress.org>
Date:   Sat Oct 17 16:05:09 2020 +0000

    Docs: Fix and upgrade various `object` docblock notations.

    See #50768

    Built from https://develop.svn.wordpress.org/trunk@49183


    git-svn-id: http://core.svn.wordpress.org/trunk@48945 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php
index 95f198884c..5e6ae119ac 100644
--- a/wp-admin/edit-tag-form.php
+++ b/wp-admin/edit-tag-form.php
@@ -138,7 +138,7 @@ if ( isset( $tag->name ) ) {
 			<th scope="row"><label for="slug"><?php _e( 'Slug' ); ?></label></th>
 			<?php
 			/**
-			 * Filters the editable slug.
+			 * Filters the editable slug for a post or term.
 			 *
 			 * Note: This is a multi-use hook in that it is leveraged both for editable
 			 * post URIs and term slugs.
@@ -148,7 +148,7 @@ if ( isset( $tag->name ) ) {
 			 *
 			 * @param string          $slug The editable slug. Will be either a term slug or post URI depending
 			 *                              upon the context in which it is evaluated.
-			 * @param WP_Term|WP_Post $tag  Term or WP_Post object.
+			 * @param WP_Term|WP_Post $tag  Term or post object.
 			 */
 			$slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : '';
 			?>
diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php
index fdc26de6ea..e5988ed3c9 100644
--- a/wp-admin/includes/class-wp-media-list-table.php
+++ b/wp-admin/includes/class-wp-media-list-table.php
@@ -802,9 +802,9 @@ class WP_Media_List_Table extends WP_List_Table {
 	 *
 	 * @since 4.3.0
 	 *
-	 * @param object $post        Attachment being acted upon.
-	 * @param string $column_name Current column name.
-	 * @param string $primary     Primary column name.
+	 * @param WP_Post $post        Attachment being acted upon.
+	 * @param string  $column_name Current column name.
+	 * @param string  $primary     Primary column name.
 	 * @return string Row actions output for media attachments, or an empty string
 	 *                if the current column is not the primary column.
 	 */
diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php
index 3b9670750d..8e1656ed6c 100644
--- a/wp-admin/includes/class-wp-ms-users-list-table.php
+++ b/wp-admin/includes/class-wp-ms-users-list-table.php
@@ -490,9 +490,9 @@ class WP_MS_Users_List_Table extends WP_List_Table {
 	 *
 	 * @since 4.3.0
 	 *
-	 * @param object $user        User being acted upon.
-	 * @param string $column_name Current column name.
-	 * @param string $primary     Primary column name.
+	 * @param WP_User $user        User being acted upon.
+	 * @param string  $column_name Current column name.
+	 * @param string  $primary     Primary column name.
 	 * @return string Row actions output for users in Multisite, or an empty string
 	 *                if the current column is not the primary column.
 	 */
diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php
index 8ebdcda031..08e2ff58ec 100644
--- a/wp-admin/includes/class-wp-posts-list-table.php
+++ b/wp-admin/includes/class-wp-posts-list-table.php
@@ -1321,9 +1321,9 @@ class WP_Posts_List_Table extends WP_List_Table {
 	 *
 	 * @since 4.3.0
 	 *
-	 * @param object $post        Post being acted upon.
-	 * @param string $column_name Current column name.
-	 * @param string $primary     Primary column name.
+	 * @param WP_Post $post        Post being acted upon.
+	 * @param string  $column_name Current column name.
+	 * @param string  $primary     Primary column name.
 	 * @return string Row actions output for posts, or an empty string
 	 *                if the current column is not the primary column.
 	 */
diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php
index 92d84baa46..03b7f4ccfa 100644
--- a/wp-admin/includes/export.php
+++ b/wp-admin/includes/export.php
@@ -227,7 +227,7 @@ function export_wp( $args = array() ) {
 	 *
 	 * @since 2.1.0
 	 *
-	 * @param object $category Category Object
+	 * @param WP_Term $category Category Object
 	 */
 	function wxr_cat_name( $category ) {
 		if ( empty( $category->name ) ) {
@@ -242,7 +242,7 @@ function export_wp( $args = array() ) {
 	 *
 	 * @since 2.1.0
 	 *
-	 * @param object $category Category Object
+	 * @param WP_Term $category Category Object
 	 */
 	function wxr_category_description( $category ) {
 		if ( empty( $category->description ) ) {
@@ -257,7 +257,7 @@ function export_wp( $args = array() ) {
 	 *
 	 * @since 2.3.0
 	 *
-	 * @param object $tag Tag Object
+	 * @param WP_Term $tag Tag Object
 	 */
 	function wxr_tag_name( $tag ) {
 		if ( empty( $tag->name ) ) {
@@ -272,7 +272,7 @@ function export_wp( $args = array() ) {
 	 *
 	 * @since 2.3.0
 	 *
-	 * @param object $tag Tag Object
+	 * @param WP_Term $tag Tag Object
 	 */
 	function wxr_tag_description( $tag ) {
 		if ( empty( $tag->description ) ) {
@@ -287,7 +287,7 @@ function export_wp( $args = array() ) {
 	 *
 	 * @since 2.9.0
 	 *
-	 * @param object $term Term Object
+	 * @param WP_Term $term Term Object
 	 */
 	function wxr_term_name( $term ) {
 		if ( empty( $term->name ) ) {
@@ -302,7 +302,7 @@ function export_wp( $args = array() ) {
 	 *
 	 * @since 2.9.0
 	 *
-	 * @param object $term Term Object
+	 * @param WP_Term $term Term Object
 	 */
 	function wxr_term_description( $term ) {
 		if ( empty( $term->description ) ) {
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index 7990f0aec8..b23900961a 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -2275,7 +2275,7 @@ function media_upload_form( $errors = null ) {
  * @since 2.5.0
  *
  * @param string       $type
- * @param object       $errors
+ * @param array        $errors
  * @param int|WP_Error $id
  */
 function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php
index eff0cde907..5d003d3210 100644
--- a/wp-admin/includes/meta-boxes.php
+++ b/wp-admin/includes/meta-boxes.php
@@ -385,7 +385,7 @@ function post_submit_meta_box( $post, $args = array() ) {
  *
  * @since 3.5.0
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function attachment_submit_meta_box( $post ) {
 	?>
@@ -695,7 +695,7 @@ function post_categories_meta_box( $post, $box ) {
  *
  * @since 2.6.0
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function post_excerpt_meta_box( $post ) {
 	?>
@@ -717,7 +717,7 @@ function post_excerpt_meta_box( $post ) {
  *
  * @since 2.6.0
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function post_trackback_meta_box( $post ) {
 	$form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" value="' .
@@ -758,7 +758,7 @@ function post_trackback_meta_box( $post ) {
  *
  * @since 2.6.0
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function post_custom_meta_box( $post ) {
 	?>
@@ -792,7 +792,7 @@ function post_custom_meta_box( $post ) {
  *
  * @since 2.6.0
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function post_comment_status_meta_box( $post ) {
 	?>
@@ -840,7 +840,7 @@ function post_comment_meta_box_thead( $result ) {
  *
  * @since 2.8.0
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function post_comment_meta_box( $post ) {
 	wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
@@ -881,7 +881,7 @@ function post_comment_meta_box( $post ) {
  *
  * @since 2.6.0
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function post_slug_meta_box( $post ) {
 	/** This filter is documented in wp-admin/edit-tag-form.php */
@@ -898,7 +898,7 @@ function post_slug_meta_box( $post ) {
  *
  * @global int $user_ID
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function post_author_meta_box( $post ) {
 	global $user_ID;
@@ -921,7 +921,7 @@ function post_author_meta_box( $post ) {
  *
  * @since 2.6.0
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function post_revisions_meta_box( $post ) {
 	wp_list_post_revisions( $post );
@@ -936,7 +936,7 @@ function post_revisions_meta_box( $post ) {
  *
  * @since 2.7.0
  *
- * @param object $post
+ * @param WP_Post $post
  */
 function page_attributes_meta_box( $post ) {
 	if ( is_post_type_hierarchical( $post->post_type ) ) :
diff --git a/wp-content/themes/twentyeleven/functions.php b/wp-content/themes/twentyeleven/functions.php
index 125363eefd..f6f907d536 100644
--- a/wp-content/themes/twentyeleven/functions.php
+++ b/wp-content/themes/twentyeleven/functions.php
@@ -698,9 +698,9 @@ if ( ! function_exists( 'twentyeleven_comment' ) ) :
 	 *
 	 * @since Twenty Eleven 1.0
 	 *
-	 * @param object $comment The comment object.
-	 * @param array  $args    An array of comment arguments. @see get_comment_reply_link()
-	 * @param int    $depth   The depth of the comment.
+	 * @param WP_Comment $comment The comment object.
+	 * @param array      $args    An array of comment arguments. @see get_comment_reply_link()
+	 * @param int        $depth   The depth of the comment.
 	 */
 	function twentyeleven_comment( $comment, $args, $depth ) {
 		$GLOBALS['comment'] = $comment;
diff --git a/wp-content/themes/twentyeleven/inc/theme-options.php b/wp-content/themes/twentyeleven/inc/theme-options.php
index 9c0d672454..78be3b5aad 100644
--- a/wp-content/themes/twentyeleven/inc/theme-options.php
+++ b/wp-content/themes/twentyeleven/inc/theme-options.php
@@ -526,7 +526,7 @@ add_filter( 'body_class', 'twentyeleven_layout_classes' );
  *
  * @since Twenty Eleven 1.3
  *
- * @param object $wp_customize Customizer object.
+ * @param WP_Customize_Manager $wp_customize Customizer object.
  */
 function twentyeleven_customize_register( $wp_customize ) {
 	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
diff --git a/wp-content/themes/twentynineteen/inc/template-functions.php b/wp-content/themes/twentynineteen/inc/template-functions.php
index 2c33ff06c4..aa4e62cd64 100644
--- a/wp-content/themes/twentynineteen/inc/template-functions.php
+++ b/wp-content/themes/twentynineteen/inc/template-functions.php
@@ -120,7 +120,7 @@ add_filter( 'wp_get_attachment_image_attributes', 'twentynineteen_post_thumbnail
 /**
  * Add an extra menu to our nav for our priority+ navigation to use
  *
- * @param object $nav_menu  Nav menu.
+ * @param string $nav_menu  Nav menu.
  * @param object $args      Nav menu args.
  * @return string More link for hidden menu items.
  */
diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php
index ec790e2d41..b63239fadb 100644
--- a/wp-content/themes/twentyten/functions.php
+++ b/wp-content/themes/twentyten/functions.php
@@ -410,9 +410,9 @@ if ( ! function_exists( 'twentyten_comment' ) ) :
 	 *
 	 * @since Twenty Ten 1.0
 	 *
-	 * @param object $comment The comment object.
-	 * @param array  $args    An array of arguments. @see get_comment_reply_link()
-	 * @param int    $depth   The depth of the comment.
+	 * @param WP_Comment $comment The comment object.
+	 * @param array      $args    An array of arguments. @see get_comment_reply_link()
+	 * @param int        $depth   The depth of the comment.
 	 */
 	function twentyten_comment( $comment, $args, $depth ) {
 		$GLOBALS['comment'] = $comment;
diff --git a/wp-includes/class-walker-category-dropdown.php b/wp-includes/class-walker-category-dropdown.php
index c0fbbd681a..a2ff82d37b 100644
--- a/wp-includes/class-walker-category-dropdown.php
+++ b/wp-includes/class-walker-category-dropdown.php
@@ -47,12 +47,12 @@ class Walker_CategoryDropdown extends Walker {
 	 *
 	 * @see Walker::start_el()
 	 *
-	 * @param string $output   Used to append additional content (passed by reference).
-	 * @param object $category Category data object.
-	 * @param int    $depth    Depth of category. Used for padding.
-	 * @param array  $args     Uses 'selected', 'show_count', and 'value_field' keys, if they exist.
-	 *                         See wp_dropdown_categories().
-	 * @param int    $id       Optional. ID of the current category. Default 0 (unused).
+	 * @param string  $output   Used to append additional content (passed by reference).
+	 * @param WP_Term $category Category data object.
+	 * @param int     $depth    Depth of category. Used for padding.
+	 * @param array   $args     Uses 'selected', 'show_count', and 'value_field' keys, if they exist.
+	 *                          See wp_dropdown_categories().
+	 * @param int     $id       Optional. ID of the current category. Default 0 (unused).
 	 */
 	public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
 		$pad = str_repeat( '&nbsp;', $depth * 3 );
diff --git a/wp-includes/class-walker-category.php b/wp-includes/class-walker-category.php
index c783cad3e9..94ebc58db2 100644
--- a/wp-includes/class-walker-category.php
+++ b/wp-includes/class-walker-category.php
@@ -89,11 +89,11 @@ class Walker_Category extends Walker {
 	 *
 	 * @see Walker::start_el()
 	 *
-	 * @param string $output   Used to append additional content (passed by reference).
-	 * @param object $category Category data object.
-	 * @param int    $depth    Optional. Depth of category in reference to parents. Default 0.
-	 * @param array  $args     Optional. An array of arguments. See wp_list_categories(). Default empty array.
-	 * @param int    $id       Optional. ID of the current category. Default 0.
+	 * @param string  $output   Used to append additional content (passed by reference).
+	 * @param WP_Term $category Category data object.
+	 * @param int     $depth    Optional. Depth of category in reference to parents. Default 0.
+	 * @param array   $args     Optional. An array of arguments. See wp_list_categories(). Default empty array.
+	 * @param int     $id       Optional. ID of the current category. Default 0.
 	 */
 	public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
 		/** This filter is documented in wp-includes/category-template.php */
@@ -113,8 +113,8 @@ class Walker_Category extends Walker {
 			 *
 			 * @since 1.2.0
 			 *
-			 * @param string $description Category description.
-			 * @param object $category    Category object.
+			 * @param string  $description Category description.
+			 * @param WP_Term $category    Category object.
 			 */
 			$atts['title'] = strip_tags( apply_filters( 'category_description', $category->description, $category ) );
 		}
@@ -227,10 +227,10 @@ class Walker_Category extends Walker {
 			 *
 			 * @see wp_list_categories()
 			 *
-			 * @param array  $css_classes An array of CSS classes to be applied to each list item.
-			 * @param object $category    Category data object.
-			 * @param int    $depth       Depth of page, used for padding.
-			 * @param array  $args        An array of wp_list_categories() arguments.
+			 * @param string[] $css_classes An array of CSS classes to be applied to each list item.
+			 * @param WP_Term  $category    Category data object.
+			 * @param int      $depth       Depth of page, used for padding.
+			 * @param array    $args        An array of wp_list_categories() arguments.
 			 */
 			$css_classes = implode( ' ', apply_filters( 'category_css_class', $css_classes, $category, $depth, $args ) );
 			$css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : '';
diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php
index 6294c33188..959d0e2c5c 100644
--- a/wp-includes/class-wp-xmlrpc-server.php
+++ b/wp-includes/class-wp-xmlrpc-server.php
@@ -743,8 +743,8 @@ class wp_xmlrpc_server extends IXR_Server {
 	/**
 	 * Prepares taxonomy data for return in an XML-RPC object.
 	 *
-	 * @param object $taxonomy The unprepared taxonomy data.
-	 * @param array  $fields   The subset of taxonomy fields to return.
+	 * @param WP_Taxonomy $taxonomy The unprepared taxonomy data.
+	 * @param array       $fields   The subset of taxonomy fields to return.
 	 * @return array The prepared taxonomy data.
 	 */
 	protected function _prepare_taxonomy( $taxonomy, $fields ) {
@@ -1003,8 +1003,8 @@ class wp_xmlrpc_server extends IXR_Server {
 	/**
 	 * Prepares media item data for return in an XML-RPC object.
 	 *
-	 * @param object $media_item     The unprepared media item data.
-	 * @param string $thumbnail_size The image size to use for the thumbnail URL.
+	 * @param WP_Post $media_item     The unprepared media item data.
+	 * @param string  $thumbnail_size The image size to use for the thumbnail URL.
 	 * @return array The prepared media item data.
 	 */
 	protected function _prepare_media_item( $media_item, $thumbnail_size = 'thumbnail' ) {
@@ -1032,9 +1032,9 @@ class wp_xmlrpc_server extends IXR_Server {
 		 *
 		 * @since 3.4.0
 		 *
-		 * @param array  $_media_item    An array of media item data.
-		 * @param object $media_item     Media item object.
-		 * @param string $thumbnail_size Image size.
+		 * @param array   $_media_item    An array of media item data.
+		 * @param WP_Post $media_item     Media item object.
+		 * @param string  $thumbnail_size Image size.
 		 */
 		return apply_filters( 'xmlrpc_prepare_media_item', $_media_item, $media_item, $thumbnail_size );
 	}
@@ -1042,7 +1042,7 @@ class wp_xmlrpc_server extends IXR_Server {
 	/**
 	 * Prepares page data for return in an XML-RPC object.
 	 *
-	 * @param object $page The unprepared page data.
+	 * @param WP_Post $page The unprepared page data.
 	 * @return array The prepared page data.
 	 */
 	protected function _prepare_page( $page ) {
@@ -1122,7 +1122,7 @@ class wp_xmlrpc_server extends IXR_Server {
 	/**
 	 * Prepares comment data for return in an XML-RPC object.
 	 *
-	 * @param object $comment The unprepared comment data.
+	 * @param WP_Comment $comment The unprepared comment data.
 	 * @return array The prepared comment data.
 	 */
 	protected function _prepare_comment( $comment ) {
diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php
index 9d60eb86d8..75e7f8770e 100644
--- a/wp-includes/ms-blogs.php
+++ b/wp-includes/ms-blogs.php
@@ -260,7 +260,7 @@ function get_blog_details( $fields = null, $get_all = true ) {
 	 * @since MU (3.0.0)
 	 * @deprecated 4.7.0 Use {@see 'site_details'} instead.
 	 *
-	 * @param object $details The blog details.
+	 * @param WP_Site $details The blog details.
 	 */
 	$details = apply_filters_deprecated( 'blog_details', array( $details ), '4.7.0', 'site_details' );

diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php
index 488dc1f670..58c822c747 100644
--- a/wp-includes/ms-load.php
+++ b/wp-includes/ms-load.php
@@ -407,9 +407,9 @@ function ms_load_current_site_and_network( $domain, $path, $subdomain = false )
 		 *
 		 * @since 3.9.0
 		 *
-		 * @param object $current_site The network that had been determined.
-		 * @param string $domain       The domain used to search for a site.
-		 * @param string $path         The path used to search for a site.
+		 * @param WP_Network $current_site The network that had been determined.
+		 * @param string     $domain       The domain used to search for a site.
+		 * @param string     $path         The path used to search for a site.
 		 */
 		do_action( 'ms_site_not_found', $current_site, $domain, $path );

diff --git a/wp-includes/post-formats.php b/wp-includes/post-formats.php
index a496b118f0..7072266834 100644
--- a/wp-includes/post-formats.php
+++ b/wp-includes/post-formats.php
@@ -186,9 +186,9 @@ function _post_format_request( $qvs ) {
  *
  * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
  *
- * @param string $link
- * @param object $term
- * @param string $taxonomy
+ * @param string  $link
+ * @param WP_Term $term
+ * @param string  $taxonomy
  * @return string
  */
 function _post_format_link( $link, $term, $taxonomy ) {
diff --git a/wp-includes/user.php b/wp-includes/user.php
index 07119b2d7c..ce4ce851a3 100644
--- a/wp-includes/user.php
+++ b/wp-includes/user.php
@@ -762,8 +762,8 @@ function get_users( $args = array() ) {
  * @param int  $user_id User ID
  * @param bool $all     Whether to retrieve all sites, or only sites that are not
  *                      marked as deleted, archived, or spam.
- * @return array A list of the user's sites. An empty array if the user doesn't exist
- *               or belongs to no sites.
+ * @return object[] A list of the user's sites. An empty array if the user doesn't exist
+ *                  or belongs to no sites.
  */
 function get_blogs_of_user( $user_id, $all = false ) {
 	global $wpdb;
@@ -783,10 +783,10 @@ function get_blogs_of_user( $user_id, $all = false ) {
 	 *
 	 * @since 4.6.0
 	 *
-	 * @param null|array $sites   An array of site objects of which the user is a member.
-	 * @param int        $user_id User ID.
-	 * @param bool       $all     Whether the returned array should contain all sites, including
-	 *                            those marked 'deleted', 'archived', or 'spam'. Default false.
+	 * @param null|object[] $sites   An array of site objects of which the user is a member.
+	 * @param int           $user_id User ID.
+	 * @param bool          $all     Whether the returned array should contain all sites, including
+	 *                               those marked 'deleted', 'archived', or 'spam'. Default false.
 	 */
 	$sites = apply_filters( 'pre_get_blogs_of_user', null, $user_id, $all );

@@ -875,10 +875,10 @@ function get_blogs_of_user( $user_id, $all = false ) {
 	 *
 	 * @since MU (3.0.0)
 	 *
-	 * @param array $sites   An array of site objects belonging to the user.
-	 * @param int   $user_id User ID.
-	 * @param bool  $all     Whether the returned sites array should contain all sites, including
-	 *                       those marked 'deleted', 'archived', or 'spam'. Default false.
+	 * @param object[] $sites   An array of site objects belonging to the user.
+	 * @param int      $user_id User ID.
+	 * @param bool     $all     Whether the returned sites array should contain all sites, including
+	 *                          those marked 'deleted', 'archived', or 'spam'. Default false.
 	 */
 	return apply_filters( 'get_blogs_of_user', $sites, $user_id, $all );
 }
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 789711c45f..67c4af22f2 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -13,7 +13,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '5.6-alpha-49182';
+$wp_version = '5.6-alpha-49183';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.