Changeset 13216
- Timestamp:
- 02/19/2010 10:21:29 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/menu.php
r13094 r13216 58 58 $i = 15; 59 59 foreach ( $wp_taxonomies as $tax ) { 60 if ( ! in_array('post', (array) $tax->object_type, true) )60 if ( ! $tax->show_ui || ! in_array('post', (array) $tax->object_type, true) ) 61 61 continue; 62 62 … … 95 95 $i = 15; 96 96 foreach ( $wp_taxonomies as $tax ) { 97 if ( ! in_array($ptype, (array) $tax->object_type, true) )97 if ( ! $tax->show_ui || ! in_array($ptype, (array) $tax->object_type, true) ) 98 98 continue; 99 99 -
trunk/wp-includes/taxonomy.php
r13170 r13216 21 21 'singular_label' => __('Category'), 22 22 'query_var' => false, 23 'rewrite' => false 23 'rewrite' => false, 24 'public' => true, 25 'show_ui' => true, 26 '_builtin' => true 24 27 ) ) ; 25 28 … … 30 33 'singular_label' => __('Post Tag'), 31 34 'query_var' => false, 32 'rewrite' => false 35 'rewrite' => false, 36 'public' => true, 37 'show_ui' => true, 38 '_builtin' => true 33 39 ) ) ; 34 40 … … 36 42 'label' => __('Categories'), 37 43 'query_var' => false, 38 'rewrite' => false 44 'rewrite' => false, 45 'public' => false, 46 'show_ui' => false, 47 '_builtin' => true, 39 48 ) ) ; 40 49 } … … 190 199 $wp_taxonomies = array(); 191 200 192 $defaults = array('hierarchical' => false, 'update_count_callback' => '', 'rewrite' => true, 'query_var' => true); 201 $defaults = array( 'hierarchical' => false, 202 'update_count_callback' => '', 203 'rewrite' => true, 204 'query_var' => $taxonomy, 205 'public' => true, 206 'show_ui' => null, 207 '_builtin' => false 208 ); 193 209 $args = wp_parse_args($args, $defaults); 194 210 … … 210 226 $wp_rewrite->add_permastruct($taxonomy, "/{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']); 211 227 } 228 229 if ( is_null($args['show_ui']) ) 230 $args['show_ui'] = $args['public']; 212 231 213 232 foreach ( array('manage_cap', 'edit_cap', 'delete_cap') as $cap ) {
Note: See TracChangeset
for help on using the changeset viewer.