Changeset 5965

Show
Ignore:
Timestamp:
08/28/07 23:23:38 (1 year ago)
Author:
ryan
Message:

Make css cache busting and rtl inclusion uniform across admin. Props mdawaffe. fixes #4830

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-header.php

    r5892 r5965  
    1818<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
    1919<title><?php bloginfo('name') ?> &rsaquo; <?php echo wp_specialchars( strip_tags( $title ) ); ?> &#8212; WordPress</title> 
    20 <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    21 <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
    22 <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    23 <?php endif; ?>  
     20<?php wp_admin_css(); ?>  
    2421<script type="text/javascript"> 
    2522//<![CDATA[ 
  • trunk/wp-admin/bookmarklet.php

    r5056 r5965  
    5252<title><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title> 
    5353<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
    54 <link rel="stylesheet" href="wp-admin.css" type="text/css" /
     54<?php wp_admin_css(); ?
    5555 
    5656<style type="text/css"> 
  • trunk/wp-admin/includes/upload.php

    r5837 r5965  
    340340 
    341341function wp_upload_admin_head() { 
    342     global $wp_locale; 
    343     echo "<link rel='stylesheet' href='" . get_bloginfo('wpurl') . '/wp-admin/css/upload.css?version=' . get_bloginfo('version') . "a' type='text/css' />\n"; 
    344     if ( 'rtl' == $wp_locale->text_direction ) 
    345         echo "<link rel='stylesheet' href='" . get_bloginfo('wpurl') . '/wp-admin/css/upload-rtl.css?version=' . get_bloginfo('version') . "a' type='text/css' />\n"; 
     342    wp_admin_css( 'css/upload' ); 
    346343    if ( 'inline' == @$_GET['style'] ) { 
    347344        echo "<style type='text/css' media='screen'>\n"; 
  • trunk/wp-admin/install.php

    r5844 r5965  
    2020    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    2121    <title><?php _e('WordPress &rsaquo; Installation'); ?></title> 
    22     <link rel="stylesheet" href="css/install.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    23     <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
    24     <link rel="stylesheet" href="css/install-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    25     <?php endif; ?> 
     22    <?php wp_admin_css( 'css/install' ); ?> 
    2623</head> 
    2724<body> 
  • trunk/wp-admin/sidebar.php

    r4495 r5965  
    1414<title>WordPress &#8250; Posted</title> 
    1515<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" /> 
    16 <link rel="stylesheet" href="wp-admin.css" type="text/css" /
     16<?php wp_admin_css(); ?
    1717</head> 
    1818<body> 
     
    2929<title>WordPress &#8250; Sidebar</title> 
    3030<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" /> 
    31 <link rel="stylesheet" href="wp-admin.css" type="text/css" /
     31<?php wp_admin_css(); ?
    3232<style type="text/css" media="screen"> 
    3333form { 
  • trunk/wp-admin/upgrade.php

    r5820 r5965  
    1919    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
    2020    <title><?php _e('WordPress &rsaquo; Upgrade'); ?></title> 
    21     <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/css/install.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    22     <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
    23     <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/css/install-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    24     <?php endif; ?> 
     21    <?php wp_admin_css( 'css/install' ); ?> 
    2522</head> 
    2623<body> 
  • trunk/wp-admin/upload.php

    r5640 r5965  
    6464<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
    6565<title><?php bloginfo('name') ?> &rsaquo; <?php _e('Uploads'); ?> &#8212; WordPress</title> 
    66 <link rel="stylesheet" href="<?php bloginfo( 'wpurl' ); ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    67 <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
    68 <link rel="stylesheet" href="<?php bloginfo( 'wpurl' ); ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    69 <?php endif; ?>  
     66<?php wp_admin_css(); ?> 
    7067<script type="text/javascript"> 
    7168//<![CDATA[ 
  • trunk/wp-admin/widgets.php

    r5934 r5965  
    1111    global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls; 
    1212?> 
    13     <link rel="stylesheet" href="<?php bloginfo( 'wpurl' ); ?>/wp-admin/css/widgets.css?version=<?php bloginfo('version'); ?>" type="text/css" /
     13    <?php wp_admin_css( 'css/widgets' ); ?
    1414    <!--[if IE 7]> 
    1515    <style type="text/css"> 
     
    1818    <![endif]--> 
    1919<?php 
    20     if ( get_bloginfo( 'text_direction' ) == 'rtl' ) {  
    21 ?> 
    22     <link rel="stylesheet" href="<?php bloginfo( 'wpurl' ); ?>/wp-admin/css/widgets-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    23 <?php 
    24     } 
    2520 
    2621    $cols = array(); 
  • trunk/wp-includes/general-template.php

    r5945 r5965  
    10641064    return $r; 
    10651065} 
     1066 
     1067function wp_admin_css_uri( $file = 'wp-admin' ) { 
     1068    $_file = add_query_arg( 'version', get_bloginfo( 'version' ), get_option( 'siteurl' ) . "/wp-admin/$file.css" ); 
     1069    return apply_filters( 'wp_admin_css_uri', $_file, $file ); 
     1070} 
     1071 
     1072function wp_admin_css( $file = 'wp-admin' ) { 
     1073    echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $file ) . "' type='text/css' />\n", $file ); 
     1074    if ( 'rtl' == get_bloginfo( 'text_direction' ) ) { 
     1075        $rtl = ( 'wp-admin' == $file ) ? 'rtl' : "$file-rtl"; 
     1076        echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . wp_admin_css_uri( $rtl ) . "' type='text/css' />\n", $rtl ); 
     1077    } 
     1078} 
     1079 
    10661080?> 
  • trunk/wp-includes/js/tinymce/wp-mce-help.php

    r4983 r5965  
    77<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
    88<title><?php _e('Rich Editor Help') ?></title> 
    9 <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    10 <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
    11 <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    12 <?php endif; ?>  
     9<?php wp_admin_css(); ?> 
    1310<style type="text/css"> 
    1411    #wphead { 
     
    184181</body> 
    185182</html> 
    186  
  • trunk/wp-login.php

    r5800 r5965  
    3232    <title><?php bloginfo('name'); ?> &rsaquo; <?php echo $title; ?></title> 
    3333    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 
    34     <link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    35 <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 
    36     <link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    37 <?php endif; ?> 
     34    <?php wp_admin_css(); ?> 
    3835    <!--[if IE]><style type="text/css">#login h1 a { margin-top: 35px; } #login #login_error { margin-bottom: 10px; }</style><![endif]--><!-- Curse you, IE! --> 
    3936    <script type="text/javascript">