Changeset 4027 for trunk/bp-core/bp-core-cssjs.php
- Timestamp:
- 02/08/2011 10:36:57 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-cssjs.php
r4018 r4027 1 1 <?php 2 3 /**4 * bp_core_add_admin_bar_css()5 *6 * Add the CSS needed for the admin bar on blogs (other than the root) and in the admin area.7 *8 * @package BuddyPress Core9 * @uses get_option() Selects a site setting from the DB.10 */11 function bp_core_add_admin_bar_css() {12 global $bp, $current_blog;13 14 if ( defined( 'BP_DISABLE_ADMIN_BAR' ) )15 return false;16 17 if ( ( is_multisite() && $current_blog->blog_id != BP_ROOT_BLOG ) || is_admin() ) {18 $stylesheet = get_blog_option( BP_ROOT_BLOG, 'stylesheet' );19 20 if ( file_exists( WP_CONTENT_DIR . '/themes/' . $stylesheet . '/_inc/css/adminbar.css' ) )21 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 );22 else23 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 );24 }25 }26 add_action( 'bp_init', 'bp_core_add_admin_bar_css' );27 28 2 /** 29 3 * bp_core_admin_menu_icon_css()
Note: See TracChangeset
for help on using the changeset viewer.