wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
_remove_qs_args_if_not_in_url is private and should not be used in themes or plugins directly.
_remove_qs_args_if_not_in_url › WordPress Function
Seit3.4.0
Veraltetn/v
› _remove_qs_args_if_not_in_url ( $query_string, $args_to_check, $url )
Zugriff: |
|
Parameter: (3) |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Removes arguments from a query string if they are not present in a URL DO NOT use this in plugin code.
Ähnliche Funktionen: wp_remove_targeted_link_rel_filters, wp_removable_query_args, remove_query_arg, remove_action, remove_all_actions
Quellcode
function _remove_qs_args_if_not_in_url( $query_string, array $args_to_check, $url ) { $parsed_url = parse_url( $url ); if ( ! empty( $parsed_url['query'] ) ) { parse_str( $parsed_url['query'], $parsed_query ); foreach ( $args_to_check as $qv ) { if ( ! isset( $parsed_query[ $qv ] ) ) { $query_string = remove_query_arg( $qv, $query_string ); } } } else { $query_string = remove_query_arg( $args_to_check, $query_string ); } return $query_string; }