dozent_is_plugin_active( string $plugin )

Check if a plugin is activated


Description

Example usage:

$is_active = dozent_main_is_plugin_active( 'dozent/dozent.php' );

Parameters

$plugin

(string) (Required)


Return

(bool)


Source

File: includes/core-functions.php

	function dozent_is_plugin_active( $plugin ) {
		$network_active = false;

		if ( is_multisite() ) {

			$plugins = get_site_option( 'active_sitewide_plugins' );

			if ( isset( $plugins[ $plugin ] ) ) {
				$network_active = true;
			}
		}

		return in_array( $plugin, get_option( 'active_plugins' ) ) || $network_active;
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.