|
@@ 1457-1463 (lines=7) @@
|
| 1454 |
|
* @return mixed|WP_Error Number of days since last downtime. Otherwise, a WP_Error instance with the corresponding error. |
| 1455 |
|
*/ |
| 1456 |
|
public function get_monitor_data() { |
| 1457 |
|
if ( ! Jetpack::is_module_active( 'monitor' ) ) { |
| 1458 |
|
return new WP_Error( |
| 1459 |
|
'not_active', |
| 1460 |
|
esc_html__( 'The requested Jetpack module is not active.', 'jetpack' ), |
| 1461 |
|
array( 'status' => 404 ) |
| 1462 |
|
); |
| 1463 |
|
} |
| 1464 |
|
|
| 1465 |
|
$monitor = new Jetpack_Monitor(); |
| 1466 |
|
$last_downtime = $monitor->monitor_get_last_downtime(); |
|
@@ 1490-1496 (lines=7) @@
|
| 1487 |
|
* @return mixed|WP_Error List of services that verified this site. Otherwise, a WP_Error instance with the corresponding error. |
| 1488 |
|
*/ |
| 1489 |
|
public function get_verification_tools_data() { |
| 1490 |
|
if ( ! Jetpack::is_module_active( 'verification-tools' ) ) { |
| 1491 |
|
return new WP_Error( |
| 1492 |
|
'not_active', |
| 1493 |
|
esc_html__( 'The requested Jetpack module is not active.', 'jetpack' ), |
| 1494 |
|
array( 'status' => 404 ) |
| 1495 |
|
); |
| 1496 |
|
} |
| 1497 |
|
|
| 1498 |
|
$verification_services_codes = get_option( 'verification_services_codes' ); |
| 1499 |
|
if ( |