Opened 6 weeks ago
Last modified 3 weeks ago
#9254 assigned defect (bug)
Stop using a component for the Members Invitations feature navigation
Reported by: | imath | Owned by: | imath |
---|---|---|---|
Milestone: | Up Next | Priority: | normal |
Severity: | normal | Version: | 12.0.0 |
Component: | Members | Keywords: | has-patch |
Cc: |
Description
As @emaralive noted here #9237, we currently have a members_invitations
component active in BuddyPress although it's one of the features of the Members component.
This component was born during the 12.0 development cycle (see #9013) to register its navigation and make corresponding slugs customizable. The downside of this move is that we are wrongly populating our components globals with it.
I believe we should stop, and more globally, I believe we should have a specific API to organize a component's feature. I've been working and improving this API building these PRs :
- #9098 : Revamped notices feature
- #9057 : Make Signups a deactivable (using a filter) Members component feature
If the 2 above are introducing huge changes and couldn't be tested enough to be introduced into 15.0.0 imho, I believe we should at the very minimum introduce this new BP_Component_Feature
class and start using it to organize components features.
The Members Invitations one seems to be a MVP for this introduction as it is currently bringing some mess (I'm the one to blame about it) into our globals.
I've tested the PR I've attached to this ticket and did as few changes I could to take as less risks as possible. Ideally, from what I've seen we should carry on reorganizing some of the Members Invitations code to be only loaded when the feature is not deactivated.
Change History (4)
This ticket was mentioned in PR #403 on buddypress/buddypress by @imath.
6 weeks ago
#1
- Keywords has-patch added
Stop using
BP_Component
in favor ofBP_Component_Feature
to avoid messing with BuddyPress component globals and "faking" a component to register the feature navigation.Trac ticket: https://buddypress.trac.wordpress.org/ticket/9254