<!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>[13332] trunk/wp-includes/custom-navigation.php:
  Start consolidatinh menu item outupt into output_menu_item().</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13332">13332</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-02-23 18:17:51 +0000 (Tue, 23 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Start consolidatinh menu item outupt into output_menu_item(). DRY. see <a href="http://trac.wordpress.org/ticket/11817">#11817</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludescustomnavigationphp">trunk/wp-includes/custom-navigation.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludescustomnavigationphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/custom-navigation.php (13331 => 13332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/custom-navigation.php        2010-02-23 17:13:24 UTC (rev 13331)
+++ trunk/wp-includes/custom-navigation.php        2010-02-23 18:17:51 UTC (rev 13332)
</span><span class="lines">@@ -57,16 +57,27 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function setup_menu_item($menu_item) {
</del><ins>+function setup_menu_item($menu_item, $type = 'item', $position = 0) {
</ins><span class="cx">         global $parent_menu_order;
</span><span class="cx"> 
</span><del>-        $menu_item-&gt;type = get_post_meta($menu_item-&gt;ID, 'menu_type', true);
-        $menu_item-&gt;object_id = get_post_meta($menu_item-&gt;ID, 'object_id', true);
-        //$parent_menu_order[ $menu_item-&gt;ID ] = $menu_item-&gt;menu_order;
-        if ( isset( $parent_menu_order[ $menu_item-&gt;post_parent ] ) )
-                $menu_item-&gt;parent_item = $parent_menu_order[ $menu_item-&gt;post_parent ];
-        else
-                $menu_item-&gt;parent_item = 0;
</del><ins>+        if ( 'item' == $type ) {
+                $menu_item-&gt;type = get_post_meta($menu_item-&gt;ID, 'menu_type', true);
+                $menu_item-&gt;object_id = get_post_meta($menu_item-&gt;ID, 'object_id', true);
+                if ( isset( $parent_menu_order[ $menu_item-&gt;post_parent ] ) )
+                        $menu_item-&gt;parent_item = $parent_menu_order[ $menu_item-&gt;post_parent ];
+                else
+                        $menu_item-&gt;parent_item = 0;
+        } elseif ( 'category' == $type ) {
+                $menu_item-&gt;type = $type;
+                $menu_item-&gt;object_id = $menu_item-&gt;term_id;
+                $menu_item-&gt;parent_item = $menu_item-&gt;parent;
+                $menu_item-&gt;menu_order = $position;
+        } elseif ( 'page' == $type ) {
+                $menu_item-&gt;type = $type;
+                $menu_item-&gt;object_id = $menu_item-&gt;ID;
+                $menu_item-&gt;parent_item = $menu_item-&gt;post_parent;
+                $menu_item-&gt;menu_order = $position;
+        }
</ins><span class="cx"> 
</span><span class="cx">         switch ( $menu_item-&gt;type ) {
</span><span class="cx">                 // Page Menu Item
</span><span class="lines">@@ -86,6 +97,7 @@
</span><span class="cx">                         else
</span><span class="cx">                                 $menu_item-&gt;description = htmlentities( $menu_item-&gt;post_content );
</span><span class="cx">                         $menu_item-&gt;target = '';
</span><ins>+                        $menu_item-&gt;append = 'Page';
</ins><span class="cx">                 break;
</span><span class="cx">                 // Category Menu Item
</span><span class="cx">                 case 'category':
</span><span class="lines">@@ -106,6 +118,7 @@
</span><span class="cx">                         else
</span><span class="cx">                                 $menu_item-&gt;description = htmlentities( $menu_item-&gt;post_content );
</span><span class="cx">                         $menu_item-&gt;target = '';
</span><ins>+                        $menu_item-&gt;append = 'Category';
</ins><span class="cx">                 break;
</span><span class="cx">                 default:
</span><span class="cx">                         // Custom Menu Item
</span><span class="lines">@@ -113,6 +126,7 @@
</span><span class="cx">                         $menu_item-&gt;title =  htmlentities( $menu_item-&gt;post_title );
</span><span class="cx">                         $menu_item-&gt;description = htmlentities( $menu_item-&gt;post_content );
</span><span class="cx">                         $menu_item-&gt;target = 'target=&quot;_blank&quot;';
</span><ins>+                        $menu_item-&gt;append = 'Custom';
</ins><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -148,6 +162,43 @@
</span><span class="cx">         return $menu_item;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function output_menu_item($menu_item, $context) {
+        switch( $context ) {
+                case 'backend':
+                case 'menu':
+?&gt;
+                                                &lt;dl&gt;
+                                                        &lt;dt&gt;
+                                                                &lt;span class=&quot;title&quot;&gt;&lt;?php echo esc_html($menu_item-&gt;title); ?&gt;&lt;/span&gt;
+                                                                &lt;span class=&quot;controls&quot;&gt;
+                                                                &lt;span class=&quot;type&quot;&gt;&lt;?php echo esc_html($menu_item-&gt;type); ?&gt;&lt;/span&gt;
+                                                                &lt;a id=&quot;edit&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; onclick=&quot;edititem(&lt;?php echo $menu_item-&gt;menu_order; ?&gt;)&quot; value=&quot;&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;&lt;?php esc_attr_e('Edit Menu Item'); ?&gt;&quot; title=&quot;&lt;?php esc_attr_e('Edit Menu Item'); ?&gt;&quot; src=&quot;&lt;?php echo admin_url('images/ico-edit.png'); ?&gt;&quot; /&gt;&lt;/a&gt;
+                                                                &lt;a id=&quot;remove&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; onclick=&quot;removeitem(&lt;?php echo $menu_item-&gt;menu_order; ?&gt;)&quot; value=&quot;&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;&lt;?php esc_attr_e('Remove from Custom Menu'); ?&gt;&quot; title=&quot;&lt;?php esc_attr_e('Remove from Custom Menu'); ?&gt;&quot; src=&quot;&lt;?php echo admin_url('images/ico-close.png'); ?&gt;&quot; /&gt;&lt;/a&gt;
+                                                                &lt;a id=&quot;view&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; target=&quot;_blank&quot; href=&quot;&lt;?php echo $menu_item-&gt;link; ?&gt;&quot;&gt;&lt;img alt=&quot;&lt;?php esc_attr_e('View Page'); ?&gt;&quot; title=&quot;&lt;?php esc_attr_e('View Page'); ?&gt;&quot; src=&quot;&lt;?php echo admin_url('images/ico-viewpage.png'); ?&gt;&quot; /&gt;&lt;/a&gt;
+                                                                &lt;/span&gt;
+                                                        &lt;/dt&gt;
+                                                &lt;/dl&gt;
+                                                &lt;?php if ( 'backend' == $context ) { ?&gt;
+                                                &lt;a&gt;&lt;span class=&quot;&quot;&gt;&lt;/span&gt;&lt;/a&gt;
+                                                &lt;php } else { ?&gt;
+                                                &lt;a class=&quot;hide&quot; href=&quot;&lt;?php echo $menu_item-&gt;link; ?&gt;&quot;&gt;&lt;?php echo $menu_item-&gt;title; ?&gt;&lt;/a&gt;
+                                                &lt;?php } ?&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;dbid&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;dbid&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;ID; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;postmenu&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;postmenu&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;ID; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;parent&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;parent&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;parent_item; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;title&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;title&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;title; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;linkurl&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;linkurl&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;link; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;description&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;description&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;description; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;icon&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;icon&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;position&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;position&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;linktype&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;linktype&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;type; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;anchortitle&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;anchortitle&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo esc_html( $menu_item-&gt;post_excerpt ); ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;newwindow&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;newwindow&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo ( '' == $menu_item-&gt;post_content_filtered ? '0' : '1' ); ?&gt;&quot; /&gt;
+&lt;?php
+                break;
+        }
+}
+
</ins><span class="cx"> /*-----------------------------------------------------------------------------------*/
</span><span class="cx"> /* Custom Navigation Functions */
</span><span class="cx"> /* wp_custom_navigation_output() displays the menu in the back/frontend
</span><span class="lines">@@ -216,34 +267,7 @@
</span><span class="cx"> 
</span><span class="cx">                                                 ?&gt;&lt;/a&gt;&lt;?php
</span><span class="cx">                                         } elseif ( $type == 'backend' ) {
</span><del>-                                                ?&gt;
-
-                                                &lt;dl&gt;
-                                                        &lt;dt&gt;
-                                                                &lt;span class=&quot;title&quot;&gt;&lt;?php echo $menu_item-&gt;title; ?&gt;&lt;/span&gt;
-                                                                &lt;span class=&quot;controls&quot;&gt;
-                                                                &lt;span class=&quot;type&quot;&gt;&lt;?php echo $menu_item-&gt;type; ?&gt;&lt;/span&gt;
-                                                                &lt;a id=&quot;edit&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; onclick=&quot;edititem(&lt;?php echo $menu_item-&gt;menu_order; ?&gt;)&quot; value=&quot;&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;&lt;?php echo admin_url('images/ico-edit.png'); ?&gt;&quot; /&gt;&lt;/a&gt;
-                                                                &lt;a id=&quot;remove&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; onclick=&quot;removeitem(&lt;?php echo $menu_item-&gt;menu_order; ?&gt;)&quot; value=&quot;&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;&lt;?php echo admin_url('images/ico-close.png'); ?&gt;&quot; /&gt;&lt;/a&gt;
-                                                                &lt;a id=&quot;view&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; target=&quot;_blank&quot; href=&quot;&lt;?php echo $menu_item-&gt;link; ?&gt;&quot;&gt;&lt;img alt=&quot;View Page&quot; title=&quot;View Page&quot; src=&quot;&lt;?php echo admin_url('images/ico-viewpage.png'); ?&gt;&quot; /&gt;&lt;/a&gt;
-                                                                &lt;/span&gt;
-                                                        &lt;/dt&gt;
-                                                &lt;/dl&gt;
-
-                                                &lt;a&gt;&lt;span class=&quot;&quot;&gt;&lt;/span&gt;&lt;/a&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;dbid&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;dbid&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;ID; ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;postmenu&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;postmenu&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $id; ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;parent&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;parent&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;parent_item; ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;title&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;title&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;title; ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;linkurl&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;linkurl&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;link; ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;description&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;description&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;description; ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;icon&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;icon&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;0&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;position&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;position&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;linktype&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;linktype&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;type; ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;anchortitle&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;anchortitle&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo esc_html( $menu_item-&gt;post_excerpt ); ?&gt;&quot; /&gt;
-                                                &lt;input type=&quot;hidden&quot; name=&quot;newwindow&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;newwindow&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo ( '' == $menu_item-&gt;post_content_filtered ? '0' : '1' ); ?&gt;&quot; /&gt;
-
-                                                &lt;?php
</del><ins>+                                                output_menu_item($menu_item, 'backend');
</ins><span class="cx">                                         }
</span><span class="cx">                         // Indent children
</span><span class="cx">                         $last_item = ( count( $menu_items ) == $menu_item-&gt;menu_order );
</span><span class="lines">@@ -301,39 +325,13 @@
</span><span class="cx">                         // Custom Menu
</span><span class="cx">                         if ( $type == 'menu' ) {
</span><span class="cx">                                 $description = get_post_meta($post-&gt;ID, 'page-description', true);
</span><ins>+                                $post = setup_menu_item($post, 'page', $intCounter);
</ins><span class="cx">                                 ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;li id=&quot;menu-&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot;&gt;
</span><span class="cx"> 
</span><del>-                                        &lt;dl&gt;
-                                        &lt;dt&gt;
-                                        &lt;span class=&quot;title&quot;&gt;&lt;?php echo $post-&gt;post_title; ?&gt;&lt;/span&gt;
-                                        &lt;span class=&quot;controls&quot;&gt;
-                                                &lt;span class=&quot;type&quot;&gt;page&lt;/span&gt;
-                                                &lt;a id=&quot;edit&lt;?php echo $intCounter; ?&gt;&quot; onclick=&quot;edititem(&lt;?php echo $intCounter; ?&gt;)&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt;
-                                                &lt;a id=&quot;remove&lt;?php echo $intCounter; ?&gt;&quot; onclick=&quot;removeitem(&lt;?php echo $intCounter; ?&gt;)&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot;&gt;
-                                                        &lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-close.png&quot; /&gt;
-                                                &lt;/a&gt;
-                                                &lt;a target=&quot;_blank&quot; href=&quot;&lt;?php echo get_permalink($post-&gt;ID); ?&gt;&quot;&gt;
-                                                        &lt;img alt=&quot;View Page&quot; title=&quot;View Page&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-viewpage.png&quot; /&gt;
-                                                &lt;/a&gt;
-                                        &lt;/span&gt;
</del><ins>+                                        &lt;?php output_menu_item($post, 'menu', $intCounter); ?&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;/dt&gt;
-                                        &lt;/dl&gt;
-                                        &lt;a class=&quot;hide&quot; href=&quot;&lt;?php echo get_permalink($post-&gt;ID); ?&gt;&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;?php echo $post-&gt;post_title; ?&gt;&lt;/span&gt;
-                                        &lt;/a&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;postmenu&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;postmenu&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $post-&gt;ID; ?&gt;&quot; /&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;parent&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;parent&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;0&quot; /&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;title&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;title&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo htmlentities($post-&gt;post_title); ?&gt;&quot; /&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;linkurl&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;linkurl&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo get_permalink($post-&gt;ID); ?&gt;&quot; /&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;description&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;description&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $description; ?&gt;&quot; /&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;icon&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;icon&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;0&quot; /&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;position&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;position&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot; /&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;linktype&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;linktype&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;page&quot; /&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;anchortitle&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;anchortitle&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo htmlentities($post-&gt;post_title); ?&gt;&quot; /&gt;
-                                        &lt;input type=&quot;hidden&quot; name=&quot;newwindow&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;newwindow&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;0&quot; /&gt;
-
</del><span class="cx">                                         &lt;?php $parentli = $post-&gt;ID; ?&gt;
</span><span class="cx">                                         &lt;?php $intCounter++; ?&gt;
</span><span class="cx">                                         &lt;?php
</span></span></pre>
</div>
</div>

</body>
</html>