Ticket #17975: 17975.patch
File 17975.patch, 2.1 KB (added by , 13 years ago) |
---|
-
wp-includes/functions.php
2779 2779 * @param string|array $args Optional arguments to control behavior. 2780 2780 */ 2781 2781 function _default_wp_die_handler( $message, $title = '', $args = array() ) { 2782 $defaults = array( 'response' => 500 );2782 $defaults = array( 'response' => 500, 'inline_styles' => false ); 2783 2783 $r = wp_parse_args($args, $defaults); 2784 2784 2785 2785 $have_gettext = function_exists('__'); … … 2817 2817 nocache_headers(); 2818 2818 header( 'Content-Type: text/html; charset=utf-8' ); 2819 2819 } 2820 2820 2821 if ( ! $r['inline_styles'] ) { 2822 // Attempt to find the admin url 2823 if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) 2824 $admin_dir = WP_SITEURL . '/wp-admin/'; 2825 elseif ( function_exists( 'get_bloginfo' ) && '' != get_bloginfo( 'wpurl' ) ) 2826 $admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/'; 2827 elseif ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false ) 2828 $admin_dir = ''; 2829 else 2830 $r['inline_styles'] = true; // If we couldn't find the admin url for the install stylesheet, use the minimal inline styling anyway. 2831 } 2832 2821 2833 if ( empty($title) ) 2822 2834 $title = $have_gettext ? __('WordPress › Error') : 'WordPress › Error'; 2823 2835 … … 2833 2845 <head> 2834 2846 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 2835 2847 <title><?php echo $title ?></title> 2848 <?php if ( $r['inline_styles'] ) : ?> 2836 2849 <style type="text/css"> 2837 2850 html { 2838 2851 background: #f9f9f9; … … 2865 2878 body { font-family: Tahoma, arial; } 2866 2879 <?php endif; ?> 2867 2880 </style> 2881 <?php else : ?> 2882 <link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install.css" type="text/css" /> 2883 <?php if ( 'rtl' == $text_direction ) : ?> 2884 <link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install-rtl.css" type="text/css" /> 2885 <?php endif; ?> 2886 <?php endif; //$r['inline_styles'] ?> 2887 2868 2888 </head> 2869 2889 <body id="error-page"> 2870 2890 <?php endif; // !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ?>