remove_query_arg


remove_query_arg ( $key, $query = false )

Parameters:
  • (string|string[]) key Query key or keys to remove.
  • (false|string) query Optional. When false uses the current URL. Default false.
Returns:
  • (string) New URL query string.
Defined at:

Description

Removes an item or items from a query string.Important: The return value of remove_query_arg() is not escaped by default. Output should be late-escaped with esc_url() or similar to help prevent vulnerability to cross-site scripting (XSS) attacks.

Related Functions

wp_removable_query_args, remove_user_from_blog, add_query_arg, get_query_var, remove_menu_page

Top Google Results

User discussions

wpseek mobile