I've created a plugin that lets users build super-simple landing pages for mobile devices.

The pages my plugin creates are of a custom post type.

I want to provide users with an option to "disable all other plugins on this page", to prevent things like tweetmeme, facebook like buttons, and other third-party plugin generated content from displaying inside my plugin's template.

I've added an option that lets the user prevent the call to wp_head, but what about those that inject content elsewhere in the page, e.g. by flitering the_content?

After typing this out, I'm thinking that a combination of supressing wp_head() plus a remove_all_filters('the_content') might do the trick, but I'll go ahead and post this question anyhow in case any of you have better suggestions.


2 Answers 2


There's an option that gives you back an array of all plugins in your blog.

print_r( (array) get_option( 'active_plugins' ) );

I am assuming you mean deactivating by disabling. Deactivating all the plugins is not the good idea, it can have undesired effect on the site. Also I don't think there is any way to just deactivate the plugin with out firing the deactivation function. And some plugin do delete their options data upon deactivation.

If your only concern are those twitter, facebook and other type of buttons then yes removing the_content filters will do the job.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.