WPSEO_Plugin_Availability::get_dependency_names()publicYoast 1.0

Gets the names of the dependencies.

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

Хуков нет.

Возвращает

Массив. Array containing the names of the associated dependencies.

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

$WPSEO_Plugin_Availability = new WPSEO_Plugin_Availability();
$WPSEO_Plugin_Availability->get_dependency_names( $plugin );
$plugin(массив) (обязательный)
The plugin to get the dependency names from.

Код WPSEO_Plugin_Availability::get_dependency_names() Yoast 22.4

public function get_dependency_names( $plugin ) {
	if ( ! $this->has_dependencies( $plugin ) ) {
		return [];
	}

	return array_keys( $plugin['_dependencies'] );
}