<!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>[15254] trunk: Revert [15219], [15250], some of [15249] for 3.0,
  revisit in 3.0.1.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15254">15254</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-06-14 19:52:30 +0000 (Mon, 14 Jun 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Revert <a href="http://trac.wordpress.org/changeset/15219">[15219]</a>, <a href="http://trac.wordpress.org/changeset/15250">[15250]</a>, some of <a href="http://trac.wordpress.org/changeset/15249">[15249]</a> for 3.0, revisit in 3.0.1. see <a href="http://trac.wordpress.org/ticket/13822">#13822</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesnavmenuphp">trunk/wp-admin/includes/nav-menu.php</a></li>
<li><a href="#trunkwpadminnavmenusphp">trunk/wp-admin/nav-menus.php</a></li>
<li><a href="#trunkwpincludesdefaultfiltersphp">trunk/wp-includes/default-filters.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 (15253 => 15254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/nav-menu.php        2010-06-14 19:33:04 UTC (rev 15253)
+++ trunk/wp-admin/includes/nav-menu.php        2010-06-14 19:52:30 UTC (rev 15254)
</span><span class="lines">@@ -71,14 +71,9 @@
</span><span class="cx">                 $title = $item-&gt;title;
</span><span class="cx"> 
</span><span class="cx">                 if ( isset( $item-&gt;post_status ) &amp;&amp; 'draft' == $item-&gt;post_status ) {
</span><del>-                        $original_status = get_post_status_object( $original_object-&gt;post_status );
-                        $classes[] = &quot;draft post-status-$original_object-&gt;post_status&quot;;
-                        /* translators: 1: title of menu item in draft status, 2: actual post status. */
-                        $title = sprintf( __('%1$s (%2$s)'), $item-&gt;title, $original_status-&gt;label );
-                } elseif ( isset( $item-&gt;post_status ) &amp;&amp; 'pending' == $item-&gt;post_status ) {
-                        $classes[] = 'unsaved';
-                        /* translators: %s: title of menu item in pending status */
-                        $title = sprintf( __('%s (Unsaved)'), $item-&gt;title );
</del><ins>+                        $classes[] = 'pending';
+                        /* translators: %s: title of menu item in draft status */
+                        $title = sprintf( __('%s (Pending)'), $item-&gt;title );
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 $title = empty( $item-&gt;label ) ? $title : $item-&gt;label;
</span><span class="lines">@@ -177,27 +172,7 @@
</span><span class="cx">                                 &lt;div class=&quot;menu-item-actions description-wide submitbox&quot;&gt;
</span><span class="cx">                                         &lt;?php if( 'custom' != $item-&gt;type ) : ?&gt;
</span><span class="cx">                                                 &lt;p class=&quot;link-to-original&quot;&gt;
</span><del>-                                                        &lt;?php
-                                                        $post_status = get_post_status( $item-&gt;object_id );
-                                                        if( 'publish' == $post_status ) {
-                                                                printf( __('Original: %s'), '&lt;a href=&quot;' . esc_attr( $item-&gt;url ) . '&quot;&gt;' . esc_html( $original_title ) . '&lt;/a&gt;', '' );
-                                                        } else {
-                                                                $original_url = $item-&gt;url;
-                                                                if( 'trash' == $post_status ) {
-                                                                        $original_url = add_query_arg(
-                                                                                array(
-                                                                                        'post_status' =&gt; 'trash',
-                                                                                        'post_type' =&gt; $item-&gt;object,
-                                                                                ),
-                                                                                admin_url( 'edit.php' )
-                                                                        );
-                                                                }
-                                                                $post_status_obj = get_post_status_object( $post_status );
-                                                                /* translators: 1: title, 2: post status. */
-                                                                printf( __('Original: %1$s (%2$s)'), '&lt;a href=&quot;' . esc_attr( $original_url ) . '&quot;&gt;' . esc_html( $original_title ) . '&lt;/a&gt;',
-                                                                $post_status_obj-&gt;label );
-                                                        }
-                                                        ?&gt;
</del><ins>+                                                        &lt;?php printf( __('Original: %s'), '&lt;a href=&quot;' . esc_attr( $item-&gt;url ) . '&quot;&gt;' . esc_html( $original_title ) . '&lt;/a&gt;' ); ?&gt;
</ins><span class="cx">                                                 &lt;/p&gt;
</span><span class="cx">                                         &lt;?php endif; ?&gt;
</span><span class="cx">                                         &lt;a class=&quot;item-delete submitdelete deletion&quot; id=&quot;delete-&lt;?php echo $item_id; ?&gt;&quot; href=&quot;&lt;?php
</span><span class="lines">@@ -219,7 +194,6 @@
</span><span class="cx">                                 &lt;input class=&quot;menu-item-data-object&quot; type=&quot;hidden&quot; name=&quot;menu-item-object[&lt;?php echo $item_id; ?&gt;]&quot; value=&quot;&lt;?php echo esc_attr( $item-&gt;object ); ?&gt;&quot; /&gt;
</span><span class="cx">                                 &lt;input class=&quot;menu-item-data-parent-id&quot; type=&quot;hidden&quot; name=&quot;menu-item-parent-id[&lt;?php echo $item_id; ?&gt;]&quot; value=&quot;&lt;?php echo esc_attr( $item-&gt;menu_item_parent ); ?&gt;&quot; /&gt;
</span><span class="cx">                                 &lt;input class=&quot;menu-item-data-position&quot; type=&quot;hidden&quot; name=&quot;menu-item-position[&lt;?php echo $item_id; ?&gt;]&quot; value=&quot;&lt;?php echo esc_attr( $item-&gt;menu_order ); ?&gt;&quot; /&gt;
</span><del>-                                &lt;input class=&quot;menu-item-data-status&quot; type=&quot;hidden&quot; name=&quot;menu-item-status[&lt;?php echo $item_id; ?&gt;]&quot; value=&quot;&lt;?php echo esc_attr( $item-&gt;post_status ); ?&gt;&quot; /&gt;
</del><span class="cx">                                 &lt;input class=&quot;menu-item-data-type&quot; type=&quot;hidden&quot; name=&quot;menu-item-type[&lt;?php echo $item_id; ?&gt;]&quot; value=&quot;&lt;?php echo esc_attr( $item-&gt;type ); ?&gt;&quot; /&gt;
</span><span class="cx">                         &lt;/div&gt;&lt;!-- .menu-item-settings--&gt;
</span><span class="cx">                         &lt;ul class=&quot;menu-item-transport&quot;&gt;&lt;/ul&gt;
</span><span class="lines">@@ -973,7 +947,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 3.0.0
</span><span class="cx">  *
</span><del>- * @param int $menu_id The menu ID for which to save this item. $menu_id of 0 makes a pending, orphaned menu item.
</del><ins>+ * @param int $menu_id The menu ID for which to save this item. $menu_id of 0 makes a draft, orphaned menu item.
</ins><span class="cx">  * @param array $menu_data The unsanitized posted menu item data.
</span><span class="cx">  * @return array The database IDs of the items saved
</span><span class="cx">  */
</span><span class="lines">@@ -1105,12 +1079,12 @@
</span><span class="cx"> 
</span><span class="cx">                 $some_pending_menu_items = false;
</span><span class="cx">                 foreach( (array) $menu_items as $menu_item ) {
</span><del>-                        if ( isset( $menu_item-&gt;post_status ) &amp;&amp; 'pending' == $menu_item-&gt;post_status )
</del><ins>+                        if ( isset( $menu_item-&gt;post_status ) &amp;&amp; 'draft' == $menu_item-&gt;post_status )
</ins><span class="cx">                                 $some_pending_menu_items = true;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if ( $some_pending_menu_items )
</span><del>-                        $result .= '&lt;div class=&quot;updated inline&quot;&gt;&lt;p&gt;' . __('Click Save Menu to make unsaved menu items public.') . '&lt;/p&gt;&lt;/div&gt;';
</del><ins>+                        $result .= '&lt;div class=&quot;updated inline&quot;&gt;&lt;p&gt;' . __('Click Save Menu to make pending menu items public.') . '&lt;/p&gt;&lt;/div&gt;';
</ins><span class="cx"> 
</span><span class="cx">                 $result .= '&lt;ul class=&quot;menu&quot; id=&quot;menu-to-edit&quot;&gt; ';
</span><span class="cx">                 $result .= walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $menu_items), 0, (object) array('walker' =&gt; $walker ) );
</span><span class="lines">@@ -1143,23 +1117,23 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Deletes orphaned pending menu items
</del><ins>+ * Deletes orphaned draft menu items
</ins><span class="cx">  *
</span><span class="cx">  * @access private
</span><span class="cx">  * @since 3.0.0
</span><span class="cx">  *
</span><span class="cx">  */
</span><del>-function _wp_delete_orphaned_pending_menu_items() {
</del><ins>+function _wp_delete_orphaned_draft_menu_items() {
</ins><span class="cx">         global $wpdb;
</span><span class="cx">         $delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);
</span><span class="cx"> 
</span><del>-        // delete orphaned pending menu items
-        $menu_items_to_delete = $wpdb-&gt;get_col($wpdb-&gt;prepare(&quot;SELECT ID FROM $wpdb-&gt;posts AS p LEFT JOIN $wpdb-&gt;postmeta AS m ON p.ID = m.post_id WHERE post_type = 'nav_menu_item' AND post_status = 'pending' AND meta_key = '_menu_item_orphaned' AND meta_value &lt; '%d'&quot;, $delete_timestamp ) );
</del><ins>+        // delete orphaned draft menu items
+        $menu_items_to_delete = $wpdb-&gt;get_col($wpdb-&gt;prepare(&quot;SELECT ID FROM $wpdb-&gt;posts AS p LEFT JOIN $wpdb-&gt;postmeta AS m ON p.ID = m.post_id WHERE post_type = 'nav_menu_item' AND post_status = 'draft' AND meta_key = '_menu_item_orphaned' AND meta_value &lt; '%d'&quot;, $delete_timestamp ) );
</ins><span class="cx"> 
</span><span class="cx">         foreach( (array) $menu_items_to_delete as $menu_item_id )
</span><span class="cx">                 wp_delete_post( $menu_item_id, true );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-add_action('admin_head-nav-menus.php', '_wp_delete_orphaned_pending_menu_items');
</del><ins>+add_action('admin_head-nav-menus.php', '_wp_delete_orphaned_draft_menu_items');
</ins><span class="cx"> 
</span><span class="cx"> ?&gt;
</span></span></pre></div>
<a id="trunkwpadminnavmenusphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/nav-menus.php (15253 => 15254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/nav-menus.php        2010-06-14 19:33:04 UTC (rev 15253)
+++ trunk/wp-admin/nav-menus.php        2010-06-14 19:52:30 UTC (rev 15254)
</span><span class="lines">@@ -327,13 +327,13 @@
</span><span class="cx">                         // Update menu items
</span><span class="cx"> 
</span><span class="cx">                         if ( ! is_wp_error( $_menu_object ) ) {
</span><del>-                                $unsorted_menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array('orderby' =&gt; 'ID', 'output' =&gt; ARRAY_A, 'output_key' =&gt; 'ID', 'post_status' =&gt; 'draft,pending,publish') );
</del><ins>+                                $unsorted_menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array('orderby' =&gt; 'ID', 'output' =&gt; ARRAY_A, 'output_key' =&gt; 'ID', 'post_status' =&gt; 'draft,publish') );
</ins><span class="cx">                                 $menu_items = array();
</span><span class="cx">                                 // Index menu items by db ID
</span><span class="cx">                                 foreach( $unsorted_menu_items as $_item )
</span><span class="cx">                                         $menu_items[$_item-&gt;db_id] = $_item;
</span><span class="cx"> 
</span><del>-                                $post_fields = array( 'menu-item-db-id', 'menu-item-object-id', 'menu-item-object', 'menu-item-parent-id', 'menu-item-position', 'menu-item-type', 'menu-item-title', 'menu-item-url', 'menu-item-description', 'menu-item-attr-title', 'menu-item-status', 'menu-item-target', 'menu-item-classes', 'menu-item-xfn' );
</del><ins>+                                $post_fields = array( 'menu-item-db-id', 'menu-item-object-id', 'menu-item-object', 'menu-item-parent-id', 'menu-item-position', 'menu-item-type', 'menu-item-title', 'menu-item-url', 'menu-item-description', 'menu-item-attr-title', 'menu-item-target', 'menu-item-classes', 'menu-item-xfn' );
</ins><span class="cx">                                 wp_defer_term_counting(true);
</span><span class="cx">                                 // Loop through all the menu items' POST variables
</span><span class="cx">                                 if ( ! empty( $_POST['menu-item-db-id'] ) ) {
</span></span></pre></div>
<a id="trunkwpincludesdefaultfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-filters.php (15253 => 15254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-filters.php        2010-06-14 19:33:04 UTC (rev 15253)
+++ trunk/wp-includes/default-filters.php        2010-06-14 19:52:30 UTC (rev 15254)
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> // Navigation menu actions
</span><span class="cx"> add_action( 'delete_post',                '_wp_delete_post_menu_item'      );
</span><span class="cx"> add_action( 'delete_term',                '_wp_delete_tax_menu_item'       );
</span><del>-add_action( 'transition_post_status', '_wp_menu_changing_status_observer',  10, 3 );
</del><ins>+add_action( 'transition_post_status', '_wp_auto_add_pages_to_menu',  10, 3 );
</ins><span class="cx"> 
</span><span class="cx"> // Post Thumbnail CSS class filtering
</span><span class="cx"> add_action( 'begin_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_add'    );
</span></span></pre></div>
<a id="trunkwpincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/nav-menu.php (15253 => 15254)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/nav-menu.php        2010-06-14 19:33:04 UTC (rev 15253)
+++ trunk/wp-includes/nav-menu.php        2010-06-14 19:52:30 UTC (rev 15254)
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 3.0.0
</span><span class="cx">  *
</span><del>- * @param int $menu_id The ID of the menu. Required. If &quot;0&quot;, makes the menu item a pending orphan.
</del><ins>+ * @param int $menu_id The ID of the menu. Required. If &quot;0&quot;, makes the menu item a draft orphan.
</ins><span class="cx">  * @param int $menu_item_db_id The ID of the menu item. If &quot;0&quot;, creates a new menu item.
</span><span class="cx">  * @param array $menu_item_data The menu item's data.
</span><span class="cx">  * @return int The menu item's database ID or WP_Error object on failure.
</span><span class="lines">@@ -262,7 +262,7 @@
</span><span class="cx">         if ( ( ! $menu &amp;&amp; 0 !== $menu_id ) || is_wp_error( $menu ) )
</span><span class="cx">                 return $menu;
</span><span class="cx"> 
</span><del>-        $menu_items = 0 == $menu_id ? array() : (array) wp_get_nav_menu_items( $menu_id, array( 'post_status' =&gt; 'draft,pending,publish' ) );
</del><ins>+        $menu_items = 0 == $menu_id ? array() : (array) wp_get_nav_menu_items( $menu_id, array( 'post_status' =&gt; 'publish,draft' ) );
</ins><span class="cx"> 
</span><span class="cx">         $count = count( $menu_items );
</span><span class="cx"> 
</span><span class="lines">@@ -336,10 +336,10 @@
</span><span class="cx">         if ( 0 != $menu_id )
</span><span class="cx">                 $post['tax_input'] = array( 'nav_menu' =&gt; array( intval( $menu-&gt;term_id ) ) );
</span><span class="cx"> 
</span><del>-        // New menu item. Default is pending status
</del><ins>+        // New menu item. Default is draft status
</ins><span class="cx">         if ( 0 == $menu_item_db_id ) {
</span><span class="cx">                 $post['ID'] = 0;
</span><del>-                $post['post_status'] = 'publish' == $args['menu-item-status'] ? 'publish' : 'pending';
</del><ins>+                $post['post_status'] = 'publish' == $args['menu-item-status'] ? 'publish' : 'draft';
</ins><span class="cx">                 $menu_item_db_id = wp_insert_post( $post );
</span><span class="cx"> 
</span><span class="cx">         // Update existing menu item. Default is publish status
</span><span class="lines">@@ -690,7 +690,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Modify a navigational menu upon post object status change, if appropos.
</del><ins>+ * Automatically add newly published page objects to menus with that as an option.
</ins><span class="cx">  *
</span><span class="cx">  * @since 3.0.0
</span><span class="cx">  * @access private
</span><span class="lines">@@ -700,61 +700,34 @@
</span><span class="cx">  * @param object $post The post object being transitioned from one status to another.
</span><span class="cx">  * @return void
</span><span class="cx">  */
</span><del>-function _wp_menu_changing_status_observer( $new_status, $old_status, $post ) {
-        // append new top-level page objects to a menu for which that option is selected
-        if (
-                'publish' == $new_status &amp;&amp;
-                'publish' != $old_status &amp;&amp;
-                'page' == $post-&gt;post_type &amp;&amp;
-                empty( $post-&gt;post_parent )
-        ) {
-                $auto_add = get_option( 'nav_menu_options' );
-                if (
-                        isset( $auto_add['auto_add'] ) &amp;&amp;
-                        is_array( $auto_add['auto_add'] )
-                ) {
-                        $args = array(
-                                'menu-item-object-id' =&gt; $post-&gt;ID,
-                                'menu-item-object' =&gt; $post-&gt;post_type,
-                                'menu-item-type' =&gt; 'post_type',
-                                'menu-item-status' =&gt; 'publish',
-                        );
</del><ins>+function _wp_auto_add_pages_to_menu( $new_status, $old_status, $post ) {
+        if ( 'publish' != $new_status || 'publish' == $old_status || 'page' != $post-&gt;post_type )
+                return;
+        if ( ! empty( $post-&gt;post_parent ) )
+                return;
+        $auto_add = get_option( 'nav_menu_options' );
+        if ( empty( $auto_add ) || ! is_array( $auto_add ) || ! isset( $auto_add['auto_add'] ) )
+                return;
+        $auto_add = $auto_add['auto_add'];
+        if ( empty( $auto_add ) || ! is_array( $auto_add ) )
+                return;
</ins><span class="cx"> 
</span><del>-                        foreach ( $auto_add['auto_add'] as $menu_id ) {
-                                $items = wp_get_nav_menu_items( $menu_id, array( 'post_status' =&gt; 'draft,pending,publish' ) );
-                                if ( ! is_array( $items ) )
-                                        continue;
-                                foreach ( $items as $item ) {
-                                        if ( $post-&gt;ID == $item-&gt;object_id )
-                                                continue 2;
-                                }
-                                wp_update_nav_menu_item( $menu_id, 0, $args );
-                        }
-                }
-        }
</del><ins>+        $args = array(
+                'menu-item-object-id' =&gt; $post-&gt;ID,
+                'menu-item-object' =&gt; $post-&gt;post_type,
+                'menu-item-type' =&gt; 'post_type',
+                'menu-item-status' =&gt; 'publish',
+        );
</ins><span class="cx"> 
</span><del>-        // give menu items draft status if their associated post objects change from &quot;publish&quot; to &quot;draft&quot;, or vice versa (draft item being re-published)
-        if (
-                ( $new_status != $old_status ) &amp;&amp;
-                ! empty( $post-&gt;ID ) &amp;&amp; ! empty( $post-&gt;post_type ) &amp;&amp;
-                'nav_menu_item' != $post-&gt;post_type &amp;&amp; 
-                ( 'publish' == $old_status || 'publish' == $new_status )
-        ) {
-                $menu_items = get_posts(array(
-                        'meta_key' =&gt; '_menu_item_object_id',
-                        'meta_value' =&gt; $post-&gt;ID,
-                        'post_status' =&gt; 'any',
-                        'post_type' =&gt; 'nav_menu_item',
-                ));
-
-                foreach( (array) $menu_items as $menu_item ) {
-                        if ( ! empty( $menu_item-&gt;ID ) ) {
-                                $properties = get_object_vars( $menu_item );
-                                $properties['post_status'] = 'publish' == $new_status ? 'publish' : 'draft';
-
-                                wp_insert_post( $properties );
-                        }
</del><ins>+        foreach ( $auto_add as $menu_id ) {
+                $items = wp_get_nav_menu_items( $menu_id, array( 'post_status' =&gt; 'publish,draft' ) );
+                if ( ! is_array( $items ) )
+                        continue;
+                foreach ( $items as $item ) {
+                        if ( $post-&gt;ID == $item-&gt;object_id )
+                                continue 2;
</ins><span class="cx">                 }
</span><ins>+                wp_update_nav_menu_item( $menu_id, 0, $args );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>