Changeset 6264 for trunk/bp-core/bp-core-buddybar.php
- Timestamp:
- 08/24/2012 06:10:17 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-buddybar.php
r6161 r6264 666 666 */ 667 667 function bp_core_load_buddybar_css() { 668 global $wp_styles; 669 668 670 if ( bp_use_wp_admin_bar() || ( (int) bp_get_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) || ( defined( 'BP_DISABLE_ADMIN_BAR' ) && BP_DISABLE_ADMIN_BAR ) ) 669 671 return; 670 672 673 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 674 671 675 if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) // Backwards compatibility 672 676 $stylesheet = get_stylesheet_directory_uri() . '/_inc/css/adminbar.css'; 673 elseif ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )674 $stylesheet = BP_PLUGIN_URL . 'bp-core/css/buddybar.dev.css';675 677 else 676 $stylesheet = BP_PLUGIN_URL . 'bp-core/css/buddybar.css'; 677 678 wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_admin_bar_css', $stylesheet ), array(), bp_get_version() ); 679 680 if ( !is_rtl() ) 681 return; 682 683 if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) 684 $stylesheet = BP_PLUGIN_URL . 'bp-core/css/buddybar-rtl.dev.css'; 685 else 686 $stylesheet = BP_PLUGIN_URL . 'bp-core/css/buddybar-rtl.css'; 687 688 wp_enqueue_style( 'bp-admin-bar-rtl', apply_filters( 'bp_core_buddybar_rtl_css', $stylesheet ), array( 'bp-admin-bar' ), bp_get_version() ); 678 $stylesheet = BP_PLUGIN_URL . "bp-core/css/buddybar{$min}.css"; 679 680 wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_buddybar_rtl_css', $stylesheet ), array(), bp_get_version() ); 681 $wp_styles->add_data( 'bp-admin-bar', 'rtl', true ); 682 if ( $min ) 683 $wp_styles->add_data( 'bp-admin-bar', 'suffix', $min ); 689 684 } 690 685 add_action( 'bp_init', 'bp_core_load_buddybar_css' );
Note: See TracChangeset
for help on using the changeset viewer.