WordPress.org

Make WordPress Core

Ticket #13732: 13732.diff

File 13732.diff, 1.2 KB (added by mitchoyoshitaka, 4 years ago)
  • wp-includes/update.php

     
    327327        wp_update_themes(); 
    328328} 
    329329 
    330 add_action( 'admin_init', '_maybe_update_core' ); 
     330if ( !defined( 'DOING_AJAX' ) || !DOING_AJAX  ) { 
     331        add_action( 'admin_init', '_maybe_update_core' ); 
     332        add_action( 'admin_init', '_maybe_update_plugins' ); 
     333        add_action( 'admin_init', '_maybe_update_themes' ); 
     334} 
     335 
    331336add_action( 'wp_version_check', 'wp_version_check' ); 
    332337 
    333338add_action( 'load-plugins.php', 'wp_update_plugins' ); 
    334339add_action( 'load-update.php', 'wp_update_plugins' ); 
    335340add_action( 'load-update-core.php', 'wp_update_plugins' ); 
    336 add_action( 'admin_init', '_maybe_update_plugins' ); 
    337341add_action( 'wp_update_plugins', 'wp_update_plugins' ); 
    338342 
    339343add_action( 'load-themes.php', 'wp_update_themes' ); 
    340344add_action( 'load-update.php', 'wp_update_themes' ); 
    341345add_action( 'load-update-core.php', 'wp_update_themes' ); 
    342 add_action( 'admin_init', '_maybe_update_themes' ); 
    343346add_action( 'wp_update_themes', 'wp_update_themes' ); 
    344347 
    345348if ( !wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING') )