4

I am running a WP Multisite Network.

I am curious to know how WordPress knows that a plugin is installed on a network site:

  • how does WP know that a plugin is Network Activated?
  • how does WP know that a plugin is activated at the site level?

Does it record this instance in a DB Table somewhere? If so, which table and how is it tagged?

Thanks for helping.

5

You can clearly see the way WordPress loads plugins if you inspect the source code of the file wp-settings.php.

The function wp_get_active_and_valid_plugins() loads plugins for individual sites in the network and for non-Multi-Site installations, while wp_get_active_network_plugins() loads network activated plugins when Multi-Site is enabled.

The former more or less just calls get_option() to get the active_plugins option from the wp_options database table, while the latter uses get_site_option() which is the network-wide version of get_option(). The option which has the network enabled plugins is called active_sitewide_plugins.

  • As hint, the plugin Multisite Enhancements give you an overview about all plugins, themes and in which blog or network is it active. Maybe this helps you fast. – bueltge Jul 8 '15 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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