Changeset 47069
- Timestamp:
- 01/13/2020 05:25:26 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/dashboard.php
r47063 r47069 1773 1773 $get_issues = get_transient( 'health-check-site-status-result' ); 1774 1774 1775 $issue_counts = new stdClass();1775 $issue_counts = array(); 1776 1776 1777 1777 if ( false !== $get_issues ) { 1778 $issue_counts = json_decode( $get_issues );1779 } 1780 1781 if ( ! is_ object( $issue_counts ) || empty( $issue_counts )) {1782 $issue_counts = (object)array(1778 $issue_counts = json_decode( $get_issues, true ); 1779 } 1780 1781 if ( ! is_array( $issue_counts ) || ! $issue_counts ) { 1782 $issue_counts = array( 1783 1783 'good' => 0, 1784 1784 'recommended' => 0, … … 1787 1787 } 1788 1788 1789 $issues_total = $issue_counts ->recommended + $issue_counts->critical;1789 $issues_total = $issue_counts['recommended'] + $issue_counts['critical']; 1790 1790 ?> 1791 1791 <div class="health-check-title-section site-health-progress-wrapper loading hide-if-no-js"> … … 1822 1822 <?php else : ?> 1823 1823 <p> 1824 <?php if ( $issue_counts ->critical> 0 ) : ?>1824 <?php if ( $issue_counts['critical'] > 0 ) : ?> 1825 1825 <?php _e( 'Your site has critical issues that should be addressed as soon as possible to improve the performance or security of your website.' ); ?> 1826 1826 <?php elseif ( $issues_total <= 0 ) : ?>
Note: See TracChangeset
for help on using the changeset viewer.