Uma área de pesquisa sobre o WordPress para devs e autores do tema



remove_query_arg ›

Desde1.5.0
Obsoleton/a
remove_query_arg ( $key, $query = false )
Parâmetros: (2)
  • (string|array) $key Query key or keys to remove.
    Required: Yes
  • (bool|string) $query Optional. When false uses the current URL. Default false.
    Required: No
    Padrão: false
Retorna:
  • (string) New URL query string.
Definido em:
Codex:

Removes an item or items from a query string.



Fonte

function remove_query_arg( $key, $query = false ) {
	if ( is_array( $key ) ) { // removing multiple keys
		foreach ( $key as $k ) {
			$query = add_query_arg( $k, false, $query );
		}
		return $query;
	}
	return add_query_arg( $key, false, $query );
}