2020-05-01 / 4118阅 / 悠然
Add a new rewrite tag (like %postname%).
The $query parameter is optional. If it is omitted you must ensure that you call this>‘init’ hook. This is because $query defaults to "$tag=", and for this to work a new query var has to be added.
(string)
(Required)
Name of the new rewrite tag.
(string)
(Required)
Regular expression to substitute the tag for in rewrite rules.
(string)
(Optional)
String to append to the rewritten query. Must end in '='.
Default value: ''