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

WP_CLI\Utils

phar_safe_path() WP-CLI 1.0

Get a Phar-safe version of a path.

For paths inside a Phar, this strips the outer filesystem's location to reduce the path to what it needs to be within the Phar archive.

Use the __FILE__ or __DIR__ constants as a starting point.

Хуков нет.

Возвращает

Строку. A Phar-safe version of the path.

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

phar_safe_path( $path );
$path(строка) (обязательный)
An absolute path that might be within a Phar.

Код phar_safe_path() WP-CLI 2.5.0

function phar_safe_path( $path ) {

	if ( ! inside_phar() ) {
		return $path;
	}

	return str_replace(
		PHAR_STREAM_PREFIX . WP_CLI_PHAR_PATH . '/',
		PHAR_STREAM_PREFIX,
		$path
	);
}