Changeset 13722
- Timestamp:
- 03/16/2010 10:01:49 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/nav-menu.php
r13716 r13722 22 22 if ( !in_array($post_type->name, $allowed_types) ) 23 23 continue; 24 $id = sanitize_title_with_dashes( $post_type->label );25 24 $id = $post_type->name; 25 26 26 // delete_transient( "nav_menu_items_{$post_type->name}" ); 27 27 // delete_transient( "nav_menu_sub_items_{$post_type->name}" ); … … 38 38 function wp_nav_menu_taxonomy_metaboxes() { 39 39 $taxonomies = get_taxonomies( array( 'show_ui' => true ), 'object' ); 40 40 41 41 if ( !$taxonomies ) 42 42 return false; … … 46 46 if ( !in_array($tax->name, $allowed_types) ) 47 47 continue; 48 $id = sanitize_title_with_dashes( $tax->label ); 49 50 48 $id = $tax->name; 49 51 50 // delete_transient( "nav_menu_items_{$tax->name}" ); 52 51 // delete_transient( "nav_menu_sub_items_{$tax->name}" ); 53 52 54 53 add_meta_box( "add-{$id}", sprintf( __('Add an Existing %s'), $tax->singular_label ), 'wp_nav_menu_item_taxonomy_metabox', 'menus', 'side', 'default', $tax ); 55 54 } … … 183 182 } 184 183 185 $id = sanitize_title_with_dashes( $post_type['args']->label );184 $id = $post_type['args']->name; 186 185 ?> 187 186 <p class="quick-search-wrap"> … … 198 197 <div class="list-container"> 199 198 <ul class="list"> 200 <?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $query->posts, 'post_type', $ post_type['args']->name); ?>199 <?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $query->posts, 'post_type', $id ); ?> 201 200 </ul> 202 201 </div><!-- /.list-container--> … … 205 204 <a class="button-secondary"><?php _e('Add to Menu'); ?></a> 206 205 </p> 207 <input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr( $ post_type['args']->name); ?>-names" value="<?php echo esc_js( $pt_names ); ?>" />206 <input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr( $id ); ?>-names" value="<?php echo esc_js( $pt_names ); ?>" /> 208 207 <br class="clear" /> 209 208 <script type="text/javascript" charset="utf-8"> … … 253 252 } 254 253 255 $id = sanitize_title_with_dashes( $taxonomy['args']->label );254 $id = $taxonomy['args']->name; 256 255 ?> 257 256 <p class="quick-search-wrap"> … … 268 267 <div class="list-container"> 269 268 <ul class="list"> 270 <?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $terms, 'taxonomy', $ taxonomy['args']->name); ?>269 <?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $terms, 'taxonomy', $id ); ?> 271 270 </ul> 272 271 </div><!-- /.list-container--> … … 275 274 <a class="button-secondary"><?php _e('Add to Menu'); ?></a> 276 275 </p> 277 <input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr($ taxonomy['args']->name); ?>-names" value="<?php echo esc_js( $term_names ); ?>" />276 <input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr($id); ?>-names" value="<?php echo esc_js( $term_names ); ?>" /> 278 277 <br class="clear" /> 279 278 <script type="text/javascript" charset="utf-8"> -
trunk/wp-includes/nav-menu-template.php
r13704 r13722 117 117 $menu_item = wp_setup_nav_menu_item( $menu_item, 'frontend' ); 118 118 119 $type = sanitize_title_with_dashes( $menu_item->append );119 $type = $menu_item->append; 120 120 $maybe_value = 'frontend' == $args->context ? '' : ' value="'. $menu_item->ID .'"'; 121 121 $classes = 'frontend' == $args->context ? ' class="menu-item-type-'. $type . $menu_item->li_class .'"' : ''; -
trunk/wp-includes/nav-menu.php
r13719 r13722 172 172 $menu_item->parent_id = (int) $menu_item->post_parent; 173 173 $menu_item->type = get_post_meta( $menu_item->ID, 'menu_item_type', true ); 174 $menu_item->append = _x( get_post_meta( $menu_item->ID, 'menu_item_append', true ), 'nav menu item type' ); 174 175 $menu_item->append = get_post_meta( $menu_item->ID, 'menu_item_append', true ); 175 176 176 177 $menu_item->title = $menu_item->post_title; … … 191 192 $menu_item->parent_id = (int) $menu_item->post_parent; 192 193 $menu_item->type = 'custom'; //$menu_item_type 193 $menu_item->append = _x( 'Custom', 'nav menu item type' );194 $menu_item->append = 'custom'; 194 195 195 196 $menu_item->attr_title = strip_tags( $menu_item->post_excerpt ); … … 208 209 209 210 $object = get_post_type_object( $menu_item_object ); 210 $menu_item->append = _x( $object->singular_label, 'nav menu item type' );211 $menu_item->append = $object->name; 211 212 212 213 $menu_item->title = $menu_item->post_title; … … 226 227 227 228 $object = get_taxonomy( $menu_item_object ); 228 $menu_item->append = _x( $object->singular_label, 'nav menu item type' );229 $menu_item->append = $object->name; 229 230 230 231 $menu_item->title = $menu_item->name; … … 235 236 break; 236 237 } 237 238 238 239 $menu_item->classes = get_post_meta( $menu_item->ID, 'menu_item_classes', true ); 239 240 $menu_item->xfn = get_post_meta( $menu_item->ID, 'menu_item_xfn', true );
Note: See TracChangeset
for help on using the changeset viewer.