I'm working on creating a plugin out of some custom code I use a lot, in hopes that other people find it useful too.
It works, so yay! but...
Here's my question:
I feel like I'm missing some puzzle pieces in my understanding of the system.
What happens to all the code I add and hook everywhere after I deactivate my plugin?
In my main .php file, when is the code that's not in a function being executed? Only at install? Then what is the purpose of register_activation_hook( __FILE__,'install_method'); ?
If I put add_action and add_filter in my main php file, do I have to remove them at uninstall? (For example, I know that if I add_option('option', '0', '', 'yes'); during install I have to delete_option('option'); at uninstall.)
In some tutorial, they told me to put if ( is_admin() ) {} around my code, is this necessary?