Open tedsecretsource opened 6 years ago
I found my own answer.
In herbert.config.php, under the requires
section, include a file inside your app called actionsAndFilters.php. Then add your actions and filters there and voila, you are now loading actions and filters when your plugin runs. Very nice.
/**
* Auto-load all required files.
*/
'requires' => [
__DIR__ . '/app/customPostTypes.php',
__DIR__ . '/app/actionsAndFilters.php'
],
What is the recommended way to add actions and filters on the front end? Is there a "default" route that executes on every request or a way to say "every route except wp-admin"? I'd hate to think that we have to add lines to plugin.php. That seems like a hack, but I can't figure out where else to do that. Thanks in advance.