Changeset 25133
- Timestamp:
- 08/26/2013 10:34:56 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/menu.php
r25100 r25133 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 || ! $tax->show_in_menu || ! in_array('post', (array) $tax->object_type, true) ) 57 57 continue; 58 58 … … 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 … … 85 85 $i = 15; 86 86 foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { 87 if ( ! $tax->show_ui || ! in_array('page', (array) $tax->object_type, true) )87 if ( ! $tax->show_ui || ! $tax->show_in_menu || ! in_array('page', (array) $tax->object_type, true) ) 88 88 continue; 89 89 … … 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 -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r24917 r25133 548 548 $_taxonomy['cap'] = (array) $taxonomy->cap; 549 549 550 if ( in_array( 'menu', $fields ) ) 551 $_taxonomy['show_in_menu'] = (bool) $_taxonomy->show_in_menu; 552 550 553 if ( in_array( 'object_type', $fields ) ) 551 554 $_taxonomy['object_type'] = array_unique( (array) $taxonomy->object_type ); -
trunk/src/wp-includes/taxonomy.php
r25130 r25133 281 281 * - show_ui -Whether to generate a default UI for managing this taxonomy in the admin. 282 282 * * If not set, the default is inherited from public. 283 * - show_in_menu - Where to show the taxonomy in the admin menu. 284 * * If true, the taxonomy is shown as a submenu of the object type menu. 285 * * If false, no menu is shown. 286 * * show_ui must be true. 287 * * If not set, the default is inherited from show_ui. 283 288 * - show_in_nav_menus - Makes this taxonomy available for selection in navigation menus. 284 289 * * If not set, the default is inherited from public. … … 325 330 'hierarchical' => false, 326 331 'show_ui' => null, 332 'show_in_menu' => null, 327 333 'show_in_nav_menus' => null, 328 334 'show_tagcloud' => null, … … 366 372 if ( null === $args['show_ui'] ) 367 373 $args['show_ui'] = $args['public']; 374 375 // If not set, default to the setting for show_ui. 376 if ( null === $args['show_in_menu' ] || ! $args['show_ui'] ) 377 $args['show_in_menu' ] = $args['show_ui']; 368 378 369 379 // If not set, default to the setting for public.
Note: See TracChangeset
for help on using the changeset viewer.