diff --git wp-includes/admin-bar.php wp-includes/admin-bar.php
index 41800c5..fb827d7 100644
|
|
|
8 | 8 | /** |
9 | 9 | * Instantiate the admin bar object and set it up as a global for access elsewhere. |
10 | 10 | * |
11 | | * To hide the admin bar, you're looking in the wrong place. Unhooking this function will not |
12 | | * properly remove the admin bar. For that, use show_admin_bar(false) or the show_admin_bar filter. |
| 11 | * UNHOOKING THIS FUNCTION WILL NOT PROPERLY REMOVE THE ADMIN BAR. |
| 12 | * |
| 13 | * For that, use show_admin_bar(false) or the 'show_admin_bar' filter. |
13 | 14 | * |
14 | 15 | * @since 3.1.0 |
15 | 16 | * @access private |
… |
… |
function _wp_admin_bar_init() { |
36 | 37 | |
37 | 38 | return true; |
38 | 39 | } |
39 | | add_action( 'init', '_wp_admin_bar_init' ); // Don't remove. Wrong way to disable. |
| 40 | add_action( 'admin_init', '_wp_admin_bar_init' ); |
| 41 | add_action( 'template_redirect', '_wp_admin_bar_init', 0 ); |
40 | 42 | |
41 | 43 | /** |
42 | 44 | * Render the admin bar to the page based on the $wp_admin_bar->menu member var. |