Coding Standards: Wrap some long lines in `wp-admin/js/site-health.js` per the JS coding standards for better readability.
See #49542. Built from https://develop.svn.wordpress.org/trunk@48301 git-svn-id: http://core.svn.wordpress.org/trunk@48070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5ffac7cab7
commit
db0e0ca245
|
@ -84,11 +84,20 @@ jQuery( document ).ready( function( $ ) {
|
|||
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>' );
|
||||
heading = sprintf(
|
||||
_n( '%s critical issue', '%s critical issues', count ),
|
||||
'<span class="issue-count">' + count + '</span>'
|
||||
);
|
||||
} else if ( 'recommended' === issue.status ) {
|
||||
heading = sprintf( _n( '%s recommended improvement', '%s recommended improvements', count ), '<span class="issue-count">' + count + '</span>' );
|
||||
heading = sprintf(
|
||||
_n( '%s recommended improvement', '%s recommended improvements', count ),
|
||||
'<span class="issue-count">' + count + '</span>'
|
||||
);
|
||||
} else if ( 'good' === issue.status ) {
|
||||
heading = sprintf( _n( '%s item with no issues detected', '%s items with no issues detected', count ), '<span class="issue-count">' + count + '</span>' );
|
||||
heading = sprintf(
|
||||
_n( '%s item with no issues detected', '%s items with no issues detected', count ),
|
||||
'<span class="issue-count">' + count + '</span>'
|
||||
);
|
||||
}
|
||||
|
||||
if ( heading ) {
|
||||
|
@ -109,8 +118,11 @@ jQuery( document ).ready( function( $ ) {
|
|||
var $wrapper = $progress.closest( '.site-health-progress-wrapper' );
|
||||
var $progressLabel = $( '.site-health-progress-label', $wrapper );
|
||||
var $circle = $( '.site-health-progress svg #bar' );
|
||||
var totalTests = parseInt( SiteHealth.site_status.issues.good, 0 ) + parseInt( SiteHealth.site_status.issues.recommended, 0 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 );
|
||||
var failedTests = ( parseInt( SiteHealth.site_status.issues.recommended, 0 ) * 0.5 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 );
|
||||
var totalTests = parseInt( SiteHealth.site_status.issues.good, 0 ) +
|
||||
parseInt( SiteHealth.site_status.issues.recommended, 0 ) +
|
||||
( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 );
|
||||
var failedTests = ( parseInt( SiteHealth.site_status.issues.recommended, 0 ) * 0.5 ) +
|
||||
( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 );
|
||||
var val = 100 - Math.ceil( ( failedTests / totalTests ) * 100 );
|
||||
|
||||
if ( 0 === totalTests ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-alpha-48300';
|
||||
$wp_version = '5.5-alpha-48301';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue