Changeset 52833
- Timestamp:
- 03/09/2022 03:06:09 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r51125 r52833 848 848 */ 849 849 function strip_fragment_from_url( $url ) { 850 $parsed_url = parse_url( $url );850 $parsed_url = wp_parse_url( $url ); 851 851 852 852 if ( ! empty( $parsed_url['host'] ) ) { 853 // This mirrors code in redirect_canonical(). It does not handle every case. 854 $url = $parsed_url['scheme'] . '://' . $parsed_url['host']; 853 $url = ''; 854 855 if ( ! empty( $parsed_url['scheme'] ) ) { 856 $url = $parsed_url['scheme'] . ':'; 857 } 858 859 $url .= '//' . $parsed_url['host']; 860 855 861 if ( ! empty( $parsed_url['port'] ) ) { 856 862 $url .= ':' . $parsed_url['port'];
Note: See TracChangeset
for help on using the changeset viewer.