Automattic\WooCommerce\Internal\Logging
RemoteLogger::normalize_paths
Normalize file paths by replacing absolute paths with relative ones.
Метод класса: RemoteLogger{}
Хуков нет.
Возвращает
Строку. The content with normalized paths.
Использование
// private - только в коде основоного (родительского) класса $result = $this->normalize_paths( $content ): string;
- $content(строка) (обязательный)
- The content containing paths to normalize.
Код RemoteLogger::normalize_paths() RemoteLogger::normalize paths WC 10.7.0
private function normalize_paths( string $content ): string {
$plugin_path = StringUtil::normalize_local_path_slashes( trailingslashit( dirname( WC_ABSPATH ) ) );
$wp_path = StringUtil::normalize_local_path_slashes( trailingslashit( ABSPATH ) );
return str_replace(
array( $plugin_path, $wp_path ),
array( './', './' ),
$content
);
}