<!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>[13544] trunk/wp-admin/nav-menus.php: Clean up whitespace in nav-menu.
 php see #11817</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13544">13544</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2010-03-02 03:59:28 +0000 (Tue, 02 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clean up whitespace in nav-menu.php see <a href="http://trac.wordpress.org/ticket/11817">#11817</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminnavmenusphp">trunk/wp-admin/nav-menus.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminnavmenusphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/nav-menus.php (13543 => 13544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/nav-menus.php        2010-03-02 03:58:02 UTC (rev 13543)
+++ trunk/wp-admin/nav-menus.php        2010-03-02 03:59:28 UTC (rev 13544)
</span><span class="lines">@@ -57,10 +57,10 @@
</span><span class="cx"> if ( isset($_GET['delete-menu']) &amp;&amp; $_GET['delete-menu'] &gt; 0 ) {
</span><span class="cx">         // if ( ! current_user_can('delete_menus') )
</span><span class="cx">         //         wp_die( __( 'Cheatin&amp;#8217; uh?' ));
</span><del>-        
</del><ins>+
</ins><span class="cx">         $menu_id = (int) $_GET['delete-menu'];
</span><span class="cx">         check_admin_referer( 'delete_menu-' . $menu_id );
</span><del>-        
</del><ins>+
</ins><span class="cx">         wp_delete_nav_menu( $menu_id );
</span><span class="cx">         $messages_div = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;' . __('Menu successfully deleted.') . '&lt;/p&gt;&lt;/div&gt;';
</span><span class="cx">         $menu_selected_id = 0;
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> if ( ! $menu_selected_id &amp;&amp; ! empty($menus) )
</span><span class="cx">         $menu_selected_id = $menus[0]-&gt;term_id;
</span><span class="cx"> 
</span><del>-// Get the name of the current Menu 
</del><ins>+// Get the name of the current Menu
</ins><span class="cx"> $menu_title = '';
</span><span class="cx"> $valid_menu = false;
</span><span class="cx"> if ( $menu_selected_id &gt; 0 ) {
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx"> if ( $post_counter &gt; 0 &amp;&amp; $menu_selected_id &gt; 0 &amp;&amp; ! $updated ) {
</span><span class="cx">         $menu_items = wp_get_nav_menu_items( $menu_selected_id, array('orderby' =&gt; 'ID', 'output' =&gt; ARRAY_A, 'output_key' =&gt; 'ID') );
</span><span class="cx">         $parent_menu_ids = array();
</span><del>-        
</del><ins>+
</ins><span class="cx">         // Loop through all POST variables
</span><span class="cx">         for ( $k = 1; $k &lt;= $post_counter; $k++ ) {
</span><span class="cx">                 $db_id = isset( $_POST['item-dbid'.$k] )? $_POST['item-dbid'.$k] : 0;
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">                 $custom_title = isset( $_POST['item-title'.$k] )?  $_POST['item-title'.$k] : '';
</span><span class="cx">                 $custom_linkurl = ( isset( $_POST['item-url'.$k] ) &amp;&amp; 'custom' == $_POST['linktype'.$k] ) ? $_POST['item-url'.$k] : '';
</span><span class="cx">                 $custom_description = isset( $_POST['item-description'.$k] )? $_POST['item-description'.$k] : '';
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // doesn't seem to be used by UI
</span><span class="cx">                 $position = isset( $_POST['item-position'.$k] )? $_POST['item-position'.$k] : 0;
</span><span class="cx">                 $linktype = isset( $_POST['item-type'.$k] )? $_POST['item-type'.$k] : 'custom';
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> 
</span><span class="cx">                 if ( $parent_id &gt; 0 &amp;&amp; isset( $parent_menu_ids[$parent_id] ) )
</span><span class="cx">                         $post['post_parent'] = $parent_menu_ids[$parent_id];
</span><del>-                
</del><ins>+
</ins><span class="cx">                 // New menu item
</span><span class="cx">                 if ( $db_id == 0 ) {
</span><span class="cx">                         $db_id = wp_insert_post( $post );
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">         &lt;h2&gt;&lt;?php esc_html_e('Menus'); ?&gt;&lt;/h2&gt;
</span><span class="cx">         &lt;?php echo $messages_div; ?&gt;
</span><span class="cx">         &lt;div class=&quot;hide-if-js error&quot;&gt;&lt;p&gt;&lt;?php _e('You do not have JavaScript enabled in your browser. Please enable it to access the Menus functionality.'); ?&gt;&lt;/p&gt;&lt;/div&gt;
</span><del>-        
</del><ins>+
</ins><span class="cx">         &lt;form onsubmit=&quot;wp_update_post_data();&quot; action=&quot;&lt;?php echo admin_url( 'nav-menus.php' ); ?&gt;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
</span><span class="cx">                 &lt;?php if ( !empty($menus) &amp;&amp; count($menus) &gt; 1 ) : ?&gt;
</span><span class="cx">                 &lt;ul class=&quot;subsubsub&quot;&gt;
</span><span class="lines">@@ -195,13 +195,13 @@
</span><span class="cx">                         ?&gt;
</span><span class="cx">                 &lt;/ul&gt;
</span><span class="cx">                 &lt;?php endif; ?&gt;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 &lt;div id=&quot;menu-management&quot; class=&quot;metabox-holder has-right-sidebar&quot;&gt;
</span><span class="cx">                         &lt;div id=&quot;post-body&quot;&gt;
</span><span class="cx">                                 &lt;div id=&quot;post-body-content&quot;&gt;
</span><span class="cx">                                         &lt;div id=&quot;normal-sortables&quot; class=&quot;meta-box-sortables ui-sortable&quot;&gt;
</span><span class="cx">                                         &lt;?php if ( $valid_menu and ! empty( $menus ) ) : ?&gt;
</span><del>-                                                &lt;div id=&quot;menu-container&quot; class=&quot;postbox&quot;&gt;        
</del><ins>+                                                &lt;div id=&quot;menu-container&quot; class=&quot;postbox&quot;&gt;
</ins><span class="cx">                                                         &lt;h3 class=&quot;hndle&quot;&gt;&lt;?php echo esc_html( $menu_title ); ?&gt;&lt;/h3&gt;
</span><span class="cx">                                                         &lt;div class=&quot;inside&quot;&gt;
</span><span class="cx">                                                                 &lt;input type=&quot;hidden&quot; name=&quot;li-count&quot; id=&quot;li-count&quot; value=&quot;0&quot; /&gt;
</span><span class="lines">@@ -210,7 +210,7 @@
</span><span class="cx">                                                                 if ( $menu_selected_id &gt; 0 )
</span><span class="cx">                                                                         echo wp_get_nav_menu( array( 'type' =&gt; 'backend', 'menu' =&gt; $menu_selected_id, 'ul_class' =&gt; 'menu' ) );
</span><span class="cx">                                                                 ?&gt;
</span><del>-                                                                
</del><ins>+
</ins><span class="cx">                                                                 &lt;div id=&quot;queue&quot; class=&quot;hide&quot;&gt;
</span><span class="cx">                                                                 &lt;/div&gt;&lt;!--/#queue--&gt;
</span><span class="cx">                                                         &lt;/div&gt;&lt;!-- /.inside --&gt;
</span><span class="lines">@@ -230,7 +230,7 @@
</span><span class="cx">                         &lt;/div&gt;&lt;!--- /#post-body --&gt;
</span><span class="cx">                         &lt;div id=&quot;menu-settings-column&quot; class=&quot;inner-sidebar&quot;&gt;
</span><span class="cx">                                 &lt;div id=&quot;side-sortables&quot; class=&quot;meta-box-sortables ui-sortable&quot;&gt;
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                         &lt;div id=&quot;create-menu&quot; class=&quot;postbox&quot;&gt;
</span><span class="cx">                                                 &lt;h3 class=&quot;hndle&quot;&gt;&lt;?php esc_html_e('Create Menu'); ?&gt;&lt;/h3&gt;
</span><span class="cx">                                                 &lt;div class=&quot;inside&quot;&gt;
</span><span class="lines">@@ -240,10 +240,10 @@
</span><span class="cx">                                                         &lt;/p&gt;
</span><span class="cx">                                                 &lt;/div&gt;&lt;!-- /.inside--&gt;
</span><span class="cx">                                         &lt;/div&gt;&lt;!--END #create-menu--&gt;
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                         &lt;div id=&quot;add-custom-link&quot; class=&quot;postbox&quot;&gt;
</span><span class="cx">                                                 &lt;h3 class=&quot;hndle&quot;&gt;&lt;?php esc_html_e('Add a Custom Link'); ?&gt;&lt;/h3&gt;
</span><del>-                                                &lt;div class=&quot;inside&quot;&gt;                                                        
</del><ins>+                                                &lt;div class=&quot;inside&quot;&gt;
</ins><span class="cx">                                                         &lt;p id=&quot;menu-item-url-wrap&quot;&gt;
</span><span class="cx">                                                                 &lt;label class=&quot;howto&quot; for=&quot;menu-item-url&quot;&gt;
</span><span class="cx">                                                                         &lt;span&gt;&lt;?php _e('URL'); ?&gt;&lt;/span&gt;
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx">                                                                         &lt;input id=&quot;menu-item-name&quot; type=&quot;text&quot; class=&quot;regular-text&quot; value=&quot;&lt;?php echo esc_attr( __('Menu Item') ); ?&gt;&quot; /&gt;
</span><span class="cx">                                                                 &lt;/label&gt;
</span><span class="cx">                                                         &lt;/p&gt;
</span><del>-                                                        
</del><ins>+
</ins><span class="cx">                                                         &lt;p class=&quot;button-controls&quot;&gt;
</span><span class="cx">                                                                 &lt;a class=&quot;show-all&quot;&gt;&lt;?php _e('View All'); ?&gt;&lt;/a&gt;
</span><span class="cx">                                                                 &lt;a class=&quot;hide-all&quot;&gt;&lt;?php _e('Hide All'); ?&gt;&lt;/a&gt;
</span><span class="lines">@@ -275,7 +275,7 @@
</span><span class="cx">                                                         &lt;br class=&quot;clear&quot; /&gt;
</span><span class="cx">                                                 &lt;/div&gt;&lt;!-- /.inside--&gt;
</span><span class="cx">                                         &lt;/div&gt;&lt;!-- /#add-custom-link--&gt;
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                         &lt;div id=&quot;add-pages&quot; class=&quot;postbox&quot;&gt;
</span><span class="cx">                                                 &lt;h3 class=&quot;hndle&quot;&gt;&lt;?php esc_html_e('Add an Existing Page'); ?&gt;&lt;/h3&gt;
</span><span class="cx">                                                 &lt;div class=&quot;inside&quot;&gt;
</span><span class="lines">@@ -299,8 +299,8 @@
</span><span class="cx">                                                                 jQuery(document).ready(function(){
</span><span class="cx">                                                                         var posts = &quot;&lt;?php echo esc_js( $page_name ); ?&gt;&quot;.split('|');
</span><span class="cx">                                                                         jQuery('#add-pages .quick-search').autocomplete(posts);
</span><del>-                                                                        
-                                                                        
</del><ins>+
+
</ins><span class="cx">                                                                         jQuery('#add-pages .quick-search').result(function(event, data, formatted) {
</span><span class="cx">                                                                                 jQuery('#add-pages .list-wrap').css('display','block');
</span><span class="cx">                                                                                 jQuery(&quot;#add-pages .list-wrap li:contains('&quot; + data + &quot;')&quot;).css('display','block');
</span><span class="lines">@@ -313,12 +313,12 @@
</span><span class="cx">                                                                 &lt;input type=&quot;text&quot; class=&quot;quick-search regular-text&quot; value=&quot;&quot; /&gt;
</span><span class="cx">                                                                 &lt;a class=&quot;quick-search-submit button&quot;&gt;&lt;?php _e('Search'); ?&gt;&lt;/a&gt;
</span><span class="cx">                                                         &lt;/p&gt;
</span><del>-                                                        
</del><ins>+
</ins><span class="cx">                                                         &lt;p class=&quot;button-controls&quot;&gt;
</span><span class="cx">                                                                 &lt;a class=&quot;show-all&quot;&gt;&lt;?php _e('View All'); ?&gt;&lt;/a&gt;
</span><span class="cx">                                                                 &lt;a class=&quot;hide-all&quot;&gt;&lt;?php _e('Hide All'); ?&gt;&lt;/a&gt;
</span><span class="cx">                                                         &lt;/p&gt;
</span><del>-                                                        
</del><ins>+
</ins><span class="cx">                                                         &lt;div id=&quot;existing-pages&quot; class=&quot;list-wrap&quot;&gt;
</span><span class="cx">                                                                 &lt;div class=&quot;list-container&quot;&gt;
</span><span class="cx">                                                                         &lt;ul class=&quot;list&quot;&gt;
</span><span class="lines">@@ -332,7 +332,7 @@
</span><span class="cx">                                                         &lt;br class=&quot;clear&quot; /&gt;
</span><span class="cx">                                                 &lt;/div&gt;&lt;!-- /.inside--&gt;
</span><span class="cx">                                         &lt;/div&gt;&lt;!--END #add-pages--&gt;
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                         &lt;div id=&quot;add-categories&quot; class=&quot;postbox&quot;&gt;
</span><span class="cx">                                                 &lt;h3 class=&quot;hndle&quot;&gt;&lt;?php esc_html_e('Add an Existing Category'); ?&gt;&lt;/h3&gt;
</span><span class="cx">                                                 &lt;div class=&quot;inside&quot;&gt;
</span><span class="lines">@@ -375,12 +375,12 @@
</span><span class="cx">                                                                 &lt;input type=&quot;text&quot; class=&quot;quick-search regular-text&quot; value=&quot;&quot; /&gt;
</span><span class="cx">                                                                 &lt;a class=&quot;quick-search-submit button&quot;&gt;&lt;?php _e('Search'); ?&gt;&lt;/a&gt;
</span><span class="cx">                                                         &lt;/p&gt;
</span><del>-                                                        
</del><ins>+
</ins><span class="cx">                                                         &lt;p class=&quot;button-controls&quot;&gt;
</span><span class="cx">                                                                 &lt;a class=&quot;show-all&quot;&gt;&lt;?php _e('View All'); ?&gt;&lt;/a&gt;
</span><span class="cx">                                                                 &lt;a class=&quot;hide-all&quot;&gt;&lt;?php _e('Hide All'); ?&gt;&lt;/a&gt;
</span><span class="cx">                                                         &lt;/p&gt;
</span><del>-                                                        
</del><ins>+
</ins><span class="cx">                                                         &lt;div id=&quot;existing-categories&quot; class=&quot;list-wrap&quot;&gt;
</span><span class="cx">                                                                 &lt;div class=&quot;list-container&quot;&gt;
</span><span class="cx">                                                                         &lt;ul class=&quot;list&quot;&gt;
</span></span></pre>
</div>
</div>

</body>
</html>