at path:
ROOT
/
wp-admin
/
js
/
tags.js
run:
R
W
Run
widgets
DIR
2026-09-09 19:07:27
R
W
Run
accordion.js
2.86 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
accordion.min.js
758 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
application-passwords.js
6.24 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
application-passwords.min.js
2.95 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
auth-app.js
5.66 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
auth-app.min.js
2.04 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
code-editor.js
17.54 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
code-editor.min.js
3.46 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
color-picker.js
9.54 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
color-picker.min.js
3.4 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
comment.js
5.08 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
comment.min.js
2.03 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
common.js
68.77 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
common.min.js
25.6 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
custom-background.js
3.35 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
custom-background.min.js
1.18 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
custom-header.js
1.98 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
customize-controls.js
288.97 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
customize-controls.min.js
109.9 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
customize-nav-menus.js
111.46 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
customize-nav-menus.min.js
47.14 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
customize-widgets.js
70.05 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
customize-widgets.min.js
27.41 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
dashboard.js
26.92 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
dashboard.min.js
8.51 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
edit-comments.js
37.25 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
edit-comments.min.js
15.15 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
editor-expand.js
41.61 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
editor-expand.min.js
13.14 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
editor.js
44 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
editor.min.js
12.78 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
farbtastic.js
7.67 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
gallery.js
5.41 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
gallery.min.js
3.65 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
image-edit.js
39.98 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
image-edit.min.js
15.15 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
inline-edit-post.js
20.19 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
inline-edit-post.min.js
9.36 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
inline-edit-tax.js
7.61 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
inline-edit-tax.min.js
2.93 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
iris.min.js
23.09 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
language-chooser.js
890 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
language-chooser.min.js
423 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
link.js
4.76 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
link.min.js
2.26 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
media-gallery.js
1.27 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
media-gallery.min.js
611 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
media-upload.js
3.38 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
media-upload.min.js
1.13 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
media.js
6.61 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
media.min.js
2.38 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
nav-menu.js
61.15 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
nav-menu.min.js
30.06 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
password-strength-meter.js
4.14 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
password-strength-meter.min.js
1.1 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
password-toggle.js
1.31 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
password-toggle.min.js
847 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
plugin-install.js
6.92 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
plugin-install.min.js
2.35 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
post.js
39.54 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
post.min.js
18.96 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
postbox.js
18.49 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
postbox.min.js
6.6 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
privacy-tools.js
10.88 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
privacy-tools.min.js
5.07 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
revisions.js
33.92 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
revisions.min.js
17.97 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
set-post-thumbnail.js
876 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
set-post-thumbnail.min.js
620 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
site-health.js
13.55 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
site-health.min.js
6.32 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
site-icon.js
6.69 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
site-icon.min.js
2.47 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
svg-painter.js
3.2 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
svg-painter.min.js
1.53 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
tags-box.js
10.88 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
tags-box.min.js
3 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
tags-suggest.js
5.64 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
tags-suggest.min.js
2.22 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
tags.js
7.66 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
tags.min.js
3.04 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
theme-plugin-editor.js
25.56 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
theme-plugin-editor.min.js
11.82 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
theme.js
56.01 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
theme.min.js
26.88 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
updates.js
109.37 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
updates.min.js
47.31 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
user-profile.js
17.74 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
user-profile.min.js
7.73 KB
2026-09-09 19:24:59
R
W
Run
Delete
Rename
user-suggest.js
2.25 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
user-suggest.min.js
676 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
widgets.js
22.56 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
widgets.min.js
12.31 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
word-count.js
7.52 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
word-count.min.js
1.49 KB
2026-09-09 19:07:27
R
W
Run
Delete
Rename
xfn.js
740 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
xfn.min.js
458 By
2026-09-09 19:07:27
R
W
Run
Delete
Rename
error_log
up
📄
tags.js
Save
/** * Contains logic for deleting and adding tags. * * For deleting tags it makes a request to the server to delete the tag. * For adding tags it makes a request to the server to add the tag. * * @output wp-admin/js/tags.js */ /* global ajaxurl, wpAjax, showNotice, validateForm */ jQuery( function($) { var addingTerm = false; /** * Adds an event handler to the delete term link on the term overview page. * * Cancels default event handling and event bubbling. * * @since 2.8.0 * * @return {boolean} Always returns false to cancel the default event handling. */ $( '#the-list' ).on( 'click', '.delete-tag', function() { var t = $(this), tr = t.parents('tr'), r = true, data; if ( 'undefined' != showNotice ) r = showNotice.warn(); if ( r ) { data = t.attr('href').replace(/[^?]*\?/, '').replace(/action=delete/, 'action=delete-tag'); tr.children().css('backgroundColor', '#faafaa'); // Disable pointer events and all form controls/links in the row tr.css('pointer-events', 'none'); tr.find(':input, a').prop('disabled', true).attr('tabindex', -1); /** * Makes a request to the server to delete the term that corresponds to the * delete term button. * * @param {string} r The response from the server. * * @return {void} */ $.post(ajaxurl, data, function(r){ var message; if ( '1' == r ) { $('#ajax-response').empty(); let nextFocus = tr.next( 'tr' ).find( 'a.row-title' ); let prevFocus = tr.prev( 'tr' ).find( 'a.row-title' ); // If there is neither a next row or a previous row, focus the tag input field. if ( nextFocus.length < 1 && prevFocus.length < 1 ) { nextFocus = $( '#tag-name' ).trigger( 'focus' ); } else { if ( nextFocus.length < 1 ) { nextFocus = prevFocus; } } tr.fadeOut('normal', function() { tr.remove(); updateTableNavCount(); }); /** * Removes the term from the parent box and the tag cloud. * * `data.match(/tag_ID=(\d+)/)[1]` matches the term ID from the data variable. * This term ID is then used to select the relevant HTML elements: * The parent box and the tag cloud. */ $('select#parent option[value="' + data.match(/tag_ID=(\d+)/)[1] + '"]').remove(); $('a.tag-link-' + data.match(/tag_ID=(\d+)/)[1]).remove(); nextFocus.trigger( 'focus' ); message = wp.i18n.__( 'The selected tag has been deleted.' ); } else if ( '-1' == r ) { message = wp.i18n.__( 'Sorry, you are not allowed to do that.' ); $('#ajax-response').empty().append('<div class="notice notice-error"><p>' + message + '</p></div>'); resetRowAfterFailure( tr ); } else { message = wp.i18n.__( 'An error occurred while processing your request. Please try again later.' ); $('#ajax-response').empty().append('<div class="notice notice-error"><p>' + message + '</p></div>'); resetRowAfterFailure( tr ); } wp.a11y.speak( message, 'assertive' ); }); } return false; }); /** * Restores the original UI state of a table row after an AJAX failure. * * @param {jQuery} tr The table row to reset. * @return {void} */ function resetRowAfterFailure( tr ) { tr.children().css( 'backgroundColor', '' ); tr.css( 'pointer-events', '' ); tr.find( ':input, a' ).prop( 'disabled', false ).removeAttr( 'tabindex' ); } /** * Updates the item count and table navigation after a tag is added or removed. * * Tags are added and removed client-side, but the item count, the `.tablenav` * regions, the search box, and the empty-state row are otherwise only * reconciled by PHP on a full page reload. This keeps them in sync. * * @param {string} [action] Pass 'add' when a tag was added. Any other value, * including none, is treated as a removal. * * @return {void} */ function updateTableNavCount( action ) { var $displayingNum = $( '.tablenav-pages .displaying-num' ), currentCount = parseInt( $displayingNum.first().text().replace( /[^0-9]/g, '' ), 10 ) || 0, itemCount = ( 'add' === action ) ? currentCount + 1 : Math.max( currentCount - 1, 0 ), formattedCount = itemCount.toLocaleString(); $displayingNum.text( wp.i18n.sprintf( /* translators: %s: Number of items. */ wp.i18n._n( '%s item', '%s items', itemCount ), formattedCount ) ); if ( itemCount < 1 ) { // No tags remain: show the empty-state row and hide the navigation. var $list = $( '#the-list' ); if ( ! $list.find( 'tr.no-items' ).length ) { var colspan = $list.closest( 'table' ).find( 'thead > tr' ).first().children( ':not(.hidden)' ).length; $list.append( '<tr class="no-items"><td class="colspanchange" colspan="' + colspan + '">' + wp.i18n.__( 'No tags found.' ) + '</td></tr>' ); } $( '.tablenav > *' ).hide(); $( 'p.search-box' ).hide(); } else { $( '#the-list' ).find( 'tr.no-items' ).remove(); $( '.tablenav > *' ).show(); $( 'p.search-box' ).show(); } } /** * Adds a deletion confirmation when removing a tag. * * @since 4.8.0 * * @return {void} */ $( '#edittag' ).on( 'click', '.delete', function( e ) { if ( 'undefined' === typeof showNotice ) { return true; } // Confirms the deletion, a negative response means the deletion must not be executed. var response = showNotice.warn(); if ( ! response ) { e.preventDefault(); } }); /** * Adds an event handler to the form submit on the term overview page. * * Cancels default event handling and event bubbling. * * @since 2.8.0 * * @return {boolean} Always returns false to cancel the default event handling. */ $('#submit').on( 'click', function(){ var form = $(this).parents('form'); if ( addingTerm ) { // If we're adding a term, noop the button to avoid duplicate requests. return false; } addingTerm = true; form.find( '.submit .spinner' ).addClass( 'is-active' ); /** * Does a request to the server to add a new term to the database * * @param {string} r The response from the server. * * @return {void} */ $.post(ajaxurl, $('#addtag').serialize(), function(r){ var res, parent, term, indent, i; addingTerm = false; form.find( '.submit .spinner' ).removeClass( 'is-active' ); $('#ajax-response').empty(); res = wpAjax.parseAjaxResponse( r, 'ajax-response' ); if ( res.errors && res.responses[0].errors[0].code === 'empty_term_name' ) { validateForm( form ); } if ( ! res || res.errors ) { return; } parent = form.find( 'select#parent' ).val(); // If the parent exists on this page, insert it below. Else insert it at the top of the list. if ( parent > 0 && $('#tag-' + parent ).length > 0 ) { // As the parent exists, insert the version with - - - prefixed. $( '.tags #tag-' + parent ).after( res.responses[0].supplemental.noparents ); } else { // As the parent is not visible, insert the version with Parent - Child - ThisTerm. $( '.tags' ).prepend( res.responses[0].supplemental.parents ); } $('.tags .no-items').remove(); if ( form.find('select#parent') ) { // Parents field exists, Add new term to the list. term = res.responses[1].supplemental; // Create an indent for the Parent field. indent = ''; for ( i = 0; i < res.responses[1].position; i++ ) indent += ' '; form.find( 'select#parent option:selected' ).after( '<option value="' + term.term_id + '">' + indent + term.name + '</option>' ); } $('input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):visible, textarea:visible', form).val(''); updateTableNavCount( 'add' ); }); return false; }); });