|
@@ 944-950 (lines=7) @@
|
| 941 |
|
* @return mixed|WP_Error Number of days since last downtime. Otherwise, a WP_Error instance with the corresponding error. |
| 942 |
|
*/ |
| 943 |
|
public function get_monitor_data() { |
| 944 |
|
if ( ! Jetpack::is_module_active( 'monitor' ) ) { |
| 945 |
|
return new WP_Error( |
| 946 |
|
'not_active', |
| 947 |
|
esc_html__( 'The requested Jetpack module is not active.', 'jetpack' ), |
| 948 |
|
array( 'status' => 404 ) |
| 949 |
|
); |
| 950 |
|
} |
| 951 |
|
|
| 952 |
|
$monitor = new Jetpack_Monitor(); |
| 953 |
|
$last_downtime = $monitor->monitor_get_last_downtime(); |
|
@@ 977-983 (lines=7) @@
|
| 974 |
|
* @return mixed|WP_Error List of services that verified this site. Otherwise, a WP_Error instance with the corresponding error. |
| 975 |
|
*/ |
| 976 |
|
public function get_verification_tools_data() { |
| 977 |
|
if ( ! Jetpack::is_module_active( 'verification-tools' ) ) { |
| 978 |
|
return new WP_Error( |
| 979 |
|
'not_active', |
| 980 |
|
esc_html__( 'The requested Jetpack module is not active.', 'jetpack' ), |
| 981 |
|
array( 'status' => 404 ) |
| 982 |
|
); |
| 983 |
|
} |
| 984 |
|
|
| 985 |
|
$verification_services_codes = get_option( 'verification_services_codes' ); |
| 986 |
|
if ( |