mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Add a language pack upgrader class.
At the conclusion of any upgrade, after the transients are refreshed from the API, pending translations are downloaded and installed to wp-content/languages. props dd32. see #18200. git-svn-id: https://develop.svn.wordpress.org/trunk@25566 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -158,6 +158,9 @@ function wp_update_plugins() {
|
||||
|
||||
// Check for update on a different schedule, depending on the page.
|
||||
switch ( current_filter() ) {
|
||||
case 'upgrader_process_complete' :
|
||||
$timeout = 0;
|
||||
break;
|
||||
case 'load-update-core.php' :
|
||||
$timeout = MINUTE_IN_SECONDS;
|
||||
break;
|
||||
@@ -283,6 +286,9 @@ function wp_update_themes() {
|
||||
|
||||
// Check for update on a different schedule, depending on the page.
|
||||
switch ( current_filter() ) {
|
||||
case 'upgrader_process_complete' :
|
||||
$timeout = 0;
|
||||
break;
|
||||
case 'load-update-core.php' :
|
||||
$timeout = MINUTE_IN_SECONDS;
|
||||
break;
|
||||
@@ -485,18 +491,21 @@ if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) &
|
||||
|
||||
add_action( 'admin_init', '_maybe_update_core' );
|
||||
add_action( 'wp_version_check', 'wp_version_check' );
|
||||
add_action( 'upgrader_process_complete', 'wp_version_check' );
|
||||
|
||||
add_action( 'load-plugins.php', 'wp_update_plugins' );
|
||||
add_action( 'load-update.php', 'wp_update_plugins' );
|
||||
add_action( 'load-update-core.php', 'wp_update_plugins' );
|
||||
add_action( 'admin_init', '_maybe_update_plugins' );
|
||||
add_action( 'wp_update_plugins', 'wp_update_plugins' );
|
||||
add_action( 'upgrader_process_complete', 'wp_update_plugins' );
|
||||
|
||||
add_action( 'load-themes.php', 'wp_update_themes' );
|
||||
add_action( 'load-update.php', 'wp_update_themes' );
|
||||
add_action( 'load-update-core.php', 'wp_update_themes' );
|
||||
add_action( 'admin_init', '_maybe_update_themes' );
|
||||
add_action( 'wp_update_themes', 'wp_update_themes' );
|
||||
add_action( 'upgrader_process_complete', 'wp_update_themes' );
|
||||
|
||||
// Automatic Updates - Cron callback
|
||||
add_action( 'wp_auto_updates_maybe_update', 'wp_auto_updates_maybe_update' );
|
||||
|
||||
Reference in New Issue
Block a user