Ticket #21543: 21543.diff
File 21543.diff, 2.8 KB (added by , 12 years ago) |
---|
-
wp-includes/taxonomy.php
352 352 add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite'] ); 353 353 } 354 354 355 if ( is_null($args['show_ui']) ) 356 $args['show_ui'] = $args['public']; 355 if ( ! is_array( $args['public'] ) ) { // $args['public'] defaults to true 356 if ( null === $args['show_ui'] ) 357 $args['show_ui'] = $args['public']; 357 358 358 // Whether to show this typein nav-menus.php. Defaults to the setting for public.359 if ( null === $args['show_in_nav_menus'] )360 $args['show_in_nav_menus'] = $args['public'];359 // Whether to show this taxonomy in nav-menus.php. Defaults to the setting for public. 360 if ( null === $args['show_in_nav_menus'] ) 361 $args['show_in_nav_menus'] = $args['public']; 361 362 362 if ( is_null($args['show_tagcloud']) ) 363 $args['show_tagcloud'] = $args['show_ui']; 364 363 if ( null === $args['show_tagcloud'] ) 364 $args['show_tagcloud'] = $args['show_ui']; 365 if ( null === $args['show_tagcloud'] ) 366 $args['show_tagcloud'] = $args['show_ui']; 367 if ( null === $args['show_in_nav_menus'] ) 368 $args['show_in_nav_menus'] = $args['public']; 369 } else { 370 if ( ! isset( $args['public']['admin_menu'] ) ) 371 $args['public']['admin_menu'] = true; 372 if ( ! isset( $args['public']['meta_box'] ) ) 373 $args['public']['meta_box'] = true; 374 if ( $args['public']['admin_menu'] || $args['public']['meta_box'] ) { 375 if ( null === $args['show_ui'] ) 376 $args['show_ui'] = true; 377 } 378 } 379 365 380 $default_caps = array( 366 381 'manage_terms' => 'manage_categories', 367 382 'edit_terms' => 'manage_categories', -
wp-admin/edit-form-advanced.php
110 110 // all taxonomies 111 111 foreach ( get_object_taxonomies($post_type) as $tax_name ) { 112 112 $taxonomy = get_taxonomy($tax_name); 113 if ( ! $taxonomy->show_ui ) 113 if ( ! $taxonomy->show_ui 114 || ( is_array( $taxonomy->public ) && ! $taxonomy->public['meta_box'] ) ) 114 115 continue; 115 116 116 117 $label = $taxonomy->labels->name; -
wp-admin/menu.php
53 53 54 54 $i = 15; 55 55 foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { 56 if ( ! $tax->show_ui || ! in_array('post', (array) $tax->object_type, true) ) 56 if ( ! $tax->show_ui 57 || ! in_array('post', (array) $tax->object_type, true ) 58 || ( is_array( $tax->public ) && ! $tax->public['admin_menu'] ) ) 57 59 continue; 58 60 59 61 $submenu['edit.php'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name );