'; _e( 'My Sites', 'buddypress' ); echo ''; echo ''; 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 '
'; // **** Do bp-adminbar-logo Actions ******** do_action( 'bp_adminbar_logo' ); echo ''; echo "
\n\n"; $bp->doing_admin_bar = false; } /** * Output the BuddyBar logo. * * @deprecated 2.1.0 */ function bp_adminbar_logo() { echo ''; } /** * 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 bool|null Returns false if the current user is logged in. */ function bp_adminbar_login_menu() { if ( is_user_logged_in() ) { return false; } echo '
  • ' . __( 'Log In', 'buddypress' ) . '
  • '; // Show "Sign Up" link if user registrations are allowed if ( bp_get_signup_allowed() ) { echo '
  • ' . __( 'Sign Up', 'buddypress' ) . '
  • '; } } /** * Output the My Account BuddyBar menu. * * @deprecated 2.1.0 * * @return bool|null Returns false on failure. */ function bp_adminbar_account_menu() { $bp = buddypress(); if ( empty( $bp->bp_nav ) || ! is_user_logged_in() ) { return false; } echo '
  • '; echo __( 'My Account', 'buddypress' ) . ''; echo ''; echo '
  • '; } function bp_adminbar_thisblog_menu() { if ( current_user_can( 'edit_posts' ) ) { echo '
  • '; _e( 'Dashboard', 'buddypress' ); echo ''; echo ''; 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; } ?>
  • 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 '
  • '; _e('Blog Authors', 'buddypress'); echo ''; echo ''; 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; } ?>
  • '; _e( 'Notifications', 'buddypress' ); $notification_count = bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ); $notifications = bp_notifications_get_notifications_for_user( bp_loggedin_user_id() ); if ( ! empty( $notification_count ) ) : ?> '; echo '