Function Reference: geodir_is_plugin_active

Summary

Check if a GeoDirectory addon plugin is active.

Package

GeoDirectory

Parameters

$plugin
(string) (required) plugin uri.

Default: None

Return Values

(bool)
  • true or false.

Change Log

Since: 1.0.0

Todo

check if this is faster than normal WP check and remove if not.

Source File

geodir_is_plugin_active() is located in geodirectory-functions/general_functions.php [Line: 68]

Source Code

function geodir_is_plugin_active( $plugin ) {
	$active_plugins = get_option( 'active_plugins' );
	foreach ( $active_plugins as $key => $active_plugin ) {
		if ( strstr( $active_plugin, $plugin ) ) {
			return true;
		}
	}

	return false;
}