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. Built from https://develop.svn.wordpress.org/trunk@31168 git-svn-id: http://core.svn.wordpress.org/trunk@31149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -44,9 +44,6 @@ function _wp_admin_bar_init() {
|
||||
|
||||
return true;
|
||||
}
|
||||
// Don't remove. Wrong way to disable.
|
||||
add_action( 'template_redirect', '_wp_admin_bar_init', 0 );
|
||||
add_action( 'admin_init', '_wp_admin_bar_init' );
|
||||
|
||||
/**
|
||||
* Render the admin bar to the page based on the $wp_admin_bar->menu member var.
|
||||
@@ -92,8 +89,6 @@ function wp_admin_bar_render() {
|
||||
*/
|
||||
do_action( 'wp_after_admin_bar_render' );
|
||||
}
|
||||
add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
|
||||
add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
|
||||
|
||||
/**
|
||||
* Add the WordPress logo menu.
|
||||
|
||||
Reference in New Issue
Block a user