Skip to content

mymizan/wp-check-if-plugin-active

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Check If a Plugin is Active

On a WordPress site, plugins can be (1) activated on the site, (2) network activated on a multisite and (3) added as a must use plugin. This class adds method to check if a plugin is active in all these cases.

Please, read the associated blog post.

Example

// Check if WooCommerce is active.
Utils_Plugins::is_active('woocommerce.php'); //True|False

// Check if WooCommerce is network active.
Utils_Plugins::is_network_active('woocommerce.php'); //True|False

// Check if a plugin is added as must use (mu-plugins).
Utils_Plugins::is_mu_active('plugin.php');  //True|False

About

Check if a WordPress plugin is active

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages