<!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>[13342] trunk/wp-admin/custom-navigation.php: Cleanups.</title>
</head>
<body>

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

<h3>Log Message</h3>
<pre>Cleanups. see <a href="http://trac.wordpress.org/ticket/11817">#11817</a></pre>

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

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincustomnavigationphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/custom-navigation.php (13341 => 13342)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/custom-navigation.php        2010-02-23 20:38:41 UTC (rev 13341)
+++ trunk/wp-admin/custom-navigation.php        2010-02-23 20:48:50 UTC (rev 13342)
</span><span class="lines">@@ -12,6 +12,9 @@
</span><span class="cx"> 
</span><span class="cx"> require_once('admin.php');
</span><span class="cx"> 
</span><ins>+if ( ! current_user_can('switch_themes') )
+        wp_die( __( 'Cheatin&amp;#8217; uh?' ));
+
</ins><span class="cx"> wp_admin_css( 'custom-navigation' );
</span><span class="cx"> wp_enqueue_script( 'jquery' );
</span><span class="cx"> wp_enqueue_script( 'jquery-ui-draggable' );
</span><span class="lines">@@ -26,528 +29,490 @@
</span><span class="cx"> require_once('admin-header.php');
</span><span class="cx"> require_once (ABSPATH . WPINC . '/custom-navigation.php');
</span><span class="cx"> 
</span><del>-wp_custom_navigation();
-
</del><span class="cx"> function wp_custom_nav_reset() {
</span><span class="cx">         wp_custom_navigation_setup(true);
</span><span class="cx"> 
</span><span class="cx">         return true;
</span><del>-
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-/*-----------------------------------------------------------------------------------*/
-/* Custom Navigation Admin Interface
-/* wp_custom_navigation() is the main function for the Custom Navigation
-/* See functions in admin-functions.php
-/*-----------------------------------------------------------------------------------*/
</del><ins>+$messagesdiv = '';
+$menu_id_in_edit = 0;
</ins><span class="cx"> 
</span><del>-function wp_custom_navigation() {
-        global $wpdb, $user_ID;
-        ?&gt;
</del><ins>+// Check which menu is selected and if menu is in edit already
+if ( isset( $_POST['switch_menu'] ) )
+        $menu_selected_id = (int) $_POST['menu_select'];
+elseif ( isset( $_POST['menu_id_in_edit'] ) )
+        $menu_selected_id = (int) $_POST['menu_id_in_edit'];
+else
+        $menu_selected_id = 0;
</ins><span class="cx"> 
</span><del>-        &lt;div class=&quot;wrap&quot;&gt;
-        &lt;div id=&quot;no-js&quot;&gt;&lt;h3&gt;&lt;?php _e('You do not have JavaScript enabled in your browser. Please enable it to access the Menus functionality.'); ?&gt;&lt;/h3&gt;&lt;/div&gt;
</del><ins>+// Default Menu to show
+$custom_menus = get_terms( 'nav_menu', array( 'hide_empty' =&gt; false ) );
+if ( !empty( $custom_menus ) )
+        $menu_selected_id = $custom_menus[0]-&gt;term_id;
</ins><span class="cx"> 
</span><del>-        &lt;?php
-        $messagesdiv = '';
-        $menu_id_in_edit = 0;
</del><ins>+$menu_title = '';
+if ( $menu_selected_id &gt; 0 ) {
+        foreach ( $custom_menus as $menu ) {
+                if ( $menu-&gt;term_id == $menu_selected_id ) {
+                        $menu_title = $menu-&gt;name;
+                        break;
+                }
+        }
+}
</ins><span class="cx"> 
</span><del>-        // Get the theme name
-        $themename = get_current_theme();
</del><ins>+if ( isset( $_POST['set_wp_menu'] ) ) {
+        // @todo validate set_wp_menu
+        update_option( 'wp_custom_nav_menu', $_POST['enable_wp_menu'] );
+        $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;' . __('Menu has been updated!') . '&lt;/p&gt;&lt;/div&gt;';
+}
</ins><span class="cx"> 
</span><del>-        // Check which menu is selected and if menu is in edit already
-        if ( isset( $_POST['switch_menu'] ) )
-                $menu_selected_id = (int) $_POST['menu_select'];
-        elseif ( isset( $_POST['menu_id_in_edit'] ) )
-                $menu_selected_id = (int) $_POST['menu_id_in_edit'];
-        else
-                $menu_selected_id = 0;
</del><ins>+if ( isset( $_POST['licount'] ) )
+        $postCounter = $_POST['licount'];
+else
+        $postCounter = 0;
</ins><span class="cx"> 
</span><del>-        // Default Menu to show
-        $custom_menus = get_terms( 'nav_menu', array( 'hide_empty' =&gt; false ) );
-         if ( !empty( $custom_menus ) )
-                $menu_selected_id = $custom_menus[0]-&gt;term_id;
</del><ins>+// Create a new menu. Menus are stored as terms in the 'menu' taxonomy.
+if ( isset( $_POST['add_menu'] ) ) {
+        $insert_menu_name = $_POST['add_menu_name'];
</ins><span class="cx"> 
</span><del>-        $menu_title = '';
-        if ( $menu_selected_id &gt; 0 ) {
-                foreach ( $custom_menus as $menu ) {
-                        if ( $menu-&gt;term_id == $menu_selected_id ) {
-                                $menu_title = $menu-&gt;name;
-                                break;
</del><ins>+        if ( $insert_menu_name != '' ) {
+                $existing_term = get_term_by( 'name', $insert_menu_name, 'nav_menu' );
+                if ( $existing_term ) {
+                        $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;' . esc_html( sprintf( e__('A menu named &quot;%s&quot; already exists; please try another name.'), $existing_term-&gt;name ) ) . '&lt;/p&gt;&lt;/div&gt;';
+                } else {
+                        $term = wp_insert_term( $insert_menu_name, 'nav_menu' );
+                        if ( !is_wp_error($term) ) {
+                                $term = get_term($term['term_id'], 'nav_menu');
+                                $custom_menus[$term-&gt;term_id] = $term;
+                                $menu_selected_id = $term-&gt;term_id;
+                                $menu_id_in_edit = $menu_selected_id;
+                                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;' . esc_html( sprintf( __('&quot;%s&quot; menu has been created!'), $term-&gt;name ) ) . '&lt;/p&gt;&lt;/div&gt;';
+
+                                $postCounter = 0;
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><ins>+        } else {
+                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;' . __('Please enter a valid menu name.') . '&lt;/p&gt;&lt;/div&gt;';
</ins><span class="cx">         }
</span><ins>+}
</ins><span class="cx"> 
</span><del>-        if ( isset( $_POST['set_wp_menu'] ) ) {
-                // @todo validate set_wp_menu
-            update_option( 'wp_custom_nav_menu', $_POST['enable_wp_menu'] );
-                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;' . __('Menu has been updated!') . '&lt;/p&gt;&lt;/div&gt;';
</del><ins>+if ( isset($_POST['reset_wp_menu']) ) {
+        $success = wp_custom_nav_reset();
+        if ( $success ) {
+                // DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
+                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;' . __('The menu has been reset.') . '&lt;/p&gt;&lt;/div&gt;';
+                // GET reset menu id
+                $custom_menus = array();
+                $menu_selected_id = 0;
+        } else {
+                // DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
+                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;' . __('The menu could not be reset. Please try again.') . '&lt;/p&gt;&lt;/div&gt;';
</ins><span class="cx">         }
</span><ins>+} elseif ( $postCounter &gt; 0 &amp;&amp; $menu_selected_id &gt; 0 ) {
+        $menu_objects = get_objects_in_term( $menu_selected_id, 'nav_menu' );
+        $menu_items = wp_custom_navigation_get_menu_items( $menu_objects );
</ins><span class="cx"> 
</span><del>-        if ( isset( $_POST['licount'] ) )
-                $postCounter = $_POST['licount'];
-        else
-            $postCounter = 0;
</del><ins>+        // Loop through all POST variables
+        for ( $k = 1; $k &lt;= $postCounter; $k++ ) {
+                if (isset($_POST['dbid'.$k])) { $db_id = $_POST['dbid'.$k]; } else { $db_id = 0; }
+                if (isset($_POST['postmenu'.$k])) { $object_id = $_POST['postmenu'.$k]; } else { $object_id = 0; }
+                if (isset($_POST['parent'.$k])) { $parent_id = $_POST['parent'.$k]; } else { $parent_id = 0; }
+                if (isset($_POST['title'.$k])) { $custom_title = $_POST['title'.$k]; } else { $custom_title = ''; }
+                if (isset($_POST['linkurl'.$k])) { $custom_linkurl = $_POST['linkurl'.$k]; } else { $custom_linkurl = ''; }
+                if (isset($_POST['description'.$k])) { $custom_description = $_POST['description'.$k]; } else { $custom_description = ''; }
+                // doesn't seem to be used by UI
+                if (isset($_POST['icon'.$k])) { $icon = $_POST['icon'.$k]; } else { $icon = 0; }
+                if (isset($_POST['position'.$k])) { $position = $_POST['position'.$k]; } else { $position = 0; }
+                if (isset($_POST['linktype'.$k])) { $linktype = $_POST['linktype'.$k]; } else { $linktype = 'custom'; }
+                if (isset($_POST['anchortitle'.$k])) { $custom_anchor_title = $_POST['anchortitle'.$k]; } else { $custom_anchor_title = $custom_title; }
+                if (isset($_POST['newwindow'.$k])) { $new_window = $_POST['newwindow'.$k]; } else { $new_window = 0; }
</ins><span class="cx"> 
</span><del>-        // Create a new menu. Menus are stored as terms in the 'menu' taxonomy.
-        if ( isset( $_POST['add_menu'] ) ) {
-                 $insert_menu_name = $_POST['add_menu_name'];
</del><ins>+                $post = array( 'post_status' =&gt; 'publish', 'post_type' =&gt; 'nav_menu_item', 'post_author' =&gt; $user_ID,
+                        'ping_status' =&gt; 0, 'post_parent' =&gt; 0, 'menu_order' =&gt; $position,
+                        'guid' =&gt; $custom_linkurl, 'post_excerpt' =&gt; $custom_anchor_title, 'tax_input' =&gt; array( 'nav_menu' =&gt; $menu_title ),
+                        'post_content' =&gt; $custom_description, 'post_title' =&gt; $custom_title );
+                if ( $new_window )
+                        $post['post_content_filtered'] = '_blank';
+                else
+                        $post['post_content_filtered'] = '';
+                if ( $parent_id &gt; 0 &amp;&amp; isset( $_POST[ 'dbid' . $parent_id ] ) )
+                        $post[ 'post_parent' ] = (int) $_POST[ 'dbid' . $parent_id ];
</ins><span class="cx"> 
</span><del>-                 if ( $insert_menu_name != '' ) {
-                        $existing_term = get_term_by( 'name', $insert_menu_name, 'nav_menu' );
-                         if ( $existing_term ) {
-                                 $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;' . esc_html( sprintf( e__('A menu named &quot;%s&quot; already exists; please try another name.'), $existing_term-&gt;name ) ) . '&lt;/p&gt;&lt;/div&gt;';
-                         } else {
-                                $term = wp_insert_term( $insert_menu_name, 'nav_menu' );
-                                if ( !is_wp_error($term) ) {
-                                        $term = get_term($term['term_id'], 'nav_menu');
-                                        $custom_menus[$term-&gt;term_id] = $term;
-                                         $menu_selected_id = $term-&gt;term_id;
-                                         $menu_id_in_edit = $menu_selected_id;
-                                         $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;' . esc_html( sprintf( __('&quot;%s&quot; menu has been created!'), $term-&gt;name ) ) . '&lt;/p&gt;&lt;/div&gt;';
-
-                                        $postCounter = 0;
-                                 }
-                         }
-                 } else {
-                         $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;' . __('Please enter a valid menu name.') . '&lt;/p&gt;&lt;/div&gt;';
-                 }
</del><ins>+                // New menu item
+                if ( $db_id == 0 ) {
+                        $db_id = wp_insert_post( $post );
+                } elseif ( isset( $menu_items[$db_id] ) ) {
+                        $post['ID'] = $db_id;
+                        wp_update_post( $post );
+                        unset( $menu_items[$db_id] );
+                }
+                update_post_meta($db_id, 'menu_type', $linktype);
+                update_post_meta($db_id, 'object_id', $object_id);
</ins><span class="cx">         }
</span><del>-
-        if ( isset($_POST['reset_wp_menu']) ) {
-            $success = wp_custom_nav_reset();
-            if ( $success ) {
-                    // DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
-                        $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;' . __('The menu has been reset.') . '&lt;/p&gt;&lt;/div&gt;';
-                        // GET reset menu id
-                        $custom_menus = array();
-                        $menu_selected_id = 0;
-            } else {
-                    // DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
-                        $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;' . __('The menu could not be reset. Please try again.') . '&lt;/p&gt;&lt;/div&gt;';
-            }
-        } elseif ( $postCounter &gt; 0 &amp;&amp; $menu_selected_id &gt; 0 ) {
-                $menu_objects = get_objects_in_term( $menu_selected_id, 'nav_menu' );
-                $menu_items = wp_custom_navigation_get_menu_items( $menu_objects );
-
-                // Loop through all POST variables
-                 for ( $k = 1; $k &lt;= $postCounter; $k++ ) {
-                         if (isset($_POST['dbid'.$k])) { $db_id = $_POST['dbid'.$k]; } else { $db_id = 0; }
-                         if (isset($_POST['postmenu'.$k])) { $object_id = $_POST['postmenu'.$k]; } else { $object_id = 0; }
-                        if (isset($_POST['parent'.$k])) { $parent_id = $_POST['parent'.$k]; } else { $parent_id = 0; }
-                         if (isset($_POST['title'.$k])) { $custom_title = $_POST['title'.$k]; } else { $custom_title = ''; }
-                         if (isset($_POST['linkurl'.$k])) { $custom_linkurl = $_POST['linkurl'.$k]; } else { $custom_linkurl = ''; }
-                         if (isset($_POST['description'.$k])) { $custom_description = $_POST['description'.$k]; } else { $custom_description = ''; }
-                        // doesn't seem to be used by UI
-                        if (isset($_POST['icon'.$k])) { $icon = $_POST['icon'.$k]; } else { $icon = 0; }
-                         if (isset($_POST['position'.$k])) { $position = $_POST['position'.$k]; } else { $position = 0; }
-                         if (isset($_POST['linktype'.$k])) { $linktype = $_POST['linktype'.$k]; } else { $linktype = 'custom'; }
-                         if (isset($_POST['anchortitle'.$k])) { $custom_anchor_title = $_POST['anchortitle'.$k]; } else { $custom_anchor_title = $custom_title; }
-                         if (isset($_POST['newwindow'.$k])) { $new_window = $_POST['newwindow'.$k]; } else { $new_window = 0; }
-
-                        $post = array( 'post_status' =&gt; 'publish', 'post_type' =&gt; 'nav_menu_item', 'post_author' =&gt; $user_ID,
-                                'ping_status' =&gt; 0, 'post_parent' =&gt; 0, 'menu_order' =&gt; $position,
-                                'guid' =&gt; $custom_linkurl, 'post_excerpt' =&gt; $custom_anchor_title, 'tax_input' =&gt; array( 'nav_menu' =&gt; $menu_title ),
-                                'post_content' =&gt; $custom_description, 'post_title' =&gt; $custom_title );
-                        if ( $new_window )
-                                $post['post_content_filtered'] = '_blank';
-                        else
-                                $post['post_content_filtered'] = '';
-                        if ( $parent_id &gt; 0 &amp;&amp; isset( $_POST[ 'dbid' . $parent_id ] ) )
-                                $post[ 'post_parent' ] = (int) $_POST[ 'dbid' . $parent_id ];
-
-                        // New menu item
-                         if ( $db_id == 0 ) {
-                                $db_id = wp_insert_post( $post );
-                        } elseif ( isset( $menu_items[$db_id] ) ) {
-                                $post['ID'] = $db_id;
-                                wp_update_post( $post );
-                                unset( $menu_items[$db_id] );
-                        }
-                        update_post_meta($db_id, 'menu_type', $linktype);
-                        update_post_meta($db_id, 'object_id', $object_id);
</del><ins>+        if ( !empty( $menu_items ) ) {
+                foreach ( array_keys( $menu_items ) as $menu_id ) {
+                        wp_delete_post( $menu_id );
</ins><span class="cx">                 }
</span><del>-                if ( !empty( $menu_items ) ) {
-                        foreach ( array_keys( $menu_items ) as $menu_id ) {
-                                wp_delete_post( $menu_id );
-                        }
-                }
-                // DISPLAY SUCCESS MESSAGE IF POST CORRECT
-                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;' . __('The menu has been updated.') . '&lt;/p&gt;&lt;/div&gt;';
</del><span class="cx">         }
</span><ins>+        // DISPLAY SUCCESS MESSAGE IF POST CORRECT
+        $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;' . __('The menu has been updated.') . '&lt;/p&gt;&lt;/div&gt;';
+}
</ins><span class="cx"> 
</span><del>-                 // DISPLAY Custom Navigation
-                 ?&gt;
-                &lt;?php screen_icon(); ?&gt;
-                &lt;h2 class=&quot;maintitle&quot;&gt;&lt;?php esc_html_e('Menus') ?&gt;&lt;/h2&gt;
-                &lt;div id=&quot;pages-left&quot;&gt;
-                        &lt;div class=&quot;inside&quot;&gt;
-                        &lt;?php
</del><ins>+?&gt;
+&lt;div class=&quot;wrap&quot;&gt;
+&lt;?php screen_icon(); ?&gt;
+&lt;h2 class=&quot;maintitle&quot;&gt;&lt;?php esc_html_e('Menus') ?&gt;&lt;/h2&gt;
</ins><span class="cx"> 
</span><del>-                                // CHECK if custom menu has been enabled
-                                $enabled_menu = get_option('wp_custom_nav_menu');
-                            $checked = strtolower($enabled_menu);
</del><ins>+        &lt;div id=&quot;no-js&quot;&gt;&lt;h3&gt;&lt;?php _e('You do not have JavaScript enabled in your browser. Please enable it to access the Menus functionality.'); ?&gt;&lt;/h3&gt;&lt;/div&gt;
+        &lt;div id=&quot;pages-left&quot;&gt;
+                &lt;div class=&quot;inside&quot;&gt;
+                &lt;?php
+                        // CHECK if custom menu has been enabled
+                        $enabled_menu = get_option('wp_custom_nav_menu');
+                        $checked = strtolower($enabled_menu);
</ins><span class="cx"> 
</span><del>-                                if ( $checked != 'true' )
-                                        echo '&lt;div id=&quot;message-enabled&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;&lt;strong&gt;' . __('Menu editing has not been Enabled yet. Please enable it in order to use it --------&gt;') . '&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;';
</del><ins>+                        if ( $checked != 'true' )
+                                echo '&lt;div id=&quot;message-enabled&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;&lt;strong&gt;' . __('Menu editing has not been Enabled yet. Please enable it in order to use it --------&gt;') . '&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;';
+                ?&gt;
+                &lt;?php echo $messagesdiv; ?&gt;
+                &lt;form onsubmit=&quot;updatepostdata()&quot; action=&quot;custom-navigation.php&quot; method=&quot;post&quot;  enctype=&quot;multipart/form-data&quot;&gt;
</ins><span class="cx"> 
</span><del>-                        ?&gt;
-                        &lt;?php echo $messagesdiv; ?&gt;
-                        &lt;form onsubmit=&quot;updatepostdata()&quot; action=&quot;custom-navigation.php&quot; method=&quot;post&quot;  enctype=&quot;multipart/form-data&quot;&gt;
</del><ins>+                &lt;input type=&quot;hidden&quot; name=&quot;licount&quot; id=&quot;licount&quot; value=&quot;0&quot; /&gt;
+                &lt;input type=&quot;hidden&quot; name=&quot;menu_id_in_edit&quot; id=&quot;menu_id_in_edit&quot; value=&quot;&lt;?php echo esc_attr($menu_selected_id); ?&gt;&quot; /&gt;
</ins><span class="cx"> 
</span><del>-                        &lt;input type=&quot;hidden&quot; name=&quot;licount&quot; id=&quot;licount&quot; value=&quot;0&quot; /&gt;
-                        &lt;input type=&quot;hidden&quot; name=&quot;menu_id_in_edit&quot; id=&quot;menu_id_in_edit&quot; value=&quot;&lt;?php echo esc_attr($menu_selected_id); ?&gt;&quot; /&gt;
</del><ins>+                &lt;div class=&quot;sidebar-name&quot;&gt;
</ins><span class="cx"> 
</span><del>-                        &lt;div class=&quot;sidebar-name&quot;&gt;
-
-                                &lt;div class=&quot;sidebar-name-arrow&quot;&gt;
-                                        &lt;br/&gt;
-                                &lt;/div&gt;
-                                &lt;h3&gt;&lt;?php echo esc_html($menu_title); ?&gt;&lt;/h3&gt;
-
</del><ins>+                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;
+                                &lt;br/&gt;
</ins><span class="cx">                         &lt;/div&gt;
</span><ins>+                        &lt;h3&gt;&lt;?php echo esc_html($menu_title); ?&gt;&lt;/h3&gt;
</ins><span class="cx"> 
</span><del>-                        &lt;div id=&quot;nav-container&quot;&gt;
-                                &lt;ul id=&quot;custom-nav&quot;&gt;
-
-                        &lt;?php
-                        //DISPLAY existing menu
-                        if ( $menu_selected_id &gt; 0 ) {
-                                // SET output type
-                                $output_type = &quot;backend&quot;;
-                                // MAIN OUTPUT FUNCTION
-                                wp_custom_navigation_output( 'type='.$output_type.'&amp;name='.$menu_title.'&amp;id='.$menu_selected_id );
-                        }
-                        ?&gt;
-
-                                &lt;/ul&gt;
-                        &lt;/div&gt;&lt;!-- /#nav-container --&gt;
-
-                        &lt;p class=&quot;submit&quot;&gt;
-
-                        &lt;script type=&quot;text/javascript&quot;&gt;
-                                updatepostdata();
-                        &lt;/script&gt;
-
-                        &lt;input id=&quot;save_bottom&quot; name=&quot;save_bottom&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Save All Changes'); ?&gt;&quot; /&gt;&lt;/p&gt;
-                        &lt;/div&gt;&lt;!-- /.inside --&gt;
</del><span class="cx">                 &lt;/div&gt;
</span><span class="cx"> 
</span><del>-                &lt;div id=&quot;menu-right&quot;&gt;
-                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
-                                &lt;div class=&quot;sidebar-name&quot;&gt;
-                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
-                                        &lt;h3&gt;&lt;?php esc_html_e('Setup Menus'); ?&gt;&lt;/h3&gt;
-                                &lt;/div&gt;
-                                &lt;div class=&quot;widget-holder&quot;&gt;
</del><ins>+                &lt;div id=&quot;nav-container&quot;&gt;
+                        &lt;ul id=&quot;custom-nav&quot;&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;?php
</del><ins>+                &lt;?php
+                //DISPLAY existing menu
+                if ( $menu_selected_id &gt; 0 ) {
+                        // SET output type
+                        $output_type = &quot;backend&quot;;
+                        // MAIN OUTPUT FUNCTION
+                        wp_custom_navigation_output( 'type='.$output_type.'&amp;name='.$menu_title.'&amp;id='.$menu_selected_id );
+                }
+                ?&gt;
</ins><span class="cx"> 
</span><del>-                                    // Setup custom menu
</del><ins>+                        &lt;/ul&gt;
+                &lt;/div&gt;&lt;!-- /#nav-container --&gt;
</ins><span class="cx"> 
</span><del>-                                        $enabled_menu = get_option('wp_custom_nav_menu');
</del><ins>+                &lt;p class=&quot;submit&quot;&gt;
</ins><span class="cx"> 
</span><del>-                                    $checked = strtolower($enabled_menu);
</del><ins>+                &lt;script type=&quot;text/javascript&quot;&gt;
+                        updatepostdata();
+                &lt;/script&gt;
</ins><span class="cx"> 
</span><del>-                                    ?&gt;
</del><ins>+                &lt;input id=&quot;save_bottom&quot; name=&quot;save_bottom&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Save All Changes'); ?&gt;&quot; /&gt;&lt;/p&gt;
+                &lt;/div&gt;&lt;!-- /.inside --&gt;
+        &lt;/div&gt;
</ins><span class="cx"> 
</span><del>-                                    &lt;span &gt;
-                                            &lt;label&gt;&lt;?php _e('Enable'); ?&gt;&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;enable_wp_menu&quot; value=&quot;true&quot; &lt;?php if ($checked=='true') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
-                                            &lt;label&gt;&lt;?php _e('Disable'); ?&gt;&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;enable_wp_menu&quot; value=&quot;false&quot; &lt;?php if ($checked=='true') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
-                                        &lt;/span&gt;&lt;!-- /.checkboxes --&gt;
</del><ins>+        &lt;div id=&quot;menu-right&quot;&gt;
+                &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                        &lt;div class=&quot;sidebar-name&quot;&gt;
+                                &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                &lt;h3&gt;&lt;?php esc_html_e('Setup Menus'); ?&gt;&lt;/h3&gt;
+                        &lt;/div&gt;
+                        &lt;div class=&quot;widget-holder&quot;&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;input id=&quot;set_wp_menu&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Set Menu'); ?&gt;&quot; name=&quot;set_wp_menu&quot; class=&quot;button&quot; /&gt;&lt;br /&gt;
</del><ins>+                                &lt;?php
+                                // Setup custom menu
+                                $enabled_menu = get_option('wp_custom_nav_menu');
+                                $checked = strtolower($enabled_menu);
+                                ?&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;span&gt;
-                                                &lt;label&gt;&lt;?php _e('Reset Menu to Default'); ?&gt;&lt;/label&gt;
-                                                &lt;input id=&quot;reset_wp_menu&quot; type=&quot;submit&quot; value=&quot;Reset&quot; name=&quot;reset_wp_menu&quot; class=&quot;button&quot; onclick=&quot;return confirm('&lt;?php _e('Are you sure you want to reset the menu to its default settings?'); ?&gt;');&quot; /&gt;
-                                        &lt;/span&gt;
</del><ins>+                                &lt;span &gt;
+                                        &lt;label&gt;&lt;?php _e('Enable'); ?&gt;&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;enable_wp_menu&quot; value=&quot;true&quot; &lt;?php if ($checked=='true') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                        &lt;label&gt;&lt;?php _e('Disable'); ?&gt;&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;enable_wp_menu&quot; value=&quot;false&quot; &lt;?php if ($checked=='true') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                &lt;/span&gt;&lt;!-- /.checkboxes --&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
-                                &lt;/div&gt;
-                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</del><ins>+                                &lt;input id=&quot;set_wp_menu&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Set Menu'); ?&gt;&quot; name=&quot;set_wp_menu&quot; class=&quot;button&quot; /&gt;&lt;br /&gt;
</ins><span class="cx"> 
</span><del>-                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
-                                &lt;div class=&quot;sidebar-name&quot;&gt;
-                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
-                                        &lt;h3&gt;&lt;?php esc_html_e('Menu Selector'); ?&gt;&lt;/h3&gt;
-                                &lt;/div&gt;
-                                &lt;div class=&quot;widget-holder&quot;&gt;
-                                        &lt;select id=&quot;menu_select&quot; name=&quot;menu_select&quot;&gt;
-                                                &lt;?php
</del><ins>+                                &lt;span&gt;
+                                        &lt;label&gt;&lt;?php _e('Reset Menu to Default'); ?&gt;&lt;/label&gt;
+                                        &lt;input id=&quot;reset_wp_menu&quot; type=&quot;submit&quot; value=&quot;Reset&quot; name=&quot;reset_wp_menu&quot; class=&quot;button&quot; onclick=&quot;return confirm('&lt;?php _e('Are you sure you want to reset the menu to its default settings?'); ?&gt;');&quot; /&gt;
+                                &lt;/span&gt;
</ins><span class="cx"> 
</span><del>-                                                // Display select options
-                                                foreach ( $custom_menus as $menu ) {
-                                                        $menu_term = get_term( $menu, 'nav_menu' );
-                                                        if ( ( $menu_id_in_edit == $menu-&gt;term_id ) || ( $menu_selected_id == $menu-&gt;term_id ) )
-                                                                $selected_option = 'selected=&quot;selected&quot;';
-                                                        else
-                                                                $selected_option = '';
-                                                        ?&gt;
-                                                        &lt;option value=&quot;&lt;?php echo esc_attr($menu_term-&gt;term_id); ?&gt;&quot; &lt;?php echo $selected_option; ?&gt;&gt;&lt;?php echo $menu_term-&gt;name; ?&gt;&lt;/option&gt;
-                                                        &lt;?php
</del><ins>+                                &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                        &lt;/div&gt;
+                &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</ins><span class="cx"> 
</span><del>-                                                }
</del><ins>+                &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                        &lt;div class=&quot;sidebar-name&quot;&gt;
+                                &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                &lt;h3&gt;&lt;?php esc_html_e('Menu Selector'); ?&gt;&lt;/h3&gt;
+                        &lt;/div&gt;
+                        &lt;div class=&quot;widget-holder&quot;&gt;
+                                &lt;select id=&quot;menu_select&quot; name=&quot;menu_select&quot;&gt;
+                                        &lt;?php
+                                        // Display select options
+                                        foreach ( $custom_menus as $menu ) {
+                                                $menu_term = get_term( $menu, 'nav_menu' );
+                                                if ( ( $menu_id_in_edit == $menu-&gt;term_id ) || ( $menu_selected_id == $menu-&gt;term_id ) )
+                                                        $selected_option = 'selected=&quot;selected&quot;';
+                                                else
+                                                        $selected_option = '';
</ins><span class="cx">                                                 ?&gt;
</span><del>-                                        &lt;/select&gt;
</del><ins>+                                                &lt;option value=&quot;&lt;?php echo esc_attr($menu_term-&gt;term_id); ?&gt;&quot; &lt;?php echo $selected_option; ?&gt;&gt;&lt;?php echo $menu_term-&gt;name; ?&gt;&lt;/option&gt;
+                                                &lt;?php
+                                        }
+                                        ?&gt;
+                                &lt;/select&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;input id=&quot;switch_menu&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Switch'); ?&gt;&quot; name=&quot;switch_menu&quot; class=&quot;button&quot; /&gt;
-                                        &lt;input id=&quot;add_menu_name&quot; name=&quot;add_menu_name&quot; type=&quot;text&quot; value=&quot;&quot;  /&gt;
-                                        &lt;input id=&quot;add_menu&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Add Menu'); ?&gt;&quot; name=&quot;add_menu&quot; class=&quot;button&quot; /&gt;
</del><ins>+                                &lt;input id=&quot;switch_menu&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Switch'); ?&gt;&quot; name=&quot;switch_menu&quot; class=&quot;button&quot; /&gt;
+                                &lt;input id=&quot;add_menu_name&quot; name=&quot;add_menu_name&quot; type=&quot;text&quot; value=&quot;&quot;  /&gt;
+                                &lt;input id=&quot;add_menu&quot; type=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e('Add Menu'); ?&gt;&quot; name=&quot;add_menu&quot; class=&quot;button&quot; /&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
-                                &lt;/div&gt;
-                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
-                        &lt;?php $advanced_option_descriptions = get_option('wp_settings_custom_nav_advanced_options'); ?&gt;
-                        &lt;div class=&quot;widgets-holder-wrap&quot; style=&quot;display:none;&quot;&gt;
-                                &lt;div class=&quot;sidebar-name&quot;&gt;
-                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
-                                        &lt;h3&gt;&lt;?php esc_html_e('Top Level Menu Descriptions'); ?&gt;&lt;/h3&gt;
-                                &lt;/div&gt;
-                                &lt;div class=&quot;widget-holder&quot;&gt;
-                                        &lt;span&gt;&lt;?php _e('Display Descriptions in Top Level Menu?'); ?&gt;&lt;/span&gt;
</del><ins>+                                &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                        &lt;/div&gt;
+                &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
+                &lt;?php $advanced_option_descriptions = get_option('wp_settings_custom_nav_advanced_options'); ?&gt;
+                &lt;div class=&quot;widgets-holder-wrap&quot; style=&quot;display:none;&quot;&gt;
+                        &lt;div class=&quot;sidebar-name&quot;&gt;
+                                &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                &lt;h3&gt;&lt;?php esc_html_e('Top Level Menu Descriptions'); ?&gt;&lt;/h3&gt;
+                        &lt;/div&gt;
+                        &lt;div class=&quot;widget-holder&quot;&gt;
+                                &lt;span&gt;&lt;?php _e('Display Descriptions in Top Level Menu?'); ?&gt;&lt;/span&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;?php
</del><ins>+                                &lt;?php
+                                // UPDATE and DISPLAY Menu Description Option
+                                if ( isset($_POST['menu-descriptions']) ) {
+                                        if ( !isset($_POST['switch_menu']) ) {
+                                                $menu_options_to_edit = $_POST['menu_id_in_edit'];
+                                                update_option('wp_settings_custom_nav_'.$menu_options_to_edit.'_descriptions',$_POST['menu-descriptions']);
+                                        }
+                                }
</ins><span class="cx"> 
</span><del>-                                    // UPDATE and DISPLAY Menu Description Option
-                                    if ( isset($_POST['menu-descriptions']) ) {
-                                                if ( !isset($_POST['switch_menu']) ) {
-                                                        $menu_options_to_edit = $_POST['menu_id_in_edit'];
-                                                    update_option('wp_settings_custom_nav_'.$menu_options_to_edit.'_descriptions',$_POST['menu-descriptions']);
-                                                }
-                                    }
</del><ins>+                                if ( $menu_id_in_edit &gt; 0 )
+                                        $checkedraw = get_option('wp_settings_custom_nav_'.$menu_id_in_edit.'_descriptions');
+                                else
+                                        $checkedraw = get_option('wp_settings_custom_nav_'.$menu_selected_id.'_descriptions');
</ins><span class="cx"> 
</span><del>-                                    if ( $menu_id_in_edit &gt; 0 )
-                                                $checkedraw = get_option('wp_settings_custom_nav_'.$menu_id_in_edit.'_descriptions');
-                                        else
-                                                $checkedraw = get_option('wp_settings_custom_nav_'.$menu_selected_id.'_descriptions');
</del><ins>+                                $checked = strtolower($checkedraw);
</ins><span class="cx"> 
</span><del>-                                    $checked = strtolower($checkedraw);
</del><ins>+                                if ( $advanced_option_descriptions == 'no' )
+                                        $checked = 'no';
+                                ?&gt;
</ins><span class="cx"> 
</span><del>-                                    if ( $advanced_option_descriptions == 'no' )
-                                            $checked = 'no';
</del><ins>+                                &lt;span class=&quot;checkboxes&quot;&gt;
+                                        &lt;label&gt;&lt;?php _e('Yes'); ?&gt;&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;menu-descriptions&quot; value=&quot;yes&quot; &lt;?php if ($checked=='yes') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                        &lt;label&gt;&lt;?php _e('No'); ?&gt;&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;menu-descriptions&quot; value=&quot;no&quot; &lt;?php if ($checked=='yes') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                &lt;/span&gt;&lt;!-- /.checkboxes --&gt;
+                                &lt;/form&gt;
+                                &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                        &lt;/div&gt;
+                &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</ins><span class="cx"> 
</span><del>-                                    ?&gt;
</del><ins>+                &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                        &lt;div class=&quot;sidebar-name&quot;&gt;
+                                &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                &lt;h3&gt;&lt;?php esc_html_e('Add an Existing Page'); ?&gt;&lt;/h3&gt;
+                        &lt;/div&gt;
+                        &lt;div class=&quot;widget-holder&quot;&gt;
</ins><span class="cx"> 
</span><del>-                                    &lt;span class=&quot;checkboxes&quot;&gt;
-                                            &lt;label&gt;&lt;?php _e('Yes'); ?&gt;&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;menu-descriptions&quot; value=&quot;yes&quot; &lt;?php if ($checked=='yes') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
-                                            &lt;label&gt;&lt;?php _e('No'); ?&gt;&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;menu-descriptions&quot; value=&quot;no&quot; &lt;?php if ($checked=='yes') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
-                                        &lt;/span&gt;&lt;!-- /.checkboxes --&gt;
-                                    &lt;/form&gt;
-                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
-                                &lt;/div&gt;
-                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</del><ins>+                                &lt;?php
+                                $pages_args = array(
+                                'child_of' =&gt; 0,
+                                'sort_order' =&gt; 'ASC',
+                                'sort_column' =&gt; 'post_title',
+                                'hierarchical' =&gt; 1,
+                                'exclude' =&gt; '',
+                                'include' =&gt; '',
+                                'meta_key' =&gt; '',
+                                'meta_value' =&gt; '',
+                                'authors' =&gt; '',
+                                'parent' =&gt; -1,
+                                'exclude_tree' =&gt; '',
+                                'number' =&gt; '',
+                                'offset' =&gt; 0 );
</ins><span class="cx"> 
</span><del>-                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
-                                &lt;div class=&quot;sidebar-name&quot;&gt;
-                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
-                                        &lt;h3&gt;&lt;?php esc_html_e('Add an Existing Page'); ?&gt;&lt;/h3&gt;
-                                &lt;/div&gt;
-                                &lt;div class=&quot;widget-holder&quot;&gt;
-
-                                        &lt;?php
-
-                                        $pages_args = array(
-                                    'child_of' =&gt; 0,
-                                        'sort_order' =&gt; 'ASC',
-                                        'sort_column' =&gt; 'post_title',
-                                        'hierarchical' =&gt; 1,
-                                        'exclude' =&gt; '',
-                                        'include' =&gt; '',
-                                        'meta_key' =&gt; '',
-                                        'meta_value' =&gt; '',
-                                        'authors' =&gt; '',
-                                        'parent' =&gt; -1,
-                                        'exclude_tree' =&gt; '',
-                                        'number' =&gt; '',
-                                        'offset' =&gt; 0 );
-
-                                        //GET all pages
-                                        $pages_array = get_pages($pages_args);
-                                        $page_name = '';
-                                        //CHECK if pages exist
-                                        if ( $pages_array ) {
-                                                foreach ( $pages_array as $post ) {
-                                                        //Add page name to
-                                                        $page_name .= htmlentities($post-&gt;post_title).'|';
-                                                }
-                                        } else {
-                                                $page_name = __('No pages available');
</del><ins>+                                //GET all pages
+                                $pages_array = get_pages($pages_args);
+                                $page_name = '';
+                                //CHECK if pages exist
+                                if ( $pages_array ) {
+                                        foreach ( $pages_array as $post ) {
+                                                //Add page name to
+                                                $page_name .= htmlentities($post-&gt;post_title).'|';
</ins><span class="cx">                                         }
</span><ins>+                                } else {
+                                        $page_name = __('No pages available');
+                                }
+                                ?&gt;
</ins><span class="cx"> 
</span><del>-                                        ?&gt;
</del><ins>+                                &lt;script&gt;
+                                        jQuery(document).ready(function(){
</ins><span class="cx"> 
</span><del>-                                        &lt;script&gt;
-                                                  jQuery(document).ready(function(){
</del><ins>+                                                //GET PHP pages
+                                                var dataposts = &quot;&lt;?php echo esc_js($page_name); ?&gt;&quot;.split(&quot;|&quot;);
</ins><span class="cx"> 
</span><del>-                                                        //GET PHP pages
-                                                    var dataposts = &quot;&lt;?php echo esc_js($page_name); ?&gt;&quot;.split(&quot;|&quot;);
</del><ins>+                                                //Set autocomplete
+                                                jQuery(&quot;#page-search&quot;).autocomplete(dataposts);
</ins><span class="cx"> 
</span><del>-                                                        //Set autocomplete
-                                                        jQuery(&quot;#page-search&quot;).autocomplete(dataposts);
</del><ins>+                                                //Handle autocomplete result
+                                                jQuery(&quot;#page-search&quot;).result(function(event, data, formatted) {
+                                                        jQuery('#existing-pages').css('display','block');
+                                                        jQuery(&quot;#existing-pages dt:contains('&quot; + data + &quot;')&quot;).css(&quot;display&quot;, &quot;block&quot;);
</ins><span class="cx"> 
</span><del>-                                                        //Handle autocomplete result
-                                                        jQuery(&quot;#page-search&quot;).result(function(event, data, formatted) {
-                                                            jQuery('#existing-pages').css('display','block');
-                                                            jQuery(&quot;#existing-pages dt:contains('&quot; + data + &quot;')&quot;).css(&quot;display&quot;, &quot;block&quot;);
</del><ins>+                                                        jQuery('#show-pages').hide();
+                                                        jQuery('#hide-pages').show();
</ins><span class="cx"> 
</span><del>-                                                            jQuery('#show-pages').hide();
-                                                            jQuery('#hide-pages').show();
</del><ins>+                                                });
+                                                jQuery('#existing-pages').css('display','none');
+                                        });
+                                &lt;/script&gt;
</ins><span class="cx"> 
</span><del>-                                                        });
-                                                        jQuery('#existing-pages').css('display','none');
-                                                 });
-                                          &lt;/script&gt;
</del><ins>+                                &lt;input type=&quot;text&quot; onfocus=&quot;jQuery('#page-search').attr('value','');&quot; id=&quot;page-search&quot; value=&quot;&lt;?php esc_attr_e('Search Pages'); ?&gt;&quot; /&gt;
</ins><span class="cx"> 
</span><ins>+                                &lt;a id=&quot;show-pages&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-pages').css('display','block');jQuery('#page-search').attr('value','');jQuery('#existing-pages dt').css('display','block');jQuery('#show-pages').hide();jQuery('#hide-pages').show();&quot;&gt;View All&lt;/a&gt;
+                                &lt;a id=&quot;hide-pages&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-pages').css('display','none');jQuery('#page-search').attr('value','Search Pages');jQuery('#existing-pages dt').css('display','none');jQuery('#show-pages').show();jQuery('#hide-pages').hide();&quot;&gt;Hide All&lt;/a&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;input type=&quot;text&quot; onfocus=&quot;jQuery('#page-search').attr('value','');&quot; id=&quot;page-search&quot; value=&quot;&lt;?php esc_attr_e('Search Pages'); ?&gt;&quot; /&gt;
</del><ins>+                                &lt;script type=&quot;text/javascript&quot;&gt;
+                                        jQuery('#hide-pages').hide();
+                                &lt;/script&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;a id=&quot;show-pages&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-pages').css('display','block');jQuery('#page-search').attr('value','');jQuery('#existing-pages dt').css('display','block');jQuery('#show-pages').hide();jQuery('#hide-pages').show();&quot;&gt;View All&lt;/a&gt;
-                                        &lt;a id=&quot;hide-pages&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-pages').css('display','none');jQuery('#page-search').attr('value','Search Pages');jQuery('#existing-pages dt').css('display','none');jQuery('#show-pages').show();jQuery('#hide-pages').hide();&quot;&gt;Hide All&lt;/a&gt;
</del><ins>+                                &lt;ul id=&quot;existing-pages&quot; class=&quot;list&quot;&gt;
+                                        &lt;?php
+                                                $intCounter = 0;
+                                                //Get default Pages
+                                                $intCounter = wp_custom_nav_get_pages($intCounter,'default');
+                                        ?&gt;
+                                &lt;/ul&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;script type=&quot;text/javascript&quot;&gt;
</del><ins>+                                &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> 
</span><del>-                                                jQuery('#hide-pages').hide();
</del><ins>+                        &lt;/div&gt;
+                &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;/script&gt;
</del><ins>+                &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                        &lt;div class=&quot;sidebar-name&quot;&gt;
+                                &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                &lt;h3&gt;&lt;?php esc_html_e('Add an Existing Category'); ?&gt;&lt;/h3&gt;
+                        &lt;/div&gt;
+                        &lt;div class=&quot;widget-holder&quot;&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;ul id=&quot;existing-pages&quot; class=&quot;list&quot;&gt;
-                                                &lt;?php
-                                                        $intCounter = 0;
-                                                        //Get default Pages
-                                                        $intCounter = wp_custom_nav_get_pages($intCounter,'default');
-                                                ?&gt;
-                                        &lt;/ul&gt;
</del><ins>+                                &lt;?php
+                                // Custom GET categories query
+                                // @todo Use API
+                                $categories = $wpdb-&gt;get_results(&quot;SELECT term_id FROM $wpdb-&gt;term_taxonomy WHERE taxonomy = 'category' ORDER BY term_id ASC&quot;);
+                                $cat_name = '';
+                                //CHECK for results
+                                if ( $categories ) {
+                                        foreach ( $categories as $category ) {
+                                                $cat_id = $category-&gt;term_id;
</ins><span class="cx"> 
</span><del>-                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
</del><ins>+                                                $cat_args = array(
+                                                        'orderby' =&gt; 'name',
+                                                        'include' =&gt; $cat_id,
+                                                        'hierarchical' =&gt; 1,
+                                                        'order' =&gt; 'ASC'
+                                                );
</ins><span class="cx"> 
</span><del>-                                &lt;/div&gt;
-                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</del><ins>+                                                $category_names=get_categories($cat_args);
</ins><span class="cx"> 
</span><del>-                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
-                                &lt;div class=&quot;sidebar-name&quot;&gt;
-                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
-                                        &lt;h3&gt;&lt;?php esc_html_e('Add an Existing Category'); ?&gt;&lt;/h3&gt;
-                                &lt;/div&gt;
-                                &lt;div class=&quot;widget-holder&quot;&gt;
-
-                                        &lt;?php
-
-                                        // Custom GET categories query
-                                        // @todo Use API
-                                        $categories = $wpdb-&gt;get_results(&quot;SELECT term_id FROM $wpdb-&gt;term_taxonomy WHERE taxonomy = 'category' ORDER BY term_id ASC&quot;);
-                                        $cat_name = '';
-                                        //CHECK for results
-                                        if ( $categories ) {
-                                                foreach ( $categories as $category ) {
-                                                        $cat_id = $category-&gt;term_id;
-
-                                                        $cat_args = array(
-                                                                 'orderby' =&gt; 'name',
-                                                                  'include' =&gt; $cat_id,
-                                                                  'hierarchical' =&gt; 1,
-                                                                  'order' =&gt; 'ASC'
-                                                          );
-
-                                                          $category_names=get_categories($cat_args);
-
-                                                        if ( isset($category_names[0]-&gt;name) ) {
-                                                                // Add category name to data string
-                                                                $cat_name .= htmlentities($category_names[0]-&gt;name).'|';
-                                                        }
-                                                  }
-                                          } else {
-                                                $cat_name = __('No categories available');
</del><ins>+                                                if ( isset($category_names[0]-&gt;name) ) {
+                                                        // Add category name to data string
+                                                        $cat_name .= htmlentities($category_names[0]-&gt;name).'|';
+                                                }
</ins><span class="cx">                                         }
</span><ins>+                                } else {
+                                        $cat_name = __('No categories available');
+                                }
+                                ?&gt;
</ins><span class="cx"> 
</span><del>-                                        ?&gt;
</del><ins>+                                &lt;script&gt;
+                                        jQuery(document).ready(function(){
</ins><span class="cx"> 
</span><del>-                                        &lt;script&gt;
-                                                  jQuery(document).ready(function(){
</del><ins>+                                                //GET PHP categories
+                                                var datacats = &quot;&lt;?php echo esc_js($cat_name); ?&gt;&quot;.split(&quot;|&quot;);
</ins><span class="cx"> 
</span><del>-                                                        //GET PHP categories
-                                                    var datacats = &quot;&lt;?php echo esc_js($cat_name); ?&gt;&quot;.split(&quot;|&quot;);
</del><ins>+                                                //Set autocomplete
+                                                jQuery(&quot;#cat-search&quot;).autocomplete(datacats);
</ins><span class="cx"> 
</span><del>-                                                        //Set autocomplete
-                                                        jQuery(&quot;#cat-search&quot;).autocomplete(datacats);
</del><ins>+                                                //Handle autocomplete result
+                                                jQuery(&quot;#cat-search&quot;).result(function(event, data, formatted) {
+                                                        jQuery('#existing-categories').css('display','block');
+                                                        jQuery(&quot;#existing-categories dt:contains('&quot; + data + &quot;')&quot;).css(&quot;display&quot;, &quot;block&quot;);
</ins><span class="cx"> 
</span><del>-                                                        //Handle autocomplete result
-                                                        jQuery(&quot;#cat-search&quot;).result(function(event, data, formatted) {
-                                                            jQuery('#existing-categories').css('display','block');
-                                                            jQuery(&quot;#existing-categories dt:contains('&quot; + data + &quot;')&quot;).css(&quot;display&quot;, &quot;block&quot;);
</del><ins>+                                                        jQuery('#show-cats').hide();
+                                                        jQuery('#hide-cats').show();
</ins><span class="cx"> 
</span><del>-                                                            jQuery('#show-cats').hide();
-                                                            jQuery('#hide-cats').show();
</del><ins>+                                                });
+                                                jQuery('#existing-categories').css('display','none');
</ins><span class="cx"> 
</span><del>-                                                        });
-                                                        jQuery('#existing-categories').css('display','none');
</del><ins>+                                        });
+                                &lt;/script&gt;
</ins><span class="cx"> 
</span><del>-                                                 });
-                                          &lt;/script&gt;
</del><ins>+                                &lt;input type=&quot;text&quot; onfocus=&quot;jQuery('#cat-search').attr('value','');&quot; id=&quot;cat-search&quot; value=&quot;&lt;?php esc_attr_e('Search Categories'); ?&gt;&quot; /&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;input type=&quot;text&quot; onfocus=&quot;jQuery('#cat-search').attr('value','');&quot; id=&quot;cat-search&quot; value=&quot;&lt;?php esc_attr_e('Search Categories'); ?&gt;&quot; /&gt;
</del><ins>+                                &lt;a id=&quot;show-cats&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-categories').css('display','block');jQuery('#cat-search').attr('value','');jQuery('#existing-categories dt').css('display','block');jQuery('#show-cats').hide();jQuery('#hide-cats').show();&quot;&gt;View All&lt;/a&gt;
+                                &lt;a id=&quot;hide-cats&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-categories').css('display','none');jQuery('#cat-search').attr('value','Search Categories');jQuery('#existing-categories dt').css('display','none');jQuery('#show-cats').show();jQuery('#hide-cats').hide();&quot;&gt;Hide All&lt;/a&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;a id=&quot;show-cats&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-categories').css('display','block');jQuery('#cat-search').attr('value','');jQuery('#existing-categories dt').css('display','block');jQuery('#show-cats').hide();jQuery('#hide-cats').show();&quot;&gt;View All&lt;/a&gt;
-                                        &lt;a id=&quot;hide-cats&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-categories').css('display','none');jQuery('#cat-search').attr('value','Search Categories');jQuery('#existing-categories dt').css('display','none');jQuery('#show-cats').show();jQuery('#hide-cats').hide();&quot;&gt;Hide All&lt;/a&gt;
</del><ins>+                                &lt;script type=&quot;text/javascript&quot;&gt;
+                                        jQuery('#hide-cats').hide();
+                                &lt;/script&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;script type=&quot;text/javascript&quot;&gt;
</del><ins>+                                &lt;ul id=&quot;existing-categories&quot; class=&quot;list&quot;&gt;
+                                        &lt;?php
+                                                // Get default Categories
+                                                $intCounter = wp_custom_nav_get_categories($intCounter, 'default');
+                                        ?&gt;
+                                &lt;/ul&gt;
</ins><span class="cx"> 
</span><del>-                                                jQuery('#hide-cats').hide();
</del><ins>+                                &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;/script&gt;
</del><ins>+                        &lt;/div&gt;
+                &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;ul id=&quot;existing-categories&quot; class=&quot;list&quot;&gt;
-                                    &lt;?php
-                                                         // Get default Categories
-                                            $intCounter = wp_custom_nav_get_categories($intCounter, 'default');
-                                                ?&gt;
-                                       &lt;/ul&gt;
</del><ins>+                &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                        &lt;div class=&quot;sidebar-name&quot;&gt;
+                                &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                &lt;h3&gt;&lt;?php esc_html_e('Add a Custom Url'); ?&gt;&lt;/h3&gt;
+                        &lt;/div&gt;
+                        &lt;div class=&quot;widget-holder&quot;&gt;
+                                &lt;input id=&quot;custom_menu_item_url&quot; type=&quot;text&quot; value=&quot;http://&quot;  /&gt;
+                                &lt;label&gt;&lt;?php _e('URL'); ?&gt;&lt;/label&gt;&lt;br /&gt;
+                                &lt;?php $templatedir = get_bloginfo('url'); ?&gt;
+                                &lt;input type=&quot;hidden&quot; id=&quot;templatedir&quot; value=&quot;&lt;?php echo esc_attr($templatedir); ?&gt;&quot; /&gt;
+                                &lt;input id=&quot;custom_menu_item_name&quot; type=&quot;text&quot; value=&quot;Menu Item&quot; onfocus=&quot;jQuery('#custom_menu_item_name').attr('value','');&quot;  /&gt;
+                                &lt;label&gt;&lt;?php _e('Menu Text'); ?&gt;&lt;/label&gt;&lt;br /&gt;
+                                &lt;input id=&quot;custom_menu_item_description&quot; type=&quot;text&quot; value=&quot;&lt;?php esc_attr_e('A description'); ?&gt;&quot; &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; onfocus=&quot;jQuery('#custom_menu_item_description').attr('value','');&quot; /&gt;
+                                &lt;label &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; &gt;&lt;?php _e('Description'); ?&gt;&lt;/label&gt;
+                                &lt;a class=&quot;addtomenu&quot; onclick=&quot;appendToList('&lt;?php echo $templatedir; ?&gt;','Custom','','','','0','');jQuery('#custom_menu_item_name').attr('value','Menu Item');jQuery('#custom_menu_item_description').attr('value','A description');&quot;&gt;&lt;?php _e('Add to menu'); ?&gt;&lt;/a&gt;
+                                &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                        &lt;/div&gt;
+                &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</ins><span class="cx"> 
</span><del>-                                       &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
</del><ins>+   &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx"> 
</span><del>-                                &lt;/div&gt;
-                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</del><ins>+&lt;script type=&quot;text/javascript&quot;&gt;
+        document.getElementById('pages-left').style.display='block';
+        document.getElementById('menu-right').style.display='block';
+        document.getElementById('no-js').style.display='none';
+&lt;/script&gt;
</ins><span class="cx"> 
</span><del>-                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
-                                &lt;div class=&quot;sidebar-name&quot;&gt;
-                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
-                                        &lt;h3&gt;&lt;?php esc_html_e('Add a Custom Url'); ?&gt;&lt;/h3&gt;
-                                &lt;/div&gt;
-                                &lt;div class=&quot;widget-holder&quot;&gt;
-                                        &lt;input id=&quot;custom_menu_item_url&quot; type=&quot;text&quot; value=&quot;http://&quot;  /&gt;
-                                        &lt;label&gt;&lt;?php _e('URL'); ?&gt;&lt;/label&gt;&lt;br /&gt;
-                                   &lt;?php $templatedir = get_bloginfo('url'); ?&gt;
-                            &lt;input type=&quot;hidden&quot; id=&quot;templatedir&quot; value=&quot;&lt;?php echo esc_attr($templatedir); ?&gt;&quot; /&gt;
-                            &lt;input id=&quot;custom_menu_item_name&quot; type=&quot;text&quot; value=&quot;Menu Item&quot; onfocus=&quot;jQuery('#custom_menu_item_name').attr('value','');&quot;  /&gt;
-                            &lt;label&gt;&lt;?php _e('Menu Text'); ?&gt;&lt;/label&gt;&lt;br /&gt;
-                                   &lt;input id=&quot;custom_menu_item_description&quot; type=&quot;text&quot; value=&quot;&lt;?php esc_attr_e('A description'); ?&gt;&quot; &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; onfocus=&quot;jQuery('#custom_menu_item_description').attr('value','');&quot; /&gt;
-                                   &lt;label &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; &gt;&lt;?php _e('Description'); ?&gt;&lt;/label&gt;
-                                   &lt;a class=&quot;addtomenu&quot; onclick=&quot;appendToList('&lt;?php echo $templatedir; ?&gt;','Custom','','','','0','');jQuery('#custom_menu_item_name').attr('value','Menu Item');jQuery('#custom_menu_item_description').attr('value','A description');&quot;&gt;&lt;?php _e('Add to menu'); ?&gt;&lt;/a&gt;
-                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
-                                &lt;/div&gt;
-                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
</del><ins>+&lt;div id=&quot;dialog-confirm&quot; title=&quot;&lt;?php esc_attr_e('Edit Menu Item'); ?&gt;&quot;&gt;
+        &lt;/label&gt;&lt;input id=&quot;edittitle&quot; type=&quot;text&quot; name=&quot;edittitle&quot; value=&quot;&quot; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;edittitle&quot;&gt;&lt;?php _e('Menu Title'); ?&gt;&lt;/label&gt;&lt;br /&gt;
+        &lt;input id=&quot;editlink&quot; type=&quot;text&quot; name=&quot;editlink&quot; value=&quot;&quot; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editlink&quot;&gt;&lt;?php _e('URL'); ?&gt;&lt;/label&gt;&lt;br /&gt;
+        &lt;input id=&quot;editanchortitle&quot; type=&quot;text&quot; name=&quot;editanchortitle&quot; value=&quot;&quot; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editanchortitle&quot;&gt;&lt;?php _e('Link Title'); ?&gt;&lt;/label&gt;&lt;br /&gt;
+        &lt;select id=&quot;editnewwindow&quot; name=&quot;editnewwindow&quot;&gt;
+                &lt;option value=&quot;1&quot;&gt;&lt;?php _e('Yes'); ?&gt;&lt;/option&gt;
+                &lt;option value=&quot;0&quot;&gt;&lt;?php _e('No'); ?&gt;&lt;/option&gt;
+        &lt;/select&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editnewwindow&quot;&gt;&lt;?php _e('Open Link in a new window'); ?&gt;&lt;/label&gt;
+        &lt;input id=&quot;editdescription&quot; type=&quot;text&quot; name=&quot;editdescription&quot; value=&quot;&quot; &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editdescription&quot; &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; &gt;&lt;?php _e('Description'); ?&gt;&lt;/label&gt;&lt;br /&gt;
+&lt;/div&gt;
</ins><span class="cx"> 
</span><del>-       &lt;/div&gt;
-    &lt;/div&gt;
-
-    &lt;script type=&quot;text/javascript&quot;&gt;
-                document.getElementById('pages-left').style.display='block';
-                document.getElementById('menu-right').style.display='block';
-                document.getElementById('no-js').style.display='none';
-        &lt;/script&gt;
-
-        &lt;div id=&quot;dialog-confirm&quot; title=&quot;&lt;?php esc_attr_e('Edit Menu Item'); ?&gt;&quot;&gt;
-                &lt;/label&gt;&lt;input id=&quot;edittitle&quot; type=&quot;text&quot; name=&quot;edittitle&quot; value=&quot;&quot; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;edittitle&quot;&gt;&lt;?php _e('Menu Title'); ?&gt;&lt;/label&gt;&lt;br /&gt;
-                &lt;input id=&quot;editlink&quot; type=&quot;text&quot; name=&quot;editlink&quot; value=&quot;&quot; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editlink&quot;&gt;&lt;?php _e('URL'); ?&gt;&lt;/label&gt;&lt;br /&gt;
-                &lt;input id=&quot;editanchortitle&quot; type=&quot;text&quot; name=&quot;editanchortitle&quot; value=&quot;&quot; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editanchortitle&quot;&gt;&lt;?php _e('Link Title'); ?&gt;&lt;/label&gt;&lt;br /&gt;
-                &lt;select id=&quot;editnewwindow&quot; name=&quot;editnewwindow&quot;&gt;
-                        &lt;option value=&quot;1&quot;&gt;&lt;?php _e('Yes'); ?&gt;&lt;/option&gt;
-                        &lt;option value=&quot;0&quot;&gt;&lt;?php _e('No'); ?&gt;&lt;/option&gt;
-                &lt;/select&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editnewwindow&quot;&gt;&lt;?php _e('Open Link in a new window'); ?&gt;&lt;/label&gt;
-                &lt;input id=&quot;editdescription&quot; type=&quot;text&quot; name=&quot;editdescription&quot; value=&quot;&quot; &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editdescription&quot; &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; &gt;&lt;?php _e('Description'); ?&gt;&lt;/label&gt;&lt;br /&gt;
-        &lt;/div&gt;
-
</del><span class="cx"> &lt;?php
</span><del>-}
</del><span class="cx"> 
</span><span class="cx"> include(&quot;admin-footer.php&quot;);
</span></span></pre>
</div>
</div>

</body>
</html>