I know this is going to be a little strange because it's seemingly counter-intuitive. How do I add code to my WP multisite without adding a new plugin, and keeping it out of functions.php?
Purpose: I run a WP multisite instance that uses some custom code for sending emails using a self-signed certificate. I don't want anyone to know the code even exists. I don't want it to show in a menu, and I don't want it to be deleted during an update.
What I've Tried: I tried removing the header from the custom plugin I'm using now for this code, but that just deactivated the plugin.
I tried moving the file out of it's directory and placing it directly in the plugins folder, but that doesn't load it. I know because I lose email function.
I want to do the same for some custom shortcodes I have ready to go.
I know you might be asking why? It's easy to add the plugins and limit who can see them. I know this as well, but it would be even easier to add code without the need for creating a plugin. It also adds the benefit of completely hiding the code from customer/admin eyes. Sometimes admins can be a bigger problem than the customers.
For example, the email plugin I use has more lines of code in the header for the plugin, than the functional code itself.
Being able to add code snippets without the need for creating plugins would make my life much easier.
What I would like for a solution: A sub-directory within wp-content/ that will parse any code files included in this sub-directory.
Is WP presently capable of this?