_inc/lib/class.core-rest-api-endpoints.php 1 location
|
@@ 800-802 (lines=3) @@
|
797 |
|
$param = $request->get_params(); |
798 |
|
|
799 |
|
// Exit if no parameters were passed. |
800 |
|
if ( ! is_array( $param ) ) { |
801 |
|
return new WP_Error( 'missing_setting', esc_html__( 'Missing setting.', 'jetpack' ), array( 'status' => 404 ) ); |
802 |
|
} |
803 |
|
|
804 |
|
// Get option name and value. |
805 |
|
$option = key( $param ); |
_inc/lib/core-api/class.jetpack-core-api-site-endpoints.php 1 location
|
@@ 34-40 (lines=7) @@
|
31 |
|
$results = json_decode( $response['body'], true ); |
32 |
|
|
33 |
|
// Bail if there were no results or plan details returned |
34 |
|
if ( ! is_array( $results ) ) { |
35 |
|
return new WP_Error( |
36 |
|
'failed_to_fetch_data', |
37 |
|
esc_html__( 'Unable to fetch the requested data.', 'jetpack' ), |
38 |
|
array( 'status' => 500 ) |
39 |
|
); |
40 |
|
} |
41 |
|
|
42 |
|
return rest_ensure_response( array( |
43 |
|
'code' => 'success', |
_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php 1 location
|
@@ 1488-1497 (lines=10) @@
|
1485 |
|
} |
1486 |
|
|
1487 |
|
$verification_services_codes = get_option( 'verification_services_codes' ); |
1488 |
|
if ( |
1489 |
|
! is_array( $verification_services_codes ) |
1490 |
|
|| empty( $verification_services_codes ) |
1491 |
|
) { |
1492 |
|
return new WP_Error( |
1493 |
|
'empty', |
1494 |
|
esc_html__( 'Site not verified with any service.', 'jetpack' ), |
1495 |
|
array( 'status' => 404 ) |
1496 |
|
); |
1497 |
|
} |
1498 |
|
|
1499 |
|
$services = array(); |
1500 |
|
foreach ( jetpack_verification_services() as $name => $service ) { |