Changeset 13597 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 03/06/2010 03:43:23 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r13491 r13597 234 234 235 235 if ( false !== $args['rewrite'] && '' != get_option('permalink_structure') ) { 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']); 236 $args['rewrite'] = wp_parse_args($args['rewrite'], array( 237 'slug' => sanitize_title_with_dashes($taxonomy), 238 'with_front' => true, 239 )); 240 $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)', $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term="); 241 $wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']); 244 242 } 245 243
Note: See TracChangeset
for help on using the changeset viewer.