Opened 9 months ago
Last modified 8 months ago
#21883 new enhancement
WP_Plugin action/filter concept
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | Awaiting Review |
| Component: | Plugins | Version: | |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Attached is a concept for allowing plugins to have dedicated action/filter loops.
The problem:
- Plugins like BuddyPress and bbPress that have their own actions and filters pollute the global action/filter namespace. This isn't necessarily bad, but it's arguably not optimal.
- Allowing plugins to have their own action/filter hooks means mirror action/filter names to match what's used in WordPress, without adding more items to the global action/filter array.
- BuddyPress and bbPress namespace their actions with prefixes, I.E. 'bp_init', 'bp_ready' et all. This works fine, and is straightforward to use, so I'm not really even sure this patch is that good.
- More conceptual than anything; it's intended as a fun experiment to toy with a new way of looking at WordPress how actions/filters might evolve in the future.
Attached is a big patch with a small example file. The patch is ugly looking, due to running out of time in the day and wanting feedback sooner.
Attachments (2)
Note: See
TracTickets for help on using
tickets.
Related: #22256