From 196882960338698984b1759fbc5a33ee85a6287e Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 14 Jan 2011 05:57:25 +0000 Subject: [PATCH] Rename wp_admin_bar_init to _wp_admin_bar_init and add a note that removing this action is the wrong way to do it. git-svn-id: http://svn.automattic.com/wordpress/trunk@17296 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/admin-bar.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index a306a196fb..65a78be3d6 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -8,10 +8,14 @@ /** * Instantiate the admin bar object and set it up as a global for access elsewhere. * + * To hide the admin bar, you're looking in the wrong place. Unhooking this function will not + * properly remove the admin bar. For that, use show_admin_bar(false) or the show_admin_bar filter. + * * @since 3.1.0 + * @access private * @return bool Whether the admin bar was successfully initialized. */ -function wp_admin_bar_init() { +function _wp_admin_bar_init() { global $wp_admin_bar; if ( ! is_admin_bar_showing() ) @@ -32,7 +36,7 @@ function wp_admin_bar_init() { return true; } -add_action( 'init', 'wp_admin_bar_init' ); +add_action( 'init', '_wp_admin_bar_init' ); // Don't remove. Wrong way to disable. /** * Render the admin bar to the page based on the $wp_admin_bar->menu member var.