WPSEO_Plugin_Availability::get_dependency_names()publicYoast 1.0

Устарела с версии 23.4. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

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 ) // @phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- needed for BC reasons;
$plugin(массив) (обязательный)
The plugin to get the dependency names from.

Список изменений

Устарела с 23.4

Код WPSEO_Plugin_Availability::get_dependency_names() Yoast 24.6

public function get_dependency_names( $plugin ) { // @phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- needed for BC reasons
	_deprecated_function( __METHOD__, 'Yoast SEO 23.4' );
	if ( ! $this->has_dependencies( $plugin ) ) {
		return [];
	}

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