Forum Replies Created
-
@djpaul Thank you.
it seems… finally I found it. holy moly…
so what should I do? Because BP extended settings plugin has no option to turning this off (or I am just blind)
well I am using my own theme
none of these help… I pasted it to my functions.php, but links are still visible.
not bad idea
@naijaping yeah it works, but how to get rid of “Notifications” text… I would like to display only number. Thanks.
@Roger Coathup: how to edit this to work without admin bar? I know I need to replace $wp_admin_bar, but with what? I want to append it to my header, which is `
`
`/**
* Build the “Notifications” dropdown
*
* @package Buddypress
* @since BuddyPress (1.5)
*/
function bp_members_admin_bar_notifications_menu2() {
global $wp_admin_bar;if ( !is_user_logged_in() )
return false;$notifications = bp_core_get_notifications_for_user( bp_loggedin_user_id(), ‘object’ );
$count = !empty( $notifications ) ? count( $notifications ) : 0;
$alert_class = (int) $count > 0 ? ‘pending-count alert’ : ‘count no-alert’;
$menu_title = ‘‘ . $count . ‘‘;// Add the top-level Notifications button
$wp_admin_bar->add_menu( array(
‘parent’ => ‘top-secondary’,
‘id’ => ‘bp-notifications’,
‘title’ => $menu_title,
‘href’ => bp_loggedin_user_domain(),
) );if ( !empty( $notifications ) ) {
foreach ( (array) $notifications as $notification ) {
$wp_admin_bar->add_menu( array(
‘parent’ => ‘bp-notifications’,
‘id’ => ‘notification-‘ . $notification->id,
‘title’ => $notification->content,
‘href’ => $notification->href
) );
}
} else {
$wp_admin_bar->add_menu( array(
‘parent’ => ‘bp-notifications’,
‘id’ => ‘no-notifications’,
‘title’ => __( ‘No new notifications’, ‘buddypress’ ),
‘href’ => bp_loggedin_user_domain()
) );
}return;
}
add_action( ‘admin_bar_menu’, ‘bp_members_admin_bar_notifications_menu2’, 90 );`bump
…or maybe I am just dumb. I deleted wp_head from my header… *facepalm*