/** * Handle the BuddyBar CSS */ function bp_core_load_buddybar_css() { if (bp_use_nxt_admin_bar() || (int) bp_get_option('hide-loggedout-adminbar') && !is_user_logged_in() || defined('BP_DISABLE_ADMIN_BAR') && BP_DISABLE_ADMIN_BAR) { return; } if (file_exists(get_stylesheet_directory() . '/_inc/css/adminbar.css')) { // Backwards compatibility $stylesheet = get_stylesheet_directory_uri() . '/_inc/css/adminbar.css'; } elseif (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) { $stylesheet = BP_PLUGIN_URL . '/bp-core/css/buddybar.dev.css'; } else { $stylesheet = BP_PLUGIN_URL . '/bp-core/css/buddybar.css'; } nxt_enqueue_style('bp-admin-bar', apply_filters('bp_core_admin_bar_css', $stylesheet), array(), '20110723'); if (!is_rtl()) { return; } if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) { $stylesheet = BP_PLUGIN_URL . '/bp-core/css/buddybar-rtl.dev.css'; } else { $stylesheet = BP_PLUGIN_URL . '/bp-core/css/buddybar-rtl.css'; } nxt_enqueue_style('bp-admin-bar-rtl', apply_filters('bp_core_buddybar_rtl_css', $stylesheet), array('bp-admin-bar'), '20110723'); }
/** * Set up BuddyPress implementation of the nxt admin bar */ function bp_setup_admin_bar() { if (bp_use_nxt_admin_bar()) { do_action('bp_setup_admin_bar'); } }
/** * Handle the Admin Bar CSS */ function bp_core_load_admin_bar_css() { if (!bp_use_nxt_admin_bar()) { return; } // Admin bar styles if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) { $stylesheet = BP_PLUGIN_URL . '/bp-core/css/admin-bar.dev.css'; } else { $stylesheet = BP_PLUGIN_URL . '/bp-core/css/admin-bar.css'; } nxt_enqueue_style('bp-admin-bar', apply_filters('bp_core_admin_bar_css', $stylesheet), array('admin-bar'), '20110723'); if (!is_rtl()) { return; } if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) { $stylesheet = BP_PLUGIN_URL . '/bp-core/css/admin-bar-rtl.dev.css'; } else { $stylesheet = BP_PLUGIN_URL . '/bp-core/css/admin-bar-rtl.css'; } nxt_enqueue_style('bp-admin-bar-rtl', apply_filters('bp_core_admin_bar_rtl_css', $stylesheet), array('bp-admin-bar'), '20110723'); }
/** * Setup the admin bar * * @global obj $nxt_admin_bar * @param array $nxt_admin_menus */ function setup_admin_bar($nxt_admin_nav = '') { // Bail if this is an ajax request if (defined('DOING_AJAX')) { return; } // Do not proceed if BP_USE_nxt_ADMIN_BAR constant is not set or is false if (!bp_use_nxt_admin_bar()) { return; } // Do we have admin bar menus to add? if (!empty($nxt_admin_nav)) { // Set this objects menus $this->admin_menu = $nxt_admin_nav; // Define the NXTClass global global $nxt_admin_bar; // Add each admin menu foreach ($this->admin_menu as $admin_menu) { $nxt_admin_bar->add_menu($admin_menu); } } // Call action do_action('bp_' . $this->id . '_setup_admin_bar'); }