From 0f1b959ae5356100a90d1c7da9a857bba6a09ab0 Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@19022 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 028a4d138..d8de2bf2d 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();