Adds a new permalink structure.
A permalink structure (permastruct) is an abstract definition of a set of rewrite rules; it is an easy way of expressing a set of regular expressions that rewrite to a set of query strings. The new permastruct is added to the WP_Rewrite::$extra_permastructs array.
When the rewrite rules are built by WP_Rewrite::rewrite_rules(), all of these extra permastructs are passed to WP_Rewrite::generate_rewrite_rules() which transforms them into the regular expressions that many love to hate.
$args parameter gives you control over how WP_Rewrite::generate_rewrite_rules() works on the new permastruct.
(string) (Required) Name for permalink structure.
(string) (Required) Permalink structure (e.g. category/%category%)
(array) (Optional) Arguments for building rewrite rules based on the permalink structure.
(bool) Whether the structure should be prepended with
WP_Rewrite::$front. Default true.
(int) The endpoint mask defining which endpoints are added to the structure. Accepts
(bool) Whether archive pagination rules should be added for the structure. Default true.
(bool) Whether feed rewrite rules should be added for the structure. Default true.
(bool) Whether the feed rules should be a query for a comments feed. Default false.
(bool) Whether the 'directories' making up the structure should be walked over and rewrite rules built for each in-turn. Default true.
(bool) Whether endpoints should be applied to the generated rules. Default true.
Default value: array()