From f6b632983f90f7cb967307ce508074523abee764 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 23 Feb 2016 16:17:26 +0000 Subject: [PATCH] Updates: Pass locales of all available languages to the themes/plugins update API. This ensures that language packs for all languages in a Multisite install are updated. Fixes #34937. Built from https://develop.svn.wordpress.org/trunk@36630 git-svn-id: http://core.svn.wordpress.org/trunk@36597 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/update.php | 14 ++++++++++---- wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/wp-includes/update.php b/wp-includes/update.php index 5edd801654..6aa1c27a5f 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -262,14 +262,17 @@ function wp_update_plugins( $extra_stats = array() ) { $to_send = compact( 'plugins', 'active' ); + $locales = array_values( get_available_languages() ); /** * Filter the locales requested for plugin translations. * * @since 3.7.0 + * @since 4.5.0 Changed default value of `$locales` to include all locales. * - * @param array $locales Plugin locale. Default is current locale of the site. + * @param array $locales Plugin locales. Default is all available locales of the site. */ - $locales = apply_filters( 'plugins_update_check_locales', array( get_locale() ) ); + $locales = apply_filters( 'plugins_update_check_locales', $locales ); + $locales = array_unique( $locales ); if ( defined( 'DOING_CRON' ) && DOING_CRON ) { $timeout = 30; @@ -432,14 +435,17 @@ function wp_update_themes( $extra_stats = array() ) { $request['themes'] = $themes; + $locales = array_values( get_available_languages() ); /** * Filter the locales requested for theme translations. * * @since 3.7.0 + * @since 4.5.0 Changed default value of `$locales` to include all locales. * - * @param array $locales Theme locale. Default is current locale of the site. + * @param array $locales Theme locales. Default is all available locales of the site. */ - $locales = apply_filters( 'themes_update_check_locales', array( get_locale() ) ); + $locales = apply_filters( 'themes_update_check_locales', $locales ); + $locales = array_unique( $locales ); if ( defined( 'DOING_CRON' ) && DOING_CRON ) { $timeout = 30; diff --git a/wp-includes/version.php b/wp-includes/version.php index ce763f297f..0ca997392d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36629'; +$wp_version = '4.5-alpha-36630'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.