Changeset 16705 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 12/03/2010 10:13:17 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r16691 r16705 20 20 'update_count_callback' => '_update_post_term_count', 21 21 'query_var' => 'category_name', 22 'rewrite' => array(22 'rewrite' => did_action( 'init' ) ? array( 23 23 'hierarchical' => true, 24 24 'slug' => get_option('category_base') ? get_option('category_base') : 'category', 25 'with_front' => false) ,25 'with_front' => false) : false, 26 26 'public' => true, 27 27 'show_ui' => true, … … 33 33 'update_count_callback' => '_update_post_term_count', 34 34 'query_var' => 'tag', 35 'rewrite' => array(36 'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag' 37 'with_front' => false) ,35 'rewrite' => did_action( 'init' ) ? array( 36 'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag', 37 'with_front' => false) : false, 38 38 'public' => true, 39 39 'show_ui' => true, … … 53 53 '_builtin' => true, 54 54 'show_in_nav_menus' => false, 55 ) ) 55 ) ); 56 56 57 57 register_taxonomy( 'link_category', 'link', array( … … 76 76 'show_ui' => false, 77 77 '_builtin' => true, 78 ) ) ; 78 ) ); 79 80 $rewrite = false; 81 if ( did_action( 'init' ) && current_theme_supports( 'post-formats' ) ) { 82 $rewrite = apply_filters( 'post_format_rewrite_base', 'type' ); 83 $rewrite = $rewrite ? array( 'slug' => $rewrite ) : false; 84 } 79 85 80 86 register_taxonomy( 'post_format', 'post', array( 81 'public' => false,87 'public' => true, 82 88 'hierarchical' => false, 83 89 'labels' => array( … … 85 91 'singular_name' => '', 86 92 ), 87 'query_var' => false,88 'rewrite' => false,93 'query_var' => 'post_format', 94 'rewrite' => $rewrite, 89 95 'show_ui' => false, 90 96 '_builtin' => true, 91 97 'show_in_nav_menus' => false, 92 ) ) 98 ) ); 93 99 } 94 100 add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority … … 311 317 } 312 318 313 if ( false !== $args['rewrite'] && '' != get_option('permalink_structure') && !empty($wp_rewrite)) {319 if ( false !== $args['rewrite'] && '' != get_option('permalink_structure') ) { 314 320 $args['rewrite'] = wp_parse_args($args['rewrite'], array( 315 321 'slug' => sanitize_title_with_dashes($taxonomy),
Note: See TracChangeset
for help on using the changeset viewer.