Plugged In

If you ever wondered on writing and creating plugins yourself and feels like depending on a specific plugin being active, then it’s more important to check on that whether another plugin is already installed and active. Helping you in this, WordPress is having is_plugin_active() function for you, which lets you know that whether the plugin is active or not.

But remember in order to make the function is_plugin_active() works for you, you need to pass the plugin basename which means you have to get the plugin basedname from the base path from plugins directory. It could also be possible the case when you will need to do some check for plugins when creating themes.

In the Admin Area: 

In the front end, in a theme, etc… 

Here’s an example on how we can use this:

Useful Snippet

In order to have the thing of checking on whether the plugin is active or not, you can also use the short code or a snippet. For doing this, you all require is the active plugins, which you can foung in the database, table options, the active_plugins. (Source)

Photo Credit: trekkyandy via photopin cc