WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/18/2010 05:58:36 PM (9 years ago)
Author:
ryan
Message:

Allow turning off the admin bar via WP_SHOW_ADMIN_BAR constant, no_admin_bar() function, or show_admin_bar filter. see #14772

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r15813 r15834  
    44094409    return false;
    44104410}
     4411
     4412/**
     4413 * Prevents the admin bar from being shown for the current screen.
     4414 *
     4415 * This can be called immediately upon plugin load.  It does not need to be called from a function hooked to the init action.
     4416 *
     4417 * @since 3.1.0
     4418 */
     4419function no_admin_bar() {
     4420    define('WP_SHOW_ADMIN_BAR', false);
     4421}
Note: See TracChangeset for help on using the changeset viewer.