/home/techb158/public_html/wp-admin/js
NameSizeModeActions
widgets/-0777rm
accordion.js29330666editdlrm
accordion.min.js7580666editdlrm
application-passwords.js63940666editdlrm
application-passwords.min.js30240666editdlrm
auth-app.js57960666editdlrm
auth-app.min.js20840666editdlrm
code-editor.js179630666editdlrm
code-editor.min.js35430666editdlrm
color-picker.js97680666editdlrm
color-picker.min.js34860666editdlrm
comment.js52050666editdlrm
comment.min.js20810666editdlrm
common.js704210666editdlrm
common.min.js262100666editdlrm
custom-background.js34350666editdlrm
custom-background.min.js12060666editdlrm
custom-header.js20230666editdlrm
customize-controls.js2959050666editdlrm
customize-controls.min.js1125380666editdlrm
customize-nav-menus.js1141340666editdlrm
customize-nav-menus.min.js482720666editdlrm
customize-widgets.js717270666editdlrm
customize-widgets.min.js280650666editdlrm
dashboard.js275620666editdlrm
dashboard.min.js87110666editdlrm
edit-comments.js381390666editdlrm
edit-comments.min.js155150666editdlrm
editor-expand.js426060666editdlrm
editor-expand.min.js134510666editdlrm
editor.js450550666editdlrm
editor.min.js130850666editdlrm
farbtastic.js78490666editdlrm
gallery.js55430666editdlrm
gallery.min.js37410666editdlrm
image-edit.js409360666editdlrm
image-edit.min.js155150666editdlrm
inline-edit-post.js206760666editdlrm
inline-edit-post.min.js95860666editdlrm
inline-edit-tax.js77970666editdlrm
inline-edit-tax.min.js29970666editdlrm
iris.min.js236430666editdlrm
language-chooser.js8900666editdlrm
language-chooser.min.js4230666editdlrm
link.js48730666editdlrm
link.min.js23190666editdlrm
media-gallery.js13030666editdlrm
media-gallery.min.js6110666editdlrm
media-upload.js34650666editdlrm
media-upload.min.js11520666editdlrm
media.js67650666editdlrm
media.min.js24390666editdlrm
nav-menu.js626170666editdlrm
nav-menu.min.js307850666editdlrm
password-strength-meter.js42360666editdlrm
password-strength-meter.min.js11230666editdlrm
password-toggle.js13390666editdlrm
password-toggle.min.js8470666editdlrm
plugin-install.js70860666editdlrm
plugin-install.min.js24030666editdlrm
post.js404940666editdlrm
post.min.js194150666editdlrm
postbox.js189370666editdlrm
postbox.min.js67610666editdlrm
privacy-tools.js111460666editdlrm
privacy-tools.min.js51890666editdlrm
revisions.js347290666editdlrm
revisions.min.js184010666editdlrm
set-post-thumbnail.js8760666editdlrm
set-post-thumbnail.min.js6200666editdlrm
site-health.js138800666editdlrm
site-health.min.js64740666editdlrm
site-icon.js68530666editdlrm
site-icon.min.js25320666editdlrm
svg-painter.js32800666editdlrm
svg-painter.min.js15670666editdlrm
tags-box.js111400666editdlrm
tags-box.min.js30770666editdlrm
tags-suggest.js57710666editdlrm
tags-suggest.min.js22690666editdlrm
tags.js78390666editdlrm
tags.min.js31110666editdlrm
theme-plugin-editor.js261760666editdlrm
theme-plugin-editor.min.js121040666editdlrm
theme.js573500666editdlrm
theme.min.js275300666editdlrm
updates.js1119990666editdlrm
updates.min.js484430666editdlrm
user-profile.js181610666editdlrm
user-profile.min.js79140666editdlrm
user-suggest.js23010666editdlrm
user-suggest.min.js6760666editdlrm
widgets.js230980666editdlrm
widgets.min.js126090666editdlrm
word-count.js76960666editdlrm
word-count.min.js15300666editdlrm
xfn.js7400666editdlrm
xfn.min.js4580666editdlrm
Edit: /home/techb158/public_html/wp-admin/js/nav-menu.js (62617B)
/** * WordPress Administration Navigation Menu * Interface JS functions * * @version 2.0.0 * * @package WordPress * @subpackage Administration * @output wp-admin/js/nav-menu.js */ /* global menus, postboxes, columns, isRtl, ajaxurl, wpNavMenu */ (function($) { var api; /** * 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. globalMaxDepth: 11, sortableItems: '> *', targetTolerance: 0 }, menuList : undefined, // Set in init. targetList : undefined, // Set in init. menusChanged : false, isRTL: !! ( 'undefined' != typeof isRtl && isRtl ), negateIfRTL: ( 'undefined' != typeof isRtl && isRtl ) ? -1 : 1, lastSearch: '', // Functions that run on init. init : function() { api.menuList = $('#menu-to-edit'); api.targetList = api.menuList; this.jQueryExtensions(); this.attachMenuEditListeners(); this.attachBulkSelectButtonListeners(); this.attachMenuCheckBoxListeners(); this.attachMenuItemDeleteButton(); this.attachPendingMenuItemsListForDeletion(); this.attachQuickSearchListeners(); this.attachThemeLocationsListeners(); this.attachMenuSaveSubmitListeners(); this.attachTabsPanelListeners(); this.attachUnsavedChangesListener(); if ( api.menuList.length ) this.initSortables(); if ( menus.oneThemeLocationNoMenus ) $( '#posttype-page' ).addSelectedToMenu( api.addMenuItemToBottom ); this.initManageLocations(); this.initAccessibility(); this.initToggles(); this.initPreviewing(); }, jQueryExtensions : function() { // jQuery extensions. $.fn.extend({ menuItemDepth : function() { var margin = api.isRTL ? this.eq(0).css('margin-right') : this.eq(0).css('margin-left'); return api.pxToDepth( margin && -1 != margin.indexOf('px') ? margin.slice(0, -2) : 0 ); }, updateDepthClass : function(current, prev) { return this.each(function(){ var t = $(this); prev = prev || t.menuItemDepth(); $(this).removeClass('menu-item-depth-'+ prev ) .addClass('menu-item-depth-'+ current ); }); }, shiftDepthClass : function(change) { return this.each(function(){ var t = $(this), depth = t.menuItemDepth(), newDepth = depth + change; t.removeClass( 'menu-item-depth-'+ depth ) .addClass( 'menu-item-depth-'+ ( newDepth ) ); if ( 0 === newDepth ) { t.find( '.is-submenu' ).hide(); } }); }, childMenuItems : function() { var result = $(); this.each(function(){ var t = $(this), depth = t.menuItemDepth(), next = t.next( '.menu-item' ); while( next.length && next.menuItemDepth() > depth ) { result = result.add( next ); next = next.next( '.menu-item' ); } }); return result; }, shiftHorizontally : function( dir ) { return this.each(function(){ var t = $(this), depth = t.menuItemDepth(), newDepth = depth + dir; // Change .menu-item-depth-n class. t.moveHorizontally( newDepth, depth ); }); }, moveHorizontally : function( newDepth, depth ) { return this.each(function(){ var t = $(this), children = t.childMenuItems(), diff = newDepth - depth, subItemText = t.find('.is-submenu'); // Change .menu-item-depth-n class. t.updateDepthClass( newDepth, depth ).updateParentMenuItemDBId(); // If it has children, move those too. if ( children ) { children.each(function() { var t = $(this), thisDepth = t.menuItemDepth(), newDepth = thisDepth + diff; t.updateDepthClass(newDepth, thisDepth).updateParentMenuItemDBId(); }); } // Show "Sub item" helper text. if (0 === newDepth) subItemText.hide(); else subItemText.show(); }); }, updateParentMenuItemDBId : function() { return this.each(function(){ var item = $(this), input = item.find( '.menu-item-data-parent-id' ), depth = parseInt( item.menuItemDepth(), 10 ), parentDepth = depth - 1, parent = item.prevAll( '.menu-item-depth-' + parentDepth ).first(); if ( 0 === depth ) { // Item is on the top level, has no parent. input.val(0); } else { // Find the parent item, and retrieve its object id. input.val( parent.find( '.menu-item-data-db-id' ).val() ); } }); }, hideAdvancedMenuItemFields : function() { return this.each(function(){ var that = $(this); $('.hide-column-tog').not(':checked').each(function(){ that.find('.field-' + $(this).val() ).addClass('hidden-field'); }); }); }, /** * Adds selected menu items to the menu. * * @ignore * * @param jQuery metabox The metabox jQuery object. */ addSelectedToMenu : function(processMethod) { if ( 0 === $('#menu-to-edit').length ) { return false; } return this.each(function() { var t = $(this), menuItems = {}, checkboxes = ( menus.oneThemeLocationNoMenus && 0 === t.find( '.tabs-panel-active .categorychecklist li input:checked' ).length ) ? t.find( '#page-all li input[type="checkbox"]' ) : t.find( '.tabs-panel-active .categorychecklist li input:checked' ), re = /menu-item\[([^\]]*)/; processMethod = processMethod || api.addMenuItemToBottom; // If no items are checked, bail. if ( !checkboxes.length ) return false; // Show the Ajax spinner. t.find( '.button-controls .spinner' ).addClass( 'is-active' ); // Retrieve menu item data. $(checkboxes).each(function(){ var t = $(this), listItemDBIDMatch = re.exec( t.attr('name') ), listItemDBID = 'undefined' == typeof listItemDBIDMatch[1] ? 0 : parseInt(listItemDBIDMatch[1], 10); if ( this.className && -1 != this.className.indexOf('add-to-top') ) processMethod = api.addMenuItemToTop; menuItems[listItemDBID] = t.closest('li').getItemData( 'add-menu-item', listItemDBID ); }); // Add the items. api.addItemToMenu(menuItems, processMethod, function(){ // Deselect the items and hide the Ajax spinner. checkboxes.prop( 'checked', false ); t.find( '.button-controls .select-all' ).prop( 'checked', false ); t.find( '.button-controls .spinner' ).removeClass( 'is-active' ); t.updateParentDropdown(); t.updateOrderDropdown(); }); }); }, getItemData : function( itemType, id ) { itemType = itemType || 'menu-item'; var itemData = {}, i, fields = [ 'menu-item-db-id', 'menu-item-object-id', 'menu-item-object', 'menu-item-parent-id', 'menu-item-position', 'menu-item-type', 'menu-item-title', 'menu-item-url', 'menu-item-description', 'menu-item-attr-title', 'menu-item-target', 'menu-item-classes', 'menu-item-xfn' ]; if( !id && itemType == 'menu-item' ) { id = this.find('.menu-item-data-db-id').val(); } if( !id ) return itemData; this.find('input').each(function() { var field; i = fields.length; while ( i-- ) { if( itemType == 'menu-item' ) field = fields[i] + '[' + id + ']'; else if( itemType == 'add-menu-item' ) field = 'menu-item[' + id + '][' + fields[i] + ']'; if ( this.name && field == this.name ) { itemData[fields[i]] = this.value; } } }); return itemData; }, setItemData : function( itemData, itemType, id ) { // Can take a type, such as 'menu-item', or an id. itemType = itemType || 'menu-item'; if( !id && itemType == 'menu-item' ) { id = $('.menu-item-data-db-id', this).val(); } if( !id ) return this; this.find('input').each(function() { var t = $(this), field; $.each( itemData, function( attr, val ) { if( itemType == 'menu-item' ) field = attr + '[' + id + ']'; else if( itemType == 'add-menu-item' ) field = 'menu-item[' + id + '][' + attr + ']'; if ( field == t.attr('name') ) { t.val( val ); } }); }); return this; }, updateParentDropdown : function() { return this.each(function(){ var menuItems = $( '#menu-to-edit li' ), parentDropdowns = $( '.edit-menu-item-parent' ); $.each( parentDropdowns, function() { var parentDropdown = $( this ), currentItemID = parseInt( parentDropdown.closest( 'li.menu-item' ).find( '.menu-item-data-db-id' ).val() ), currentParentID = parseInt( parentDropdown.closest( 'li.menu-item' ).find( '.menu-item-data-parent-id' ).val() ), currentItem = parentDropdown.closest( 'li.menu-item' ), currentMenuItemChild = currentItem.childMenuItems(), excludeMenuItem = /** @type {number[]} */ [ currentItemID ]; parentDropdown.empty(); if ( currentMenuItemChild.length > 0 ) { $.each( currentMenuItemChild, function(){ var childItem = $(this), childID = parseInt( childItem.find( '.menu-item-data-db-id' ).val() ); excludeMenuItem.push( childID ); }); } parentDropdown.append( $( '