Astra_Ext_Extension::is_active( string $key, boolean $default = false )

Check extension status


Description


Parameters

$key

(string) (Required) Key to find in Extensions Array.

$default

(boolean) (Optional) Default if Key not exist in Extensions Array.

Default value: false


Return

(boolean)


Source

File: classes/class-astra-ext-extension.php

	public static function is_active( $key, $default = false ) {
		$extensions = array_merge( self::get_enabled_addons(), self::get_default_addons() );

		if ( array_key_exists( $key, $extensions ) && $extensions[ $key ] ) {
			return true;
		} else {
			return $default;
		}
	}

Changelog

Changelog
Version Description
1.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.