Skip to content

Commit

Permalink
Coding Standards: Rename functions in wp-admin/js/site-health.js pe…
Browse files Browse the repository at this point in the history
…r the JS coding standards.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48297 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jul 4, 2020
1 parent 480dbc8 commit 39d4214
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/js/_enqueues/admin/site-health.js
Expand Up @@ -67,18 +67,18 @@ jQuery( document ).ready( function( $ ) {
} );

/**
* Append a new issue to the issue list.
* Appends a new issue to the issue list.
*
* @since 5.2.0
*
* @param {Object} issue The issue data.
*/
function AppendIssue( issue ) {
function appendIssue( issue ) {
var template = wp.template( 'health-check-issue' ),
issueWrapper = $( '#health-check-issues-' + issue.status ),
heading,
count;

SiteHealth.site_status.issues[ issue.status ]++;

count = SiteHealth.site_status.issues[ issue.status ];
Expand All @@ -99,11 +99,11 @@ jQuery( document ).ready( function( $ ) {
}

/**
* Update site health status indicator as asynchronous tests are run and returned.
* Updates site health status indicator as asynchronous tests are run and returned.
*
* @since 5.2.0
*/
function RecalculateProgression() {
function recalculateProgression() {
var r, c, pct;
var $progress = $( '.site-health-progress' );
var $wrapper = $progress.closest( '.site-health-progress-wrapper' );
Expand Down Expand Up @@ -172,7 +172,7 @@ jQuery( document ).ready( function( $ ) {
}

/**
* Queue the next asynchronous test when we're ready to run it.
* Queues the next asynchronous test when we're ready to run it.
*
* @since 5.2.0
*/
Expand All @@ -199,7 +199,7 @@ jQuery( document ).ready( function( $ ) {
data,
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 ) );
appendIssue( wp.hooks.applyFilters( 'site_status_test_result', response.data ) );
maybeRunNextAsyncTest();
}
);
Expand All @@ -209,13 +209,13 @@ jQuery( document ).ready( function( $ ) {
}

if ( doCalculation ) {
RecalculateProgression();
recalculateProgression();
}
}

if ( 'undefined' !== typeof SiteHealth && ! isDebugTab ) {
if ( 0 === SiteHealth.site_status.direct.length && 0 === SiteHealth.site_status.async.length ) {
RecalculateProgression();
recalculateProgression();
} else {
SiteHealth.site_status.issues = {
'good': 0,
Expand All @@ -226,7 +226,7 @@ jQuery( document ).ready( function( $ ) {

if ( 0 < SiteHealth.site_status.direct.length ) {
$.each( SiteHealth.site_status.direct, function() {
AppendIssue( this );
appendIssue( this );
} );
}

Expand All @@ -242,12 +242,12 @@ jQuery( document ).ready( function( $ ) {
ajaxurl,
data,
function( response ) {
AppendIssue( response.data );
appendIssue( response.data );
maybeRunNextAsyncTest();
}
);
} else {
RecalculateProgression();
recalculateProgression();
}
}

Expand Down Expand Up @@ -275,7 +275,7 @@ jQuery( document ).ready( function( $ ) {
var delay = ( new Date().getTime() ) - timestamp;

$( '.health-check-wp-paths-sizes.spinner' ).css( 'visibility', 'hidden' );
RecalculateProgression();
recalculateProgression();

if ( delay > 3000 ) {
/*
Expand Down Expand Up @@ -329,7 +329,7 @@ jQuery( document ).ready( function( $ ) {
if ( pathsSizesSection.length ) {
getDirectorySizes();
} else {
RecalculateProgression();
recalculateProgression();
}
}
} );

0 comments on commit 39d4214

Please sign in to comment.