Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Remove “Blog Owners” From Admin Bar for ONE Blog Only?

OK, I found this in bp-core-adminbar.php. Say I wanted to get rid of the text “Blog Authors”, but only for blog ID# 12:

// **** “Blog Authors” Menu (visible when not logged in) ********
function bp_adminbar_authors_menu() {
global $bp, $current_blog, $wpdb;

if ( $current_blog->blog_id == BP_ROOT_BLOG || !function_exists( ‘bp_blogs_install’ ) )
return false;

$blog_prefix = $wpdb->get_blog_prefix( $current_blog->id );
$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 ‘

  • ‘;
    }
    }

    Skip to toolbar