Make WordPress Core


Ignore:
Timestamp:
12/17/2010 09:48:30 PM (13 years ago)
Author:
ryan
Message:

Admin bar visibility prefs. Props duck_. see #15829

File:
1 edited

Legend:

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

    r17022 r17032  
    44724472}
    44734473
    4474 /**
    4475  * Set the display status of the admin bar
    4476  *
    4477  * This can be called immediately upon plugin load.  It does not need to be called from a function hooked to the init action.
    4478  *
    4479  * @since 3.1.0
    4480  *
    4481  * @param bool $show Whether to allow the admin bar to show.
    4482  * @return void
    4483  */
    4484 function show_admin_bar( $show ) {
    4485     global $show_admin_bar;
    4486     $show_admin_bar = (bool) $show;
    4487    
    4488     // Remove the object if we are not going to be showing
    4489     // Otherwise you have to call this function prior to the init hook for it to work!
    4490     if ( ! $show_admin_bar && isset( $GLOBALS['wp_admin_bar'] ) )
    4491         $GLOBALS['wp_admin_bar'] = null;
    4492 }
    4493 
    44944474?>
Note: See TracChangeset for help on using the changeset viewer.