Make WordPress Core

Ticket #32800: 32800.2.diff

File 32800.2.diff, 877 bytes (added by adamsilverstein, 8 years ago)

first step for adding menus on the fly to custom menu widgets

  • wp-admin/js/customize-nav-menus.js

     
    16761676                                                select.append( new Option( control.setting().name, menuId ) );
    16771677                                        }
    16781678                                } );
    1679                                 $( '#available-widgets-list .widget-inside:has(input.id_base[value=nav_menu]) select:first' ).append( new Option( control.setting().name, menuId ) );
    16801679                        }
    16811680                },
    16821681
     
    22312230                        // Clear name field.
    22322231                        nameInput.val( '' );
    22332232
     2233                        /**
     2234                         * Add the new menu to any custom menu widgets
     2235                         */
     2236                        $( '#available-widgets-list .widget-inside:has(input.id_base[value=nav_menu]) select:first' ).append( new Option( name, placeholderId ) );
     2237
     2238
    22342239                        wp.a11y.speak( api.Menus.data.l10n.menuAdded );
    22352240
    22362241                        // Focus on the new menu section.