';
echo '';
}
}
/**
* If user has upgraded to 1.6 and chose to retain their BuddyBar, offer then a switch to change over
* to the WP Toolbar.
*
* @since 1.6.0
* @deprecated 2.1.0
*/
function bp_admin_setting_callback_force_buddybar() {
?>
/>
doing_admin_bar = true;
echo '
\n\n";
$bp->doing_admin_bar = false;
}
/**
* Output the BuddyBar logo.
*
* @deprecated 2.1.0
*/
function bp_adminbar_logo() {
echo '' . get_blog_option( bp_get_root_blog_id(), 'blogname' ) . '';
}
/**
* Output the "Log In" and "Sign Up" names to the BuddyBar.
*
* Visible only to visitors who are not logged in.
*
* @deprecated 2.1.0
*
* @return false|null Returns false if the current user is logged in.
*/
function bp_adminbar_login_menu() {
if ( is_user_logged_in() ) {
return false;
}
echo '
';
}
}
/**
* Output the Random BuddyBar menu.
*
* Not visible for logged-in users.
*
* @deprecated 2.1.0
*/
function bp_adminbar_random_menu() {
?>
plugin_url . "bp-core/css/buddybar{$min}.css";
}
wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_buddybar_rtl_css', $stylesheet ), array(), bp_get_version() );
wp_style_add_data( 'bp-admin-bar', 'rtl', true );
if ( $min ) {
wp_style_add_data( 'bp-admin-bar', 'suffix', $min );
}
}
add_action( 'bp_init', 'bp_core_load_buddybar_css' );
/**
* Add menu items to the BuddyBar.
*
* @since 1.0.0
*
* @deprecated 2.1.0
*/
function bp_groups_adminbar_admin_menu() {
$bp = buddypress();
if ( empty( $bp->groups->current_group ) ) {
return false;
}
// Only group admins and site admins can see this menu
if ( !current_user_can( 'edit_users' ) && !bp_current_user_can( 'bp_moderate' ) && !bp_is_item_admin() ) {
return false;
} ?>
avatar->show_avatars ) : ?>
groups->current_group->status == 'private' ) : ?>
blogid ) || ! bp_is_active( 'blogs' ) ) {
return false;
}
$blog_prefix = $wpdb->get_blog_prefix( $wpdb->blogid );
$authors = $wpdb->get_results( "SELECT user_id, user_login, user_nicename, display_name, user_email, meta_value as caps FROM $wpdb->users u, $wpdb->usermeta um WHERE u.ID = um.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY um.user_id" );
if ( !empty( $authors ) ) {
// This is a blog, render a menu with links to all authors
echo '
';
}
}
add_action( 'bp_adminbar_menus', 'bp_adminbar_authors_menu', 12 );
/**
* Add a member admin menu to the BuddyBar.
*
* Adds an Toolbar menu to any profile page providing site moderator actions
* that allow capable users to clean up a users account.
*
* @deprecated 2.1.0
*/
function bp_members_adminbar_admin_menu() {
// Only show if viewing a user
if ( ! bp_displayed_user_id() ) {
return false;
}
// Don't show this menu to non site admins or if you're viewing your own profile
if ( !current_user_can( 'edit_users' ) || bp_is_my_profile() ) {
return false;
} ?>