diff --git wp-admin/menu.php wp-admin/menu.php
index 365b459..497a89a 100644
|
|
|
$menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top menu |
| 65 | 65 | /* translators: add new file */ |
| 66 | 66 | $submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php'); |
| 67 | 67 | foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) { |
| 68 | | if ( ! $tax->show_ui ) |
| | 68 | if ( ! $tax->show_ui || ! $tax->show_in_menu ) |
| 69 | 69 | continue; |
| 70 | 70 | |
| 71 | 71 | $submenu['upload.php'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&post_type=attachment' ); |
| … |
… |
foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false, |
| 126 | 126 | |
| 127 | 127 | $i = 15; |
| 128 | 128 | foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { |
| 129 | | if ( ! $tax->show_ui || ! in_array($ptype, (array) $tax->object_type, true) ) |
| | 129 | if ( ! $tax->show_ui || ! $tax->show_in_menu || ! in_array( $ptype, (array) $tax->object_type, true ) ) |
| 130 | 130 | continue; |
| 131 | 131 | |
| 132 | 132 | $submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" ); |
diff --git wp-includes/taxonomy.php wp-includes/taxonomy.php
index 955369e..8d918f5 100644
|
|
|
function register_taxonomy( $taxonomy, $object_type, $args = array() ) { |
| 326 | 326 | 'query_var' => $taxonomy, |
| 327 | 327 | 'public' => true, |
| 328 | 328 | 'show_ui' => null, |
| | 329 | 'show_in_menu' => null, |
| 329 | 330 | 'show_tagcloud' => null, |
| 330 | 331 | '_builtin' => false, |
| 331 | 332 | 'labels' => array(), |
| … |
… |
function register_taxonomy( $taxonomy, $object_type, $args = array() ) { |
| 363 | 364 | add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite'] ); |
| 364 | 365 | } |
| 365 | 366 | |
| 366 | | if ( is_null($args['show_ui']) ) |
| | 367 | // If not set, default to the setting for public. |
| | 368 | if ( null === $args['show_ui'] ) |
| 367 | 369 | $args['show_ui'] = $args['public']; |
| 368 | 370 | |
| | 371 | // If not set, default to the setting for show_ui. |
| | 372 | if ( null === $args['show_in_menu'] || ! $args['show_ui'] ) |
| | 373 | $args['show_in_menu'] = $args['show_ui']; |
| | 374 | |
| 369 | 375 | // Whether to show this type in nav-menus.php. Defaults to the setting for public. |
| 370 | 376 | if ( null === $args['show_in_nav_menus'] ) |
| 371 | 377 | $args['show_in_nav_menus'] = $args['public']; |
| 372 | 378 | |
| 373 | | if ( is_null($args['show_tagcloud']) ) |
| | 379 | // If not set, default to the setting for show_ui. |
| | 380 | if ( null === $args['show_tagcloud'] ) |
| 374 | 381 | $args['show_tagcloud'] = $args['show_ui']; |
| 375 | 382 | |
| 376 | 383 | $default_caps = array( |