Make WordPress Core


Ignore:
Timestamp:
01/12/2015 04:39:39 PM (10 years ago)
Author:
wonderboymusic
Message:

There are some random add_action() and add_filter() calls littered around some files in wp-includes/. These should be moved to wp-includes/default-filters.php with the rest of the registered hooks. It seems like this was the best practice for awhile and then we randomly stopped. This file loads way before any of the includes, so the hooks will be registered for any request that loads WordPress, even SHORTINIT - a lot of the hooks registered won't run anyways (that's already the case).

See #30947.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r30856 r31168  
    670670    return;
    671671}
    672 
    673 add_action( 'admin_init', '_maybe_update_core' );
    674 add_action( 'wp_version_check', 'wp_version_check' );
    675 add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
    676 
    677 add_action( 'load-plugins.php', 'wp_update_plugins' );
    678 add_action( 'load-update.php', 'wp_update_plugins' );
    679 add_action( 'load-update-core.php', 'wp_update_plugins' );
    680 add_action( 'admin_init', '_maybe_update_plugins' );
    681 add_action( 'wp_update_plugins', 'wp_update_plugins' );
    682 add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
    683 
    684 add_action( 'load-themes.php', 'wp_update_themes' );
    685 add_action( 'load-update.php', 'wp_update_themes' );
    686 add_action( 'load-update-core.php', 'wp_update_themes' );
    687 add_action( 'admin_init', '_maybe_update_themes' );
    688 add_action( 'wp_update_themes', 'wp_update_themes' );
    689 add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
    690 
    691 add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 );
    692 
    693 add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
    694 
    695 add_action('init', 'wp_schedule_update_checks');
Note: See TracChangeset for help on using the changeset viewer.