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
This commit is contained in:
Dominik Schilling 2016-02-23 16:17:26 +00:00
parent 724ccb492f
commit f6b632983f
2 changed files with 11 additions and 5 deletions

View File

@ -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;

View File

@ -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.