Ticket #8590: 8590-hooks.diff
File 8590-hooks.diff, 1.3 KB (added by , 15 years ago) |
---|
-
wp-includes/update.php
283 283 wp_update_themes( ); 284 284 } 285 285 286 add_action( 'init', '_maybe_update_core' ); 286 if ( is_admin() ) { 287 add_action( 'admin_init', '_maybe_update_core' ); 288 add_action( 'admin_init', '_maybe_update_plugins' ); 289 add_action( 'admin_init', '_maybe_update_themes' ); 290 } else { 291 add_action( 'shutdown', '_maybe_update_core', 1 ); 292 add_action( 'shutdown', '_maybe_update_plugins', 1 ); 293 add_action( 'shutdown', '_maybe_update_themes', 1 ); 294 } 287 295 288 296 add_action( 'load-plugins.php', 'wp_update_plugins' ); 289 297 add_action( 'load-update.php', 'wp_update_plugins' ); 290 add_action( 'admin_init', '_maybe_update_plugins' );291 298 add_action( 'wp_update_plugins', 'wp_update_plugins' ); 292 299 293 300 add_action( 'load-themes.php', 'wp_update_themes' ); 294 301 add_action( 'load-update.php', 'wp_update_themes' ); 295 add_action( 'admin_init', '_maybe_update_themes' );296 302 add_action( 'wp_update_themes', 'wp_update_themes' ); 297 303 298 304 if ( !wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING') ) … … 302 308 if ( !wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING') ) 303 309 wp_schedule_event(time(), 'twicedaily', 'wp_update_themes'); 304 310 305 ?> 311 ?> 312 No newline at end of file