Make WordPress Core

Changeset 13375


Ignore:
Timestamp:
02/24/2010 06:52:54 PM (13 years ago)
Author:
ryan
Message:

Nav menu cleanups. Props nbachiyski. see #11817

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/custom-navigation.css

    r13372 r13375  
    1 .fix{clear:both;height:1px;margin:-1px 0 0;overflow:hidden;}.maintitle{margin:0 0 20px 0!important;}.logo{vertical-align:middle;margin:0 10px 0 0;}#pages-left{min-width:650px;max-width:1100px;width:100%;float:left;clear:left;margin-right:-315px;}#pages-left .inside{margin-top:20px;margin-right:315px;}#nav-container{margin-top:-3px;}.sidebar-name{background-color:#AAA;background-image:url(../images/ed-bg.gif);border-color:#DFDFDF;text-shadow:0 1px 0 #FFF;-moz-border-radius-topleft:8px;-moz-border-radius-topright:8px;background-position:0 0;background-repeat:repeat-x;border-style:solid;border-width:1px;cursor:pointer;font-size:13px;}.sidebar-name h3{font-size:13px;height:19px;margin:0;overflow:hidden;padding:5px 12px;white-space:nowrap;}.sidebar-name-arrow{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -109px;float:right;height:29px;width:26px;}#menu-right{width:285px;margin-top:20px;margin-right:10px;margin-left:20px;float:left;clear:right;}h2.heading{margin:32px 0 10px 0;}.widgets-holder-wrap{margin:0 0 20px 0;}.widget-holder{padding:15px 10px;-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;border-style:none solid solid;border-width:0 1px 1px;background-color:#F1F1F1;border-color:#DDD;}.checkboxes{float:right;margin:10px 12px 0 0;}.addtomenu{display:block;float:right;margin:10px 0 0 0;text-shadow:0 -1px 0 rgba(0,0,0,0.3);background:#21759B url(../images/button-grad.png) repeat-x scroll left top;border-color:#298CBA!important;color:#FFF!important;font-weight:bold;-moz-border-radius-bottomleft:11px;-moz-border-radius-bottomright:11px;-moz-border-radius-topleft:11px;-moz-border-radius-topright:11px;border-style:solid;border-width:1px;cursor:pointer;font-size:11px!important;line-height:16px;padding:2px 8px;text-decoration:none;}.list{zoom:1;}.list li{margin:0;}.list dt{display:none;float:left;width:260px;margin:0;padding:0 0 0 5px;line-height:30px;border-bottom:1px solid #e3e3e3;}.list dt span{float:left;}.list dt img{cursor:pointer;float:right;margin:7px 5px 0 0;}#nav-container{padding:0 10px 10px 10px;background-color:#fff;border:1px solid #DFDFDF;border-top:none;-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;}#custom-nav ul{width:100%;}#custom-nav li{margin:0;}.ui-draggable-dragging{width:500px;}#custom-nav li dl dt{-webkit-border-bottom-left-radius:6px;-webkit-border-bottom-right-radius:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;border:1px solid #E6E6E6;position:relative;padding-left:10px;background-color:#f1f1f1;height:35px;line-height:35px;}#custom-nav li dl dt:hover{cursor:move;}#custom-nav li dl dt .controls{position:absolute;right:15px;top:-1px;}#custom-nav li dl dt img{vertical-align:middle;}#custom-nav li .title{background:url(../images/ico-arrow.png) no-repeat 4px 5px;padding-left:15px;}#custom-nav li ul li{margin-left:20px;opacity:.7;}#custom-nav li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li ul li{opacity:.95;}#existing-pages li .title{background:url(../images/ico-arrow.png) no-repeat 4px 13px;padding-left:15px;}#existing-pages li ul li .title{margin-left:10px;}#existing-pages li ul li ul li .title{margin-left:20px;}#existing-pages li ul li ul li ul li .title{margin-left:30px;}#existing-pages li ul li ul li ul li ul li .title{margin-left:40px;}#existing-pages li ul li ul li ul li ul li ul li .title{margin-left:50px;}#existing-pages li ul li ul li ul li ul li ul li ul li .title{margin-left:60px;}#existing-pages li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:70px;}#existing-pages li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:80px;}#existing-categories li .title{background:url(../images/ico-arrow.png) no-repeat 4px 13px;padding-left:15px;}#existing-categories li ul li .title{margin-left:10px;}#existing-categories li ul li ul li .title{margin-left:20px;}#existing-categories li ul li ul li ul li .title{margin-left:30px;}#existing-categories li ul li ul li ul li ul li .title{margin-left:40px;}#existing-categories li ul li ul li ul li ul li ul li .title{margin-left:50px;}#existing-categories li ul li ul li ul li ul li ul li ul li .title{margin-left:60px;}#existing-categories li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:70px;}#existing-categories li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:80px;}img.remove,img.edit{cursor:pointer;margin:0 5px 0 0;}.dropzone{height:7px;margin:3px 0 3px 0;}.hide{display:none;}.type{text-transform:uppercase;font-size:11px;color:#999;padding-right:10px;}#menu_select{width:170px;}#dialog-confirm label{padding-left:10px;}.ui-dialog{background:#fff;border:1px solid #555;-moz-box-shadow:0 4px 30px #000;}.ui-dialog-titlebar{color:#CFCFCF;font-family:"Lucida Grande",Verdana,Arial,sans-serif;padding:6px 10px 6px;background-color:#222!important;border:none!important;-moz-border-radius:none!important;}#dialog-confirm{height:168px!important;padding:20px 10px 10px;}#dialog-confirm input{margin:0 0 15px 0;width:280px;}#dialog-confirm select{margin:0 0 15px 0;}.ui-dialog-buttonpane{padding:10px;}.ui-dialog-buttonpane button{margin:0 10px 0 0;background:#F2F2F2;text-shadow:0 1px 0 #FFF;border-color:#BBB;color:#464646;-moz-border-radius-bottomleft:11px;-moz-border-radius-bottomright:11px;-moz-border-radius-topleft:11px;-moz-border-radius-topright:11px;border-style:solid;border-width:1px;cursor:pointer;font-size:11px!important;line-height:14px;padding:2px 8px;text-decoration:none;}.ui-dialog-buttonpane button:hover{color:#000;border-color:#666;}.ui-icon{display:none;}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);-moz-border-radius:8px;-webkit-border-radius:8px;}#reset_wp_menu{background:#c77 none!important;color:white!important;text-shadow:0 1px 0 #555!important;}
     1.fix{clear:both;height:1px;margin:-1px 0 0;overflow:hidden;}.maintitle{margin:0 0 20px 0!important;}.logo{vertical-align:middle;margin:0 10px 0 0;}#pages-left{min-width:650px;max-width:1100px;width:100%;float:left;clear:left;margin-right:-315px;}#pages-left .inside{margin-top:20px;margin-right:315px;}#nav-container{margin-top:-3px;}.sidebar-name{background-color:#AAA;background-image:url(../images/ed-bg.gif);border-color:#DFDFDF;text-shadow:0 1px 0 #FFF;-moz-border-radius-topleft:8px;-moz-border-radius-topright:8px;background-position:0 0;background-repeat:repeat-x;border-style:solid;border-width:1px;cursor:pointer;font-size:13px;}.sidebar-name h3{font-size:13px;height:19px;margin:0;overflow:hidden;padding:5px 12px;white-space:nowrap;}.sidebar-name-arrow{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -109px;float:right;height:29px;width:26px;}#menu-right{width:285px;margin-top:20px;margin-right:10px;margin-left:20px;float:left;clear:right;}h2.heading{margin:32px 0 10px 0;}.widgets-holder-wrap{margin:0 0 20px 0;}.widget-holder{padding:15px 10px;-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;border-style:none solid solid;border-width:0 1px 1px;background-color:#F1F1F1;border-color:#DDD;}.checkboxes{float:right;margin:10px 12px 0 0;}.addtomenu{display:block;float:right;margin:10px 0 0 0;text-shadow:0 -1px 0 rgba(0,0,0,0.3);background:#21759B url(../images/button-grad.png) repeat-x scroll left top;border-color:#298CBA!important;color:#FFF!important;font-weight:bold;-moz-border-radius-bottomleft:11px;-moz-border-radius-bottomright:11px;-moz-border-radius-topleft:11px;-moz-border-radius-topright:11px;border-style:solid;border-width:1px;cursor:pointer;font-size:11px!important;line-height:16px;padding:2px 8px;text-decoration:none;}.list{zoom:1;}.list li{margin:0;}.list dt{display:none;float:left;width:260px;margin:0;padding:0 0 0 5px;line-height:30px;border-bottom:1px solid #e3e3e3;}.list dt span{float:left;}.list dt img{cursor:pointer;float:right;margin:7px 5px 0 0;}#nav-container{padding:0 10px 10px 10px;background-color:#fff;border:1px solid #DFDFDF;border-top:none;-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;}#custom-nav ul{width:100%;}#custom-nav li{margin:0;}.ui-draggable-dragging{width:500px;}#custom-nav li dl dt{-webkit-border-bottom-left-radius:6px;-webkit-border-bottom-right-radius:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;border:1px solid #E6E6E6;position:relative;padding-left:10px;background-color:#f1f1f1;height:35px;line-height:35px;}#custom-nav li dl dt:hover{cursor:move;}#custom-nav li dl dt .controls{position:absolute;right:15px;top:-1px;}#custom-nav li dl dt img{vertical-align:middle;}#custom-nav li .title{background:url(../images/ico-arrow.png) no-repeat 4px 5px;padding-left:15px;}#custom-nav li ul li{margin-left:20px;opacity:.7;}#custom-nav li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li ul li{opacity:.95;}#existing-pages li .title{background:url(../images/ico-arrow.png) no-repeat 4px 13px;padding-left:15px;}#existing-pages li ul li .title{margin-left:10px;}#existing-pages li ul li ul li .title{margin-left:20px;}#existing-pages li ul li ul li ul li .title{margin-left:30px;}#existing-pages li ul li ul li ul li ul li .title{margin-left:40px;}#existing-pages li ul li ul li ul li ul li ul li .title{margin-left:50px;}#existing-pages li ul li ul li ul li ul li ul li ul li .title{margin-left:60px;}#existing-pages li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:70px;}#existing-pages li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:80px;}#existing-categories li .title{background:url(../images/ico-arrow.png) no-repeat 4px 13px;padding-left:15px;}#existing-categories li ul li .title{margin-left:10px;}#existing-categories li ul li ul li .title{margin-left:20px;}#existing-categories li ul li ul li ul li .title{margin-left:30px;}#existing-categories li ul li ul li ul li ul li .title{margin-left:40px;}#existing-categories li ul li ul li ul li ul li ul li .title{margin-left:50px;}#existing-categories li ul li ul li ul li ul li ul li ul li .title{margin-left:60px;}#existing-categories li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:70px;}#existing-categories li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:80px;}img.remove,img.edit{cursor:pointer;margin:0 5px 0 0;}.dropzone{height:7px;margin:3px 0 3px 0;}.hide{display:none;}.type{text-transform:uppercase;font-size:11px;color:#999;padding-right:10px;}#menu_select{width:170px;}#dialog-confirm label{padding-left:10px;}.ui-dialog{background:#fff;border:1px solid #555;-moz-box-shadow:0 4px 30px #000;}.ui-dialog-titlebar{color:#CFCFCF;font-family:"Lucida Grande",Verdana,Arial,sans-serif;padding:6px 10px 6px;background-color:#222!important;border:none!important;-moz-border-radius:none!important;}#dialog-confirm{height:168px!important;padding:20px 10px 10px;}#dialog-confirm input{margin:0 0 15px 0;width:280px;}#dialog-confirm select{margin:0 0 15px 0;}.ui-dialog-buttonpane{padding:10px;}.ui-dialog-buttonpane button{margin:0 10px 0 0;background:#F2F2F2;text-shadow:0 1px 0 #FFF;border-color:#BBB;color:#464646;-moz-border-radius-bottomleft:11px;-moz-border-radius-bottomright:11px;-moz-border-radius-topleft:11px;-moz-border-radius-topright:11px;border-style:solid;border-width:1px;cursor:pointer;font-size:11px!important;line-height:14px;padding:2px 8px;text-decoration:none;}.ui-dialog-buttonpane button:hover{color:#000;border-color:#666;}.ui-icon{display:none;}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);-moz-border-radius:8px;-webkit-border-radius:8px;}
  • trunk/wp-admin/css/custom-navigation.dev.css

    r13372 r13375  
    162162.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); }
    163163.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); -moz-border-radius: 8px; -webkit-border-radius: 8px; }
    164 
    165 
    166 #reset_wp_menu { background:#c77 none !important;color:white!important;text-shadow:0 1px 0 #555 !important;}
  • trunk/wp-admin/includes/nav-menu.php

    r13369 r13375  
    3030    $pages_array = get_pages($pages_args);
    3131
    32     $intCounter = $counter;
    33     $parentli = $intCounter;
     32    $items_counter = $counter;
     33    $parentli = $items_counter;
    3434
    3535    if ( !$pages_array ) {
    36         echo 'Not Found';
    37         return $intCounter;
     36        echo __('Not Found');
     37        return $items_counter;
    3838    }
    3939
     
    4141    foreach ( $pages_array as $post ) {
    4242        if ( $post->post_parent == 0 ) {
    43             $post = wp_setup_nav_menu_item($post, 'page', $intCounter);
     43            $post = wp_setup_nav_menu_item($post, 'page', $items_counter);
    4444            if ( $type == 'menu' ) {
    4545                ?>
    4646
    47                 <li id="menu-<?php echo $intCounter; ?>" value="<?php echo $intCounter; ?>">
    48                     <?php
    49                         wp_print_nav_menu_item($post, 'menu', $intCounter);
     47                <li id="menu-<?php echo $items_counter; ?>" value="<?php echo $items_counter; ?>">
     48                    <?php
     49                        wp_print_nav_menu_item($post, 'menu', $items_counter);
    5050                        $parentli = $post->ID;
    51                         $intCounter++;
    52                         $intCounter = wp_custom_navigation_default_sub_items($post->ID, $intCounter, $parentli, 'pages', 'menu');
     51                        $items_counter++;
     52                        $items_counter = wp_custom_navigation_default_sub_items($post->ID, $items_counter, $parentli, 'pages', 'menu');
    5353                    ?>
    5454                </li>
     
    6262                        wp_print_nav_menu_item($post, 'default');
    6363                        $parentli = $post->ID;
    64                         $intCounter++;
    65                         $intCounter = wp_nav_menu_sub_items($post->ID, $intCounter, $parentli, 'pages', 'default');
     64                        $items_counter++;
     65                        $items_counter = wp_nav_menu_sub_items($post->ID, $items_counter, $parentli, 'pages', 'default');
    6666                     ?>
    6767                </li>
     
    7272    }
    7373
    74     return $intCounter;
     74    return $items_counter;
    7575}
    7676
     
    9191            'pad_counts'               => false );
    9292
    93     $intCounter = $counter;
     93    $items_counter = $counter;
    9494
    9595    // Get all categories
     
    9898    if ( !$categories_array ) {
    9999        _e('Not Found');
    100         return $intCounter;
     100        return $items_counter;
    101101    }
    102102
     
    104104    foreach ( $categories_array as $cat_item ) {
    105105        if ( $cat_item->parent == 0 ) {
    106             $cat_item = wp_setup_nav_menu_item($cat_item, 'category', $intCounter);
     106            $cat_item = wp_setup_nav_menu_item($cat_item, 'category', $items_counter);
    107107            // Custom Menu
    108108            if ( $type == 'menu' ) {
    109109                ?>
    110110
    111                 <li id="menu-<?php echo $intCounter; ?>" value="<?php echo $intCounter; ?>">
     111                <li id="menu-<?php echo $items_counter; ?>" value="<?php echo $items_counter; ?>">
    112112                    <?php
    113113                        wp_print_nav_menu_item($cat_item, 'menu');
    114114                        $parentli = $cat_item->cat_ID;
    115                         $intCounter++;
    116                         $intCounter = wp_nav_menu_sub_items($cat_item->cat_ID, $intCounter, $parentli, 'categories', 'menu');
     115                        $items_counter++;
     116                        $items_counter = wp_nav_menu_sub_items($cat_item->cat_ID, $items_counter, $parentli, 'categories', 'menu');
    117117                    ?>
    118118
     
    127127                        wp_print_nav_menu_item($cat_item, 'default');
    128128                        $parentli = $cat_item->cat_ID;
    129                         $intCounter++;
    130                         $intCounter = wp_nav_menu_sub_items($cat_item->cat_ID, $intCounter, $parentli, 'categories', 'default');
     129                        $items_counter++;
     130                        $items_counter = wp_nav_menu_sub_items($cat_item->cat_ID, $items_counter, $parentli, 'categories', 'default');
    131131                    ?>
    132132
     
    138138    }
    139139
    140     return $intCounter;
     140    return $items_counter;
    141141}
    142142
    143143//RECURSIVE Sub Menu Items of default categories and pages
    144 function wp_nav_menu_sub_items($childof, $intCounter, $parentli, $type, $output_type) {
    145 
    146     $counter = $intCounter;
     144function wp_nav_menu_sub_items($childof, $items_counter, $parentli, $type, $output_type) {
     145
     146    $counter = $items_counter;
    147147
    148148    // Custom Menu
  • trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js

    r13365 r13375  
    116116        jQuery(this).find('dl > dt > span > #remove' + j).attr('id','remove' + i);
    117117
    118         jQuery('#licount').attr('value',i);
     118        jQuery('#li-count').attr('value',i);
    119119
    120120   });
     
    143143    var inputicon = '';
    144144
    145     if (additemtype == 'Custom')
    146     {
    147         inputvaluevarname = document.getElementById('custom_menu_item_name').value;
    148         inputvaluevarurl = document.getElementById('custom_menu_item_url').value;
     145    if (additemtype == navMenuL10n.custom)
     146    {
     147        inputvaluevarname = document.getElementById('custom-menu-item-name').value;
     148        inputvaluevarurl = document.getElementById('custom-menu-item-url').value;
    149149        inputitemid = '';
    150150        inputparentid = '';
    151151        inputlinktype = 'custom';
    152         inputdescription = document.getElementById('custom_menu_item_description').value;
    153     }
    154     else if (additemtype == 'Page')
     152        inputdescription = '';
     153    }
     154    else if (additemtype == navMenuL10n.page)
    155155    {
    156156        inputvaluevarname = htmlentities(itemtext.toString());
     
    162162
    163163    }
    164     else if (additemtype == 'Category')
     164    else if (additemtype == navMenuL10n.category)
    165165    {
    166166        inputvaluevarname = htmlentities(itemtext.toString());
  • trunk/wp-admin/js/custom-navigation-dynamic-functions.js

    r13365 r13375  
    1 function removeitem(o){var todelete=document.getElementById("menu-"+o);if(todelete){var parenttodelete=document.getElementById("menu-"+o).parentNode;throwaway_node=parenttodelete.removeChild(todelete)}updatepostdata()}function edititem(o){itemTitle=jQuery("#title"+o).attr("value");itemURL=jQuery("#linkurl"+o).attr("value");itemAnchorTitle=jQuery("#anchortitle"+o).attr("value");itemNewWindow=jQuery("#newwindow"+o).attr("value");itemDesc=jQuery("#description"+o).attr("value");jQuery("#dialog-confirm").dialog("option","itemID",o);jQuery("#dialog-confirm").dialog("open");jQuery("#edittitle").attr("value",itemTitle);jQuery("#editlink").attr("value",itemURL);jQuery("#editanchortitle").attr("value",itemAnchorTitle);jQuery("#editnewwindow option[value='"+itemNewWindow+"']").attr("selected","selected");jQuery("#editdescription").attr("value",itemDesc)}function updatepostdata(){var i=0;jQuery("#custom-nav").find("li").each(function(i){i=i+1;var j=jQuery(this).attr("value");jQuery(this).find("#position"+j).attr("value",i);jQuery(this).attr("id","menu-"+i);jQuery(this).attr("value",i);jQuery(this).find("#dbid"+j).attr("name","dbid"+i);jQuery(this).find("#dbid"+j).attr("id","dbid"+i);jQuery(this).find("#postmenu"+j).attr("name","postmenu"+i);jQuery(this).find("#postmenu"+j).attr("id","postmenu"+i);var p=jQuery(this).find("#parent"+j).parent().parent().parent().attr("value");jQuery(this).find("#parent"+j).attr("name","parent"+i);jQuery(this).find("#parent"+j).attr("id","parent"+i);if(p){}else{p=0}jQuery(this).find("#parent"+j).attr("value",p);jQuery(this).find("#title"+j).attr("name","title"+i);jQuery(this).find("#title"+j).attr("id","title"+i);jQuery(this).find("#linkurl"+j).attr("name","linkurl"+i);jQuery(this).find("#linkurl"+j).attr("id","linkurl"+i);jQuery(this).find("#description"+j).attr("name","description"+i);jQuery(this).find("#description"+j).attr("id","description"+i);jQuery(this).find("#icon"+j).attr("name","icon"+i);jQuery(this).find("#icon"+j).attr("id","icon"+i);jQuery(this).find("#position"+j).attr("name","position"+i);jQuery(this).find("#position"+j).attr("id","position"+i);jQuery(this).find("#linktype"+j).attr("name","linktype"+i);jQuery(this).find("#linktype"+j).attr("id","linktype"+i);jQuery(this).find("#anchortitle"+j).attr("name","anchortitle"+i);jQuery(this).find("#anchortitle"+j).attr("id","anchortitle"+i);jQuery(this).find("#newwindow"+j).attr("name","newwindow"+i);jQuery(this).find("#newwindow"+j).attr("id","newwindow"+i);jQuery(this).find("dl > dt > span > #remove"+j).attr("value",i);jQuery(this).find("dl > dt > span > #remove"+j).attr("onClick","removeitem("+i+")");jQuery(this).find("dl > dt > span > #remove"+j).attr("id","remove"+i);jQuery("#licount").attr("value",i)})}function appendToList(templatedir,additemtype,itemtext,itemurl,itemid,itemparentid,itemdescription){var inputvaluevarname="";var inputvaluevarurl="";var inputitemid="";var inputparentid="";var inputdescription="";var inputicon="";if(additemtype=="Custom"){inputvaluevarname=document.getElementById("custom_menu_item_name").value;inputvaluevarurl=document.getElementById("custom_menu_item_url").value;inputitemid="";inputparentid="";inputlinktype="custom";inputdescription=document.getElementById("custom_menu_item_description").value}else{if(additemtype=="Page"){inputvaluevarname=htmlentities(itemtext.toString());inputvaluevarurl=itemurl.toString();inputitemid=itemid.toString();inputparentid="0";inputlinktype="page";inputdescription=htmlentities(itemdescription.toString())}else{if(additemtype=="Category"){inputvaluevarname=htmlentities(itemtext.toString());inputvaluevarurl=itemurl.toString();inputitemid=itemid.toString();inputparentid="0";inputlinktype="category";inputdescription=htmlentities(itemdescription.toString())}else{inputvaluevarname="";inputvaluevarname="";inputitemid="";inputparentid="";inputlinktype="custom";inputdescription=""}}}var count=document.getElementById("custom-nav").getElementsByTagName("li").length+1;var randomnumber=count;var validatetest=0;try{var test=document.getElementById("menu-"+randomnumber.toString()).value}catch(err){validatetest=1}while(validatetest==0){randomnumber=randomnumber+1;try{var test2=document.getElementById("menu-"+randomnumber.toString()).value}catch(err){validatetest=1}}jQuery(".maintitle").after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>');jQuery("#message").animate({opacity:1},2000).fadeOut(300,function(){jQuery(this).remove()});jQuery("#custom-nav").append('<li id="menu-'+randomnumber+'" value="'+randomnumber+'"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">'+inputvaluevarname+'</span><span class="controls"><span class="type">'+additemtype+'</span><a id="edit'+randomnumber+'" onclick="edititem('+randomnumber+')" value="'+randomnumber+'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="'+templatedir+'/wp-admin/images/ico-edit.png" /></a> <a id="remove'+randomnumber+'" onclick="removeitem('+randomnumber+')" value="'+randomnumber+'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="'+templatedir+'/wp-admin/images/ico-close.png" /></a> <a href="'+inputvaluevarurl+'" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="'+templatedir+'/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="'+inputvaluevarurl+'">'+inputvaluevarname+'</a><input type="hidden" name="postmenu'+randomnumber+'" id="postmenu'+randomnumber+'" value="'+inputitemid+'" /><input type="hidden" name="parent'+randomnumber+'" id="parent'+randomnumber+'" value="'+inputparentid+'" /><input type="hidden" name="title'+randomnumber+'" id="title'+randomnumber+'" value="'+inputvaluevarname+'" /><input type="hidden" name="linkurl'+randomnumber+'" id="linkurl'+randomnumber+'" value="'+inputvaluevarurl+'" /><input type="hidden" name="description'+randomnumber+'" id="description'+randomnumber+'" value="'+inputdescription+'" /><input type="hidden" name="icon'+randomnumber+'" id="icon'+randomnumber+'" value="'+inputicon+'" /><input type="hidden" name="position'+randomnumber+'" id="position'+randomnumber+'" value="'+randomnumber+'" /><input type="hidden" name="linktype'+randomnumber+'" id="linktype'+randomnumber+'" value="'+inputlinktype+'" /><input type="hidden" name="anchortitle'+randomnumber+'" id="anchortitle'+randomnumber+'" value="'+inputvaluevarname+'" /><input type="hidden" name="newwindow'+randomnumber+'" id="newwindow'+randomnumber+'" value="0" /></li>');jQuery("#menu-"+randomnumber+"").draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100});jQuery("#menu-"+randomnumber+" dl, #menu-"+randomnumber+" .dropzone").droppable({accept:"#"+randomnumber+", #custom-nav li",tolerance:"pointer",drop:function(e,ui){var li=jQuery(this).parent();var child=!jQuery(this).hasClass("dropzone");if(child&&li.children("ul").length==0){li.append("<ul/>")}if(child){li.children("ul").append(ui.draggable)}else{li.before(ui.draggable)}li.find("dl,.dropzone").css({backgroundColor:"",borderColor:""});var draggablevalue=ui.draggable.attr("value");var droppablevalue=li.attr("value");li.find("#menu-"+draggablevalue).find("#parent"+draggablevalue).val(droppablevalue);jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style")},over:function(){if(jQuery(this).attr("class")=="dropzone ui-droppable"){jQuery(this).parent().find("div:first").css("background","none").css("height","50px")}else{if(jQuery(this).attr("class")=="ui-droppable"){jQuery(this).parent().find("dt:first").css("background","#d8d8d8")}else{}}var parentid=jQuery(this).parent().attr("id")},out:function(){jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style");jQuery(this).filter(".dropzone").css({borderColor:""})}});updatepostdata()};
     1function removeitem(c){var b=document.getElementById("menu-"+c);if(b){var a=document.getElementById("menu-"+c).parentNode;throwaway_node=a.removeChild(b)}updatepostdata()}function edititem(a){itemTitle=jQuery("#title"+a).attr("value");itemURL=jQuery("#linkurl"+a).attr("value");itemAnchorTitle=jQuery("#anchortitle"+a).attr("value");itemNewWindow=jQuery("#newwindow"+a).attr("value");itemDesc=jQuery("#description"+a).attr("value");jQuery("#dialog-confirm").dialog("option","itemID",a);jQuery("#dialog-confirm").dialog("open");jQuery("#edittitle").attr("value",itemTitle);jQuery("#editlink").attr("value",itemURL);jQuery("#editanchortitle").attr("value",itemAnchorTitle);jQuery("#editnewwindow option[value='"+itemNewWindow+"']").attr("selected","selected");jQuery("#editdescription").attr("value",itemDesc)}function updatepostdata(){var a=0;jQuery("#custom-nav").find("li").each(function(c){c=c+1;var b=jQuery(this).attr("value");jQuery(this).find("#position"+b).attr("value",c);jQuery(this).attr("id","menu-"+c);jQuery(this).attr("value",c);jQuery(this).find("#dbid"+b).attr("name","dbid"+c);jQuery(this).find("#dbid"+b).attr("id","dbid"+c);jQuery(this).find("#postmenu"+b).attr("name","postmenu"+c);jQuery(this).find("#postmenu"+b).attr("id","postmenu"+c);var d=jQuery(this).find("#parent"+b).parent().parent().parent().attr("value");jQuery(this).find("#parent"+b).attr("name","parent"+c);jQuery(this).find("#parent"+b).attr("id","parent"+c);if(d){}else{d=0}jQuery(this).find("#parent"+b).attr("value",d);jQuery(this).find("#title"+b).attr("name","title"+c);jQuery(this).find("#title"+b).attr("id","title"+c);jQuery(this).find("#linkurl"+b).attr("name","linkurl"+c);jQuery(this).find("#linkurl"+b).attr("id","linkurl"+c);jQuery(this).find("#description"+b).attr("name","description"+c);jQuery(this).find("#description"+b).attr("id","description"+c);jQuery(this).find("#icon"+b).attr("name","icon"+c);jQuery(this).find("#icon"+b).attr("id","icon"+c);jQuery(this).find("#position"+b).attr("name","position"+c);jQuery(this).find("#position"+b).attr("id","position"+c);jQuery(this).find("#linktype"+b).attr("name","linktype"+c);jQuery(this).find("#linktype"+b).attr("id","linktype"+c);jQuery(this).find("#anchortitle"+b).attr("name","anchortitle"+c);jQuery(this).find("#anchortitle"+b).attr("id","anchortitle"+c);jQuery(this).find("#newwindow"+b).attr("name","newwindow"+c);jQuery(this).find("#newwindow"+b).attr("id","newwindow"+c);jQuery(this).find("dl > dt > span > #remove"+b).attr("value",c);jQuery(this).find("dl > dt > span > #remove"+b).attr("onClick","removeitem("+c+")");jQuery(this).find("dl > dt > span > #remove"+b).attr("id","remove"+c);jQuery("#li-count").attr("value",c)})}function appendToList(b,s,d,n,h,l,e){var k="";var c="";var r="";var o="";var i="";var a="";if(s==navMenuL10n.custom){k=document.getElementById("custom-menu-item-name").value;c=document.getElementById("custom-menu-item-url").value;r="";o="";inputlinktype="custom";i=""}else{if(s==navMenuL10n.page){k=htmlentities(d.toString());c=n.toString();r=h.toString();o="0";inputlinktype="page";i=htmlentities(e.toString())}else{if(s==navMenuL10n.category){k=htmlentities(d.toString());c=n.toString();r=h.toString();o="0";inputlinktype="category";i=htmlentities(e.toString())}else{k="";k="";r="";o="";inputlinktype="custom";i=""}}}var g=document.getElementById("custom-nav").getElementsByTagName("li").length+1;var p=g;var m=0;try{var q=document.getElementById("menu-"+p.toString()).value}catch(f){m=1}while(m==0){p=p+1;try{var j=document.getElementById("menu-"+p.toString()).value}catch(f){m=1}}jQuery(".maintitle").after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>');jQuery("#message").animate({opacity:1},2000).fadeOut(300,function(){jQuery(this).remove()});jQuery("#custom-nav").append('<li id="menu-'+p+'" value="'+p+'"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">'+k+'</span><span class="controls"><span class="type">'+s+'</span><a id="edit'+p+'" onclick="edititem('+p+')" value="'+p+'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="'+b+'/wp-admin/images/ico-edit.png" /></a> <a id="remove'+p+'" onclick="removeitem('+p+')" value="'+p+'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="'+b+'/wp-admin/images/ico-close.png" /></a> <a href="'+c+'" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="'+b+'/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="'+c+'">'+k+'</a><input type="hidden" name="postmenu'+p+'" id="postmenu'+p+'" value="'+r+'" /><input type="hidden" name="parent'+p+'" id="parent'+p+'" value="'+o+'" /><input type="hidden" name="title'+p+'" id="title'+p+'" value="'+k+'" /><input type="hidden" name="linkurl'+p+'" id="linkurl'+p+'" value="'+c+'" /><input type="hidden" name="description'+p+'" id="description'+p+'" value="'+i+'" /><input type="hidden" name="icon'+p+'" id="icon'+p+'" value="'+a+'" /><input type="hidden" name="position'+p+'" id="position'+p+'" value="'+p+'" /><input type="hidden" name="linktype'+p+'" id="linktype'+p+'" value="'+inputlinktype+'" /><input type="hidden" name="anchortitle'+p+'" id="anchortitle'+p+'" value="'+k+'" /><input type="hidden" name="newwindow'+p+'" id="newwindow'+p+'" value="0" /></li>');jQuery("#menu-"+p+"").draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100});jQuery("#menu-"+p+" dl, #menu-"+p+" .dropzone").droppable({accept:"#"+p+", #custom-nav li",tolerance:"pointer",drop:function(x,w){var t=jQuery(this).parent();var y=!jQuery(this).hasClass("dropzone");if(y&&t.children("ul").length==0){t.append("<ul/>")}if(y){t.children("ul").append(w.draggable)}else{t.before(w.draggable)}t.find("dl,.dropzone").css({backgroundColor:"",borderColor:""});var v=w.draggable.attr("value");var u=t.attr("value");t.find("#menu-"+v).find("#parent"+v).val(u);jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style")},over:function(){if(jQuery(this).attr("class")=="dropzone ui-droppable"){jQuery(this).parent().find("div:first").css("background","none").css("height","50px")}else{if(jQuery(this).attr("class")=="ui-droppable"){jQuery(this).parent().find("dt:first").css("background","#d8d8d8")}else{}}var t=jQuery(this).parent().attr("id")},out:function(){jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style");jQuery(this).filter(".dropzone").css({borderColor:""})}});updatepostdata()};
  • trunk/wp-admin/nav-menus.php

    r13372 r13375  
    3232function wp_reset_nav_menu() {
    3333    wp_nav_menu_setup(true);
    34 
    3534    return true;
    3635}
    3736
    38 $messagesdiv = '';
     37$messages_div = '';
    3938$menu_id_in_edit = 0;
    4039$updated = false;
     40$advanced_option_descriptions = 'no';
    4141
    4242// Check which menu is selected and if menu is in edit already
    43 if ( isset( $_GET['edit_menu'] ) ) {
    44     $menu_selected_id = (int) $_GET['edit_menu'];
     43if ( isset( $_GET['edit-menu'] ) ) {
     44    $menu_selected_id = (int) $_GET['edit-menu'];
    4545    $updated = true;
    46 } elseif ( isset( $_POST[ 'menu_id_in_edit' ] ) ) {
    47     $menu_selected_id = (int) $_POST[ 'menu_id_in_edit' ];
     46} elseif ( isset( $_POST[ 'menu-id-in-edit' ] ) ) {
     47    $menu_selected_id = (int) $_POST[ 'menu-id-in-edit' ];
    4848} else {
    4949    $menu_selected_id = 0;
    5050}
    5151
    52 if ( isset( $_POST[ 'delete_menu' ] ) && $menu_selected_id > 0 ) {
     52if ( isset( $_POST[ 'delete-menu' ] ) && $menu_selected_id > 0 ) {
    5353    wp_delete_nav_menu( $menu_selected_id );
    5454    $menu_selected_id = 0;
     
    7171}
    7272
    73 if ( isset( $_POST['licount'] ) )
    74     $postCounter = $_POST['licount'];
     73if ( isset( $_POST['li-count'] ) )
     74    $post_counter = $_POST['li-count'];
    7575else
    76     $postCounter = 0;
     76    $post_counter = 0;
    7777
    7878// Create a new menu. Menus are stored as terms in the 'menu' taxonomy.
    79 if ( isset( $_POST['add_menu'] ) && ! $updated ) {
    80     update_option( 'wp_custom_nav_menu', $_POST['enable_wp_menu'] ); // Do we need this?
    81     $insert_menu_name = $_POST['add_menu_name'];
    82 
    83     if ( $insert_menu_name != '' ) {
    84         $menu = wp_create_nav_menu($insert_menu_name);
    85         if ( is_wp_error($menu) ) {
    86             $messagesdiv = '<div id="message" class="error fade below-h2"><p>' . esc_html( $menu->get_error_message() ) . '</p></div>';
     79if ( isset( $_POST['add-menu'] ) && ! $updated ) {
     80    $insert_menu_name = $_POST['add-menu-name'];
     81
     82    if ( $insert_menu_name ) {
     83        $menu = wp_create_nav_menu( $insert_menu_name );
     84        if ( is_wp_error( $menu ) ) {
     85            $messages_div = '<div id="message" class="error fade below-h2"><p>' . $menu->get_error_message() . '</p></div>';
    8786        } else {
    8887            $custom_menus[$menu->term_id] = $menu;
     
    9089            $menu_id_in_edit = $menu_selected_id;
    9190            $menu_title = $menu->name;
    92             $messagesdiv = '<div id="message" class="updated fade below-h2"><p>' . esc_html( sprintf( __('"%s" menu has been created!'), $menu->name ) ) . '</p></div>';
    93             $postCounter = 0;
     91            $messages_div = '<div id="message" class="updated fade below-h2"><p>' . sprintf( __('&#8220;%s&#8221; menu has been created.'), esc_html( $menu->name ) ) . '</p></div>';
     92            $post_counter = 0;
    9493        }
    9594    } else {
    96         $messagesdiv = '<div id="message" class="error fade below-h2"><p>' . __('Please enter a valid menu name.') . '</p></div>';
     95        $messages_div = '<div id="message" class="error fade below-h2"><p>' . __('Please enter a valid menu name.') . '</p></div>';
    9796    }
    9897    $updated = true;
    9998}
    10099
    101 if ( $postCounter > 0 && $menu_selected_id > 0 && ! $updated ) {
     100if ( $post_counter > 0 && $menu_selected_id > 0 && ! $updated ) {
    102101    $menu_items = wp_get_nav_menu_items( $menu_selected_id, array('orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID') );
    103102    $parent_menu_ids = array();
    104103
    105104    // Loop through all POST variables
    106     for ( $k = 1; $k <= $postCounter; $k++ ) {
    107         if (isset($_POST['dbid'.$k])) { $db_id = $_POST['dbid'.$k]; } else { $db_id = 0; }
    108         if (isset($_POST['postmenu'.$k])) { $object_id = $_POST['postmenu'.$k]; } else { $object_id = 0; }
    109         if (isset($_POST['parent'.$k])) { $parent_id = $_POST['parent'.$k]; } else { $parent_id = 0; }
    110         if (isset($_POST['title'.$k])) { $custom_title = $_POST['title'.$k]; } else { $custom_title = ''; }
    111         if (isset($_POST['linkurl'.$k])) { $custom_linkurl = $_POST['linkurl'.$k]; } else { $custom_linkurl = ''; }
    112         if (isset($_POST['description'.$k])) { $custom_description = $_POST['description'.$k]; } else { $custom_description = ''; }
     105    for ( $k = 1; $k <= $post_counter; $k++ ) {
     106        $db_id = isset( $_POST['dbid'.$k] )? $_POST['dbid'.$k] : 0;
     107        $object_id = isset( $_POST['postmenu'.$k] )? $_POST['postmenu'.$k] : 0;
     108        $parent_id = isset( $_POST['parent'.$k] )? $_POST['parent'.$k] : 0;
     109        $custom_title = isset( $_POST['title'.$k] )?  $_POST['title'.$k] : '';
     110        $custom_linkurl = isset( $_POST['linkurl'.$k] )? $_POST['linkurl'.$k] : '';
     111        $custom_description = isset( $_POST['description'.$k] )? $_POST['description'.$k] : '';
    113112        // doesn't seem to be used by UI
    114         if (isset($_POST['icon'.$k])) { $icon = $_POST['icon'.$k]; } else { $icon = 0; }
    115         if (isset($_POST['position'.$k])) { $position = $_POST['position'.$k]; } else { $position = 0; }
    116         if (isset($_POST['linktype'.$k])) { $linktype = $_POST['linktype'.$k]; } else { $linktype = 'custom'; }
    117         if (isset($_POST['anchortitle'.$k])) { $custom_anchor_title = $_POST['anchortitle'.$k]; } else { $custom_anchor_title = $custom_title; }
    118         if (isset($_POST['newwindow'.$k])) { $new_window = $_POST['newwindow'.$k]; } else { $new_window = 0; }
     113        $icon = isset( $_POST['icon'.$k] )? $_POST['icon'.$k] : 0;
     114        $position = isset( $_POST['position'.$k] )? $_POST['position'.$k] : 0;
     115        $linktype = isset( $_POST['linktype'.$k] )? $_POST['linktype'.$k] : 'custom';
     116        $custom_anchor_title  = isset( $_POST['anchortitle'.$k] )? $_POST['anchortitle'.$k] : $custom_title;
     117        $new_window = isset( $_POST['newwindow'.$k] )? $_POST['newwindow'.$k] : 0;
    119118
    120119        $post = array( 'post_status' => 'publish', 'post_type' => 'nav_menu_item', 'post_author' => $user_ID,
     
    126125        else
    127126            $post['post_content_filtered'] = '';
    128         if ( $parent_id > 0 && isset( $parent_menu_ids[ $parent_id ] ) )
    129             $post[ 'post_parent' ] = $parent_menu_ids[ $parent_id ];
     127        if ( $parent_id > 0 && isset( $parent_menu_ids[$parent_id] ) )
     128            $post['post_parent'] = $parent_menu_ids[$parent_id];
    130129
    131130        // New menu item
     
    139138        $parent_menu_ids[ $k ] = $db_id;
    140139
    141         update_post_meta($db_id, 'menu_type', $linktype);
    142         update_post_meta($db_id, 'object_id', $object_id);
     140        update_post_meta( $db_id, 'menu_type', $linktype );
     141        update_post_meta( $db_id, 'object_id', $object_id );
    143142    }
    144143    if ( !empty( $menu_items ) ) {
     
    147146        }
    148147    }
    149     // DISPLAY SUCCESS MESSAGE IF POST CORRECT
    150     $messagesdiv = '<div id="message" class="updated fade below-h2"><p>' . __('The menu has been updated.') . '</p></div>';
     148    $messages_div = '<div id="message" class="updated fade below-h2"><p>' . __('The menu has been updated.') . '</p></div>';
    151149}
    152150
     
    156154<h2><?php esc_html_e('Menus') ?></h2>
    157155    <form onsubmit="updatepostdata()" action="<?php echo admin_url( 'nav-menus.php' ); ?>" method="post" enctype="multipart/form-data">
    158     <?php if ( ! empty( $custom_menus ) && count( $custom_menus ) > 1 ) { ?>
     156<?php if ( ! empty( $custom_menus ) && count( $custom_menus ) > 1 ): ?>
    159157        <ul class="subsubsub">
    160158<?php
    161159                foreach ( $custom_menus as $menu ) {
    162                     $sep = end($custom_menus) == $menu ? '' : ' | ';
    163                     // $menu_term = get_term( $menu, 'nav_menu' );
     160                    $sep = end( $custom_menus ) == $menu ? '' : ' | ';
    164161                    if ( ( $menu_id_in_edit == $menu->term_id ) || ( $menu_selected_id == $menu->term_id ) ) { ?>
    165                         <li><a href='nav-menus.php?edit_menu=<?php echo esc_attr($menu->term_id); ?>' class="current"><?php echo esc_html( $menu->name ); ?></a><?php echo $sep; ?></li>
     162                        <li><a href='nav-menus.php?edit-menu=<?php echo esc_attr($menu->term_id); ?>' class="current"><?php echo esc_html( $menu->name ); ?></a><?php echo $sep; ?></li>
    166163<?php               } else { ?>
    167                         <li><a href='nav-menus.php?edit_menu=<?php echo esc_attr($menu->term_id); ?>'><?php echo esc_html( $menu->name ); ?></a><?php echo $sep; ?></li>
     164                        <li><a href='nav-menus.php?edit-menu=<?php echo esc_attr($menu->term_id); ?>'><?php echo esc_html( $menu->name ); ?></a><?php echo $sep; ?></li>
    168165<?php               }
    169166                }
     
    171168        </ul>
    172169        <div class="clear"></div>
    173 <?php } ?>
     170<?php endif ?>
    174171
    175172    <div class="hide-if-js error"><p><?php _e('You do not have JavaScript enabled in your browser. Please enable it to access the Menus functionality.'); ?></p></div>
     
    178175        <div class="inside">
    179176        <?php if ( ! empty( $custom_menus ) ) : ?>
    180         <?php echo $messagesdiv; ?>
    181 
    182         <input type="hidden" name="licount" id="licount" value="0" />
    183         <input type="hidden" name="menu_id_in_edit" id="menu_id_in_edit" value="<?php echo esc_attr($menu_selected_id); ?>" />
     177        <?php echo $messages_div; ?>
     178
     179        <input type="hidden" name="li-count" id="li-count" value="0" />
     180        <input type="hidden" name="menu-id-in-edit" id="menu-id-in-edit" value="<?php echo esc_attr( $menu_selected_id ); ?>" />
    184181
    185182        <div class="sidebar-name">
     
    187184                <br/>
    188185            </div>
    189             <h3><?php echo esc_html($menu_title); ?></h3>
     186            <h3><?php echo esc_html( $menu_title ); ?></h3>
    190187
    191188        </div>
     
    194191            <ul id="custom-nav">
    195192
    196         <?php
    197         //DISPLAY existing menu
     193<?php
    198194        if ( $menu_selected_id > 0 ) {
    199             wp_print_nav_menu( 'type=backend&name='.$menu_title.'&id='.$menu_selected_id );
    200         }
    201         ?>
    202 
     195            wp_print_nav_menu( array( 'type' => 'backend', 'name' => $menu_title, 'id' => $menu_selected_id ) );
     196        }
     197?>
    203198            </ul>
    204199        </div><!-- /#nav-container -->
     
    210205        </script>
    211206        <input id="save_bottom" name="save_bottom" type="submit" value="<?php esc_attr_e('Save All Changes'); ?>" />
    212         <input id="delete_menu" name="delete_menu" type="submit" value="<?php esc_attr_e('Delete This Menu'); ?>" />
     207        <input id="delete-menu" name="delete-menu" type="submit" value="<?php esc_attr_e('Delete This Menu'); ?>" />
    213208        </p>
    214209
     
    228223
    229224                <span>
    230                 <input id="add_menu_name" name="add_menu_name" type="text" value=""  />
    231                 <input id="add_menu" type="submit" value="<?php esc_attr_e('Add Menu'); ?>" name="add_menu" class="button" />
     225                <input id="add-menu-name" name="add-menu-name" type="text" value=""  />
     226                <input id="add-menu" type="submit" value="<?php esc_attr_e('Add Menu'); ?>" name="add-menu" class="button" />
    232227                </span>
    233228            </div>
    234229        </div><!-- /.widgets-holder-wrap -->
    235 <?php /* ?>
    236         <?php $advanced_option_descriptions = get_option('wp_settings_custom_nav_advanced_options'); ?>
    237         <div class="widgets-holder-wrap" style="display:none;">
    238             <div class="sidebar-name">
    239                 <div class="sidebar-name-arrow"></div>
    240                 <h3><?php esc_html_e('Top Level Menu Descriptions'); ?></h3>
    241             </div>
    242             <div class="widget-holder">
    243                 <span><?php _e('Display Descriptions in Top Level Menu?'); ?></span>
    244 
    245                 <?php
    246                 // UPDATE and DISPLAY Menu Description Option
    247                 if ( isset($_POST['menu-descriptions']) ) {
    248                     if ( !isset($_POST['switch_menu']) ) {
    249                         $menu_options_to_edit = $_POST['menu_id_in_edit'];
    250                         update_option('wp_settings_custom_nav_'.$menu_options_to_edit.'_descriptions',$_POST['menu-descriptions']);
    251                     }
    252                 }
    253 
    254                 if ( $menu_id_in_edit > 0 )
    255                     $checkedraw = get_option('wp_settings_custom_nav_'.$menu_id_in_edit.'_descriptions');
    256                 else
    257                     $checkedraw = get_option('wp_settings_custom_nav_'.$menu_selected_id.'_descriptions');
    258 
    259                 $checked = strtolower($checkedraw);
    260 
    261                 if ( $advanced_option_descriptions == 'no' )
    262                     $checked = 'no';
    263                 ?>
    264 
    265                 <span class="checkboxes">
    266                     <label><?php _e('Yes'); ?></label><input type="radio" name="menu-descriptions" value="yes" <?php if ($checked=='yes') { echo 'checked="checked"'; } ?> />
    267                     <label><?php _e('No'); ?></label><input type="radio" name="menu-descriptions" value="no" <?php if ($checked=='yes') { } else { echo 'checked="checked"'; } ?> />
    268                 </span><!-- /.checkboxes -->
    269                 </form>
    270                 <div class="fix"></div>
    271             </div>
    272         </div><!-- /.widgets-holder-wrap -->
    273 <?php */ ?>
    274230        <div class="widgets-holder-wrap">
    275231            <div class="sidebar-name">
     
    278234            </div>
    279235            <div class="widget-holder">
    280 
    281                 <?php
    282                 $pages_args = array(
    283                 'child_of' => 0,
    284                 'sort_order' => 'ASC',
    285                 'sort_column' => 'post_title',
    286                 'hierarchical' => 1,
    287                 'exclude' => '',
    288                 'include' => '',
    289                 'meta_key' => '',
    290                 'meta_value' => '',
    291                 'authors' => '',
    292                 'parent' => -1,
    293                 'exclude_tree' => '',
    294                 'number' => '',
    295                 'offset' => 0 );
    296 
    297                 //GET all pages
    298                 $pages_array = get_pages($pages_args);
    299                 $page_name = '';
    300                 //CHECK if pages exist
    301                 if ( $pages_array ) {
    302                     foreach ( $pages_array as $post ) {
    303                         //Add page name to
    304                         $page_name .= htmlentities($post->post_title).'|';
    305                     }
    306                 } else {
    307                     $page_name = __('No pages available');
    308                 }
    309                 ?>
    310 
    311                 <script>
     236<?php
     237    $pages_args = array(
     238        'child_of' => 0,
     239        'sort_order' => 'ASC',
     240        'sort_column' => 'post_title',
     241        'hierarchical' => 1,
     242        'exclude' => '',
     243        'include' => '',
     244        'meta_key' => '',
     245        'meta_value' => '',
     246        'authors' => '',
     247        'parent' => -1,
     248        'exclude_tree' => '',
     249        'number' => '',
     250        'offset' => 0
     251    );
     252    $page_name = '';
     253    $pages_array = get_pages($pages_args);
     254    if ( $pages_array ) {
     255        foreach ( $pages_array as $post ) {
     256            $page_name .= $post->post_title . '|';
     257        }
     258    } else {
     259        $page_name = __('No pages available');
     260    }
     261?>
     262                <script type="text/javascript" charset="<?php bloginfo('charset'); ?>">
    312263                    jQuery(document).ready(function(){
    313 
    314                         //GET PHP pages
    315                         var dataposts = "<?php echo esc_js($page_name); ?>".split("|");
    316 
    317                         //Set autocomplete
    318                         jQuery("#page-search").autocomplete(dataposts);
    319 
    320                         //Handle autocomplete result
     264                        var posts = "<?php echo esc_js( $page_name ); ?>".split("|");
     265                        jQuery("#page-search").autocomplete(posts);
    321266                        jQuery("#page-search").result(function(event, data, formatted) {
    322267                            jQuery('#existing-pages').css('display','block');
    323268                            jQuery("#existing-pages dt:contains('" + data + "')").css("display", "block");
    324 
    325269                            jQuery('#show-pages').hide();
    326270                            jQuery('#hide-pages').show();
    327 
    328271                        });
    329272                        jQuery('#existing-pages').css('display','none');
    330273                    });
    331274                </script>
    332 
    333275                <input type="text" onfocus="jQuery('#page-search').attr('value','');" id="page-search" value="<?php esc_attr_e('Search Pages'); ?>" />
    334276
    335                 <a id="show-pages" style="cursor:pointer;" onclick="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();">View All</a>
    336                 <a id="hide-pages" style="cursor:pointer;" onclick="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();">Hide All</a>
     277                <a id="show-pages" style="cursor:pointer;" onclick="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();"><?php _e('View All'); ?></a>
     278                <a id="hide-pages" style="cursor:pointer;" onclick="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();"><?php _e('Hide All'); ?></a>
    337279
    338280                <script type="text/javascript">
     
    341283
    342284                <ul id="existing-pages" class="list">
    343                     <?php
    344                         $intCounter = 0;
    345                         //Get default Pages
    346                         $intCounter = wp_nav_menu_get_pages($intCounter,'default');
    347                     ?>
     285<?php
     286    $items_counter = wp_nav_menu_get_pages( 0,'default' );
     287?>
    348288                </ul>
    349 
    350289                <div class="fix"></div>
    351 
    352290            </div>
    353291        </div><!-- /.widgets-holder-wrap -->
     
    360298            <div class="widget-holder">
    361299
    362                 <?php
    363                 // Custom GET categories query
    364                 // @todo Use API
    365                 $categories = $wpdb->get_results("SELECT term_id FROM $wpdb->term_taxonomy WHERE taxonomy = 'category' ORDER BY term_id ASC");
    366                 $cat_name = '';
    367                 //CHECK for results
    368                 if ( $categories ) {
    369                     foreach ( $categories as $category ) {
    370                         $cat_id = $category->term_id;
    371 
    372                         $cat_args = array(
    373                             'orderby' => 'name',
    374                             'include' => $cat_id,
    375                             'hierarchical' => 1,
    376                             'order' => 'ASC'
    377                         );
    378 
    379                         $category_names=get_categories($cat_args);
    380 
    381                         if ( isset($category_names[0]->name) ) {
    382                             // Add category name to data string
    383                             $cat_name .= htmlentities($category_names[0]->name).'|';
    384                         }
    385                     }
    386                 } else {
    387                     $cat_name = __('No categories available');
    388                 }
    389                 ?>
    390 
    391                 <script>
     300<?php
     301    // Custom GET categories query
     302    // @todo Use API
     303    $categories = $wpdb->get_results("SELECT term_id FROM $wpdb->term_taxonomy WHERE taxonomy = 'category' ORDER BY term_id ASC");
     304    $cat_name = '';
     305    if ( $categories ) {
     306        foreach ( $categories as $category ) {
     307            $cat_id = $category->term_id;
     308            $cat_args = array(
     309                'orderby' => 'name',
     310                'include' => $cat_id,
     311                'hierarchical' => 1,
     312                'order' => 'ASC',
     313            );
     314            $category_names = get_categories( $cat_args );
     315            if ( isset( $category_names[0]->name ) ) {
     316                $cat_name .= htmlentities( $category_names[0]->name ).'|';
     317            }
     318        }
     319    } else {
     320        $cat_name = __('No categories available');
     321    }
     322?>
     323                <script type="text/javascript" charset="<?php bloginfo('charset'); ?>">
    392324                    jQuery(document).ready(function(){
    393 
    394                         //GET PHP categories
    395                         var datacats = "<?php echo esc_js($cat_name); ?>".split("|");
    396 
    397                         //Set autocomplete
    398                         jQuery("#cat-search").autocomplete(datacats);
    399 
    400                         //Handle autocomplete result
     325                        var categories = "<?php echo esc_js($cat_name); ?>".split("|");
     326                        jQuery("#cat-search").autocomplete(categories);
    401327                        jQuery("#cat-search").result(function(event, data, formatted) {
    402328                            jQuery('#existing-categories').css('display','block');
    403329                            jQuery("#existing-categories dt:contains('" + data + "')").css("display", "block");
    404 
    405330                            jQuery('#show-cats').hide();
    406331                            jQuery('#hide-cats').show();
    407 
    408332                        });
    409333                        jQuery('#existing-categories').css('display','none');
    410 
    411334                    });
    412335                </script>
     
    414337                <input type="text" onfocus="jQuery('#cat-search').attr('value','');" id="cat-search" value="<?php esc_attr_e('Search Categories'); ?>" />
    415338
    416                 <a id="show-cats" style="cursor:pointer;" onclick="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();">View All</a>
    417                 <a id="hide-cats" style="cursor:pointer;" onclick="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();">Hide All</a>
     339                <a id="show-cats" style="cursor:pointer;" onclick="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();"><?php _e('View All'); ?></a>
     340                <a id="hide-cats" style="cursor:pointer;" onclick="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();"><?php _e('Hide All'); ?></a>
    418341
    419342                <script type="text/javascript">
     
    422345
    423346                <ul id="existing-categories" class="list">
    424                     <?php
    425                         // Get default Categories
    426                         $intCounter = wp_nav_menu_get_categories($intCounter, 'default');
    427                     ?>
     347<?php
     348    $items_counter = wp_nav_menu_get_categories( $items_counter, 'default' );
     349?>
    428350                </ul>
    429351
    430352                <div class="fix"></div>
    431 
    432353            </div>
    433354        </div><!-- /.widgets-holder-wrap -->
     
    439360            </div>
    440361            <div class="widget-holder">
    441                 <input id="custom_menu_item_url" type="text" value="http://"  />
    442                 <label><?php _e('URL'); ?></label><br />
    443                 <?php $templatedir = get_bloginfo('url'); ?>
    444                 <input type="hidden" id="templatedir" value="<?php echo esc_attr($templatedir); ?>" />
    445                 <input id="custom_menu_item_name" type="text" value="Menu Item" onfocus="jQuery('#custom_menu_item_name').attr('value','');"  />
    446                 <label><?php _e('Menu Text'); ?></label><br />
     362                <input id="custom-menu-item-url" type="text" value="http://"  />
     363                <label for="custom-menu-item-url"><?php _e('URL'); ?></label><br />
     364                <?php $template_dir = get_bloginfo('url'); ?>
     365                <input type="hidden" id="template-dir" value="<?php echo esc_attr($template_dir); ?>" />
     366                <input id="custom-menu-item-name" type="text" value="<?php echo esc_attr( __('Menu Item') ); ?>" onfocus="jQuery('#custom-menu-item-name').attr('value','');"  />
     367                <label for="custom-menu-item-name"><?php _e('Menu Text'); ?></label><br />
    447368                <input id="custom_menu_item_description" type="text" value="<?php esc_attr_e('A description'); ?>" <?php if ($advanced_option_descriptions == 'no') { ?>style="display:none;"<?php } ?> onfocus="jQuery('#custom_menu_item_description').attr('value','');" />
    448369                <label <?php if ($advanced_option_descriptions == 'no') { ?>style="display:none;"<?php } ?> ><?php _e('Description'); ?></label>
    449                 <a class="addtomenu" onclick="appendToList('<?php echo $templatedir; ?>','Custom','','','','0','');jQuery('#custom_menu_item_name').attr('value','Menu Item');jQuery('#custom_menu_item_description').attr('value','A description');"><?php _e('Add to menu'); ?></a>
     370                <a class="addtomenu" onclick="appendToList('<?php echo $template_dir; ?>','<?php echo esc_js( _x('Custom', 'menu nav item type') ); ?>','','','','0','');jQuery('#custom-menu-item-name').attr('value','<?php echo esc_js( __('Menu Item') ); ?>');jQuery('#custom_menu_item_description').attr('value','<?php echo esc_js( __('A description') ); ?>');"><?php _e('Add to menu'); ?></a>
    450371                <div class="fix"></div>
    451372            </div>
     
    456377
    457378<div id="dialog-confirm" style="display:none;" title="<?php esc_attr_e('Edit Menu Item'); ?>">
    458     </label><input id="edittitle" type="text" name="edittitle" value="" /><label class="editlabel" for="edittitle"><?php _e('Menu Title'); ?></label><br />
     379    <input id="edittitle" type="text" name="edittitle" value="" /><label class="editlabel" for="edittitle"><?php _e('Menu Title'); ?></label><br />
    459380    <input id="editlink" type="text" name="editlink" value="" /><label class="editlabel" for="editlink"><?php _e('URL'); ?></label><br />
    460381    <input id="editanchortitle" type="text" name="editanchortitle" value="" /><label class="editlabel" for="editanchortitle"><?php _e('Link Title'); ?></label><br />
  • trunk/wp-includes/default-widgets.php

    r13368 r13375  
    11211121                    <?php
    11221122                }
    1123 
    1124                 ?>
    1125 
    1126                         <?php
    1127                             //DISPLAY custom navigation menu
    1128                             if ( get_option('wp_custom_nav_menu') == 'true' )
    1129                                 wp_nav_menu( array('id' => $navmenu, 'name' => $wp_custom_nav_menu_name, 'desc' => $navwidgetdescription, 'format' => 'widget') );
    1130                         ?>
    1131 
    1132                 <?php
    1133 
    1134                     //DEVELOPER settings enabled
     1123                wp_nav_menu( array('id' => $navmenu, 'name' => $wp_custom_nav_menu_name, 'desc' => $navwidgetdescription, 'format' => 'widget') );
     1124                //DEVELOPER settings enabled
    11351125                    if ( $navdeveloper == 'yes' ) {
    11361126                        //DISPLAY Custom UL
  • trunk/wp-includes/nav-menu-template.php

    r13371 r13375  
    105105                        <a><span class=""></span></a>
    106106                        <?php } else { ?>
    107                         <a class="hide" href="<?php echo $menu_item->link; ?>"><?php echo $menu_item->title; ?></a>
     107                        <a class="hide" href="<?php echo $menu_item->link; ?>"><?php echo esc_html( $menu_item->title ); ?></a>
    108108                        <?php } ?>
    109109                        <input type="hidden" name="dbid<?php echo $menu_item->menu_order; ?>" id="dbid<?php echo $menu_item->menu_order; ?>" value="<?php echo $menu_item->ID; ?>" />
     
    149149
    150150        case 'default':
    151             $templatedir = get_bloginfo('url');
     151            $template_dir = get_bloginfo('url');
    152152?>
    153153                    <dl>
    154                     <dt>
    155                     <span class="title"><?php echo $menu_item->title; ?></span> <a onclick="appendToList('<?php echo esc_js( esc_url_raw( $templatedir ) ); ?>','<?php echo esc_js( $menu_item->append ); ?>','<?php echo esc_js( $menu_item->title ); ?>','<?php echo esc_js( $menu_item->link ); ?>','<?php echo esc_js( $menu_item->ID ); ?>','<?php echo esc_js( $menu_item->parent_item ); ?>','<?php echo esc_js( $menu_item->description ); ?>')" name="<?php echo esc_attr( $menu_item->title ); ?>" value="<?php echo esc_attr( $menu_item->link ); ?>"><img alt="<?php esc_attr_e('Add to Custom Menu'); ?>" title="<?php esc_attr_e('Add to Custom Menu'); ?>" src="<?php echo admin_url('images/ico-add.png'); ?>" /></a> </dt>
     154                        <dt>
     155                            <span class="title"><?php echo $menu_item->title; ?></span>
     156                            <a onclick="appendToList('<?php echo esc_js( esc_url_raw( $template_dir ) ); ?>','<?php echo esc_js( $menu_item->append ); ?>','<?php echo esc_js( $menu_item->title ); ?>','<?php echo esc_js( $menu_item->link ); ?>','<?php echo esc_js( $menu_item->ID ); ?>','<?php echo esc_js( $menu_item->parent_item ); ?>','<?php echo esc_js( $menu_item->description ); ?>')" name="<?php echo esc_attr( $menu_item->title ); ?>" value="<?php echo esc_attr( $menu_item->link ); ?>"><img alt="<?php esc_attr_e('Add to Custom Menu'); ?>" title="<?php esc_attr_e('Add to Custom Menu'); ?>" src="<?php echo admin_url('images/ico-add.png'); ?>" /></a>
     157                        </dt>
    156158                    </dl>
    157159<?php
  • trunk/wp-includes/nav-menu.php

    r13370 r13375  
    2626
    2727    if ( $menu_exists )
    28         return WP_Error('menu_exists', sprintf( __('A menu named "%s" already exists; please try another name.'), $menu_exists->name ));
     28        return new WP_Error('menu_exists', sprintf( __('A menu named &#8220;%s&#8221; already exists; please try another name.'), esc_html( $menu_exists->name ) ) );
    2929
    3030    $menu = wp_insert_term( $menu_name, 'nav_menu' );
     
    9898
    9999            if ( $menu_item->post_title == '' )
    100                 $menu_item->title = htmlentities( get_the_title( $menu_item->object_id ) );
     100                $menu_item->title = get_the_title( $menu_item->object_id );
    101101            else
    102                 $menu_item->title = htmlentities( $menu_item->post_title );
     102                $menu_item->title = $menu_item->post_title;
    103103
    104104            if ( $menu_item->post_content == '' )
    105                 $menu_item->description = htmlentities( get_post_meta( $menu_item->ID, 'page-description', true ) );
     105                $menu_item->description = get_post_meta( $menu_item->ID, 'page-description', true );
    106106            else
    107                 $menu_item->description = htmlentities( $menu_item->post_content );
     107                $menu_item->description = $menu_item->post_content;
    108108            $menu_item->target = '';
    109             $menu_item->append = 'Page';
     109            $menu_item->append = _x('Page', 'menu nav item type');
    110110        break;
    111111        // Category Menu Item
     
    115115            if ( empty($menu_item->post_title) ) {
    116116                $title_raw = get_category( $menu_item->object_id );
    117                 $menu_item->title =  htmlentities($title_raw->cat_name);
     117                $menu_item->title =  $title_raw->cat_name;
    118118            } else {
    119                 $menu_item->title = htmlentities( $menu_item->post_title );
     119                $menu_item->title = $menu_item->post_title;
    120120            }
    121121
    122122            if ( empty($menu_item->post_content) )
    123                 $menu_item->description = htmlentities( strip_tags( category_description( $menu_item->object_id ) ) );
     123                $menu_item->description = strip_tags( category_description( $menu_item->object_id ) );
    124124            else
    125                 $menu_item->description = htmlentities( $menu_item->post_content );
     125                $menu_item->description = $menu_item->post_content;
    126126            $menu_item->target = '';
    127             $menu_item->append = 'Category';
     127            $menu_item->append = _x('Category', 'menu nav item type');
    128128        break;
    129129        default:
    130130            // Custom Menu Item
    131131            $menu_item->link = $menu_item->guid;
    132             $menu_item->title =  htmlentities( $menu_item->post_title );
    133             $menu_item->description = htmlentities( $menu_item->post_content );
     132            $menu_item->title =  $menu_item->post_title;
     133            $menu_item->description = $menu_item->post_content;
    134134            $menu_item->target = 'target="_blank"';
    135             $menu_item->append = 'Custom';
     135            $menu_item->append = _x('Custom', 'menu nav item type');
    136136        break;
    137137    }
     
    147147            //SET anchor title
    148148            if (isset($wp_custom_nav_menu_items->custom_anchor_title)) {
    149                 $anchor_title = htmlentities($wp_custom_nav_menu_items->custom_anchor_title);
     149                $anchor_title = $wp_custom_nav_menu_items->custom_anchor_title;
    150150            }
    151151            else {
  • trunk/wp-includes/script-loader.php

    r13372 r13375  
    399399        // Custom Navigation
    400400        $scripts->add( 'custom-navigation-default-items', "/wp-admin/js/custom-navigation-default-items$suffix.js", false, '20100223' );
    401         $scripts->add( 'custom-navigation-dynamic-functions', "/wp-admin/js/custom-navigation-dynamic-functions$suffix.js", false, '20100220' );
     401        $scripts->add( 'custom-navigation-dynamic-functions', "/wp-admin/js/custom-navigation-dynamic-functions$suffix.js", false, '20100224' );
     402        $scripts->localize( 'custom-navigation-dynamic-functions', 'navMenuL10n', array(
     403            'custom' => _x('Custom', 'menu nav item type'),
     404            'page' => _x('Page', 'menu nav item type'),
     405            'category' => _x('Category', 'menu nav item type')
     406        ) );
     407       
    402408        $scripts->add( 'custom-navigation-php-functions', "/wp-admin/js/custom-navigation-php-functions$suffix.js", false, '20100220' );
    403409    }
     
    469475    $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
    470476    $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
    471     $styles->add( 'custom-navigation', "/wp-admin/css/custom-navigation$suffix.css", array(), '20100223' );
     477    $styles->add( 'custom-navigation', "/wp-admin/css/custom-navigation$suffix.css", array(), '20100224' );
    472478
    473479    foreach ( $rtl_styles as $rtl_style ) {
Note: See TracChangeset for help on using the changeset viewer.