I have a plugin with the following structure:
I can access core WordPress functionality inside myplugin.php fine, but when I try to access stuff such as
add_action('init', 'myaction') inside authentication.php, I receive a PHP error.
I tried including the WordPress wp-load.php file in order to gain core functionality, but the WordPress repository doesn't accept plugins that load wp-config or wp-load files.
What is the best way to proceed in this situation and why don't I have access to core WordPress functions from a plugin that is loaded.