<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[13722] trunk: Menu item -> append should be a key/name, not a label.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13722">13722</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-03-16 22:01:49 +0000 (Tue, 16 Mar 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Menu item -> append should be a key/name, not a label. see <a href="http://trac.wordpress.org/ticket/11817">#11817</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesnavmenuphp">trunk/wp-admin/includes/nav-menu.php</a></li>
<li><a href="#trunkwpincludesnavmenutemplatephp">trunk/wp-includes/nav-menu-template.php</a></li>
<li><a href="#trunkwpincludesnavmenuphp">trunk/wp-includes/nav-menu.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/nav-menu.php (13721 => 13722)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/nav-menu.php        2010-03-16 20:59:26 UTC (rev 13721)
+++ trunk/wp-admin/includes/nav-menu.php        2010-03-16 22:01:49 UTC (rev 13722)
</span><span class="lines">@@ -21,8 +21,8 @@
</span><span class="cx">         foreach ( $post_types as $post_type ) {
</span><span class="cx">                 if ( !in_array($post_type->name, $allowed_types) )
</span><span class="cx">                         continue;
</span><del>-                $id = sanitize_title_with_dashes( $post_type->label );
-                
</del><ins>+                $id = $post_type->name;
+
</ins><span class="cx">                 // delete_transient( "nav_menu_items_{$post_type->name}" );
</span><span class="cx">                 // delete_transient( "nav_menu_sub_items_{$post_type->name}" );
</span><span class="cx">                 
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> */
</span><span class="cx"> function wp_nav_menu_taxonomy_metaboxes() {
</span><span class="cx">         $taxonomies = get_taxonomies( array( 'show_ui' => true ), 'object' );
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( !$taxonomies )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><span class="lines">@@ -45,12 +45,11 @@
</span><span class="cx">         foreach ( $taxonomies as $tax ) {
</span><span class="cx">                 if ( !in_array($tax->name, $allowed_types) )
</span><span class="cx">                         continue;
</span><del>-                $id = sanitize_title_with_dashes( $tax->label );
</del><ins>+                $id = $tax->name;
</ins><span class="cx">
</span><del>-                
</del><span class="cx">                 // delete_transient( "nav_menu_items_{$tax->name}" );
</span><span class="cx">                 // delete_transient( "nav_menu_sub_items_{$tax->name}" );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 add_meta_box( "add-{$id}", sprintf( __('Add an Existing %s'), $tax->singular_label ), 'wp_nav_menu_item_taxonomy_metabox', 'menus', 'side', 'default', $tax );
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -182,7 +181,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        $id = sanitize_title_with_dashes( $post_type['args']->label );
</del><ins>+        $id = $post_type['args']->name;
</ins><span class="cx">         ?>
</span><span class="cx">         <p class="quick-search-wrap">
</span><span class="cx">                 <input type="text" class="quick-search regular-text" value="" />
</span><span class="lines">@@ -197,14 +196,14 @@
</span><span class="cx">         <div id="existing-<?php echo esc_attr( $id ); ?>" class="list-wrap">
</span><span class="cx">                 <div class="list-container">
</span><span class="cx">                         <ul class="list">
</span><del>-                                <?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $query->posts, 'post_type', $post_type['args']->name ); ?>
</del><ins>+                                <?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $query->posts, 'post_type', $id ); ?>
</ins><span class="cx">                         </ul>
</span><span class="cx">                 </div><!-- /.list-container-->
</span><span class="cx">         </div><!-- /#existing-categories-->
</span><span class="cx">         <p class="add-to-menu">
</span><span class="cx">                 <a class="button-secondary"><?php _e('Add to Menu'); ?></a>
</span><span class="cx">         </p>
</span><del>-        <input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr( $post_type['args']->name ); ?>-names" value="<?php echo esc_js( $pt_names ); ?>" />
</del><ins>+        <input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr( $id ); ?>-names" value="<?php echo esc_js( $pt_names ); ?>" />
</ins><span class="cx">         <br class="clear" />
</span><span class="cx">         <script type="text/javascript" charset="utf-8">
</span><span class="cx">                 // <![CDATA[
</span><span class="lines">@@ -252,7 +251,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        $id = sanitize_title_with_dashes( $taxonomy['args']->label );
</del><ins>+        $id = $taxonomy['args']->name;
</ins><span class="cx">         ?>
</span><span class="cx">         <p class="quick-search-wrap">
</span><span class="cx">                 <input type="text" class="quick-search regular-text" value="" />
</span><span class="lines">@@ -267,14 +266,14 @@
</span><span class="cx">         <div id="existing-<?php echo esc_attr( $id ); ?>" class="list-wrap">
</span><span class="cx">                 <div class="list-container">
</span><span class="cx">                         <ul class="list">
</span><del>-                                <?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $terms, 'taxonomy', $taxonomy['args']->name ); ?>
</del><ins>+                                <?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $terms, 'taxonomy', $id ); ?>
</ins><span class="cx">                         </ul>
</span><span class="cx">                 </div><!-- /.list-container-->
</span><span class="cx">         </div><!-- /#existing-categories-->
</span><span class="cx">         <p class="add-to-menu">
</span><span class="cx">                 <a class="button-secondary"><?php _e('Add to Menu'); ?></a>
</span><span class="cx">         </p>
</span><del>-        <input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr($taxonomy['args']->name); ?>-names" value="<?php echo esc_js( $term_names ); ?>" />
</del><ins>+        <input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr($id); ?>-names" value="<?php echo esc_js( $term_names ); ?>" />
</ins><span class="cx">         <br class="clear" />
</span><span class="cx">         <script type="text/javascript" charset="utf-8">
</span><span class="cx">                 // <![CDATA[
</span></span></pre></div>
<a id="trunkwpincludesnavmenutemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/nav-menu-template.php (13721 => 13722)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/nav-menu-template.php        2010-03-16 20:59:26 UTC (rev 13721)
+++ trunk/wp-includes/nav-menu-template.php        2010-03-16 22:01:49 UTC (rev 13722)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx">                 // Setup the $menu_item variables
</span><span class="cx">                 $menu_item = wp_setup_nav_menu_item( $menu_item, 'frontend' );
</span><span class="cx">
</span><del>-                $type = sanitize_title_with_dashes( $menu_item->append );
</del><ins>+                $type = $menu_item->append;
</ins><span class="cx">                 $maybe_value = 'frontend' == $args->context ? '' : ' value="'. $menu_item->ID .'"';
</span><span class="cx">                 $classes = 'frontend' == $args->context ? ' class="menu-item-type-'. $type . $menu_item->li_class .'"' : '';
</span><span class="cx">                 
</span></span></pre></div>
<a id="trunkwpincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/nav-menu.php (13721 => 13722)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/nav-menu.php        2010-03-16 20:59:26 UTC (rev 13721)
+++ trunk/wp-includes/nav-menu.php        2010-03-16 22:01:49 UTC (rev 13722)
</span><span class="lines">@@ -171,7 +171,8 @@
</span><span class="cx">                         $menu_item->object_id = get_post_meta( $menu_item->ID, 'menu_item_object_id', true );
</span><span class="cx">                         $menu_item->parent_id = (int) $menu_item->post_parent;
</span><span class="cx">                         $menu_item->type = get_post_meta( $menu_item->ID, 'menu_item_type', true );
</span><del>-                        $menu_item->append = _x( get_post_meta( $menu_item->ID, 'menu_item_append', true ), 'nav menu item type' );
</del><ins>+
+                        $menu_item->append = get_post_meta( $menu_item->ID, 'menu_item_append', true );
</ins><span class="cx">                         
</span><span class="cx">                         $menu_item->title = $menu_item->post_title;
</span><span class="cx">                         $menu_item->url = get_post_meta( $menu_item->ID, 'menu_item_url', true );
</span><span class="lines">@@ -190,7 +191,7 @@
</span><span class="cx">                         $menu_item->object_id = (int) $menu_item->ID;
</span><span class="cx">                         $menu_item->parent_id = (int) $menu_item->post_parent;
</span><span class="cx">                         $menu_item->type = 'custom'; //$menu_item_type
</span><del>-                        $menu_item->append = _x( 'Custom', 'nav menu item type' );
</del><ins>+                        $menu_item->append = 'custom';
</ins><span class="cx">                         
</span><span class="cx">                         $menu_item->attr_title = strip_tags( $menu_item->post_excerpt );
</span><span class="cx">                         $menu_item->description = strip_tags( $menu_item->post_content );
</span><span class="lines">@@ -207,7 +208,7 @@
</span><span class="cx">                         $menu_item->type = $menu_item_type;
</span><span class="cx">                         
</span><span class="cx">                         $object = get_post_type_object( $menu_item_object );
</span><del>-                        $menu_item->append = _x( $object->singular_label, 'nav menu item type' );
</del><ins>+                        $menu_item->append = $object->name;
</ins><span class="cx">
</span><span class="cx">                         $menu_item->title = $menu_item->post_title;
</span><span class="cx">                         $menu_item->url = get_permalink( $menu_item->ID );
</span><span class="lines">@@ -225,7 +226,7 @@
</span><span class="cx">                         $menu_item->type = $menu_item_type;
</span><span class="cx">                         
</span><span class="cx">                         $object = get_taxonomy( $menu_item_object );
</span><del>-                        $menu_item->append = _x( $object->singular_label, 'nav menu item type' );
</del><ins>+                        $menu_item->append = $object->name;
</ins><span class="cx">
</span><span class="cx">                         $menu_item->title = $menu_item->name;
</span><span class="cx">                         $menu_item->url = get_term_link( $menu_item, $menu_item_object );
</span><span class="lines">@@ -234,7 +235,7 @@
</span><span class="cx">                         $menu_item->description = strip_tags( $menu_item->description );
</span><span class="cx">                         break;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         $menu_item->classes = get_post_meta( $menu_item->ID, 'menu_item_classes', true );
</span><span class="cx">         $menu_item->xfn = get_post_meta( $menu_item->ID, 'menu_item_xfn', true );
</span><span class="cx">         
</span></span></pre>
</div>
</div>
</body>
</html>