From 2f1cd87ae2cfdd3474b40c1b60b89842db892f55 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 22 Sep 2022 11:11:45 +0000 Subject: [PATCH] Docs: Use typed array notation for the `$locales` parameter in plugin update filters. The value comes from `get_available_languages()`, which returns an array of strings. This affects: * `plugins_update_check_locales` filter. * `update_plugins_{$hostname}` filter. Follow-up to [36630], [46660], [50921], [53933], [54284]. See #55646. git-svn-id: https://develop.svn.wordpress.org/trunk@54287 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/update.php b/src/wp-includes/update.php index aa625b264f..f352cab7c2 100644 --- a/src/wp-includes/update.php +++ b/src/wp-includes/update.php @@ -400,7 +400,7 @@ function wp_update_plugins( $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 Plugin locales. Default is all available locales of the site. + * @param string[] $locales Plugin locales. Default is all available locales of the site. */ $locales = apply_filters( 'plugins_update_check_locales', $locales ); $locales = array_unique( $locales ); @@ -506,7 +506,7 @@ function wp_update_plugins( $extra_stats = array() ) { * } * @param array $plugin_data Plugin headers. * @param string $plugin_file Plugin filename. - * @param array $locales Installed locales to look up translations for. + * @param string[] $locales Installed locales to look up translations for. */ $update = apply_filters( "update_plugins_{$hostname}", false, $plugin_data, $plugin_file, $locales );