Changeset 37901
- Timestamp:
- 06/28/2016 11:06:22 PM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/customize-nav-menus.css
r37740 r37901 15 15 #customize-controls .control-section .accordion-section-title:hover .menu-in-location { 16 16 color: #555; 17 } 18 19 .customize-control-nav_menu_location .edit-menu { 20 margin-top: 1px; 17 21 } 18 22 -
trunk/src/wp-admin/js/customize-nav-menus.js
r37679 r37901 927 927 }; 928 928 929 // Edit menu button. 930 control.container.find( '.edit-menu' ).on( 'click', function() { 931 var menuId = control.setting(); 932 api.section( 'nav_menu[' + menuId + ']' ).focus(); 933 }); 934 control.setting.bind( 'change', function() { 935 if ( 0 === control.setting() ) { 936 control.container.find( '.edit-menu' ).addClass( 'hidden' ); 937 } else { 938 control.container.find( '.edit-menu' ).removeClass( 'hidden' ); 939 } 940 }); 941 929 942 // Add/remove menus from the available options when they are added and removed. 930 943 api.bind( 'add', function( setting ) { -
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-location-control.php
r35389 r37901 78 78 </select> 79 79 </label> 80 <button type="button" class="button edit-menu<?php if ( ! $this->value() ) { echo ' hidden'; } ?>"><?php _e( 'Edit' ); ?></button> 80 81 <?php 81 82 }
Note: See TracChangeset
for help on using the changeset viewer.