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.

How to find out if a particular plugin is enabled in a sub-blog in a multisite blog?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Hm, I am not entirely sure about mechanics here. Usual is_plugin_active() checks if plugin is in active_plugins option.

By this logic you could probably retrieve active_plugins of specific blog with get_blog_option() and check it for plugin.

share|improve this answer
add comment

Ya what Rarst said, for his example you can do something like the following but it returns an array with active plugin name/plugin_filename.php

get_option('active_plugins');

You can try using use the global $plugin to get a lot more data.

global $plugins;

$plugins = array(
            'all' => apply_filters( 'all_plugins', get_plugins() ),
            'search' => array(),
            'active' => array(),
            'inactive' => array(),
            'recently_activated' => array(),
            'upgrade' => array(),
            'mustuse' => array(),
            'dropins' => array()
        );
share|improve this answer
add comment

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.