Don't fire update checks for ajax requests. Props mitchoyoshitaka. fixes #13732

git-svn-id: http://svn.automattic.com/wordpress/trunk@19693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2012-01-05 22:46:32 +00:00
parent a95ad847db
commit 5849122174

View File

@ -431,7 +431,7 @@ function wp_schedule_update_checks() {
wp_schedule_event(time(), 'twicedaily', 'wp_update_themes'); wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
} }
if ( ! is_main_site() && ! is_network_admin() ) if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) )
return; return;
add_action( 'admin_init', '_maybe_update_core' ); add_action( 'admin_init', '_maybe_update_core' );