Disable All RSS Feeds – update
-
Hi,
I have a site using buddypress 2.4.3 where all buddypress functionality must be private (requires login) while the blog part is public.
The problem is that the Activity feed was being crawled by feedly and other services, thus breaking our users privacy.
Searching on google I found out this topic:
https://buddypress.org/support/topic/disable-all-rss-feeds/
And when trying to apply the fix I realised the code was outdated, therefore I leave here the updated code:
function cherrypick_custom_bp_remove_feeds(){ remove_action('bp_actions', 'bp_activity_action_sitewide_feed'); remove_action('bp_actions', 'bp_activity_action_personal_feed'); remove_action('bp_actions', 'bp_activity_action_friends_feed'); remove_action('bp_actions', 'bp_activity_action_my_groups_feed'); remove_action('bp_actions', 'bp_activity_action_mentions_feed'); remove_action('bp_actions', 'bp_activity_action_favorites_feed'); remove_action('bp_actions', 'groups_action_group_feed'); } add_action('init', 'cherrypick_custom_bp_remove_feeds');
And on pastebin:
I can confirm it is working fine on:
- WordPress 4.4.2
- BuddyPress 2.4.3
Hope this is helpful!
- The topic ‘Disable All RSS Feeds – update’ is closed to new replies.