Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
@ -6,17 +6,21 @@
|
|||
*
|
||||
* @package WordPress
|
||||
* @subpackage Administration
|
||||
* @output wp-admin/js/nav-menu.js
|
||||
*/
|
||||
|
||||
/* global menus, postboxes, columns, isRtl, navMenuL10n, ajaxurl */
|
||||
|
||||
var wpNavMenu;
|
||||
/* global menus, postboxes, columns, isRtl, navMenuL10n, ajaxurl, wpNavMenu */
|
||||
|
||||
(function($) {
|
||||
|
||||
var api;
|
||||
|
||||
api = wpNavMenu = {
|
||||
/**
|
||||
* Contains all the functions to handle WordPress navigation menus administration.
|
||||
*
|
||||
* @namespace wpNavMenu
|
||||
*/
|
||||
api = window.wpNavMenu = {
|
||||
|
||||
options : {
|
||||
menuItemDepthPerLevel : 30, // Do not use directly. Use depthToPx and pxToDepth instead.
|
||||
|
@ -167,6 +171,8 @@ var wpNavMenu;
|
|||
/**
|
||||
* Adds selected menu items to the menu.
|
||||
*
|
||||
* @ignore
|
||||
*
|
||||
* @param jQuery metabox The metabox jQuery object.
|
||||
*/
|
||||
addSelectedToMenu : function(processMethod) {
|
||||
|
@ -829,6 +835,20 @@ var wpNavMenu;
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
$( '#menu-name' ).on( 'input', _.debounce( function () {
|
||||
var menuName = $( document.getElementById( 'menu-name' ) ),
|
||||
menuNameVal = menuName.val();
|
||||
|
||||
if ( ! menuNameVal || ! menuNameVal.replace( /\s+/, '' ) ) {
|
||||
// Add warning for invalid menu name.
|
||||
menuName.parent().addClass( 'form-invalid' );
|
||||
} else {
|
||||
// Remove warning for valid menu name.
|
||||
menuName.parent().removeClass( 'form-invalid' );
|
||||
}
|
||||
}, 500 ) );
|
||||
|
||||
$('#add-custom-links input[type="text"]').keypress(function(e){
|
||||
$('#customlinkdiv').removeClass('form-invalid');
|
||||
|
||||
|
@ -867,26 +887,14 @@ var wpNavMenu;
|
|||
},
|
||||
|
||||
attachQuickSearchListeners : function() {
|
||||
var searchTimer,
|
||||
inputEvent;
|
||||
var searchTimer;
|
||||
|
||||
// Prevent form submission.
|
||||
$( '#nav-menu-meta' ).on( 'submit', function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
/*
|
||||
* Use feature detection to determine whether inputs should use
|
||||
* the `keyup` or `input` event. Input is preferred but lacks support
|
||||
* in legacy browsers. See changeset 34078, see also ticket #26600#comment:59
|
||||
*/
|
||||
if ( 'oninput' in document.createElement( 'input' ) ) {
|
||||
inputEvent = 'input';
|
||||
} else {
|
||||
inputEvent = 'keyup';
|
||||
}
|
||||
|
||||
$( '#nav-menu-meta' ).on( inputEvent, '.quick-search', function() {
|
||||
$( '#nav-menu-meta' ).on( 'input', '.quick-search', function() {
|
||||
var $this = $( this );
|
||||
|
||||
$this.attr( 'autocomplete', 'off' );
|
||||
|
@ -1172,8 +1180,8 @@ var wpNavMenu;
|
|||
menuName = $('#menu-name'),
|
||||
menuNameVal = menuName.val();
|
||||
// Cancel and warn if invalid menu name
|
||||
if( !menuNameVal || menuNameVal == menuName.attr('title') || !menuNameVal.replace(/\s+/, '') ) {
|
||||
menuName.parent().addClass('form-invalid');
|
||||
if ( ! menuNameVal || ! menuNameVal.replace( /\s+/, '' ) ) {
|
||||
menuName.parent().addClass( 'form-invalid' );
|
||||
return false;
|
||||
}
|
||||
// Copy menu theme locations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue