Skip to content

Commit

Permalink
Version 1.4.1 update (#363)
Browse files Browse the repository at this point in the history
Version 1.4.1 update
  • Loading branch information
Clorith authored Sep 28, 2019
2 parents 2ea0721 + 7a400a6 commit 3fee540
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 15 deletions.
4 changes: 4 additions & 0 deletions assets/javascript/site-status/site-status-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jQuery( document ).ready( function( $ ) {
} );

function AppendIssue( issue ) {
if ( typeof issue === 'undefined' || typeof issue.status === 'undefined' ) {
return;
}

const template = wp.template( 'health-check-issue' ),
issueWrapper = $( '#health-check-issues-' + issue.status );

Expand Down
7 changes: 6 additions & 1 deletion docs/plugin/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: wordpressdotorg, westi, pento, Clorith
Requires at least: 4.0
Requires PHP: 5.2
Tested up to: 5.2
Stable tag: 1.4.0
Stable tag: 1.4.1
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -49,6 +49,11 @@ At this time, the plugin has been tested with every version of PHP from 5.2 thro

== Changelog ==

= v1.4.1 =
* Fixed SQL version checks for various MariaDB installs.
* Fixed a warning being generated in logfiles for first-time users with no existing Site Health history.
* Added missing translation function for the new PHP compatibility tool.

= v1.4.0 =
* Fix a bug when viewing the Site Health page if enabling the Health Check plugin in troubleshooting mode.
* Fix an inconsistency with how database versions are checked.
Expand Down
4 changes: 2 additions & 2 deletions src/health-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin URI: https://wordpress.org/plugins/health-check/
* Description: Checks the health of your WordPress install.
* Author: The WordPress.org community
* Version: 1.4.0
* Version: 1.4.1
* Author URI: https://wordpress.org/plugins/health-check/
* Text Domain: health-check
*/
Expand All @@ -35,7 +35,7 @@
define( 'HEALTH_CHECK_MYSQL_REC_VERSION', '5.6' );

// Set the plugin version.
define( 'HEALTH_CHECK_PLUGIN_VERSION', '1.4.0' );
define( 'HEALTH_CHECK_PLUGIN_VERSION', '1.4.1' );

// Set the plugin file.
define( 'HEALTH_CHECK_PLUGIN_FILE', __FILE__ );
Expand Down
33 changes: 27 additions & 6 deletions src/includes/class-health-check-dashboard-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ function dashboard_setup() {
}

function widget_render() {
$issue_counts = get_transient( 'health-check-site-status-result' );
$get_issues = get_transient( 'health-check-site-status-result' );

if ( false !== $issue_counts ) {
$issue_counts = json_decode( $issue_counts );
if ( false !== $get_issues ) {
$issue_counts = json_decode( $get_issues );
} else {
$issue_counts = array(
$issue_counts = (object) array(
'good' => 0,
'recommended' => 0,
'critical' => 0,
Expand All @@ -42,10 +42,30 @@ function widget_render() {
</svg>
</div>
<div class="site-health-progress-label">
<?php _e( 'Results are still loading&hellip;', 'health-check' ); ?>
<?php if ( false === $get_issues ) : ?>
<?php _e( 'No information yet&hellip;', 'health-check' ); ?>
<?php else : ?>
<?php _e( 'Results are still loading&hellip;', 'health-check' ); ?>
<?php endif; ?>
</div>
</div>

<?php if ( false === $get_issues ) : ?>
<p>
<?php _e( 'No Site Health information has been gathered yet, you can do so by visiting the Site Health page, alternatively the checks will run automatically once every week.', 'health-check' ); ?>
</p>

<p>
<?php
printf(
// translators: %s: URL for the Site Health page.
__( '<a href="%s">Visit the Site Health page</a> to gather information on about your site..', 'health-check' ),
esc_url( admin_url( 'tools.php?page=health-check' ) )
);
?>
</p>

<?php else : ?>
<p>
<?php if ( $issue_counts->critical > 0 ) : ?>
<?php _e( 'Your site has critical issues that should be addressed as soon as possible to improve the performance or security of your website.', 'health-check' ); ?>
Expand All @@ -55,8 +75,9 @@ function widget_render() {
<?php _e( 'Your site scores pretty well on the Health Check, but there are still some things you can do to improve the performance and security of your website.', 'health-check' ); ?>
<?php endif; ?>
</p>
<?php endif; ?>

<?php if ( $issues_total > 0 ) : ?>
<?php if ( $issues_total > 0 && false !== $get_issues ) : ?>
<p>
<?php
printf(
Expand Down
2 changes: 1 addition & 1 deletion src/includes/class-health-check-debug-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ static function debug_data() {
$extension = null;
}

$server = $wpdb->db_version();
$server = $wpdb->get_var( 'SELECT VERSION()' );

if ( isset( $wpdb->use_mysqli ) && $wpdb->use_mysqli ) {
$client_version = $wpdb->dbh->client_info;
Expand Down
2 changes: 1 addition & 1 deletion src/includes/class-health-check-site-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private function prepare_sql_data() {
$mysql_server_type = mysql_get_server_info( $wpdb->dbh );
}

$this->mysql_server_version = $wpdb->db_version();
$this->mysql_server_version = $wpdb->get_var( 'SELECT VERSION()' );
}

$this->health_check_mysql_rec_version = '5.6';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public function tab_content() {
<table class="wp-list-table widefat fixed striped" id="health-check-tool-plugin-compat-list">
<thead>
<tr>
<th>Plugin</th>
<th>Version</th>
<th>Minimum PHP</th>
<th>Highest supported PHP</th>
<th><?php _e( 'Plugin', 'health-check' ); ?></th>
<th><?php _e( 'Version', 'health-check' ); ?></th>
<th><?php _e( 'Minimum PHP', 'health-check' ); ?></th>
<th><?php _e( 'Highest supported PHP', 'health-check' ); ?></th>
</tr>
</thead>

Expand Down

0 comments on commit 3fee540

Please sign in to comment.