Ticket #6124: 6124.05.patch
| File 6124.05.patch, 2.8 KB (added by , 11 years ago) |
|---|
-
src/bp-templates/bp-legacy/buddypress-functions.php
211 211 * Load the theme CSS 212 212 * 213 213 * @since BuddyPress (1.7) 214 * @since BuddyPress (2.3.0) Support custom CSS file named after the current theme or parent theme. 214 215 * 215 216 * @uses wp_enqueue_style() To enqueue the styles 216 217 */ … … 219 220 220 221 // Locate the BP stylesheet 221 222 $ltr = $this->locate_asset_in_stack( "buddypress{$min}.css", 'css' ); 222 $rtl = $this->locate_asset_in_stack( "buddypress-rtl{$min}.css", 'css' );223 223 224 224 // LTR 225 225 if ( ! is_rtl() && isset( $ltr['location'], $ltr['handle'] ) ) { … … 231 231 } 232 232 233 233 // RTL 234 if ( is_rtl() && isset( $rtl['location'], $rtl['handle'] ) ) { 235 $rtl['handle'] = str_replace( '-css', '-css-rtl', $rtl['handle'] ); // Backwards compatibility 236 wp_enqueue_style( $rtl['handle'], $rtl['location'], array(), $this->version, 'screen' ); 234 if ( is_rtl() ) { 235 $rtl = $this->locate_asset_in_stack( "buddypress-rtl{$min}.css", 'css' ); 237 236 238 if ( $min ) { 239 wp_style_add_data( $rtl['handle'], 'suffix', $min ); 237 if ( isset( $rtl['location'], $rtl['handle'] ) ) { 238 $rtl['handle'] = str_replace( '-css', '-css-rtl', $rtl['handle'] ); // Backwards compatibility 239 wp_enqueue_style( $rtl['handle'], $rtl['location'], array(), $this->version, 'screen' ); 240 241 if ( $min ) { 242 wp_style_add_data( $rtl['handle'], 'suffix', $min ); 243 } 240 244 } 241 245 } 242 246 243 247 // Compatibility stylesheets for specific themes. 244 $ asset = $this->locate_asset_in_stack( get_stylesheet() . "{$min}.css", 'css' );245 if ( isset( $asset['location'] ) ) {248 $theme = $this->locate_asset_in_stack( get_template() . "{$min}.css", 'css' ); 249 if ( ! is_rtl() && isset( $theme['location'] ) ) { 246 250 // use a unique handle 247 $ asset['handle'] = 'bp-' . get_stylesheet();248 wp_enqueue_style( $ asset['handle'], $asset['location'], array(), $this->version, 'screen' );251 $theme['handle'] = 'bp-' . get_template(); 252 wp_enqueue_style( $theme['handle'], $theme['location'], array(), $this->version, 'screen' ); 249 253 250 254 if ( $min ) { 251 wp_style_add_data( $asset['handle'], 'suffix', $min ); 255 wp_style_add_data( $theme['handle'], 'suffix', $min ); 256 } 257 } 258 259 // Compatibility stylesheet for specific themes, RTL-version 260 if ( is_rtl() ) { 261 $theme_rtl = $this->locate_asset_in_stack( get_template() . "-rtl{$min}.css", 'css' ); 262 263 if ( isset( $theme_rtl['location'] ) ) { 264 $theme_rtl['handle'] = $theme['handle'] . '-rtl'; 265 wp_enqueue_style( $theme_rtl['handle'], $theme_rtl['location'], array(), $this->version, 'screen' ); 266 267 if ( $min ) { 268 wp_style_add_data( $theme_rtl['handle'], 'suffix', $min ); 269 } 252 270 } 253 271 } 254 272 }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)