Tribe__Admin__Help_Page::is_active( string|array $should_be_active )

Check if a Plugin is active


Parameters

$should_be_active

(string|array) (Required) The Plugin Name or an array of Plugin Names.


Top ↑

Return

(boolean)


Top ↑

Source

File: src/Tribe/Admin/Help_Page.php

	public function is_active( $should_be_active ) {
		$plugins = $this->get_plugins( null, true );
		$addons = $this->get_addons( null, true );

		$actives = array_merge( $plugins, $addons );
		$is_active = array();

		foreach ( $actives as $id => $active ) {
			if ( in_array( $id, (array) $should_be_active ) ) {
				$is_active[] = $id;
			}
		}

		return count( array_filter( $is_active ) ) === 0 ? false : true;
	}

Top ↑

Changelog

Changelog
Version Description
4.0 Introduced.