[buddypress-trac] [BuddyPress] #5300: Notifications from inactive components are rendered on the Notifications panel
buddypress-trac
noreply at wordpress.org
Tue Dec 17 14:11:52 UTC 2013
#5300: Notifications from inactive components are rendered on the Notifications
panel
-----------------------------------+--------------------
Reporter: boonebgorges | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 1.9.1
Component: Notifications | Version:
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion |
-----------------------------------+--------------------
Comment (by boonebgorges):
> Do we have a wrapper function for buddypress()->active_components ?
Doesn't look like it, though it's not a bad idea. Probably not critical
for the purposes of this ticket, since the introduction of such a wrapper
will require sweeping through the codebase anyway.
> We should probably remove the changes from r7677 too?
Yes, good call.
> It might make sense to treat this similar to WP_Query, and have
component__in and component__not_in arguments, or even pass a component
arg as an array of the components to include, similar to post_type.
The 'component_name' parameter already exists, and accepts arrays/comma-
separated lists. So it works like `post_type`. In the case of active vs
inactive components, though, I'm assuming that the vast majority of uses
will not want to fetch notifications from inactive components. So I think
it's worth having shorthand for it, and I think it's worth having this
shorthand fairly far down in the stack, instead of requiring a list of
active components to be passed each time notifications are fetched. If
this strategy sounds OK, I say we go with the simpler 'active' param for
now. If, for 2.0 or beyond, we want to make it more powerful, we can
refactor the way that 'active' gets implemented in
`BP_Notifications_Notification::get()` (ie, we could juggle it with
`component_name` or something like that)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5300#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list