WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question

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

print_r( (array) get_option( 'active_plugins' ) );
share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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