WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

WPSEO_Extension_Manager::is_activated() public Yoast 1.0

Checks if the plugin is activated within My Yoast.

{} Это метод класса: WPSEO_Extension_Manager{}

Хуков нет.

Возвращает

true/false. True when the plugin is activated.

Использование

$WPSEO_Extension_Manager = new WPSEO_Extension_Manager();
$WPSEO_Extension_Manager->is_activated( $extension_name );
$extension_name(строка) (обязательный)
The extension name to check.

Код WPSEO_Extension_Manager::is_activated() Yoast 15.1.1

<?php
public function is_activated( $extension_name ) {
	if ( self::$active_extensions === null ) {
		// Force re-check on license & dashboard pages.
		$current_page = $this->get_current_page();

		// Check whether the licenses are valid or whether we need to show notifications.
		$exclude_cache = ( $current_page === 'wpseo_licenses' || $current_page === 'wpseo_dashboard' );

		// Fetch transient data on any other page.
		if ( ! $exclude_cache ) {
			self::$active_extensions = $this->get_cached_extensions();
		}

		// If the active extensions is still NULL, we need to set it.
		if ( ! is_array( self::$active_extensions ) ) {
			self::$active_extensions = $this->retrieve_active_extensions();

			$this->set_cached_extensions( self::$active_extensions );
		}
	}

	return in_array( $extension_name, self::$active_extensions, true );
}