Docs: Fix some incorrect return tags in docblocks.

See #48303

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


git-svn-id: http://core.svn.wordpress.org/trunk@46444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2019-11-03 22:23:01 +00:00
parent 441a4d752e
commit b3d6acd6a4
12 changed files with 26 additions and 18 deletions

View File

@ -348,7 +348,7 @@ class WP_Upgrader {
* *
* @param array $nested_files Array of files as returned by WP_Filesystem::dirlist() * @param array $nested_files Array of files as returned by WP_Filesystem::dirlist()
* @param string $path Relative path to prepend to child nodes. Optional. * @param string $path Relative path to prepend to child nodes. Optional.
* @return array $files A flattened array of the $nested_files specified. * @return array A flattened array of the $nested_files specified.
*/ */
protected function flatten_dirlist( $nested_files, $path = '' ) { protected function flatten_dirlist( $nested_files, $path = '' ) {
$files = array(); $files = array();

View File

@ -1001,7 +1001,7 @@ function add_contextual_help( $screen, $help ) {
* @deprecated 3.4.0 Use wp_get_themes() * @deprecated 3.4.0 Use wp_get_themes()
* @see wp_get_themes() * @see wp_get_themes()
* *
* @return array $themes Array of allowed themes. * @return WP_Theme[] Array of WP_Theme objects keyed by their name.
*/ */
function get_allowed_themes() { function get_allowed_themes() {
_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" ); _deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );

View File

@ -244,7 +244,12 @@ function wp_create_image_subsizes( $file, $attachment_id ) {
* @since 5.3.0 * @since 5.3.0
* *
* @param int $threshold The threshold value in pixels. Default 2560. * @param int $threshold The threshold value in pixels. Default 2560.
* @param array $imagesize Indexed array of the image width and height (in that order). * @param array $imagesize {
* Indexed array of the image width and height in pixels.
*
* @type int $0 The image width.
* @type int $0 The image height.
* }
* @param string $file Full path to the uploaded image file. * @param string $file Full path to the uploaded image file.
* @param int $attachment_id Attachment post ID. * @param int $attachment_id Attachment post ID.
*/ */
@ -535,7 +540,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
* *
* @since 4.7.0 * @since 4.7.0
* *
* @param array $fallback_sizes An array of image size names. * @param string[] $fallback_sizes An array of image size names.
* @param array $metadata Current attachment metadata. * @param array $metadata Current attachment metadata.
*/ */
$fallback_sizes = apply_filters( 'fallback_intermediate_image_sizes', $fallback_sizes, $metadata ); $fallback_sizes = apply_filters( 'fallback_intermediate_image_sizes', $fallback_sizes, $metadata );

View File

@ -1126,7 +1126,7 @@ function _wp_delete_orphaned_draft_menu_items() {
* *
* @param int|string $nav_menu_selected_id (id, slug, or name ) of the currently-selected menu * @param int|string $nav_menu_selected_id (id, slug, or name ) of the currently-selected menu
* @param string $nav_menu_selected_title Title of the currently-selected menu * @param string $nav_menu_selected_title Title of the currently-selected menu
* @return array $messages The menu updated message * @return array The menu updated message
*/ */
function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ) { function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ) {
$unsorted_menu_items = wp_get_nav_menu_items( $unsorted_menu_items = wp_get_nav_menu_items(

View File

@ -1104,7 +1104,7 @@ final class WP_Customize_Widgets {
* @since 4.2.0 * @since 4.2.0
* *
* @param array $nonces Array of nonces. * @param array $nonces Array of nonces.
* @return array $nonces Array of nonces. * @return array Array of nonces.
*/ */
public function refresh_nonces( $nonces ) { public function refresh_nonces( $nonces ) {
$nonces['update-widget'] = wp_create_nonce( 'update-widget' ); $nonces['update-widget'] = wp_create_nonce( 'update-widget' );

View File

@ -3393,7 +3393,7 @@ function wp_handle_comment_submission( $comment_data ) {
* @since 4.9.6 * @since 4.9.6
* *
* @param array $exporters An array of personal data exporters. * @param array $exporters An array of personal data exporters.
* @return array $exporters An array of personal data exporters. * @return array An array of personal data exporters.
*/ */
function wp_register_comment_personal_data_exporter( $exporters ) { function wp_register_comment_personal_data_exporter( $exporters ) {
$exporters['wordpress-comments'] = array( $exporters['wordpress-comments'] = array(
@ -3411,7 +3411,7 @@ function wp_register_comment_personal_data_exporter( $exporters ) {
* *
* @param string $email_address The comment author email address. * @param string $email_address The comment author email address.
* @param int $page Comment page. * @param int $page Comment page.
* @return array $return An array of personal data. * @return array An array of personal data.
*/ */
function wp_comments_personal_data_exporter( $email_address, $page = 1 ) { function wp_comments_personal_data_exporter( $email_address, $page = 1 ) {
// Limit us to 500 comments at a time to avoid timing out. // Limit us to 500 comments at a time to avoid timing out.
@ -3503,7 +3503,7 @@ function wp_comments_personal_data_exporter( $email_address, $page = 1 ) {
* @since 4.9.6 * @since 4.9.6
* *
* @param array $erasers An array of personal data erasers. * @param array $erasers An array of personal data erasers.
* @return array $erasers An array of personal data erasers. * @return array An array of personal data erasers.
*/ */
function wp_register_comment_personal_data_eraser( $erasers ) { function wp_register_comment_personal_data_eraser( $erasers ) {
$erasers['wordpress-comments'] = array( $erasers['wordpress-comments'] = array(

View File

@ -76,8 +76,12 @@ function wp_embed_defaults( $url = '' ) {
* *
* @since 2.9.0 * @since 2.9.0
* *
* @param array $size An array of embed width and height values * @param array $size {
* in pixels (in that order). * Indexed array of the embed width and height in pixels.
*
* @type int $0 The embed width.
* @type int $0 The embed height.
* }
* @param string $url The URL that should be embedded. * @param string $url The URL that should be embedded.
*/ */
return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url ); return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url );

View File

@ -6395,7 +6395,7 @@ function wp_auth_check_html() {
* @global int $login_grace_period * @global int $login_grace_period
* *
* @param array $response The Heartbeat response. * @param array $response The Heartbeat response.
* @return array $response The Heartbeat response with 'wp-auth-check' value set. * @return array The Heartbeat response with 'wp-auth-check' value set.
*/ */
function wp_auth_check( $response ) { function wp_auth_check( $response ) {
$response['wp-auth-check'] = is_user_logged_in() && empty( $GLOBALS['login_grace_period'] ); $response['wp-auth-check'] = is_user_logged_in() && empty( $GLOBALS['login_grace_period'] );

View File

@ -1107,8 +1107,7 @@ function _wp_get_attachment_relative_path( $file ) {
* *
* @param string $size_name Image size. Accepts any valid image size name ('thumbnail', 'medium', etc.). * @param string $size_name Image size. Accepts any valid image size name ('thumbnail', 'medium', etc.).
* @param array $image_meta The image meta data. * @param array $image_meta The image meta data.
* @return array|bool Array of width and height values in pixels (in that order) * @return array|bool The image meta data as returned by `wp_get_attachment_metadata()`.
* or false if the size doesn't exist.
*/ */
function _wp_get_image_size_from_meta( $size_name, $image_meta ) { function _wp_get_image_size_from_meta( $size_name, $image_meta ) {
if ( $size_name === 'full' ) { if ( $size_name === 'full' ) {

View File

@ -2577,7 +2577,7 @@ function wp_is_large_network( $using = 'sites', $network_id = null ) {
* *
* @since 4.4.0 * @since 4.4.0
* *
* @return array $names Array of reserved subdirectory names. * @return array Array of reserved subdirectory names.
*/ */
function get_subdirectory_reserved_names() { function get_subdirectory_reserved_names() {
$names = array( $names = array(

View File

@ -1165,7 +1165,7 @@ function rest_is_boolean( $maybe_bool ) {
* *
* @param mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash, * @param mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash,
* user email, WP_User object, WP_Post object, or WP_Comment object. * user email, WP_User object, WP_Post object, or WP_Comment object.
* @return array $urls Gravatar url for each size. * @return array Gravatar url for each size.
*/ */
function rest_get_avatar_urls( $id_or_email ) { function rest_get_avatar_urls( $id_or_email ) {
$avatar_sizes = rest_get_avatar_sizes(); $avatar_sizes = rest_get_avatar_sizes();

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-alpha-46643'; $wp_version = '5.4-alpha-46644';
/** /**
* 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.