wp_admin_bar_header

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

WordPress Version: 6.4

/**
 * Prints style and scripts for the admin bar.
 *
 * @since 3.1.0
 * @deprecated 6.4.0 Use wp_enqueue_admin_bar_header_styles() instead.
 */
function wp_admin_bar_header()
{
    _deprecated_function(__FUNCTION__, '6.4.0', 'wp_enqueue_admin_bar_header_styles');
    $type_attr = current_theme_supports('html5', 'style') ? '' : ' type="text/css"';
    ?>
	<style<?php 
    echo $type_attr;
    ?> media="print">#wpadminbar { display:none; }</style>
	<?php 
}

WordPress Version: 5.9

/**
 * Prints style and scripts for the admin bar.
 *
 * @since 3.1.0
 */
function wp_admin_bar_header()
{
    $type_attr = current_theme_supports('html5', 'style') ? '' : ' type="text/css"';
    ?>
<style<?php 
    echo $type_attr;
    ?> media="print">#wpadminbar { display:none; }</style>
	<?php 
}

WordPress Version: 5.3

/**
 * Style and scripts for the admin bar.
 *
 * @since 3.1.0
 */
function wp_admin_bar_header()
{
    $type_attr = current_theme_supports('html5', 'style') ? '' : ' type="text/css"';
    ?>
<style<?php 
    echo $type_attr;
    ?> media="print">#wpadminbar { display:none; }</style>
	<?php 
}

WordPress Version: 5.1

/**
 * Style and scripts for the admin bar.
 *
 * @since 3.1.0
 */
function wp_admin_bar_header()
{
    ?>
<style type="text/css" media="print">#wpadminbar { display:none; }</style>
	<?php 
}

WordPress Version: 3.7

/**
 * Style and scripts for the admin bar.
 *
 * @since 3.1.0
 */
function wp_admin_bar_header()
{
    ?>
<style type="text/css" media="print">#wpadminbar { display:none; }</style>
<?php 
}