Changeset 4436 for trunk/bp-core/bp-core-buddybar.php
- Timestamp:
- 05/28/2011 11:43:37 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-buddybar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-buddybar.php
r4409 r4436 471 471 * Handle the Admin Bar/BuddyBar business 472 472 * 473 * @global num $wp_version 473 474 * @todo Clean up global constants 474 *475 * @global num $wp_version476 475 */ 477 476 function bp_core_load_admin_bar() { … … 492 491 493 492 // Admin bar styles 494 $stylesheet = get_blog_option( BP_ROOT_BLOG, 'stylesheet' ); 495 496 if ( file_exists( WP_CONTENT_DIR . '/themes/' . $stylesheet . '/_inc/css/adminbar.css' ) ) 497 wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_admin_bar_css', WP_CONTENT_URL . '/themes/' . $stylesheet . '/_inc/css/adminbar.css' ), array(), BP_VERSION ); 498 else 499 wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_admin_bar_css', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/css/adminbar.css' ), array(), BP_VERSION ); 493 if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) // Backwards compatibility 494 $stylesheet = get_stylesheet_directory_uri() . '/_inc/css/adminbar.css'; 495 elseif ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) 496 $stylesheet = BP_PLUGIN_URL . '/bp-core/css/buddybar.dev.css'; 497 else 498 $stylesheet = BP_PLUGIN_URL . '/bp-core/css/buddybar.css'; 499 500 wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_admin_bar_css', $stylesheet ), array(), BP_VERSION ); 500 501 501 502 // Actions used to build the BP admin bar … … 512 513 } 513 514 515 /** 516 * Load the buddybar's RTL stylesheet if appropriate. 517 * 518 * This can't be done in bp_core_load_admin_bar() because that function is called before locale.php is included. 519 * 520 * @since 1.3 521 */ 522 function bp_core_load_buddybar_rtl_stylesheet() { 523 if ( !is_rtl() ) 524 return; 525 526 if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) 527 $stylesheet = BP_PLUGIN_URL . '/bp-core/css/buddybar-rtl.dev.css'; 528 else 529 $stylesheet = BP_PLUGIN_URL . '/bp-core/css/buddybar-rtl.css'; 530 531 wp_enqueue_style( 'bp-admin-bar-rtl', apply_filters( 'bp_core_buddybar_rtl_css', $stylesheet ), array( 'bp-admin-bar' ), BP_VERSION ); 532 } 533 add_action( 'wp', 'bp_core_load_buddybar_rtl_stylesheet' ); 514 534 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)