Changeset 45870 for branches/5.2
- Timestamp:
- 08/21/2019 12:28:51 AM (5 years ago)
- Location:
- branches/5.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
-
branches/5.2/src/js/_enqueues/lib/nav-menu.js
r44680 r45870 945 945 946 946 addCustomLink : function( processMethod ) { 947 var url = $('#custom-menu-item-url').val() ,947 var url = $('#custom-menu-item-url').val().trim(), 948 948 label = $('#custom-menu-item-name').val(); 949 949 -
branches/5.2/src/js/_enqueues/wp/customize/nav-menus.js
r44539 r45870 545 545 itemName = $( '#custom-menu-item-name' ), 546 546 itemUrl = $( '#custom-menu-item-url' ), 547 url = itemUrl.val().trim(), 547 548 urlRegex; 548 549 … … 568 569 itemName.addClass( 'invalid' ); 569 570 return; 570 } else if ( ! urlRegex.test( itemUrl.val()) ) {571 } else if ( ! urlRegex.test( url ) ) { 571 572 itemUrl.addClass( 'invalid' ); 572 573 return; … … 575 576 menuItem = { 576 577 'title': itemName.val(), 577 'url': itemUrl.val(),578 'url': url, 578 579 'type': 'custom', 579 580 'type_label': api.Menus.data.l10n.custom_label,
Note: See TracChangeset
for help on using the changeset viewer.