Skip to content

Instantly share code, notes, and snippets.

@someguy9
Last active July 4, 2024 14:27
Show Gist options
  • Save someguy9/44044a4e8653838830f4c959fdcece72 to your computer and use it in GitHub Desktop.
Save someguy9/44044a4e8653838830f4c959fdcece72 to your computer and use it in GitHub Desktop.
Is WordPress plugin active for admin
<?php
// Checking if a WordPress plugin is active in the admin dashboard
if ( is_plugin_active( 'plugin-directory/main-plugin-file.php' ) ) {
// plugin is active
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment