Skip to:
Content

BuddyPress.org

Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#8454 closed defect (bug) (fixed)

Feed link functions should short circuit when feeds are disabled

Reported by: sippis Owned by: imath
Milestone: 8.0.0 Priority: normal
Severity: normal Version:
Component: Activity Keywords: has-patch
Cc:

Description

When activity feeds are disabled by using bp_activity_enable_feeds filter, all activity feed link functions like bp_get_sitewide_activity_feed_link should return false or null.

Related: #8453

Attachments (1)

8454.patch (28.5 KB) - added by imath 6 months ago.

Download all attachments as: .zip

Change History (4)

@imath
6 months ago

#1 @imath
6 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 8.0.0

Hi @sippis

Thanks a lot for your feedback and for your contribution. It's nice to see you on this Trac 😍

I confirm we need to improve this part. Instead of make links return null, I chose to avoid to display the HTML output if the feeds are disabled. I also added some improvements to be able to deactivate all or specific feeds. The filter now returns a second parameter with the feed identifier.

Doing this: add_filter( 'bp_activity_enable_feeds', '__return_false' ); is still disabling all feeds 😉

I also added some BP Nouveau improvements as on Activity directory or on Member's activity pages the link was always the main activity feed, which is wrong. Now according to what you display you get the right feed. Eg: on the 'My Groups' tab you'll get the activity feeds of the groups you belong too.

Let's fix this in 8.0.0!

PS: I will close the other ticket as duplicate.

#2 @imath
6 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 12907:

Improve ways to disable BP RSS feeds

Returning false to the filter bp_activity_enable_feeds is completely disabling all RSS feeds and will now avoid the output of an empty link.

A second argument has been added to the filter to allow to disable a specific feed in particular, one of these feed identifiers:

  • 'sitewide',
  • 'personal',
  • 'friends',
  • 'mygroups',
  • 'mentions',
  • 'favorites'.

The BP Nouveau Template pack has also been improved to update the user's profile activity RSS feed links according to the context.

Props sippis

Fixes #8454

#3 @imath
6 months ago

In 12909:

BP Nouveau: restrict RSS link dynamic generation to activity directory

See #8454
Fixes #8463

Note: See TracTickets for help on using tickets.