Skip to content

Commit

Permalink
Docs: Updates and corrections to various inline docs added in 6.1.
Browse files Browse the repository at this point in the history
See #55646


git-svn-id: https://develop.svn.wordpress.org/trunk@54284 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
johnbillion committed Sep 21, 2022
1 parent eea4277 commit 1af2c8b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 23 deletions.
10 changes: 5 additions & 5 deletions src/wp-admin/includes/class-wp-site-health.php
Original file line number Diff line number Diff line change
Expand Up @@ -2486,8 +2486,8 @@ public function get_test_persistent_object_cache() {
*
* @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 );

Expand Down Expand Up @@ -3349,7 +3349,7 @@ public function should_suggest_persistent_object_cache() {
*
* @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',
Expand Down Expand Up @@ -3408,7 +3408,7 @@ public function should_suggest_persistent_object_cache() {
*
* @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(
Expand All @@ -3431,7 +3431,7 @@ private function available_object_cache_services() {
*
* @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 );
}
Expand Down
1 change: 1 addition & 0 deletions src/wp-includes/blocks/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
8 changes: 1 addition & 7 deletions src/wp-includes/class-wp-theme-json-resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,7 @@ public static function get_user_data() {
}
}

/**
* 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' );
Expand Down
12 changes: 6 additions & 6 deletions src/wp-includes/pluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2245,20 +2245,20 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' )
* 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 ) {
/**
* 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 );

Expand Down Expand Up @@ -2290,8 +2290,8 @@ function wp_verify_nonce( $nonce, $action = -1 ) {
*
* @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 );
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/post-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );

Expand Down

0 comments on commit 1af2c8b

Please sign in to comment.