X7ROOT File Manager
Current Path:
/home/notabjze/digitalcontentmentors.com/wp-admin/js
home
/
notabjze
/
digitalcontentmentors.com
/
wp-admin
/
js
/
ðŸ“
..
📄
accordion.js
(2.86 KB)
📄
accordion.min.js
(758 B)
📄
application-passwords.js
(6.24 KB)
📄
application-passwords.min.js
(2.95 KB)
📄
auth-app.js
(5.66 KB)
📄
auth-app.min.js
(2.04 KB)
📄
code-editor.js
(11.32 KB)
📄
code-editor.min.js
(3.01 KB)
📄
color-picker.js
(9.54 KB)
📄
color-picker.min.js
(3.4 KB)
📄
comment.js
(2.85 KB)
📄
comment.min.js
(1.28 KB)
📄
common.js
(61.15 KB)
📄
common.min.js
(23.12 KB)
📄
custom-background.js
(3.35 KB)
📄
custom-background.min.js
(1.18 KB)
📄
custom-header.js
(1.98 KB)
📄
customize-controls.js
(287.36 KB)
📄
customize-controls.min.js
(109.14 KB)
📄
customize-nav-menus.js
(110.92 KB)
📄
customize-nav-menus.min.js
(46.89 KB)
📄
customize-widgets.js
(70.05 KB)
📄
customize-widgets.min.js
(27.41 KB)
📄
dashboard.js
(27.02 KB)
📄
dashboard.min.js
(8.65 KB)
📄
edit-comments.js
(37.12 KB)
📄
edit-comments.min.js
(15.13 KB)
📄
editor-expand.js
(41.61 KB)
📄
editor-expand.min.js
(13.14 KB)
📄
editor.js
(43.98 KB)
📄
editor.min.js
(12.76 KB)
📄
farbtastic.js
(7.67 KB)
📄
gallery.js
(5.41 KB)
📄
gallery.min.js
(3.65 KB)
📄
image-edit.js
(39.98 KB)
📄
image-edit.min.js
(15.15 KB)
📄
inline-edit-post.js
(20.17 KB)
📄
inline-edit-post.min.js
(9.41 KB)
📄
inline-edit-tax.js
(7.61 KB)
📄
inline-edit-tax.min.js
(2.93 KB)
📄
iris.min.js
(23.09 KB)
📄
language-chooser.js
(890 B)
📄
language-chooser.min.js
(423 B)
📄
link.js
(3.89 KB)
📄
link.min.js
(1.7 KB)
📄
media-gallery.js
(1.27 KB)
📄
media-gallery.min.js
(611 B)
📄
media-upload.js
(3.38 KB)
📄
media-upload.min.js
(1.13 KB)
📄
media.js
(6.61 KB)
📄
media.min.js
(2.38 KB)
📄
nav-menu.js
(60.44 KB)
📄
nav-menu.min.js
(29.77 KB)
📄
password-strength-meter.js
(4.14 KB)
📄
password-strength-meter.min.js
(1.1 KB)
📄
password-toggle.js
(1.31 KB)
📄
password-toggle.min.js
(847 B)
📄
plugin-install.js
(6.92 KB)
📄
plugin-install.min.js
(2.35 KB)
📄
post.js
(38.68 KB)
📄
post.min.js
(18.4 KB)
📄
postbox.js
(18.49 KB)
📄
postbox.min.js
(6.6 KB)
📄
privacy-tools.js
(10.67 KB)
📄
privacy-tools.min.js
(5.03 KB)
📄
revisions.js
(33.92 KB)
📄
revisions.min.js
(17.97 KB)
📄
set-post-thumbnail.js
(876 B)
📄
set-post-thumbnail.min.js
(620 B)
📄
site-health.js
(13.15 KB)
📄
site-health.min.js
(6.13 KB)
📄
site-icon.js
(6.1 KB)
📄
site-icon.min.js
(2.2 KB)
📄
svg-painter.js
(3.2 KB)
📄
svg-painter.min.js
(1.53 KB)
📄
tags-box.js
(10.88 KB)
📄
tags-box.min.js
(3 KB)
📄
tags-suggest.js
(5.64 KB)
📄
tags-suggest.min.js
(2.22 KB)
📄
tags.js
(4.85 KB)
📄
tags.min.js
(2.04 KB)
📄
theme-plugin-editor.js
(24.77 KB)
📄
theme-plugin-editor.min.js
(11.43 KB)
📄
theme.js
(54.67 KB)
📄
theme.min.js
(26.42 KB)
📄
updates.js
(109.33 KB)
📄
updates.min.js
(47.27 KB)
📄
user-profile.js
(15 KB)
📄
user-profile.min.js
(6.7 KB)
📄
user-suggest.js
(2.25 KB)
📄
user-suggest.min.js
(676 B)
ðŸ“
widgets
📄
widgets.js
(22.56 KB)
📄
widgets.min.js
(12.31 KB)
📄
word-count.js
(7.52 KB)
📄
word-count.min.js
(1.49 KB)
📄
xfn.js
(740 B)
📄
xfn.min.js
(458 B)
Editing: site-icon.js
/** * Handle the site icon setting in options-general.php. * * @since 6.5.0 * @output wp-admin/js/site-icon.js */ /* global jQuery, wp */ ( function ( $ ) { var $chooseButton = $( '#choose-from-library-button' ), $iconPreview = $( '#site-icon-preview' ), $browserIconPreview = $( '#browser-icon-preview' ), $appIconPreview = $( '#app-icon-preview' ), $hiddenDataField = $( '#site_icon_hidden_field' ), $removeButton = $( '#js-remove-site-icon' ), frame; /** * Calculate image selection options based on the attachment dimensions. * * @since 6.5.0 * * @param {Object} attachment The attachment object representing the image. * @return {Object} The image selection options. */ function calculateImageSelectOptions( attachment ) { var realWidth = attachment.get( 'width' ), realHeight = attachment.get( 'height' ), xInit = 512, yInit = 512, ratio = xInit / yInit, xImg = xInit, yImg = yInit, x1, y1, imgSelectOptions; if ( realWidth / realHeight > ratio ) { yInit = realHeight; xInit = yInit * ratio; } else { xInit = realWidth; yInit = xInit / ratio; } x1 = ( realWidth - xInit ) / 2; y1 = ( realHeight - yInit ) / 2; imgSelectOptions = { aspectRatio: xInit + ':' + yInit, handles: true, keys: true, instance: true, persistent: true, imageWidth: realWidth, imageHeight: realHeight, minWidth: xImg > xInit ? xInit : xImg, minHeight: yImg > yInit ? yInit : yImg, x1: x1, y1: y1, x2: xInit + x1, y2: yInit + y1, }; return imgSelectOptions; } /** * Initializes the media frame for selecting or cropping an image. * * @since 6.5.0 */ $chooseButton.on( 'click', function () { var $el = $( this ); // Create the media frame. frame = wp.media( { button: { // Set the text of the button. text: $el.data( 'update' ), // Don't close, we might need to crop. close: false, }, states: [ new wp.media.controller.Library( { title: $el.data( 'choose-text' ), library: wp.media.query( { type: 'image' } ), date: false, suggestedWidth: $el.data( 'size' ), suggestedHeight: $el.data( 'size' ), } ), new wp.media.controller.SiteIconCropper( { control: { params: { width: $el.data( 'size' ), height: $el.data( 'size' ), }, }, imgSelectOptions: calculateImageSelectOptions, } ), ], } ); frame.on( 'cropped', function ( attachment ) { $hiddenDataField.val( attachment.id ); switchToUpdate( attachment ); frame.close(); // Start over with a frame that is so fresh and so clean clean. frame = null; } ); // When an image is selected, run a callback. frame.on( 'select', function () { // Grab the selected attachment. var attachment = frame.state().get( 'selection' ).first(); if ( attachment.attributes.height === $el.data( 'size' ) && $el.data( 'size' ) === attachment.attributes.width ) { switchToUpdate( attachment.attributes ); frame.close(); // Set the value of the hidden input to the attachment id. $hiddenDataField.val( attachment.id ); } else { frame.setState( 'cropper' ); } } ); frame.open(); } ); /** * Update the UI when a site icon is selected. * * @since 6.5.0 * * @param {array} attributes The attributes for the attachment. */ function switchToUpdate( attributes ) { var i18nAppAlternativeString, i18nBrowserAlternativeString; if ( attributes.alt ) { i18nAppAlternativeString = wp.i18n.sprintf( /* translators: %s: The selected image alt text. */ wp.i18n.__( 'App icon preview: Current image: %s' ), attributes.alt ); i18nBrowserAlternativeString = wp.i18n.sprintf( /* translators: %s: The selected image alt text. */ wp.i18n.__( 'Browser icon preview: Current image: %s' ), attributes.alt ); } else { i18nAppAlternativeString = wp.i18n.sprintf( /* translators: %s: The selected image filename. */ wp.i18n.__( 'App icon preview: The current image has no alternative text. The file name is: %s' ), attributes.filename ); i18nBrowserAlternativeString = wp.i18n.sprintf( /* translators: %s: The selected image filename. */ wp.i18n.__( 'Browser icon preview: The current image has no alternative text. The file name is: %s' ), attributes.filename ); } // Set site-icon-img src and alternative text to app icon preview. $appIconPreview.attr( { src: attributes.url, alt: i18nAppAlternativeString, } ); // Set site-icon-img src and alternative text to browser preview. $browserIconPreview.attr( { src: attributes.url, alt: i18nBrowserAlternativeString, } ); // Remove hidden class from icon preview div and remove button. $iconPreview.removeClass( 'hidden' ); $removeButton.removeClass( 'hidden' ); // Set the global CSS variable for --site-icon-url to the selected image URL. document.documentElement.style.setProperty( '--site-icon-url', 'url(' + attributes.url + ')' ); // If the choose button is not in the update state, swap the classes. if ( $chooseButton.attr( 'data-state' ) !== '1' ) { $chooseButton.attr( { class: $chooseButton.attr( 'data-alt-classes' ), 'data-alt-classes': $chooseButton.attr( 'class' ), 'data-state': '1', } ); } // Swap the text of the choose button. $chooseButton.text( $chooseButton.attr( 'data-update-text' ) ); } /** * Handles the click event of the remove button. * * @since 6.5.0 */ $removeButton.on( 'click', function () { $hiddenDataField.val( 'false' ); $( this ).toggleClass( 'hidden' ); $iconPreview.toggleClass( 'hidden' ); $browserIconPreview.attr( { src: '', alt: '', } ); $appIconPreview.attr( { src: '', alt: '', } ); /** * Resets state to the button, for correct visual style and state. * Updates the text of the button. * Sets focus state to the button. */ $chooseButton .attr( { class: $chooseButton.attr( 'data-alt-classes' ), 'data-alt-classes': $chooseButton.attr( 'class' ), 'data-state': '', } ) .text( $chooseButton.attr( 'data-choose-text' ) ) .trigger( 'focus' ); } ); } )( jQuery );
Upload File
Create Folder