Check for plugin/theme updates every hour when hitting update-core.php, not just themes.php/plugins.php. see #18876.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-20 00:23:35 +00:00
parent 6a4ddffe0f
commit 0f1b959ae5
1 changed files with 4 additions and 2 deletions

View File

@ -143,7 +143,8 @@ function wp_update_plugins() {
$new_option = new stdClass; $new_option = new stdClass;
$new_option->last_checked = time(); $new_option->last_checked = time();
$timeout = 'load-plugins.php' == current_filter() ? 3600 : 43200; //Check for updated every 60 minutes if hitting the themes page, Else, check every 12 hours // Check for updated every 60 minutes if hitting update pages; else, check every 12 hours.
$timeout = in_array( current_filter(), array( 'load-plugins.php', 'load-update.php', 'load-update-core.php' ) ) ? 3600 : 43200;
$time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked );
$plugin_changed = false; $plugin_changed = false;
@ -221,7 +222,8 @@ function wp_update_themes() {
if ( ! is_object($last_update) ) if ( ! is_object($last_update) )
$last_update = new stdClass; $last_update = new stdClass;
$timeout = 'load-themes.php' == current_filter() ? 3600 : 43200; //Check for updated every 60 minutes if hitting the themes page, Else, check every 12 hours // Check for updated every 60 minutes if hitting update pages; else, check every 12 hours.
$timeout = in_array( current_filter(), array( 'load-themes.php', 'load-update.php', 'load-update-core.php' ) ) ? 3600 : 43200;
$time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( ) - $last_update->last_checked ); $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( ) - $last_update->last_checked );
$themes = array(); $themes = array();