Fix logo link in wp_die(). Props Sewar. fixes #3138
git-svn-id: https://develop.svn.wordpress.org/trunk@4194 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3e42d396bd
commit
d88ed56d55
|
@ -18,6 +18,9 @@ get_admin_page_title();
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||||
<title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title>
|
<title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title>
|
||||||
<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||||
|
<?php if ( ('rtl' == $wp_locale->text_direction) ) : ?>
|
||||||
|
<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||||
|
<?php endif; ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
|
function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
|
||||||
|
|
|
@ -144,6 +144,7 @@ add_filter('option_blog_charset', 'wp_specialchars');
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
add_action('wp_head', 'rsd_link');
|
add_action('wp_head', 'rsd_link');
|
||||||
|
add_action('wp_head', 'locale_stylesheet');
|
||||||
add_action('publish_future_post', 'wp_publish_post', 10, 1);
|
add_action('publish_future_post', 'wp_publish_post', 10, 1);
|
||||||
add_action('wp_head', 'noindex', 1);
|
add_action('wp_head', 'noindex', 1);
|
||||||
add_action('wp_head', 'wp_print_scripts');
|
add_action('wp_head', 'wp_print_scripts');
|
||||||
|
|
|
@ -1111,6 +1111,12 @@ function wp_die($message, $title = '') {
|
||||||
|
|
||||||
if ( empty($title) )
|
if ( empty($title) )
|
||||||
$title = __('WordPress › Error');
|
$title = __('WordPress › Error');
|
||||||
|
|
||||||
|
if ( strstr($_SERVER['PHP_SELF'], 'wp-admin') )
|
||||||
|
$logo_src = 'images/wordpress-logo.png';
|
||||||
|
else
|
||||||
|
$logo_src = 'wp-admin/images/wordpress-logo.png';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
@ -1156,7 +1162,7 @@ function wp_die($message, $title = '') {
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="logo"><img alt="WordPress" src="<?php echo get_option('siteurl'); ?>/wp-admin/images/wordpress-logo.png" /></h1>
|
<h1 id="logo"><img alt="WordPress" src="<?php echo $logo_src; ?>" /></h1>
|
||||||
<p><?php echo $message; ?></p>
|
<p><?php echo $message; ?></p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -12,6 +12,9 @@ class WP_Locale {
|
||||||
|
|
||||||
var $meridiem;
|
var $meridiem;
|
||||||
|
|
||||||
|
var $text_direction = '';
|
||||||
|
var $locale_vars = array('text_direction');
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
// The Weekdays
|
// The Weekdays
|
||||||
$this->weekday[0] = __('Sunday');
|
$this->weekday[0] = __('Sunday');
|
||||||
|
@ -83,6 +86,21 @@ class WP_Locale {
|
||||||
$this->meridiem['pm'] = __('pm');
|
$this->meridiem['pm'] = __('pm');
|
||||||
$this->meridiem['AM'] = __('AM');
|
$this->meridiem['AM'] = __('AM');
|
||||||
$this->meridiem['PM'] = __('PM');
|
$this->meridiem['PM'] = __('PM');
|
||||||
|
|
||||||
|
$this->_load_locale_data();
|
||||||
|
}
|
||||||
|
|
||||||
|
function _load_locale_data() {
|
||||||
|
$locale = get_locale();
|
||||||
|
$locale_file = ABSPATH . "wp-includes/languages/$locale.php";
|
||||||
|
if ( !file_exists($locale_file) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
include($locale_file);
|
||||||
|
|
||||||
|
foreach ( $this->locale_vars as $var ) {
|
||||||
|
$this->$var = $$var;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_weekday($weekday_number) {
|
function get_weekday($weekday_number) {
|
||||||
|
|
|
@ -25,6 +25,20 @@ function get_stylesheet_uri() {
|
||||||
return apply_filters('stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri);
|
return apply_filters('stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_locale_stylesheet_uri() {
|
||||||
|
global $wp_locale;
|
||||||
|
$stylesheet_dir_uri = get_stylesheet_directory_uri();
|
||||||
|
$dir = get_stylesheet_directory();
|
||||||
|
$locale = get_locale();
|
||||||
|
if ( file_exists("$dir/$locale.css") )
|
||||||
|
$stylesheet_uri = "$stylesheet_dir_uri/$locale.css";
|
||||||
|
else if ( !empty($wp_locale->text_direction) && file_exists("$dir/{$wp_locale->text_direction}.css") )
|
||||||
|
$stylesheet_uri = "$stylesheet_dir_uri/{$wp_locale->text_direction}.css";
|
||||||
|
else
|
||||||
|
$stylesheet_uri = '';
|
||||||
|
return apply_filters('locale_stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri);
|
||||||
|
}
|
||||||
|
|
||||||
function get_template() {
|
function get_template() {
|
||||||
return apply_filters('template', get_option('template'));
|
return apply_filters('template', get_option('template'));
|
||||||
}
|
}
|
||||||
|
@ -369,6 +383,13 @@ function load_template($file) {
|
||||||
require_once($file);
|
require_once($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function locale_stylesheet() {
|
||||||
|
$stylesheet = get_locale_stylesheet_uri();
|
||||||
|
if ( empty($stylesheet) )
|
||||||
|
return;
|
||||||
|
echo '<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen" />';
|
||||||
|
}
|
||||||
|
|
||||||
function validate_current_theme() {
|
function validate_current_theme() {
|
||||||
// Don't validate during an install/upgrade.
|
// Don't validate during an install/upgrade.
|
||||||
if ( defined('WP_INSTALLING') )
|
if ( defined('WP_INSTALLING') )
|
||||||
|
|
Loading…
Reference in New Issue