Make WordPress Core


Ignore:
Timestamp:
08/28/2007 11:23:38 PM (17 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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?>
Note: See TracChangeset for help on using the changeset viewer.