From f7dc68f99abcb07e825293c7204144c5c888bfb6 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 21 Sep 2022 20:24:12 +0000 Subject: [PATCH] Docs: Updates and corrections to various inline docs added in 6.1. See #55646 Built from https://develop.svn.wordpress.org/trunk@54284 git-svn-id: http://core.svn.wordpress.org/trunk@53843 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-site-health.php | 10 +++++----- wp-includes/blocks/comments.php | 1 + wp-includes/class-wp-theme-json-resolver.php | 8 +------- wp-includes/pluggable.php | 12 ++++++------ wp-includes/post-template.php | 2 +- wp-includes/post.php | 4 ++-- wp-includes/update.php | 4 ++-- wp-includes/version.php | 2 +- 8 files changed, 19 insertions(+), 24 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index 0db19027a0..eb8ca4306f 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -2486,8 +2486,8 @@ class WP_Site_Health { * * @since 6.1.0 * - * @param string $notes The notes appended to the health check description. - * @param array $available_services The list of available persistent object cache services. + * @param string $notes The notes appended to the health check description. + * @param string[] $available_services The list of available persistent object cache services. */ $notes = apply_filters( 'site_status_persistent_object_cache_notes', $notes, $available_services ); @@ -3349,7 +3349,7 @@ class WP_Site_Health { * * @since 6.1.0 * - * @param array $thresholds The list of threshold names and numbers. + * @param int[] $thresholds The list of threshold numbers keyed by threshold name. */ $thresholds = apply_filters( 'site_status_persistent_object_cache_thresholds', @@ -3408,7 +3408,7 @@ class WP_Site_Health { * * @since 6.1.0 * - * @return array The list of available persistent object cache services. + * @return string[] The list of available persistent object cache services. */ private function available_object_cache_services() { $extensions = array_map( @@ -3431,7 +3431,7 @@ class WP_Site_Health { * * @since 6.1.0 * - * @param array $services The list of available persistent object cache services. + * @param string[] $services The list of available persistent object cache services. */ return apply_filters( 'site_status_available_object_cache_services', $services ); } diff --git a/wp-includes/blocks/comments.php b/wp-includes/blocks/comments.php index 69044c081c..f26c43501a 100644 --- a/wp-includes/blocks/comments.php +++ b/wp-includes/blocks/comments.php @@ -213,6 +213,7 @@ function register_legacy_post_comments_block() { * like `_wp_multiple_block_styles`, which is required in this case because * the block has multiple styles. */ + /** This filter is documented in wp-includes/blocks.php */ $metadata = apply_filters( 'block_type_metadata', $metadata ); register_block_type( 'core/post-comments', $metadata ); diff --git a/wp-includes/class-wp-theme-json-resolver.php b/wp-includes/class-wp-theme-json-resolver.php index d9fae09ba3..16680e7317 100644 --- a/wp-includes/class-wp-theme-json-resolver.php +++ b/wp-includes/class-wp-theme-json-resolver.php @@ -434,13 +434,7 @@ class WP_Theme_JSON_Resolver { } } - /** - * Filters the data provided by the user for global styles & settings. - * - * @since 6.1.0 - * - * @param WP_Theme_JSON_Data Class to access and update the underlying data. - */ + /** This filter is documented in wp-includes/class-wp-theme-json-resolver.php */ $theme_json = apply_filters( 'theme_json_user', new WP_Theme_JSON_Data( $config, 'custom' ) ); $config = $theme_json->get_data(); static::$user = new WP_Theme_JSON( $config, 'custom' ); diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 64478e27fa..ea0482b547 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -2245,9 +2245,9 @@ if ( ! function_exists( 'wp_nonce_tick' ) ) : * updated, e.g. by autosave. * * @since 2.5.0 - * @since 6.1.0 Added `action` argument. + * @since 6.1.0 Added `$action` argument. * - * @param string|int $action Optional. The current nonce action. Default -1. + * @param string|int $action Optional. The nonce action. Default -1. * @return float Float value rounded up to the next highest integer. */ function wp_nonce_tick( $action = -1 ) { @@ -2255,10 +2255,10 @@ if ( ! function_exists( 'wp_nonce_tick' ) ) : * Filters the lifespan of nonces in seconds. * * @since 2.5.0 - * @since 6.1.0 Added `action` argument to allow for more targeted filters. + * @since 6.1.0 Added `$action` argument to allow for more targeted filters. * * @param int $lifespan Lifespan of nonces in seconds. Default 86,400 seconds, or one day. - * @param string|int $action The current nonce action. + * @param string|int $action The nonce action, or -1 if none was provided. */ $nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS, $action ); @@ -2290,8 +2290,8 @@ if ( ! function_exists( 'wp_verify_nonce' ) ) : * * @since 3.5.0 * - * @param int $uid ID of the nonce-owning user. - * @param string $action The nonce action. + * @param int $uid ID of the nonce-owning user. + * @param string|int $action The nonce action, or -1 if none was provided. */ $uid = apply_filters( 'nonce_user_logged_out', $uid, $action ); } diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 89ab67a675..03178a3dd5 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -555,7 +555,7 @@ function get_post_class( $class = '', $post = null ) { * * @since 6.1.0 * - * @param array $taxonomies List of all public taxonomies to generate classes for. + * @param string[] $taxonomies List of all taxonomy names to generate classes for. * @param int $post_id The post ID. * @param string[] $classes An array of post class names. * @param string[] $class An array of additional class names added to the post. diff --git a/wp-includes/post.php b/wp-includes/post.php index cd4a32093f..be02cc401f 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3385,7 +3385,7 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { * * @since 4.4.0 * - * @param WP_Post|false|null $delete Whether to go forward with deletion. @TODO description + * @param WP_Post|false|null $delete Whether to go forward with deletion. * @param WP_Post $post Post object. * @param bool $force_delete Whether to bypass the Trash. */ @@ -6372,7 +6372,7 @@ function wp_delete_attachment( $post_id, $force_delete = false ) { * * @since 5.5.0 * - * @param WP_Post|false|null $delete Whether to go forward with deletion. @TODO description + * @param WP_Post|false|null $delete Whether to go forward with deletion. * @param WP_Post $post Post object. * @param bool $force_delete Whether to bypass the Trash. */ diff --git a/wp-includes/update.php b/wp-includes/update.php index dc3aabdbfc..aa625b264f 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -682,7 +682,7 @@ function wp_update_themes( $extra_stats = array() ) { * @since 3.7.0 * @since 4.5.0 The default value of the `$locales` parameter changed to include all locales. * - * @param array $locales Theme locales. Default is all available locales of the site. + * @param string[] $locales Theme locales. Default is all available locales of the site. */ $locales = apply_filters( 'themes_update_check_locales', $locales ); $locales = array_unique( $locales ); @@ -788,7 +788,7 @@ function wp_update_themes( $extra_stats = array() ) { * } * @param array $theme_data Theme headers. * @param string $theme_stylesheet Theme stylesheet. - * @param array $locales Installed locales to look up translations for. + * @param string[] $locales Installed locales to look up translations for. */ $update = apply_filters( "update_themes_{$hostname}", false, $theme_data, $theme_stylesheet, $locales ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 913c3f48b9..f17d748c38 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta1-54283'; +$wp_version = '6.1-beta1-54284'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.