WordPress.org

Make WordPress Core

Changeset 18534


Ignore:
Timestamp:
08/11/2011 07:06:59 PM (10 years ago)
Author:
westi
Message:

Move the CSS inline to wp_die so that it is always available. Fixes #17975, props kawauso for the style type update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r18521 r18534  
    28122812    }
    28132813
    2814     if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL )
    2815         $admin_dir = WP_SITEURL . '/wp-admin/';
    2816     elseif ( function_exists( 'get_bloginfo' ) && '' != get_bloginfo( 'wpurl' ) )
    2817         $admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/';
    2818     elseif ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false )
    2819         $admin_dir = '';
    2820     else
    2821         $admin_dir = 'wp-admin/';
    2822 
    28232814    if ( !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ) :
    2824     if ( !headers_sent() ) {
    2825         status_header( $r['response'] );
    2826         nocache_headers();
    2827         header( 'Content-Type: text/html; charset=utf-8' );
    2828     }
    2829 
    2830     if ( empty($title) )
    2831         $title = $have_gettext ? __('WordPress › Error') : 'WordPress › Error';
    2832 
    2833     $text_direction = 'ltr';
    2834     if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] )
    2835         $text_direction = 'rtl';
    2836     elseif ( function_exists( 'is_rtl' ) && is_rtl() )
    2837         $text_direction = 'rtl';
     2815        if ( !headers_sent() ) {
     2816            status_header( $r['response'] );
     2817            nocache_headers();
     2818            header( 'Content-Type: text/html; charset=utf-8' );
     2819        }
     2820   
     2821        if ( empty($title) )
     2822            $title = $have_gettext ? __('WordPress › Error') : 'WordPress › Error';
     2823   
     2824        $text_direction = 'ltr';
     2825        if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] )
     2826            $text_direction = 'rtl';
     2827        elseif ( function_exists( 'is_rtl' ) && is_rtl() )
     2828            $text_direction = 'rtl';
    28382829?>
    28392830<!DOCTYPE html>
     
    28432834    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    28442835    <title><?php echo $title ?></title>
    2845     <link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install.css" type="text/css" />
    2846 <?php
    2847 if ( 'rtl' == $text_direction ) : ?>
    2848     <link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install-rtl.css" type="text/css" />
    2849 <?php endif; ?>
     2836    <style type="text/css">
     2837        html {
     2838            background: #f9f9f9;
     2839        }
     2840        body {
     2841            background: #fff;
     2842            color: #333;
     2843            font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;
     2844            margin: 2em auto;
     2845            width: 700px;
     2846            padding: 1em 2em;
     2847            -moz-border-radius: 11px;
     2848            -khtml-border-radius: 11px;
     2849            -webkit-border-radius: 11px;
     2850            border-radius: 11px;
     2851            border: 1px solid #dfdfdf;
     2852        }
     2853        #error-page {
     2854            margin-top: 50px;
     2855        }
     2856        #error-page p {
     2857            font-size: 12px;
     2858            line-height: 18px;
     2859            margin: 25px 0 20px;
     2860        }
     2861        #error-page code {
     2862            font-family: Consolas, Monaco, monospace;
     2863        }
     2864        <?php if ( 'rtl' == $text_direction ) : ?>
     2865        body { font-family: Tahoma, arial; }
     2866        <?php endif; ?>
     2867    </style>
    28502868</head>
    28512869<body id="error-page">
    2852 <?php endif; ?>
     2870<?php endif; // !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ?>
    28532871    <?php echo $message; ?>
    28542872</body>
Note: See TracChangeset for help on using the changeset viewer.