Disable Other Plugins on my Custom Post Type?

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!

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

Leave a Comment