WP_Plugin_Dependencies::get_dependency_filepathpublic staticWP 6.5.0

Gets the filepath for a dependency, relative to the plugin's directory.

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

Хуков нет.

Возвращает

Строку|false. If installed, the dependency's filepath relative to the plugins directory, otherwise false.

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

$result = WP_Plugin_Dependencies::get_dependency_filepath( $slug );
$slug(строка) (обязательный)
The dependency's slug.

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

С версии 6.5.0 Введена.

Код WP_Plugin_Dependencies::get_dependency_filepath() WP 6.8.1

public static function get_dependency_filepath( $slug ) {
	$dependency_filepaths = self::get_dependency_filepaths();

	if ( ! isset( $dependency_filepaths[ $slug ] ) ) {
		return false;
	}

	return $dependency_filepaths[ $slug ];
}