Changeset 20023 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 02/28/2012 08:29:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r19975 r20023 297 297 * @since 2.3.0 298 298 * @uses $wp_taxonomies Inserts new taxonomy object into the list 299 * @uses $wp_rewrite Adds rewrite tags and permastructs300 299 * @uses $wp Adds query vars 301 300 * … … 305 304 */ 306 305 function register_taxonomy( $taxonomy, $object_type, $args = array() ) { 307 global $wp_taxonomies, $wp _rewrite, $wp;306 global $wp_taxonomies, $wp; 308 307 309 308 if ( ! is_array($wp_taxonomies) ) … … 344 343 $tag = '([^/]+)'; 345 344 346 $wp_rewrite->add_rewrite_tag("%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=");347 $wp_rewrite->add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite'] );345 add_rewrite_tag( "%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=" ); 346 add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite'] ); 348 347 } 349 348
Note: See TracChangeset
for help on using the changeset viewer.