[wp-hackers] Restrict plugin load to certain pages?

Jackson Whelan jw at jacksonwhelan.com
Mon Jul 1 11:21:25 UTC 2013

On 7/1/13 5:02 AM, David Anderson wrote:
> Looking at the WP core code, my only option to achieve this seems to 
> be to be (via an mu-plugin, since a plugin would present a Catch-22) 
> to hook get_option, detect the option 'active_plugins', and remove the 
> offending plugin depending on the contents of _SERVER['REQUEST_URI'] 
> and is_admin() (I don't want to disable anything admin-side).
> - Anyone done it already and got some code?
Hi David,

Here's an mu-plugin which does just what you're after:


- Jackson

More information about the wp-hackers mailing list