I am using http://wordpress.org/extend/plugins/pdf24-post-to-pdf/ pdf generator plugin for my site, but I only want it present on certain pages.
How can I remove it from all pages except a certain template I allow?
I believe this can be done with filters, but I have googled and googled and can’t seem to get anywhere.
I don’t think that’s possible without modifying the plugin source code. That would be a nice security issue, IMO.
Plugins are files simply included on the loading process. At least, there’s no hook I could find on WordPress source code for you to interfere in this behavior. Take a look just above the
plugins_loaded
hook, and thewp_get_active_and_valid_plugins
function.What you can try to do, instead, is just modifying the plugin with the condition you need. In the top of the
pdf24.php
file, just below the standard comments, put: