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

Action/Filter manager (Loader) #77

Closed
JoryHogeveen opened this issue Sep 20, 2017 · 0 comments
Closed

Action/Filter manager (Loader) #77

JoryHogeveen opened this issue Sep 20, 2017 · 0 comments
Assignees
Milestone

Comments

@JoryHogeveen
Copy link
Owner

JoryHogeveen commented Sep 20, 2017

Currently I don't manage where and when I add actions and filters.
Might come in handy to create a manager class that handles all this.
It will be a lot easier to register/de-register all hooks etc.

Idea source: https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/blob/master/plugin-name/includes/class-plugin-name-loader.php

Differences from example:
Register in WP right away, do not use/create the run method.

Maybe later:

  • Add an extra layer in there for type identifiers (core, view, role-defaults, etc.)
  • Also let it handle apply_filters and do_action ?
@JoryHogeveen JoryHogeveen self-assigned this Sep 20, 2017
@JoryHogeveen JoryHogeveen added this to the 1.8 milestone Sep 20, 2017
JoryHogeveen added a commit that referenced this issue Sep 21, 2017
JoryHogeveen added a commit that referenced this issue Sep 21, 2017
JoryHogeveen added a commit that referenced this issue Sep 21, 2017
- Allows removal of hooks without knowing the priority
See #77
JoryHogeveen added a commit that referenced this issue Sep 21, 2017
Can be used for debugging etc.
See #77
JoryHogeveen added a commit that referenced this issue Sep 21, 2017
@JoryHogeveen JoryHogeveen mentioned this issue Sep 21, 2017
Merged
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant