Make WordPress Core

Changeset 48297


Ignore:
Timestamp:
07/04/2020 07:07:10 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Rename functions in wp-admin/js/site-health.js per the JS coding standards.

See #49542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/site-health.js

    r48233 r48297  
    6868
    6969    /**
    70      * Append a new issue to the issue list.
     70     * Appends a new issue to the issue list.
    7171     *
    7272     * @since 5.2.0
     
    7474     * @param {Object} issue The issue data.
    7575     */
    76     function AppendIssue( issue ) {
     76    function appendIssue( issue ) {
    7777        var template = wp.template( 'health-check-issue' ),
    7878            issueWrapper = $( '#health-check-issues-' + issue.status ),
    7979            heading,
    8080            count;
    81 
     81       
    8282        SiteHealth.site_status.issues[ issue.status ]++;
    8383
     
    100100
    101101    /**
    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.
    103103     *
    104104     * @since 5.2.0
    105105     */
    106     function RecalculateProgression() {
     106    function recalculateProgression() {
    107107        var r, c, pct;
    108108        var $progress = $( '.site-health-progress' );
     
    173173
    174174    /**
    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.
    176176     *
    177177     * @since 5.2.0
     
    200200                    function( response ) {
    201201                        /** 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 ) );
    203203                        maybeRunNextAsyncTest();
    204204                    }
     
    210210
    211211        if ( doCalculation ) {
    212             RecalculateProgression();
     212            recalculateProgression();
    213213        }
    214214    }
     
    216216    if ( 'undefined' !== typeof SiteHealth && ! isDebugTab ) {
    217217        if ( 0 === SiteHealth.site_status.direct.length && 0 === SiteHealth.site_status.async.length ) {
    218             RecalculateProgression();
     218            recalculateProgression();
    219219        } else {
    220220            SiteHealth.site_status.issues = {
     
    227227        if ( 0 < SiteHealth.site_status.direct.length ) {
    228228            $.each( SiteHealth.site_status.direct, function() {
    229                 AppendIssue( this );
     229                appendIssue( this );
    230230            } );
    231231        }
     
    243243                data,
    244244                function( response ) {
    245                     AppendIssue( response.data );
     245                    appendIssue( response.data );
    246246                    maybeRunNextAsyncTest();
    247247                }
    248248            );
    249249        } else {
    250             RecalculateProgression();
     250            recalculateProgression();
    251251        }
    252252    }
     
    276276
    277277            $( '.health-check-wp-paths-sizes.spinner' ).css( 'visibility', 'hidden' );
    278             RecalculateProgression();
     278            recalculateProgression();
    279279
    280280            if ( delay > 3000  ) {
     
    330330            getDirectorySizes();
    331331        } else {
    332             RecalculateProgression();
     332            recalculateProgression();
    333333        }
    334334    }
Note: See TracChangeset for help on using the changeset viewer.