Check for is_rtl() existence before checking it in the fallback condition in wp_admin_css(). Prevents fatal errors when plugins call wp_admin_css() on a non-existent (probably removed) stylesheet. props SergeyBiryukov, fixes #19913.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-03-30 13:10:52 +00:00
parent c0a461e6fe
commit b14e2379fb
1 changed files with 1 additions and 1 deletions

View File

@ -2100,7 +2100,7 @@ function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
}
echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );
if ( is_rtl() )
if ( function_exists( 'is_rtl' ) && is_rtl() )
echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( "$file-rtl" ) ) . "' type='text/css' />\n", "$file-rtl" );
}