show_admin_bar

The timeline below displays how wordpress function show_admin_bar has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Sets the display status of the admin bar.
 *
 * This can be called immediately upon plugin load. It does not need to be called
 * from a function hooked to the {@see 'init'} action.
 *
 * @since 3.1.0
 *
 * @global bool $show_admin_bar
 *
 * @param bool $show Whether to allow the admin bar to show.
 */
function show_admin_bar($show)
{
    global $show_admin_bar;
    $show_admin_bar = (bool) $show;
}

WordPress Version: 4.5

/**
 * Set the display status of the admin bar.
 *
 * This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action.
 *
 * @since 3.1.0
 *
 * @global bool $show_admin_bar
 *
 * @param bool $show Whether to allow the admin bar to show.
 */
function show_admin_bar($show)
{
    global $show_admin_bar;
    $show_admin_bar = (bool) $show;
}

WordPress Version: 4.3

/**
 * Set the display status of the admin bar.
 *
 * This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action.
 *
 * @since 3.1.0
 *
 * @global WP_Admin_Bar $wp_admin_bar
 *
 * @param bool $show Whether to allow the admin bar to show.
 */
function show_admin_bar($show)
{
    global $show_admin_bar;
    $show_admin_bar = (bool) $show;
}

WordPress Version: 3.7

/**
 * Set the display status of the admin bar.
 *
 * This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action.
 *
 * @since 3.1.0
 *
 * @param bool $show Whether to allow the admin bar to show.
 * @return void
 */
function show_admin_bar($show)
{
    global $show_admin_bar;
    $show_admin_bar = (bool) $show;
}