Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

Thanks!

share|improve this question

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' ) );
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

 
discard

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.