Make WordPress Core

Changeset 17296


Ignore:
Timestamp:
01/14/2011 05:57:25 AM (12 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r17295 r17296  
    99 * Instantiate the admin bar object and set it up as a global for access elsewhere.
    1010 *
    11  * @since 3.1.0
     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.
     13 *
     14 * @since 3.1.0
     15 * @access private
    1216 * @return bool Whether the admin bar was successfully initialized.
    1317 */
    14 function wp_admin_bar_init() {
     18function _wp_admin_bar_init() {
    1519    global $wp_admin_bar;
    1620
     
    3337    return true;
    3438}
    35 add_action( 'init', 'wp_admin_bar_init' );
     39add_action( 'init', '_wp_admin_bar_init' ); // Don't remove. Wrong way to disable.
    3640
    3741/**
Note: See TracChangeset for help on using the changeset viewer.