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 ‘user_id, $author->user_nicename, $author->user_login ) . ‘”>’;
echo bp_core_fetch_avatar( array( ‘item_id’ => $author->user_id, ’email’ => $author->user_email, ‘width’ => 15, ‘height’ => 15 ) ) ;
echo ‘ ‘ . $author->display_name . ‘‘;
echo ‘‘;
echo ‘
foreach( (array)$authors as $author ) {
$caps = maybe_unserialize( $author->caps );
if ( isset( $caps ) || isset( $caps ) ) continue;
echo ‘
‘;
}
echo ‘
‘;
echo ‘
‘;
}
}