- Timestamp:
- 09/10/2013 06:07:19 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r25310 r25319 2241 2241 } 2242 2242 2243 if ( 'relative' == $scheme ) 2244 $url = preg_replace( '#^.+://[^/]*#', '', $url ); 2245 else 2246 $url = preg_replace( '#^.+://#', $scheme . '://', $url ); 2243 $url = trim( $url ); 2244 if ( $url[0] === '/' && $url[1] === '/' ) 2245 $url = 'http:' . $url; 2246 2247 if ( 'relative' == $scheme ) { 2248 $url = ltrim( preg_replace( '#^\w+://[^/]*#', '', $url ) ); 2249 if ( $url[0] === '/' ) 2250 $url = '/' . ltrim($url , "/ \t\n\r\0\x0B" ); 2251 } else { 2252 $url = preg_replace( '#^\w+://#', $scheme . '://', $url ); 2253 } 2247 2254 2248 2255 return apply_filters( 'set_url_scheme', $url, $scheme, $orig_scheme );
Note: See TracChangeset
for help on using the changeset viewer.