Ticket #20528: 20528.patch
File 20528.patch, 717 bytes (added by , 12 years ago) |
---|
-
wp-includes/canonical.php
439 439 */ 440 440 function _remove_qs_args_if_not_in_url( $query_string, Array $args_to_check, $url ) { 441 441 $parsed_url = @parse_url( $url ); 442 parse_str( $parsed_url['query'], $parsed_query ); 443 foreach ( $args_to_check as $qv ) { 444 if ( !isset( $parsed_query[$qv] ) ) 445 $query_string = remove_query_arg( $qv, $query_string ); 442 443 if ( !empty( $parsed_url['query'] ) ) { 444 parse_str( $parsed_url['query'], $parsed_query ); 445 foreach ( $args_to_check as $qv ) { 446 if ( !isset( $parsed_query[$qv] ) ) { 447 $query_string = remove_query_arg( $qv, $query_string ); 448 } 449 } 446 450 } 451 447 452 return $query_string; 448 453 } 449 454