add_rewrite_tag ( $tag, $regex, $query = '' )
- (string) tag Name of the new rewrite tag.
- (string) regex Regular expression to substitute the tag for in rewrite rules.
- (string) query Optional. String to append to the rewritten query. Must end in '='. Default empty.
- Introduced in WordPress: 2.1.0
- Deprecated in WordPress: —
Add a new rewrite tag (like %postname%).The `$query` parameter is optional. If it is omitted you must ensure that you call
this on, or before, the Array hook. This is because `$query` defaults to
`$tag=`, and for this to work a new query var has to be added.