Skip to content

Commit

Permalink
Improve check message
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Dec 21, 2023
1 parent fab8950 commit 291c8e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion assets/js/plugin-check-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@
*/
async function runChecks( data ) {
let isSuccessMessage = true;
const allResults = [];

for ( let i = 0; i < data.checks.length; i++ ) {
try {
const results = await runCheck( data.plugin, data.checks[ i ] );
Expand All @@ -247,13 +249,17 @@
) {
isSuccessMessage = false;
}
renderResults( results );
allResults.push( results );
} catch ( e ) {
// Ignore for now.
}
}

renderResultsMessage( isSuccessMessage );

for ( let i = 0; i < allResults.length; i++ ) {
renderResults( allResults[ i ] );
}
}

/**
Expand Down
2 changes: 2 additions & 0 deletions templates/admin-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
<?php } ?>
</div>

<br />

<div id="plugin-check__results"></div>

</div>

0 comments on commit 291c8e9

Please sign in to comment.