display_header

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

WordPress Version: 5.5

/**
 * Display installation header.
 *
 * @since 2.5.0
 *
 * @param string $body_classes
 */
function display_header($body_classes = '')
{
    header('Content-Type: text/html; charset=utf-8');
    if (is_rtl()) {
        $body_classes .= 'rtl';
    }
    if ($body_classes) {
        $body_classes = ' ' . $body_classes;
    }
    ?>
<!DOCTYPE html>
<html <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex,nofollow" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    echo $body_classes;
    ?>">
<p id="logo"><?php 
    _e('WordPress');
    ?></p>

	<?php 
}

WordPress Version: .20

/**
 * Display installation header.
 *
 * @since 2.5.0
 *
 * @param string $body_classes
 */
function display_header($body_classes = '')
{
    header('Content-Type: text/html; charset=utf-8');
    if (is_rtl()) {
        $body_classes .= 'rtl';
    }
    if ($body_classes) {
        $body_classes = ' ' . $body_classes;
    }
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex,nofollow" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    echo $body_classes;
    ?>">
<p id="logo"><a href="<?php 
    echo esc_url(__('https://wordpress.org/'));
    ?>"><?php 
    _e('WordPress');
    ?></a></p>

	<?php 
}

WordPress Version: 2.2

/**
 * Display installation header.
 *
 * @since 2.5.0
 *
 * @param string $body_classes
 */
function display_header($body_classes = '')
{
    header('Content-Type: text/html; charset=utf-8');
    if (is_rtl()) {
        $body_classes .= 'rtl';
    }
    if ($body_classes) {
        $body_classes = ' ' . $body_classes;
    }
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex,nofollow" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    wp_admin_css('dashicons', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    echo $body_classes;
    ?>">
<p id="logo"><a href="<?php 
    echo esc_url(__('https://wordpress.org/'));
    ?>"><?php 
    _e('WordPress');
    ?></a></p>

	<?php 
}

WordPress Version: .10

/**
 * Display installation header.
 *
 * @since 2.5.0
 *
 * @param string $body_classes
 */
function display_header($body_classes = '')
{
    header('Content-Type: text/html; charset=utf-8');
    if (is_rtl()) {
        $body_classes .= 'rtl';
    }
    if ($body_classes) {
        $body_classes = ' ' . $body_classes;
    }
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex,nofollow" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    echo $body_classes;
    ?>">
<p id="logo"><a href="<?php 
    echo esc_url(__('https://wordpress.org/'));
    ?>"><?php 
    _e('WordPress');
    ?></a></p>

	<?php 
}

WordPress Version: 5.1

/**
 * Display installation header.
 *
 * @since 2.5.0
 *
 * @param string $body_classes
 */
function display_header($body_classes = '')
{
    header('Content-Type: text/html; charset=utf-8');
    if (is_rtl()) {
        $body_classes .= 'rtl';
    }
    if ($body_classes) {
        $body_classes = ' ' . $body_classes;
    }
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex,nofollow" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    wp_admin_css('dashicons', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    echo $body_classes;
    ?>">
<p id="logo"><a href="<?php 
    echo esc_url(__('https://wordpress.org/'));
    ?>"><?php 
    _e('WordPress');
    ?></a></p>

	<?php 
}

WordPress Version: 4.9

/**
 * Display installation header.
 *
 * @since 2.5.0
 *
 * @param string $body_classes
 */
function display_header($body_classes = '')
{
    header('Content-Type: text/html; charset=utf-8');
    if (is_rtl()) {
        $body_classes .= 'rtl';
    }
    if ($body_classes) {
        $body_classes = ' ' . $body_classes;
    }
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex,nofollow" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    wp_admin_css('dashicons', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    echo $body_classes;
    ?>">
<p id="logo"><a href="<?php 
    echo esc_url(__('https://wordpress.org/'));
    ?>" tabindex="-1"><?php 
    _e('WordPress');
    ?></a></p>

<?php 
}

WordPress Version: 4.4

/**
 * Display install header.
 *
 * @since 2.5.0
 *
 * @param string $body_classes
 */
function display_header($body_classes = '')
{
    header('Content-Type: text/html; charset=utf-8');
    if (is_rtl()) {
        $body_classes .= 'rtl';
    }
    if ($body_classes) {
        $body_classes = ' ' . $body_classes;
    }
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex,nofollow" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    wp_admin_css('dashicons', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    echo $body_classes;
    ?>">
<p id="logo"><a href="<?php 
    echo esc_url(__('https://wordpress.org/'));
    ?>" tabindex="-1"><?php 
    _e('WordPress');
    ?></a></p>

<?php 
}

WordPress Version: 4.3

/**
 * Display install header.
 *
 * @since 2.5.0
 *
 * @param string $body_classes
 */
function display_header($body_classes = '')
{
    header('Content-Type: text/html; charset=utf-8');
    if (is_rtl()) {
        $body_classes .= 'rtl';
    }
    if ($body_classes) {
        $body_classes = ' ' . $body_classes;
    }
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    wp_admin_css('dashicons', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    echo $body_classes;
    ?>">
<h1 id="logo"><a href="<?php 
    echo esc_url(__('https://wordpress.org/'));
    ?>" tabindex="-1"><?php 
    _e('WordPress');
    ?></a></h1>

<?php 
}

WordPress Version: 4.0

/**
 * Display install header.
 *
 * @since 2.5.0
 */
function display_header($body_classes = '')
{
    header('Content-Type: text/html; charset=utf-8');
    if (is_rtl()) {
        $body_classes .= 'rtl';
    }
    if ($body_classes) {
        $body_classes = ' ' . $body_classes;
    }
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    echo $body_classes;
    ?>">
<h1 id="logo"><a href="<?php 
    echo esc_url(__('https://wordpress.org/'));
    ?>" tabindex="-1"><?php 
    _e('WordPress');
    ?></a></h1>

<?php 
}

WordPress Version: 3.9

/**
 * Display install header.
 *
 * @since 2.5.0
 */
function display_header()
{
    header('Content-Type: text/html; charset=utf-8');
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    if (is_rtl()) {
        echo ' rtl';
    }
    ?>">
<h1 id="logo"><a href="<?php 
    echo esc_url(__('https://wordpress.org/'));
    ?>"><?php 
    _e('WordPress');
    ?></a></h1>

<?php 
}

WordPress Version: 3.8

/**
 * Display install header.
 *
 * @since 2.5.0
 * @package WordPress
 * @subpackage Installer
 */
function display_header()
{
    header('Content-Type: text/html; charset=utf-8');
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    if (is_rtl()) {
        echo ' rtl';
    }
    ?>">
<h1 id="logo"><a href="<?php 
    echo esc_url(__('http://wordpress.org/'));
    ?>"><?php 
    _e('WordPress');
    ?></a></h1>

<?php 
}

WordPress Version: 3.7

/**
 * Display install header.
 *
 * @since 2.5.0
 * @package WordPress
 * @subpackage Installer
 */
function display_header()
{
    header('Content-Type: text/html; charset=utf-8');
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
    language_attributes();
    ?>>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php 
    _e('WordPress &rsaquo; Installation');
    ?></title>
	<?php 
    wp_admin_css('install', true);
    ?>
</head>
<body class="wp-core-ui<?php 
    if (is_rtl()) {
        echo ' rtl';
    }
    ?>">
<h1 id="logo"><a href="<?php 
    echo esc_url(__('http://wordpress.org/'));
    ?>"><?php 
    _e('WordPress');
    ?></a></h1>

<?php 
}