WordPress.org

Make WordPress Core

Ticket #17734: admin-bar.diff

File admin-bar.diff, 1.1 KB (added by trepmal, 7 years ago)
  • wp-includes/admin-bar.php

     
    9494}
    9595
    9696/**
    97  * Add the "Dashboard"/"View Site" menu.
     97 * Add the "Dashboard"/"Visit Site" menu.
    9898 *
    9999 * @since 3.2.0
    100100 */
     
    387387}
    388388
    389389/**
    390  * Set the display status of the admin bar
     390 * Set the display status of the admin bar.
    391391 *
    392392 * This can be called immediately upon plugin load.  It does not need to be called from a function hooked to the init action.
    393393 *
     
    437437 *
    438438 * @param string $context Context of this preference check, either 'admin' or 'front'
    439439 * @param int $user Optional. ID of the user to check, defaults to 0 for current user
    440  * @return bool Whether the admin bar should be showing for this user
     440 * @return bool Whether the admin bar should be showing for this user.
    441441 */
    442442function _get_admin_bar_pref( $context, $user = 0 ) {
    443443        $pref = get_user_option( "show_admin_bar_{$context}", $user );
     
    447447        return 'true' === $pref;
    448448}
    449449
    450 ?>
    451  No newline at end of file
     450?>