Make WordPress Core

Changeset 45197


Ignore:
Timestamp:
04/14/2019 01:48:59 PM (6 years ago)
Author:
afercia
Message:

Coding standards: Site health: Avoid to use var in the middle of JavaScript function blocks.

Amends [45178].
See #46683.

File:
1 edited

Legend:

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

    r45178 r45197  
    5757        var template = wp.template( 'health-check-issue' ),
    5858            issueWrapper = $( '#health-check-issues-' + issue.status ),
    59             heading;
     59            heading,
     60            count;
    6061
    6162        SiteHealth.site_status.issues[ issue.status ]++;
    6263
    63         var count = SiteHealth.site_status.issues[ issue.status ];
     64        count = SiteHealth.site_status.issues[ issue.status ];
    6465
    6566        if ( 'critical' === issue.status ) {
     
    146147            );
    147148
    148             // translators: %s: The percentage score for the tests.
    149             var text = __( 'All site health tests have finished running. Your site scored %s, and the results are now available on the page.' );
    150             wp.a11y.speak( sprintf( text, val + '%' ) );
     149            wp.a11y.speak( sprintf(
     150                // translators: %s: The percentage score for the tests.
     151                __( 'All site health tests have finished running. Your site scored %s, and the results are now available on the page.' ),
     152                val + '%'
     153            ) );
    151154        }
    152155    }
Note: See TracChangeset for help on using the changeset viewer.