| 236 | | if ( !is_array($args['rewrite']) ) |
| 237 | | $args['rewrite'] = array(); |
| 238 | | if ( !isset($args['rewrite']['slug']) ) |
| 239 | | $args['rewrite']['slug'] = sanitize_title_with_dashes($taxonomy); |
| 240 | | if ( !isset($args['rewrite']['with_front']) ) |
| 241 | | $args['rewrite']['with_front'] = true; |
| 242 | | $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)', $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=$term"); |
| 243 | | $wp_rewrite->add_permastruct($taxonomy, "/{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']); |
| | 264 | $args['rewrite'] = wp_parse_args($args['rewrite'], array( |
| | 265 | 'slug' => sanitize_title_with_dashes($taxonomy), |
| | 266 | 'with_front' => true, |
| | 267 | )); |
| | 268 | $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)', $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term="); |
| | 269 | $wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']); |