From 2a3ad7c4304143c4761726c7c49beda995d6f2f0 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 8 Nov 2021 10:48:59 +0000 Subject: [PATCH] Docs: Various docblock improvements and corrections. See #53399 Built from https://develop.svn.wordpress.org/trunk@52035 git-svn-id: http://core.svn.wordpress.org/trunk@51627 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/deprecated.php | 24 +++++++------- wp-admin/includes/plugin.php | 54 ++++++++++++++++---------------- wp-includes/formatting.php | 2 +- wp-includes/option.php | 6 ++-- wp-includes/version.php | 2 +- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index 27ce1d4e4f..e8ae4e945b 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -163,11 +163,11 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le * @deprecated 3.0.0 Use register_setting() * @see register_setting() * - * @param string $option_group A settings group name. Should correspond to an allowed option key name. - * Default allowed option key names include 'general', 'discussion', 'media', - * 'reading', 'writing', and 'options'. - * @param string $option_name The name of an option to sanitize and save. - * @param callable $sanitize_callback A callback function that sanitizes the option's value. + * @param string $option_group A settings group name. Should correspond to an allowed option key name. + * Default allowed option key names include 'general', 'discussion', 'media', + * 'reading', 'writing', and 'options'. + * @param string $option_name The name of an option to sanitize and save. + * @param callable $sanitize_callback Optional. A callback function that sanitizes the option's value. */ function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { _deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' ); @@ -181,9 +181,9 @@ function add_option_update_handler( $option_group, $option_name, $sanitize_callb * @deprecated 3.0.0 Use unregister_setting() * @see unregister_setting() * - * @param string $option_group - * @param string $option_name - * @param callable $sanitize_callback + * @param string $option_group The settings group name used during registration. + * @param string $option_name The name of the option to unregister. + * @param callable $sanitize_callback Optional. Deprecated. */ function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { _deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' ); @@ -1426,8 +1426,8 @@ function _relocate_children( $old_ID, $new_ID ) { * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param string $icon_url The url to the icon to be used for this menu. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param string $icon_url Optional. The URL to the icon to be used for this menu. * @return string The resulting page's hook_suffix. */ function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { @@ -1459,8 +1459,8 @@ function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $fu * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param string $icon_url The url to the icon to be used for this menu. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param string $icon_url Optional. The URL to the icon to be used for this menu. * @return string The resulting page's hook_suffix. */ function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 0934d6b810..faea96f43a 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -1299,14 +1299,14 @@ function uninstall_plugin( $plugin ) { * @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu page and only * include lowercase alphanumeric, dashes, and underscores characters to be compatible * with sanitize_key(). - * @param callable $function The function to be called to output the content for this page. - * @param string $icon_url The URL to the icon to be used for this menu. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param string $icon_url Optional. The URL to the icon to be used for this menu. * * Pass a base64-encoded SVG using a data URI, which will be colored to match * the color scheme. This should begin with 'data:image/svg+xml;base64,'. * * Pass the name of a Dashicons helper class to use a font icon, * e.g. 'dashicons-chart-pie'. * * Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS. - * @param int $position The position in the menu order this item should appear. + * @param int $position Optional. The position in the menu order this item should appear. * @return string The resulting page's hook_suffix. */ function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null ) { @@ -1377,8 +1377,8 @@ function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $func * @param string $menu_slug The slug name to refer to this menu by. Should be unique for this menu * and only include lowercase alphanumeric, dashes, and underscores characters * to be compatible with sanitize_key(). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1489,8 +1489,8 @@ function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_management_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1513,8 +1513,8 @@ function add_management_page( $page_title, $menu_title, $capability, $menu_slug, * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1537,8 +1537,8 @@ function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $f * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1561,8 +1561,8 @@ function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $fun * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1585,8 +1585,8 @@ function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $f * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1614,8 +1614,8 @@ function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $fun * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1638,8 +1638,8 @@ function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1662,8 +1662,8 @@ function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $fun * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1686,8 +1686,8 @@ function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $fun * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1710,8 +1710,8 @@ function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $fun * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { @@ -1734,8 +1734,8 @@ function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $fun * @param string $menu_title The text to be used for the menu. * @param string $capability The capability required for this menu to be displayed to the user. * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). - * @param callable $function The function to be called to output the content for this page. - * @param int $position The position in the menu order this item should appear. + * @param callable $function Optional. The function to be called to output the content for this page. + * @param int $position Optional. The position in the menu order this item should appear. * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required. */ function add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 156513ae8f..91fcd44ced 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -5029,7 +5029,7 @@ function wp_pre_kses_less_than( $text ) { * * @since 2.3.0 * - * @param array $matches Populated by matches to preg_replace. + * @param string[] $matches Populated by matches to preg_replace. * @return string The text returned after esc_html if needed. */ function wp_pre_kses_less_than_callback( $matches ) { diff --git a/wp-includes/option.php b/wp-includes/option.php index 6cc4e00b1a..f90e82017e 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -2383,9 +2383,9 @@ function register_setting( $option_group, $option_name, $args = array() ) { * @global array $new_allowed_options * @global array $wp_registered_settings * - * @param string $option_group The settings group name used during registration. - * @param string $option_name The name of the option to unregister. - * @param callable|string $deprecated Deprecated. + * @param string $option_group The settings group name used during registration. + * @param string $option_name The name of the option to unregister. + * @param callable $deprecated Optional. Deprecated. */ function unregister_setting( $option_group, $option_name, $deprecated = '' ) { global $new_allowed_options, $wp_registered_settings; diff --git a/wp-includes/version.php b/wp-includes/version.php index 12f76b23a8..56d16fdac5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52034'; +$wp_version = '5.9-alpha-52035'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.