Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * check if a plugin is active ##
- */
- if ( !function_exists( 'ftf_plugin_is_active' ) ) {
- function ftf_plugin_is_active( $plugin ) {
- return in_array( $plugin, (array) get_option( 'active_plugins', array() ) );
- }}
- // example usage ##
- if ( ftf_plugin_is_active( 'mailchimp/mailchimp.php' ) ) {
- // do stuff ##
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement