From b59c0f307b131efe7bdf4b0670462019519205fb Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 5 Jan 2021 17:16:11 +0000 Subject: [PATCH] Docs: Corrections and improvements to types used in various docblocks. See #51800, #52217 Built from https://develop.svn.wordpress.org/trunk@49936 git-svn-id: http://core.svn.wordpress.org/trunk@49635 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../class-walker-nav-menu-checklist.php | 2 +- .../includes/class-wp-filesystem-base.php | 14 ++++----- .../includes/class-wp-filesystem-direct.php | 14 ++++----- .../includes/class-wp-filesystem-ftpext.php | 14 ++++----- .../class-wp-filesystem-ftpsockets.php | 14 ++++----- .../includes/class-wp-filesystem-ssh2.php | 14 ++++----- wp-admin/includes/class-wp-screen.php | 6 ++-- wp-admin/includes/dashboard.php | 6 ++-- wp-admin/includes/file.php | 2 +- wp-admin/includes/image.php | 18 +++++------ wp-admin/includes/import.php | 2 +- wp-admin/includes/ms.php | 2 +- wp-admin/includes/network.php | 4 +-- wp-admin/includes/plugin.php | 3 +- wp-admin/includes/post.php | 4 +-- wp-admin/includes/template.php | 22 +++++++------- wp-includes/capabilities.php | 4 +-- wp-includes/comment-template.php | 30 +++++++++---------- wp-includes/comment.php | 2 +- wp-includes/embed.php | 2 +- wp-includes/l10n.php | 12 ++++---- wp-includes/media.php | 4 +-- wp-includes/ms-functions.php | 2 +- wp-includes/option.php | 4 +-- wp-includes/post.php | 4 +-- wp-includes/version.php | 2 +- 26 files changed, 104 insertions(+), 103 deletions(-) diff --git a/wp-admin/includes/class-walker-nav-menu-checklist.php b/wp-admin/includes/class-walker-nav-menu-checklist.php index 3f4d6c1574..afafe4a96b 100644 --- a/wp-admin/includes/class-walker-nav-menu-checklist.php +++ b/wp-admin/includes/class-walker-nav-menu-checklist.php @@ -15,7 +15,7 @@ */ class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu { /** - * @param array $fields + * @param array|false $fields Database fields to use. */ public function __construct( $fields = false ) { if ( $fields ) { diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index 11c9390545..c7e030dc86 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -787,13 +787,13 @@ class WP_Filesystem_Base { * @since 2.5.0 * @abstract * - * @param string $path Path for new directory. - * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). - * Default false. - * @param string|int $chown Optional. A user name or number (or false to skip chown). - * Default false. - * @param string|int $chgrp Optional. A group name or number (or false to skip chgrp). - * Default false. + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. * @return bool True on success, false on failure. */ public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) { diff --git a/wp-admin/includes/class-wp-filesystem-direct.php b/wp-admin/includes/class-wp-filesystem-direct.php index 3881f70afc..9d35db6e32 100644 --- a/wp-admin/includes/class-wp-filesystem-direct.php +++ b/wp-admin/includes/class-wp-filesystem-direct.php @@ -521,13 +521,13 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { * * @since 2.5.0 * - * @param string $path Path for new directory. - * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). - * Default false. - * @param string|int $chown Optional. A user name or number (or false to skip chown). - * Default false. - * @param string|int $chgrp Optional. A group name or number (or false to skip chgrp). - * Default false. + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. * @return bool True on success, false on failure. */ public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) { diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 5958e7debf..0a4683c699 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -541,13 +541,13 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { * * @since 2.5.0 * - * @param string $path Path for new directory. - * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). - * Default false. - * @param string|int $chown Optional. A user name or number (or false to skip chown). - * Default false. - * @param string|int $chgrp Optional. A group name or number (or false to skip chgrp). - * Default false. + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. * @return bool True on success, false on failure. */ public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) { diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index 83619bfd35..b9e8c70b51 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -551,13 +551,13 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { * * @since 2.5.0 * - * @param string $path Path for new directory. - * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). - * Default false. - * @param string|int $chown Optional. A user name or number (or false to skip chown). - * Default false. - * @param string|int $chgrp Optional. A group name or number (or false to skip chgrp). - * Default false. + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. * @return bool True on success, false on failure. */ public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) { diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php index 08aba1604f..d91588d0ac 100644 --- a/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -671,13 +671,13 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { * * @since 2.7.0 * - * @param string $path Path for new directory. - * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). - * Default false. - * @param string|int $chown Optional. A user name or number (or false to skip chown). - * Default false. - * @param string|int $chgrp Optional. A group name or number (or false to skip chgrp). - * Default false. + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. * @return bool True on success, false on failure. */ public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) { diff --git a/wp-admin/includes/class-wp-screen.php b/wp-admin/includes/class-wp-screen.php index 9464fabe05..8d9623d709 100644 --- a/wp-admin/includes/class-wp-screen.php +++ b/wp-admin/includes/class-wp-screen.php @@ -539,9 +539,9 @@ final class WP_Screen { * * @since 3.3.0 * - * @param string $option Option name. - * @param string $key Optional. Specific array key for when the option is an array. - * Default false. + * @param string $option Option name. + * @param string|false $key Optional. Specific array key for when the option is an array. + * Default false. * @return string The option value if set, null otherwise. */ public function get_option( $option, $key = false ) { diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 9dfd7450cf..2f438067da 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -506,7 +506,7 @@ function wp_network_dashboard_right_now() { * * @global int $post_ID * - * @param string $error_msg Optional. Error message. Default false. + * @param string|false $error_msg Optional. Error message. Default false. */ function wp_dashboard_quick_press( $error_msg = false ) { global $post_ID; @@ -577,7 +577,7 @@ function wp_dashboard_quick_press( $error_msg = false ) { * * @since 2.7.0 * - * @param WP_Post[] $drafts Optional. Array of posts to display. Default false. + * @param WP_Post[]|false $drafts Optional. Array of posts to display. Default false. */ function wp_dashboard_recent_drafts( $drafts = false ) { if ( ! $drafts ) { @@ -1151,7 +1151,7 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar * * @global callable[] $wp_dashboard_control_callbacks * - * @param int $widget_control_id Registered Widget ID. + * @param int|false $widget_control_id Optional. Registered widget ID. Default false. */ function wp_dashboard_trigger_widget_control( $widget_control_id = false ) { global $wp_dashboard_control_callbacks; diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index baef91be82..fcb45efd7b 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -1255,7 +1255,7 @@ function verify_file_md5( $filename, $expected_md5 ) { * * @param string $filename The file to validate. * @param string|array $signatures A Signature provided for the file. - * @param string $filename_for_errors A friendly filename for errors. Optional. + * @param string|false $filename_for_errors Optional. A friendly filename for errors. * @return bool|WP_Error True on success, false if verification not attempted, * or WP_Error describing an error condition. */ diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 0bfdf288d6..5e418a898b 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -11,15 +11,15 @@ * * @since 2.1.0 * - * @param string|int $src The source file or Attachment ID. - * @param int $src_x The start x position to crop from. - * @param int $src_y The start y position to crop from. - * @param int $src_w The width to crop. - * @param int $src_h The height to crop. - * @param int $dst_w The destination width. - * @param int $dst_h The destination height. - * @param bool $src_abs Optional. If the source crop points are absolute. - * @param string $dst_file Optional. The destination file to write to. + * @param string|int $src The source file or Attachment ID. + * @param int $src_x The start x position to crop from. + * @param int $src_y The start y position to crop from. + * @param int $src_w The width to crop. + * @param int $src_h The height to crop. + * @param int $dst_w The destination width. + * @param int $dst_h The destination height. + * @param bool|false $src_abs Optional. If the source crop points are absolute. + * @param string|false $dst_file Optional. The destination file to write to. * @return string|WP_Error New filepath on success, WP_Error on failure. */ function wp_crop_image( $src, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) { diff --git a/wp-admin/includes/import.php b/wp-admin/includes/import.php index b21004321f..20054c194c 100644 --- a/wp-admin/includes/import.php +++ b/wp-admin/includes/import.php @@ -49,7 +49,7 @@ function _usort_by_first_member( $a, $b ) { * @param string $name Importer name and title. * @param string $description Importer description. * @param callable $callback Callback to run. - * @return WP_Error Returns WP_Error when $callback is WP_Error. + * @return void|WP_Error Void on success. WP_Error when $callback is WP_Error. */ function register_importer( $id, $name, $description, $callback ) { global $wp_importers; diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index a69565d274..9eb2b709d9 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -689,7 +689,7 @@ function mu_dropdown_languages( $lang_files = array(), $current = '' ) { * @global int $wp_db_version WordPress database version. * @global string $pagenow * - * @return false False if the current user is not a super admin. + * @return void|false Void on success. False if the current user is not a super admin. */ function site_admin_notice() { global $wp_db_version, $pagenow; diff --git a/wp-admin/includes/network.php b/wp-admin/includes/network.php index aee365cd62..69acb03394 100644 --- a/wp-admin/includes/network.php +++ b/wp-admin/includes/network.php @@ -107,7 +107,7 @@ function get_clean_basedomain() { * * @global bool $is_apache * - * @param WP_Error $errors + * @param false|WP_Error $errors Optional. Error object. Default false. */ function network_step1( $errors = false ) { global $is_apache; @@ -384,7 +384,7 @@ function network_step1( $errors = false ) { * @global wpdb $wpdb WordPress database abstraction object. * @global bool $is_nginx Whether the server software is Nginx or something else. * - * @param WP_Error $errors + * @param false|WP_Error $errors Optional. Error object. Default false. */ function network_step2( $errors = false ) { global $wpdb, $is_nginx; diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 4c32e3233c..18a4852e47 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -1231,7 +1231,8 @@ function is_uninstallable_plugin( $plugin ) { * @since 2.7.0 * * @param string $plugin Path to the plugin file relative to the plugins directory. - * @return true True if a plugin's uninstall.php file has been found and included. + * @return true|void True if a plugin's uninstall.php file has been found and included. + * Void otherwise. */ function uninstall_plugin( $plugin ) { $file = plugin_basename( $plugin ); diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 4740e375f5..77aadb2135 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -813,7 +813,7 @@ function post_exists( $title, $content = '', $date = '', $type = '' ) { * * @global WP_User $current_user * - * @return int|WP_Error + * @return int|WP_Error Post ID on success, WP_Error on failure. */ function wp_write_post() { if ( isset( $_POST['post_type'] ) ) { @@ -889,7 +889,7 @@ function wp_write_post() { * * @since 2.0.0 * - * @return int|null + * @return int|void Post ID on success, void on failure. */ function write_post() { $result = wp_write_post(); diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 4acbb25afa..746be839af 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -25,17 +25,17 @@ require_once ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php'; * * @see wp_terms_checklist() * - * @param int $post_id Optional. Post to generate a categories checklist for. Default 0. - * $selected_cats must not be an array. Default 0. - * @param int $descendants_and_self Optional. ID of the category to output along with its descendants. - * Default 0. - * @param int[] $selected_cats Optional. Array of category IDs to mark as checked. Default false. - * @param int[] $popular_cats Optional. Array of category IDs to receive the "popular-category" class. - * Default false. - * @param Walker $walker Optional. Walker object to use to build the output. - * Default is a Walker_Category_Checklist instance. - * @param bool $checked_ontop Optional. Whether to move checked items out of the hierarchy and to - * the top of the list. Default true. + * @param int $post_id Optional. Post to generate a categories checklist for. Default 0. + * $selected_cats must not be an array. Default 0. + * @param int $descendants_and_self Optional. ID of the category to output along with its descendants. + * Default 0. + * @param int[]|false $selected_cats Optional. Array of category IDs to mark as checked. Default false. + * @param int[]|false $popular_cats Optional. Array of category IDs to receive the "popular-category" class. + * Default false. + * @param Walker $walker Optional. Walker object to use to build the output. + * Default is a Walker_Category_Checklist instance. + * @param bool $checked_ontop Optional. Whether to move checked items out of the hierarchy and to + * the top of the list. Default true. */ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) { wp_terms_checklist( diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index ec616719ff..22eff2b1e3 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -872,8 +872,8 @@ function get_super_admins() { * * @since 3.0.0 * - * @param int $user_id (Optional) The ID of a user. Defaults to the current user. - * @return bool True if the user is a site admin. + * @param int|false $user_id Optional. The ID of a user. Defaults to false, to check the current user. + * @return bool Whether the user is a site admin. */ function is_super_admin( $user_id = false ) { if ( ! $user_id || get_current_user_id() == $user_id ) { diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 0d2da1f114..4c1b134e3a 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -878,10 +878,10 @@ function get_comments_number( $post_id = 0 ) { * @since 0.71 * @since 5.4.0 The `$deprecated` parameter was changed to `$post_id`. * - * @param string $zero Optional. Text for no comments. Default false. - * @param string $one Optional. Text for one comment. Default false. - * @param string $more Optional. Text for more than one comment. Default false. - * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is the global `$post`. + * @param string|false $zero Optional. Text for no comments. Default false. + * @param string|false $one Optional. Text for one comment. Default false. + * @param string|false $more Optional. Text for more than one comment. Default false. + * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is the global `$post`. */ function comments_number( $zero = false, $one = false, $more = false, $post_id = 0 ) { echo get_comments_number_text( $zero, $one, $more, $post_id ); @@ -1108,9 +1108,9 @@ function get_comment_type( $comment_ID = 0 ) { * * @since 0.71 * - * @param string $commenttxt Optional. String to display for comment type. Default false. - * @param string $trackbacktxt Optional. String to display for trackback type. Default false. - * @param string $pingbacktxt Optional. String to display for pingback type. Default false. + * @param string|false $commenttxt Optional. String to display for comment type. Default false. + * @param string|false $trackbacktxt Optional. String to display for trackback type. Default false. + * @param string|false $pingbacktxt Optional. String to display for pingback type. Default false. */ function comment_type( $commenttxt = false, $trackbacktxt = false, $pingbacktxt = false ) { if ( false === $commenttxt ) { @@ -1199,7 +1199,7 @@ function trackback_url( $deprecated_echo = true ) { * * @since 0.71 * - * @param int $deprecated Not used (Was $timezone = 0). + * @param int|string $deprecated Not used (Was $timezone = 0). */ function trackback_rdf( $deprecated = '' ) { if ( ! empty( $deprecated ) ) { @@ -1980,13 +1980,13 @@ function comment_id_fields( $post_id = 0 ) { * * @global WP_Comment $comment Global comment object. * - * @param string $no_reply_text Optional. Text to display when not replying to a comment. - * Default false. - * @param string $reply_text Optional. Text to display when replying to a comment. - * Default false. Accepts "%s" for the author of the comment - * being replied to. - * @param string $link_to_parent Optional. Boolean to control making the author's name a link - * to their comment. Default true. + * @param string|false $no_reply_text Optional. Text to display when not replying to a comment. + * Default false. + * @param string|false $reply_text Optional. Text to display when replying to a comment. + * Default false. Accepts "%s" for the author of the comment + * being replied to. + * @param bool $link_to_parent Optional. Boolean to control making the author's name a link + * to their comment. Default true. */ function comment_form_title( $no_reply_text = false, $reply_text = false, $link_to_parent = true ) { global $comment; diff --git a/wp-includes/comment.php b/wp-includes/comment.php index e3da72003a..116e66a57c 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -2716,7 +2716,7 @@ function wp_update_comment_count_now( $post_id ) { * @since 1.5.0 * * @param string $url URL to ping. - * @param int $deprecated Not Used. + * @param string $deprecated Not Used. * @return string|false String containing URI on success, false on failure. */ function discover_pingback_server_uri( $url, $deprecated = '' ) { diff --git a/wp-includes/embed.php b/wp-includes/embed.php index 36b007b1ca..884fd9882d 100644 --- a/wp-includes/embed.php +++ b/wp-includes/embed.php @@ -99,7 +99,7 @@ function wp_embed_defaults( $url = '' ) { * @see WP_oEmbed * * @param string $url The URL that should be embedded. - * @param array $args { + * @param array|string $args { * Optional. Additional arguments for retrieving embed HTML. Default empty. * * @type int|string $width Optional. The `maxwidth` value passed to the provider URL. diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index b4115e10a3..b9935d9967 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -934,9 +934,9 @@ function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { * @since 1.5.0 * @since 4.6.0 The function now tries to load the .mo file from the languages directory first. * - * @param string $domain Text domain. Unique identifier for retrieving translated strings. - * @param string $path Optional. Path to the directory containing the .mo file. - * Default false. + * @param string $domain Text domain. Unique identifier for retrieving translated strings. + * @param string|false $path Optional. Path to the directory containing the .mo file. + * Default false. * @return bool True when textdomain is successfully loaded, false otherwise. */ function load_theme_textdomain( $domain, $path = false ) { @@ -974,9 +974,9 @@ function load_theme_textdomain( $domain, $path = false ) { * * @since 2.9.0 * - * @param string $domain Text domain. Unique identifier for retrieving translated strings. - * @param string $path Optional. Path to the directory containing the .mo file. - * Default false. + * @param string $domain Text domain. Unique identifier for retrieving translated strings. + * @param string|false $path Optional. Path to the directory containing the .mo file. + * Default false. * @return bool True when the theme textdomain is successfully loaded, false otherwise. */ function load_child_theme_textdomain( $domain, $path = false ) { diff --git a/wp-includes/media.php b/wp-includes/media.php index b4dae23760..a22a1f359f 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -3362,7 +3362,7 @@ add_shortcode( 'video', 'wp_video_shortcode' ); * * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array * of width and height values in pixels (in that order). Default 'thumbnail'. - * @param string $text Optional. Link text. Default false. + * @param string|false $text Optional. Link text. Default false. */ function previous_image_link( $size = 'thumbnail', $text = false ) { adjacent_image_link( true, $size, $text ); @@ -3377,7 +3377,7 @@ function previous_image_link( $size = 'thumbnail', $text = false ) { * * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array * of width and height values in pixels (in that order). Default 'thumbnail'. - * @param string $text Optional. Link text. Default false. + * @param string|false $text Optional. Link text. Default false. */ function next_image_link( $size = 'thumbnail', $text = false ) { adjacent_image_link( false, $size, $text ); diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index c0d49154b5..3364f25c28 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -2298,7 +2298,7 @@ function maybe_add_existing_user_to_blog() { * * @since MU (3.0.0) * - * @param array $details { + * @param array|false $details { * User details. Must at least contain values for the keys listed below. * * @type int $user_id The ID of the user being added to the current blog. diff --git a/wp-includes/option.php b/wp-includes/option.php index 5454e7becb..055bbfc4e4 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -1058,8 +1058,8 @@ function wp_user_settings() { * * @since 2.7.0 * - * @param string $name The name of the setting. - * @param string $default Optional default value to return when $name is not set. + * @param string $name The name of the setting. + * @param string|false $default Optional. Default value to return when $name is not set. Default false. * @return mixed The last saved user setting or the default value/false if it doesn't exist. */ function get_user_setting( $name, $default = false ) { diff --git a/wp-includes/post.php b/wp-includes/post.php index dde5f92a4c..a0562578c6 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -5843,7 +5843,7 @@ function is_local_attachment( $url ) { * @see wp_insert_post() * * @param string|array $args Arguments for inserting an attachment. - * @param string $file Optional. Filename. + * @param string|false $file Optional. Filename. * @param int $parent Optional. Parent post ID. * @param bool $wp_error Optional. Whether to return a WP_Error on failure. Default false. * @param bool $fire_after_hooks Optional. Whether to fire the after insert hooks. Default true. @@ -7415,7 +7415,7 @@ function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache * @access private * * @param string $post_name Slug. - * @param string $post_ID Optional. Post ID that should be ignored. Default 0. + * @param int $post_ID Optional. Post ID that should be ignored. Default 0. */ function wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post_ID = 0 ) { $trashed_posts_with_desired_slug = get_posts( diff --git a/wp-includes/version.php b/wp-includes/version.php index 3c0084abf1..a12c8db7f6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-49935'; +$wp_version = '5.7-alpha-49936'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.