Coding standards: Site health: Avoid to use var
in the middle of JavaScript function blocks.
Amends [45178]. See #46683. git-svn-id: https://develop.svn.wordpress.org/trunk@45197 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d52d60c809
commit
5c9d27cd17
@ -56,11 +56,12 @@ jQuery( document ).ready( function( $ ) {
|
||||
function AppendIssue( issue ) {
|
||||
var template = wp.template( 'health-check-issue' ),
|
||||
issueWrapper = $( '#health-check-issues-' + issue.status ),
|
||||
heading;
|
||||
heading,
|
||||
count;
|
||||
|
||||
SiteHealth.site_status.issues[ issue.status ]++;
|
||||
|
||||
var count = SiteHealth.site_status.issues[ issue.status ];
|
||||
count = SiteHealth.site_status.issues[ issue.status ];
|
||||
|
||||
if ( 'critical' === issue.status ) {
|
||||
heading = sprintf( _n( '%s Critical issue', '%s Critical issues', count ), '<span class="issue-count">' + count + '</span>' );
|
||||
@ -145,9 +146,11 @@ jQuery( document ).ready( function( $ ) {
|
||||
}
|
||||
);
|
||||
|
||||
// translators: %s: The percentage score for the tests.
|
||||
var text = __( 'All site health tests have finished running. Your site scored %s, and the results are now available on the page.' );
|
||||
wp.a11y.speak( sprintf( text, val + '%' ) );
|
||||
wp.a11y.speak( sprintf(
|
||||
// translators: %s: The percentage score for the tests.
|
||||
__( 'All site health tests have finished running. Your site scored %s, and the results are now available on the page.' ),
|
||||
val + '%'
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user