From e8f9ea22eb6984a417594b8d2cdc7adc6dd68d1a Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 11 Aug 2011 19:06:59 +0000 Subject: [PATCH] Move the CSS inline to wp_die so that it is always available. Fixes #17975, props kawauso for the style type update. git-svn-id: http://svn.automattic.com/wordpress/trunk@18534 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 76 ++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 184965888..35dd776f1 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2811,30 +2811,21 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) { $message .= "\n

$back_text

"; } - if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) - $admin_dir = WP_SITEURL . '/wp-admin/'; - elseif ( function_exists( 'get_bloginfo' ) && '' != get_bloginfo( 'wpurl' ) ) - $admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/'; - elseif ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false ) - $admin_dir = ''; - else - $admin_dir = 'wp-admin/'; - if ( !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ) : - if ( !headers_sent() ) { - status_header( $r['response'] ); - nocache_headers(); - header( 'Content-Type: text/html; charset=utf-8' ); - } - - if ( empty($title) ) - $title = $have_gettext ? __('WordPress › Error') : 'WordPress › Error'; - - $text_direction = 'ltr'; - if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] ) - $text_direction = 'rtl'; - elseif ( function_exists( 'is_rtl' ) && is_rtl() ) - $text_direction = 'rtl'; + if ( !headers_sent() ) { + status_header( $r['response'] ); + nocache_headers(); + header( 'Content-Type: text/html; charset=utf-8' ); + } + + if ( empty($title) ) + $title = $have_gettext ? __('WordPress › Error') : 'WordPress › Error'; + + $text_direction = 'ltr'; + if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] ) + $text_direction = 'rtl'; + elseif ( function_exists( 'is_rtl' ) && is_rtl() ) + $text_direction = 'rtl'; ?> @@ -2842,14 +2833,41 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) { <?php echo $title ?> - - - - + - +