_wp_admin_html_begin

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

WordPress Version: 6.1

/**
 * Prints out the beginning of the admin HTML header.
 *
 * @global bool $is_IE
 */
function _wp_admin_html_begin()
{
    global $is_IE;
    $admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
    if ($is_IE) {
        header('X-UA-Compatible: IE=edge');
    }
    ?>
<!DOCTYPE html>
<html class="<?php 
    echo $admin_html_class;
    ?>"
	<?php 
    /**
     * Fires inside the HTML tag in the admin header.
     *
     * @since 2.2.0
     */
    do_action('admin_xml_ns');
    language_attributes();
    ?>
>
<head>
<meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>; charset=<?php 
    echo get_option('blog_charset');
    ?>" />
	<?php 
}

WordPress Version: 5.5

/**
 * @global bool $is_IE
 */
function _wp_admin_html_begin()
{
    global $is_IE;
    $admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
    if ($is_IE) {
        header('X-UA-Compatible: IE=edge');
    }
    ?>
<!DOCTYPE html>
<html class="<?php 
    echo $admin_html_class;
    ?>"
	<?php 
    /**
     * Fires inside the HTML tag in the admin header.
     *
     * @since 2.2.0
     */
    do_action('admin_xml_ns');
    language_attributes();
    ?>
>
<head>
<meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>; charset=<?php 
    echo get_option('blog_charset');
    ?>" />
	<?php 
}

WordPress Version: 5.3

/**
 * @global bool $is_IE
 */
function _wp_admin_html_begin()
{
    global $is_IE;
    $admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
    if ($is_IE) {
        header('X-UA-Compatible: IE=edge');
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php 
    echo $admin_html_class;
    ?>"
	<?php 
    /**
     * Fires inside the HTML tag in the admin header.
     *
     * @since 2.2.0
     */
    do_action('admin_xml_ns');
    language_attributes();
    ?>
	>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" class="<?php 
    echo $admin_html_class;
    ?>"
	<?php 
    /** This action is documented in wp-admin/includes/template.php */
    do_action('admin_xml_ns');
    language_attributes();
    ?>
	>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>; charset=<?php 
    echo get_option('blog_charset');
    ?>" />
	<?php 
}

WordPress Version: 5.1

/**
 * @global bool $is_IE
 */
function _wp_admin_html_begin()
{
    global $is_IE;
    $admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
    if ($is_IE) {
        @header('X-UA-Compatible: IE=edge');
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php 
    echo $admin_html_class;
    ?>"
	<?php 
    /**
     * Fires inside the HTML tag in the admin header.
     *
     * @since 2.2.0
     */
    do_action('admin_xml_ns');
    language_attributes();
    ?>
	>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" class="<?php 
    echo $admin_html_class;
    ?>"
	<?php 
    /** This action is documented in wp-admin/includes/template.php */
    do_action('admin_xml_ns');
    language_attributes();
    ?>
	>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>; charset=<?php 
    echo get_option('blog_charset');
    ?>" />
	<?php 
}

WordPress Version: 4.3

/**
 *
 * @global bool $is_IE
 */
function _wp_admin_html_begin()
{
    global $is_IE;
    $admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
    if ($is_IE) {
        @header('X-UA-Compatible: IE=edge');
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php 
    echo $admin_html_class;
    ?>" <?php 
    /**
     * Fires inside the HTML tag in the admin header.
     *
     * @since 2.2.0
     */
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" class="<?php 
    echo $admin_html_class;
    ?>" <?php 
    /** This action is documented in wp-admin/includes/template.php */
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>; charset=<?php 
    echo get_option('blog_charset');
    ?>" />
<?php 
}

WordPress Version: 4.1

function _wp_admin_html_begin()
{
    global $is_IE;
    $admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
    if ($is_IE) {
        @header('X-UA-Compatible: IE=edge');
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php 
    echo $admin_html_class;
    ?>" <?php 
    /**
     * Fires inside the HTML tag in the admin header.
     *
     * @since 2.2.0
     */
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" class="<?php 
    echo $admin_html_class;
    ?>" <?php 
    /** This action is documented in wp-admin/includes/template.php */
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>; charset=<?php 
    echo get_option('blog_charset');
    ?>" />
<?php 
}

WordPress Version: 3.9

function _wp_admin_html_begin()
{
    global $is_IE;
    $admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
    if ($is_IE) {
        @header('X-UA-Compatible: IE=edge');
    }
    /**
     * Fires inside the HTML tag in the admin header.
     *
     * @since 2.2.0
     */
    ?>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php 
    echo $admin_html_class;
    ?>" <?php 
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<?php 
    /** This action is documented in wp-admin/includes/template.php */
    ?>
<html xmlns="http://www.w3.org/1999/xhtml" class="<?php 
    echo $admin_html_class;
    ?>" <?php 
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>; charset=<?php 
    echo get_option('blog_charset');
    ?>" />
<?php 
}

WordPress Version: 3.8

function _wp_admin_html_begin()
{
    global $is_IE;
    $admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
    if ($is_IE) {
        @header('X-UA-Compatible: IE=edge');
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php 
    echo $admin_html_class;
    ?>" <?php 
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" class="<?php 
    echo $admin_html_class;
    ?>" <?php 
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>; charset=<?php 
    echo get_option('blog_charset');
    ?>" />
<?php 
}

WordPress Version: 3.7

function _wp_admin_html_begin()
{
    $admin_html_class = is_admin_bar_showing() ? 'wp-toolbar' : '';
    ?>
<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php 
    echo $admin_html_class;
    ?>" <?php 
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" class="<?php 
    echo $admin_html_class;
    ?>" <?php 
    do_action('admin_xml_ns');
    ?> <?php 
    language_attributes();
    ?>>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="<?php 
    bloginfo('html_type');
    ?>; charset=<?php 
    echo get_option('blog_charset');
    ?>" />
<?php 
}