|
@@ 1446-1452 (lines=7) @@
|
| 1443 |
|
* @return mixed|WP_Error Number of days since last downtime. Otherwise, a WP_Error instance with the corresponding error. |
| 1444 |
|
*/ |
| 1445 |
|
public function get_monitor_data() { |
| 1446 |
|
if ( ! Jetpack::is_module_active( 'monitor' ) ) { |
| 1447 |
|
return new WP_Error( |
| 1448 |
|
'not_active', |
| 1449 |
|
esc_html__( 'The requested Jetpack module is not active.', 'jetpack' ), |
| 1450 |
|
array( 'status' => 404 ) |
| 1451 |
|
); |
| 1452 |
|
} |
| 1453 |
|
|
| 1454 |
|
$monitor = new Jetpack_Monitor(); |
| 1455 |
|
$last_downtime = $monitor->monitor_get_last_downtime(); |
|
@@ 1479-1485 (lines=7) @@
|
| 1476 |
|
* @return mixed|WP_Error List of services that verified this site. Otherwise, a WP_Error instance with the corresponding error. |
| 1477 |
|
*/ |
| 1478 |
|
public function get_verification_tools_data() { |
| 1479 |
|
if ( ! Jetpack::is_module_active( 'verification-tools' ) ) { |
| 1480 |
|
return new WP_Error( |
| 1481 |
|
'not_active', |
| 1482 |
|
esc_html__( 'The requested Jetpack module is not active.', 'jetpack' ), |
| 1483 |
|
array( 'status' => 404 ) |
| 1484 |
|
); |
| 1485 |
|
} |
| 1486 |
|
|
| 1487 |
|
$verification_services_codes = get_option( 'verification_services_codes' ); |
| 1488 |
|
if ( |