Automattic\WooCommerce\Utilities
StringUtil::normalize_local_path_slashes()
Normalize the slashes (/ and ) of a local filesystem path by converting them to DIRECTORY_SEPARATOR.
Метод класса: StringUtil{}
Хуков нет.
Возвращает
Строку|null
. Normalized path, or null if the input was null.
Использование
$result = StringUtil::normalize_local_path_slashes( ?string $path );
- ?string $path (обязательный)
- -
Код StringUtil::normalize_local_path_slashes() StringUtil::normalize local path slashes WC 9.5.1
public static function normalize_local_path_slashes( ?string $path ) { return is_null( $path ) ? null : str_replace( array( '\\', '/' ), DIRECTORY_SEPARATOR, $path ); }