-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
the vip search adapter uses a filter__* namespacing for filter callbacks, but the SearchPress adapter uses a different approach that names the callbacks according to their purpose (rather than naming according to the hook that they hook into).
For readability, maintainability, and consistency across adapters these hooks and callbacks should be standardized. I would propose that the callbacks use the filter__* namespacing convention for filter callbacks, but within the callbacks there are only function calls and minimal logic (opposed to all of the logic for each feature that uses the hook). By abstracting the feature functionality from the callbacks, we get the best of both worlds: we get the connective clarity offered by the filter__*/action__* convention, and we get the functional clarity offered by the approach that the SearchPress adapter is currently taking.
Use Case
When a developer is building a new feature that exists across adapters, the approach to using hooks should be consistent between the adapters.