Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to add actions and filters that get added to the debugger #22

Open
alexstandiford opened this issue Apr 29, 2020 · 1 comment
Labels
enhancement New feature or request new loader

Comments

@alexstandiford
Copy link
Collaborator

It would be nice if actions/filters could be added with a wrapper, like so:

plugin_name_replace_me()->actions()->add();

This would allow us to add our hooks to the registry so we can see what hooks were added. We might even be able to make it so that we register what is actually fired.

@alexstandiford
Copy link
Collaborator Author

underpin()->actions()->add(); and underpin()->filters()->add(); would simply register these items.

underpin()->actions()->get( 'action' )->do()

and

underpin()->filters()->get( 'action' )->apply();

would actually do the thing.

underpin()->filters()->get( 'action' )->add(fn());

and

underpin()->actions()->get('action')->add(fn());

would do add_action and add_filter

As suggested, this would give a list of actions and filters registered for this specific plugin, as long as people actually used it appropriately.

This could also make it possible to chart out a history of what actions fired, and, log when these events fire at a higher level.

@alexstandiford alexstandiford added good first issue Good for newcomers enhancement New feature or request new loader and removed good first issue Good for newcomers labels Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new loader
Projects
None yet
Development

No branches or pull requests

1 participant