Changeset 48297
- Timestamp:
- 07/04/2020 07:07:10 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/site-health.js
r48233 r48297 68 68 69 69 /** 70 * Append a new issue to the issue list.70 * Appends a new issue to the issue list. 71 71 * 72 72 * @since 5.2.0 … … 74 74 * @param {Object} issue The issue data. 75 75 */ 76 function AppendIssue( issue ) {76 function appendIssue( issue ) { 77 77 var template = wp.template( 'health-check-issue' ), 78 78 issueWrapper = $( '#health-check-issues-' + issue.status ), 79 79 heading, 80 80 count; 81 81 82 82 SiteHealth.site_status.issues[ issue.status ]++; 83 83 … … 100 100 101 101 /** 102 * Update site health status indicator as asynchronous tests are run and returned.102 * Updates site health status indicator as asynchronous tests are run and returned. 103 103 * 104 104 * @since 5.2.0 105 105 */ 106 function RecalculateProgression() {106 function recalculateProgression() { 107 107 var r, c, pct; 108 108 var $progress = $( '.site-health-progress' ); … … 173 173 174 174 /** 175 * Queue the next asynchronous test when we're ready to run it.175 * Queues the next asynchronous test when we're ready to run it. 176 176 * 177 177 * @since 5.2.0 … … 200 200 function( response ) { 201 201 /** This filter is documented in wp-admin/includes/class-wp-site-health.php */ 202 AppendIssue( wp.hooks.applyFilters( 'site_status_test_result', response.data ) );202 appendIssue( wp.hooks.applyFilters( 'site_status_test_result', response.data ) ); 203 203 maybeRunNextAsyncTest(); 204 204 } … … 210 210 211 211 if ( doCalculation ) { 212 RecalculateProgression();212 recalculateProgression(); 213 213 } 214 214 } … … 216 216 if ( 'undefined' !== typeof SiteHealth && ! isDebugTab ) { 217 217 if ( 0 === SiteHealth.site_status.direct.length && 0 === SiteHealth.site_status.async.length ) { 218 RecalculateProgression();218 recalculateProgression(); 219 219 } else { 220 220 SiteHealth.site_status.issues = { … … 227 227 if ( 0 < SiteHealth.site_status.direct.length ) { 228 228 $.each( SiteHealth.site_status.direct, function() { 229 AppendIssue( this );229 appendIssue( this ); 230 230 } ); 231 231 } … … 243 243 data, 244 244 function( response ) { 245 AppendIssue( response.data );245 appendIssue( response.data ); 246 246 maybeRunNextAsyncTest(); 247 247 } 248 248 ); 249 249 } else { 250 RecalculateProgression();250 recalculateProgression(); 251 251 } 252 252 } … … 276 276 277 277 $( '.health-check-wp-paths-sizes.spinner' ).css( 'visibility', 'hidden' ); 278 RecalculateProgression();278 recalculateProgression(); 279 279 280 280 if ( delay > 3000 ) { … … 330 330 getDirectorySizes(); 331 331 } else { 332 RecalculateProgression();332 recalculateProgression(); 333 333 } 334 334 }
Note: See TracChangeset
for help on using the changeset viewer.