| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template for display error wrong name plugin learnpress | |
| 3 | + * Template for display error wp_remote. | |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | 7 | exit; // Exit if accessed directly |
| @@ -14,12 +14,24 @@ | ||
| 14 | 14 | if ( ! is_wp_error( $data['check'] ) ) { |
| 15 | 15 | return; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -$message_error = $data['check'] instanceof WP_Error ? $data['check']->get_error_message() : 'Result do not match!'; | |
| 18 | +/** | |
| 19 | + * @var WP_Error $wp_error | |
| 20 | + */ | |
| 21 | +$wp_error = $data['check']; | |
| 22 | +$message_error = $wp_error->get_error_message(); | |
| 19 | 23 | ?> |
| 20 | 24 | |
| 21 | 25 | <div class="lp-admin-notice notice notice-error"> |
| 22 | 26 | <p> |
| 23 | - <?php echo sprintf( '%s %s', '<strong>wp_remote_get</strong>: ', $message_error ); ?> | |
| 27 | + <?php | |
| 28 | + echo sprintf( | |
| 29 | + '%s %s. <a href="%s">%s</a>', | |
| 30 | + '<strong>wp_remote_get</strong>: ', | |
| 31 | + $message_error, | |
| 32 | + admin_url( 'site-health.php' ), | |
| 33 | + __( 'Check Site Health', 'learnpress' ) | |
| 34 | + ); | |
| 35 | + ?> | |
| 24 | 36 | </p> |
| 25 | 37 | </div> |