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

Automattic\Jetpack\Autoloader\jpc6254936a0f7cd24a79888563e5b629b

Path_Processor::find_directory_with_autoloader() public WC 1.0

Given a file and an array of places it might be, this will find the absolute path and return it.

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

Хуков нет.

Возвращает

Строку/false. Returns the absolute path to the directory, otherwise false.

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

$Path_Processor = new Path_Processor();
$Path_Processor->find_directory_with_autoloader( $file, $directories_to_check );
$file(строка) (обязательный)
The plugin or theme file to resolve.
$directories_to_check(массив) (обязательный)
The directories we should check for the file if it isn't an absolute path.

Код Path_Processor::find_directory_with_autoloader() WC 5.2.1

<?php
public function find_directory_with_autoloader( $file, $directories_to_check ) {
	$file = wp_normalize_path( $file );

	if ( ! $this->is_absolute_path( $file ) ) {
		$file = $this->find_absolute_plugin_path( $file, $directories_to_check );
		if ( ! isset( $file ) ) {
			return false;
		}
	}

	// We need the real path for consistency with __DIR__ paths.
	$file = $this->get_real_path( $file );

	// phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
	$directory = @is_file( $file ) ? dirname( $file ) : $file;
	if ( ! @is_file( $directory . '/vendor/composer/jetpack_autoload_classmap.php' ) ) {
		return false;
	}
	// phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged

	return $directory;
}