Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: @mentions is confusing to members


r-a-y
Keymaster

@r-a-y

@rgauny + @rogercoathup:

Like Rich said, @mentions- are basically a filter and a nav item.
It should be possible to remove the filter and the nav item by doing the following:

1) Removing the filter

Add the following to your theme’s functions.php:

`
// removes @mention links in updates, forum posts, etc.
remove_filter( ‘bp_activity_new_update_content’, ‘bp_activity_at_name_filter’ );
remove_filter( ‘groups_activity_new_update_content’, ‘bp_activity_at_name_filter’ );
remove_filter( ‘pre_comment_content’, ‘bp_activity_at_name_filter’ );
remove_filter( ‘group_forum_topic_text_before_save’, ‘bp_activity_at_name_filter’ );
remove_filter( ‘group_forum_post_text_before_save’, ‘bp_activity_at_name_filter’ );
remove_filter( ‘bp_activity_comment_content’, ‘bp_activity_at_name_filter’ );

// remove @mention email notifications
remove_action( ‘bp_activity_posted_update’, ‘bp_activity_at_message_notification’, 10, 3 );
remove_action( ‘bp_groups_posted_update’, ‘groups_at_message_notification’, 10, 4 );
`

2) Removing the subnav:

Add the following to your theme’s functions.php:

`function ray_remove_mention_nav() {
global $bp;

bp_core_remove_subnav_item( $bp->activity->slug, ‘mentions’ );
}
add_action( ‘init’, ‘ray_remove_mention_nav’ );`

Then, copy over /bp-default/activity/index.php to your child theme and remove the hardcoded li#activity-mentions from /activity/index.php.

Et voila! @mentions- are gone!

Might turn this into a plugin if requested.

*Edit: Also need to remove the table row on the “Settings > Notifications” page. This can be done by removing and duplicating the existing bp_activity_screen_notification_settings() function (located in /buddypress/bp-activity.php) hooked to the “bp_notification_settings” action.

Skip to toolbar