1705
1705
* @since 4.4.0 Ensures upper-case drive letters on Windows systems.
1706
1706
* @since 4.5.0 Allows for Windows network shares.
1708
1709
* @param string $path Path to normalize.
1709
1710
* @return string Normalized path.
1711
1712
function wp_normalize_path( $path ) {
1715
list( $wrapper, $path ) = explode( '://', $path, 2 );
1712
1720
$path = str_replace( '\\', '/', $path );
1713
1723
$path = preg_replace( '|(?<=.)/+|', '/', $path );
1714
1726
if ( ':' === substr( $path, 1, 1 ) ) {
1715
1727
$path = ucfirst( $path );