WPSEO_Plugin_Availability::dependencies_are_satisfied()publicYoast 1.0

Checks if all dependencies are satisfied.

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

Хуков нет.

Возвращает

true|false. Whether or not the dependencies are satisfied.

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

$WPSEO_Plugin_Availability = new WPSEO_Plugin_Availability();
$WPSEO_Plugin_Availability->dependencies_are_satisfied( $plugin );
$plugin(массив) (обязательный)
The information available about the plugin.

Код WPSEO_Plugin_Availability::dependencies_are_satisfied() Yoast 19.10

public function dependencies_are_satisfied( $plugin ) {
	if ( ! $this->has_dependencies( $plugin ) ) {
		return true;
	}

	$dependencies           = $this->get_dependencies( $plugin );
	$installed_dependencies = array_filter( $dependencies, [ $this, 'is_dependency_available' ] );

	return count( $installed_dependencies ) === count( $dependencies );
}