Glossary Term
add_query_arg()
add_query_arg() — Retrieves a modified URL query string. You can rebuild the URL and append query variables to the URL query by using this function. There are two ways to use this function; either a single key and value, or an associative array. Using a single key and value: add_query_arg( ‘key’, ‘value’, ‘http://example.com’ ); Using an associative array: add_query_arg( array( ‘key1’ => ‘value1’, ‘key2’ => ‘value2’, ), ‘http://example.com’ ); Omitting the URL from either use results in the current URL being used (the value of $_SERVER[‘REQUEST_URI’]). Values are expected to be encoded appropriately with urlencode() or rawurlencode().
Inputs: $key (string|array): Either a query variable key, or an associative array of query variables. $value (string): Optional. Either a query variable value, or a URL to act upon. $url (string): Optional. A URL to act upon.
Returns string: New URL query string (unescaped).
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
