Priority File Manager
📁 public_html
Base Directory:
/home/ecedu/public_html
/home/ecedu/public_html/wp-content/plugins
/home/ecedu/public_html/wp-content
/home/ecedu
/var/www
/var/www/cgi-bin
/var/www/html
public_html
/
wp-admin
/
js
/home/ecedu/public_html/wp-admin/js
Name
Type
Size
Actions
📁
..
Folder
-
Delete
Rename
📄
accordion.js
File
2933
Delete
Rename
Edit
Download
📄
accordion.min.js
File
758
Delete
Rename
Edit
Download
📄
application-passwords.js
File
6394
Delete
Rename
Edit
Download
📄
application-passwords.min.js
File
3024
Delete
Rename
Edit
Download
📄
auth-app.js
File
5796
Delete
Rename
Edit
Download
📄
auth-app.min.js
File
2084
Delete
Rename
Edit
Download
📄
code-editor.js
File
11588
Delete
Rename
Edit
Download
📄
code-editor.min.js
File
3083
Delete
Rename
Edit
Download
📄
color-picker.js
File
9768
Delete
Rename
Edit
Download
📄
color-picker.min.js
File
3486
Delete
Rename
Edit
Download
📄
comment.js
File
2919
Delete
Rename
Edit
Download
📄
comment.min.js
File
1315
Delete
Rename
Edit
Download
📄
common.js
File
62618
Delete
Rename
Edit
Download
📄
common.min.js
File
23676
Delete
Rename
Edit
Download
📄
custom-background.js
File
3435
Delete
Rename
Edit
Download
📄
custom-background.min.js
File
1206
Delete
Rename
Edit
Download
📄
custom-header.js
File
2023
Delete
Rename
Edit
Download
📄
customize-controls.js
File
294257
Delete
Rename
Edit
Download
📄
customize-controls.min.js
File
111759
Delete
Rename
Edit
Download
📄
customize-nav-menus.js
File
113798
Delete
Rename
Edit
Download
📄
customize-nav-menus.min.js
File
48055
Delete
Rename
Edit
Download
📄
customize-widgets.js
File
71727
Delete
Rename
Edit
Download
📄
customize-widgets.min.js
File
28065
Delete
Rename
Edit
Download
📄
dashboard.js
File
27666
Delete
Rename
Edit
Download
📄
dashboard.min.js
File
8862
Delete
Rename
Edit
Download
📄
edit-comments.js
File
38006
Delete
Rename
Edit
Download
📄
edit-comments.min.js
File
15488
Delete
Rename
Edit
Download
📄
editor-expand.js
File
42606
Delete
Rename
Edit
Download
📄
editor-expand.min.js
File
13451
Delete
Rename
Edit
Download
📄
editor.js
File
45036
Delete
Rename
Edit
Download
📄
editor.min.js
File
13066
Delete
Rename
Edit
Download
📄
farbtastic.js
File
7849
Delete
Rename
Edit
Download
📄
gallery.js
File
5543
Delete
Rename
Edit
Download
📄
gallery.min.js
File
3741
Delete
Rename
Edit
Download
📄
image-edit.js
File
40936
Delete
Rename
Edit
Download
📄
image-edit.min.js
File
15515
Delete
Rename
Edit
Download
📄
inline-edit-post.js
File
20650
Delete
Rename
Edit
Download
📄
inline-edit-post.min.js
File
9639
Delete
Rename
Edit
Download
📄
inline-edit-tax.js
File
7797
Delete
Rename
Edit
Download
📄
inline-edit-tax.min.js
File
2997
Delete
Rename
Edit
Download
📄
iris.min.js
File
23643
Delete
Rename
Edit
Download
📄
language-chooser.js
File
890
Delete
Rename
Edit
Download
📄
language-chooser.min.js
File
423
Delete
Rename
Edit
Download
📄
link.js
File
3987
Delete
Rename
Edit
Download
📄
link.min.js
File
1742
Delete
Rename
Edit
Download
📄
media-gallery.js
File
1303
Delete
Rename
Edit
Download
📄
media-gallery.min.js
File
611
Delete
Rename
Edit
Download
📄
media-upload.js
File
3465
Delete
Rename
Edit
Download
📄
media-upload.min.js
File
1152
Delete
Rename
Edit
Download
📄
media.js
File
6765
Delete
Rename
Edit
Download
📄
media.min.js
File
2439
Delete
Rename
Edit
Download
📄
nav-menu.js
File
62177
Delete
Rename
Edit
Download
📄
nav-menu.min.js
File
30563
Delete
Rename
Edit
Download
📄
password-strength-meter.js
File
4236
Delete
Rename
Edit
Download
📄
password-strength-meter.min.js
File
1123
Delete
Rename
Edit
Download
📄
password-toggle.js
File
1339
Delete
Rename
Edit
Download
📄
password-toggle.min.js
File
847
Delete
Rename
Edit
Download
📄
plugin-install.js
File
7086
Delete
Rename
Edit
Download
📄
plugin-install.min.js
File
2403
Delete
Rename
Edit
Download
📄
post.js
File
39607
Delete
Rename
Edit
Download
📄
post.min.js
File
18845
Delete
Rename
Edit
Download
📄
postbox.js
File
18937
Delete
Rename
Edit
Download
📄
postbox.min.js
File
6761
Delete
Rename
Edit
Download
📄
privacy-tools.js
File
10923
Delete
Rename
Edit
Download
📄
privacy-tools.min.js
File
5154
Delete
Rename
Edit
Download
📄
revisions.js
File
34729
Delete
Rename
Edit
Download
📄
revisions.min.js
File
18401
Delete
Rename
Edit
Download
📄
set-post-thumbnail.js
File
876
Delete
Rename
Edit
Download
📄
set-post-thumbnail.min.js
File
620
Delete
Rename
Edit
Download
📄
site-health.js
File
13465
Delete
Rename
Edit
Download
📄
site-health.min.js
File
6282
Delete
Rename
Edit
Download
📄
site-icon.js
File
6243
Delete
Rename
Edit
Download
📄
site-icon.min.js
File
2254
Delete
Rename
Edit
Download
📄
svg-painter.js
File
3280
Delete
Rename
Edit
Download
📄
svg-painter.min.js
File
1567
Delete
Rename
Edit
Download
📄
tags-box.js
File
11140
Delete
Rename
Edit
Download
📄
tags-box.min.js
File
3077
Delete
Rename
Edit
Download
📄
tags-suggest.js
File
5771
Delete
Rename
Edit
Download
📄
tags-suggest.min.js
File
2269
Delete
Rename
Edit
Download
📄
tags.js
File
4967
Delete
Rename
Edit
Download
📄
tags.min.js
File
2091
Delete
Rename
Edit
Download
📄
theme-plugin-editor.js
File
25360
Delete
Rename
Edit
Download
📄
theme-plugin-editor.min.js
File
11709
Delete
Rename
Edit
Download
📄
theme.js
File
55979
Delete
Rename
Edit
Download
📄
theme.min.js
File
27051
Delete
Rename
Edit
Download
📄
updates.js
File
111959
Delete
Rename
Edit
Download
📄
updates.min.js
File
48407
Delete
Rename
Edit
Download
📄
user-profile.js
File
15355
Delete
Rename
Edit
Download
📄
user-profile.min.js
File
6862
Delete
Rename
Edit
Download
📄
user-suggest.js
File
2301
Delete
Rename
Edit
Download
📄
user-suggest.min.js
File
676
Delete
Rename
Edit
Download
📁
widgets
Folder
-
Delete
Rename
📄
widgets.js
File
23098
Delete
Rename
Edit
Download
📄
widgets.min.js
File
12609
Delete
Rename
Edit
Download
📄
word-count.js
File
7696
Delete
Rename
Edit
Download
📄
word-count.min.js
File
1530
Delete
Rename
Edit
Download
📄
xfn.js
File
740
Delete
Rename
Edit
Download
📄
xfn.min.js
File
458
Delete
Rename
Edit
Download
Upload
Create Folder
📝 Editing:
site-icon.js
Size: 6,243 bytes
Lines: 243
Type: .js
💾 Save
Cancel
✕
/** * 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 );
✅ File saved successfully!