Ticket #47058: 47058.1.diff
| File 47058.1.diff, 1.4 KB (added by , 5 years ago) |
|---|
-
wp-admin/includes/class-wp-site-health.php
1449 1449 1450 1450 $result['status'] = ( 0 === strpos( ini_get( 'error_log' ), ABSPATH ) ) ? 'critical' : 'recommended'; 1451 1451 1452 // On development environments, set the status to recommended 1453 if ( $this->is_development_environment() ) { 1454 $result['status'] = 'recommended'; 1455 } 1456 1452 1457 $result['description'] .= sprintf( 1453 1458 '<p>%s</p>', 1454 1459 sprintf( … … 1464 1469 1465 1470 $result['status'] = 'critical'; 1466 1471 1472 // On development environments, set the status to recommended 1473 if ( $this->is_development_environment() ) { 1474 $result['status'] = 'recommended'; 1475 } 1476 1467 1477 $result['description'] .= sprintf( 1468 1478 '<p>%s</p>', 1469 1479 sprintf( … … 2595 2605 2596 2606 set_transient( 'health-check-site-status-result', wp_json_encode( $site_status ) ); 2597 2607 } 2608 2609 /** 2610 * Check if we are in a development environment. 2611 * 2612 * Checks if the wp_get_environment_type function returns 2613 * development or checks if on localhost. 2614 * 2615 * @since 5.6.0 2616 * 2617 * @return bool True if it is a development environment, false if not. 2618 */ 2619 public function is_development_environment() { 2620 return in_array( wp_get_environment_type(), array( 'development', 'local' ), true ); 2621 } 2622 2598 2623 }