From e09cb12b875c3e052ac12d1dc91875e00a020cb8 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 20 Oct 2011 00:23:35 +0000 Subject: [PATCH] Check for plugin/theme updates every hour when hitting update-core.php, not just themes.php/plugins.php. see #18876. git-svn-id: https://develop.svn.wordpress.org/trunk@19022 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/update.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/update.php b/wp-includes/update.php index 028a4d138e..d8de2bf2d8 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -143,7 +143,8 @@ function wp_update_plugins() { $new_option = new stdClass; $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 ); $plugin_changed = false; @@ -221,7 +222,8 @@ function wp_update_themes() { if ( ! is_object($last_update) ) $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 ); $themes = array();