JoryHogeveen / view-admin-as

View the WordPress admin as a different role, switch between users, temporarily change your capabilities, set default screen settings for roles, manage your roles and capabilities.

Home Page:https://wordpress.org/plugins/view-admin-as/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Action/Filter manager (Loader)

JoryHogeveen opened this issue · comments

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 ?