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
This commit is contained in:
John Blackbourn 2020-10-17 16:05:09 +00:00
parent 9d6a2d1c33
commit c16ae60deb
19 changed files with 80 additions and 80 deletions

View File

@ -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 ) : '';
?>

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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 ) ) {

View File

@ -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 ) {

View File

@ -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 ) ) :

View File

@ -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;

View File

@ -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';

View File

@ -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.
*/

View File

@ -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;

View File

@ -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 );

View File

@ -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 ) . '"' : '';

View File

@ -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 ) {

View File

@ -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' );

View File

@ -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 );

View File

@ -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 ) {

View File

@ -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 );
}

View File

@ -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.