Changeset 12694 for trunk/wp-admin/menu.php
- Timestamp:
- 01/11/2010 07:27:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/menu.php
r12673 r12694 48 48 $i = 15; 49 49 foreach ( $wp_taxonomies as $tax ) { 50 if ( $tax->hierarchical ||! in_array('post', (array) $tax->object_type, true) )50 if ( ! in_array('post', (array) $tax->object_type, true) ) 51 51 continue; 52 52 53 $submenu['edit.php'][$i] = array( esc_attr($tax->label), 'manage_categories', 'edit-tags.php?taxonomy=' . $tax->name ); 53 if ( $tax->hierarchical ) 54 $submenu['edit.php'][$i] = array( esc_attr($tax->label), 'manage_categories', 'categories.php?taxonomy=' . $tax->name ); 55 else 56 $submenu['edit.php'][$i] = array( esc_attr($tax->label), 'manage_categories', 'edit-tags.php?taxonomy=' . $tax->name ); 54 57 ++$i; 55 58 } 56 57 $submenu['edit.php'][50] = array( __('Categories'), 'manage_categories', 'categories.php' );58 59 59 60 $menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top', 'menu-media', 'div' ); … … 87 88 $i = 15; 88 89 foreach ( $wp_taxonomies as $tax ) { 89 if ( $tax->hierarchical ||! in_array($ptype, (array) $tax->object_type, true) )90 if ( ! in_array($ptype, (array) $tax->object_type, true) ) 90 91 continue; 91 92 92 $submenu["edit.php?post_type=$ptype"][$i] = array( esc_attr($tax->label), 'manage_categories', "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" ); 93 if ( $tax->hierarchical ) 94 $submenu["edit.php?post_type=$ptype"][$i] = array( esc_attr($tax->label), 'manage_categories', "categories.php?taxonomy=$tax->name&post_type=$ptype" ); 95 else 96 $submenu["edit.php?post_type=$ptype"][$i] = array( esc_attr($tax->label), 'manage_categories', "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" ); 93 97 ++$i; 94 98 }
Note: See TracChangeset
for help on using the changeset viewer.