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

Automattic\Jetpack\Autoloader\jp35ca907b2e70db60b0c2c7d0ef0fe4bd

Path_Processor::find_absolute_plugin_path() private WC 1.0

Given a file and a list of directories to check, this method will try to figure out the absolute path to the file in question.

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

Хуков нет.

Возвращает

Строку|null. The absolute path to the plugin file, otherwise null.

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

// private - только в коде основоного (родительского) класса
$result = $this->find_absolute_plugin_path( $normalized_path, $directories_to_check );
$normalized_path(строка) (обязательный)
The normalized path to 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_absolute_plugin_path() WC 5.6.0

private function find_absolute_plugin_path( $normalized_path, $directories_to_check ) {
	// We're only able to find the absolute path for plugin/theme PHP files.
	if ( ! is_string( $normalized_path ) || '.php' !== substr( $normalized_path, -4 ) ) {
		return null;
	}

	foreach ( $directories_to_check as $directory ) {
		$normalized_check = wp_normalize_path( trailingslashit( $directory ) ) . $normalized_path;
		// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
		if ( @is_file( $normalized_check ) ) {
			return $normalized_check;
		}
	}

	return null;
}