Make css cache busting and rtl inclusion uniform across admin. Props mdawaffe. fixes #4830
git-svn-id: http://svn.automattic.com/wordpress/trunk@5965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c630733e1d
commit
014915caea
|
@ -17,10 +17,7 @@ get_admin_page_title();
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<title><?php bloginfo('name') ?> › <?php echo wp_specialchars( strip_tags( $title ) ); ?> — WordPress</title>
|
||||
<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; ?>
|
||||
<?php wp_admin_css(); ?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
|
||||
|
|
|
@ -51,7 +51,7 @@ if ( !empty($content) ) {
|
|||
<head>
|
||||
<title><?php bloginfo('name') ?> › Bookmarklet — WordPress</title>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
|
||||
<?php wp_admin_css(); ?>
|
||||
|
||||
<style type="text/css">
|
||||
<!--
|
||||
|
|
|
@ -339,10 +339,7 @@ add_action( 'upload_files_browse', 'wp_upload_tab_browse_action' );
|
|||
add_action( 'upload_files_browse-all', 'wp_upload_tab_browse_action' );
|
||||
|
||||
function wp_upload_admin_head() {
|
||||
global $wp_locale;
|
||||
echo "<link rel='stylesheet' href='" . get_bloginfo('wpurl') . '/wp-admin/css/upload.css?version=' . get_bloginfo('version') . "a' type='text/css' />\n";
|
||||
if ( 'rtl' == $wp_locale->text_direction )
|
||||
echo "<link rel='stylesheet' href='" . get_bloginfo('wpurl') . '/wp-admin/css/upload-rtl.css?version=' . get_bloginfo('version') . "a' type='text/css' />\n";
|
||||
wp_admin_css( 'css/upload' );
|
||||
if ( 'inline' == @$_GET['style'] ) {
|
||||
echo "<style type='text/css' media='screen'>\n";
|
||||
echo "\t#upload-menu { position: absolute; z-index: 2; }\n";
|
||||
|
|
|
@ -19,10 +19,7 @@ header( 'Content-Type: text/html; charset=utf-8' );
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?php _e('WordPress › Installation'); ?></title>
|
||||
<link rel="stylesheet" href="css/install.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||
<?php if ( ('rtl' == $wp_locale->text_direction) ) : ?>
|
||||
<link rel="stylesheet" href="css/install-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||
<?php endif; ?>
|
||||
<?php wp_admin_css( 'css/install' ); ?>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
|
||||
|
|
|
@ -13,7 +13,7 @@ if ('b' == $_GET['a']) {
|
|||
<head>
|
||||
<title>WordPress › Posted</title>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" />
|
||||
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
|
||||
<?php wp_admin_css(); ?>
|
||||
</head>
|
||||
<body>
|
||||
<p>Posted !</p>
|
||||
|
@ -28,7 +28,7 @@ if ('b' == $_GET['a']) {
|
|||
<head>
|
||||
<title>WordPress › Sidebar</title>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
|
||||
<link rel="stylesheet" href="wp-admin.css" type="text/css" />
|
||||
<?php wp_admin_css(); ?>
|
||||
<style type="text/css" media="screen">
|
||||
form {
|
||||
padding: 3px;
|
||||
|
|
|
@ -18,10 +18,7 @@ else
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<title><?php _e('WordPress › Upgrade'); ?></title>
|
||||
<link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/css/install.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/css/install-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||
<?php endif; ?>
|
||||
<?php wp_admin_css( 'css/install' ); ?>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
|
||||
|
|
|
@ -63,10 +63,7 @@ if ( 'inline' == $style ) : ?>
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<title><?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — WordPress</title>
|
||||
<link rel="stylesheet" href="<?php bloginfo( 'wpurl' ); ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||
<?php if ( ('rtl' == $wp_locale->text_direction) ) : ?>
|
||||
<link rel="stylesheet" href="<?php bloginfo( 'wpurl' ); ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||
<?php endif; ?>
|
||||
<?php wp_admin_css(); ?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
|
||||
|
|
|
@ -10,18 +10,13 @@ wp_enqueue_script('interface');
|
|||
function wp_widgets_admin_head() {
|
||||
global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls;
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php bloginfo( 'wpurl' ); ?>/wp-admin/css/widgets.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||
<?php wp_admin_css( 'css/widgets' ); ?>
|
||||
<!--[if IE 7]>
|
||||
<style type="text/css">
|
||||
#palette { float: <?php echo ( get_bloginfo( 'text_direction' ) == 'rtl' ) ? 'right' : 'left'; ?>; }
|
||||
</style>
|
||||
<![endif]-->
|
||||
<?php
|
||||
if ( get_bloginfo( 'text_direction' ) == 'rtl' ) {
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php bloginfo( 'wpurl' ); ?>/wp-admin/css/widgets-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||
<?php
|
||||
}
|
||||
|
||||
$cols = array();
|
||||
foreach ( $wp_registered_sidebars as $index => $sidebar ) {
|
||||
|
|
|
@ -1063,4 +1063,18 @@ function paginate_links( $args = '' ) {
|
|||
endswitch;
|
||||
return $r;
|
||||
}
|
||||
|
||||
function wp_admin_css_uri( $file = 'wp-admin' ) {
|
||||
$_file = add_query_arg( 'version', get_bloginfo( 'version' ), get_option( 'siteurl' ) . "/wp-admin/$file.css" );
|
||||
return apply_filters( 'wp_admin_css_uri', $_file, $file );
|
||||
}
|
||||
|
||||
function wp_admin_css( $file = 'wp-admin' ) {
|
||||
echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $file ) . "' type='text/css' />\n", $file );
|
||||
if ( 'rtl' == get_bloginfo( 'text_direction' ) ) {
|
||||
$rtl = ( 'wp-admin' == $file ) ? 'rtl' : "$file-rtl";
|
||||
echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $rtl ) . "' type='text/css' />\n", $rtl );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -6,10 +6,7 @@ header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<title><?php _e('Rich Editor Help') ?></title>
|
||||
<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; ?>
|
||||
<?php wp_admin_css(); ?>
|
||||
<style type="text/css">
|
||||
#wphead {
|
||||
padding-top: 5px;
|
||||
|
@ -183,4 +180,3 @@ header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
|
|||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -31,10 +31,7 @@ function login_header($title = 'Login', $message = '') {
|
|||
<head>
|
||||
<title><?php bloginfo('name'); ?> › <?php echo $title; ?></title>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
||||
<link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||
<?php if ( ('rtl' == $wp_locale->text_direction) ) : ?>
|
||||
<link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||
<?php endif; ?>
|
||||
<?php wp_admin_css(); ?>
|
||||
<!--[if IE]><style type="text/css">#login h1 a { margin-top: 35px; } #login #login_error { margin-bottom: 10px; }</style><![endif]--><!-- Curse you, IE! -->
|
||||
<script type="text/javascript">
|
||||
function focusit() {
|
||||
|
|
Loading…
Reference in New Issue