_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
|
@@ 1537-1546 (lines=10) @@
|
1534 |
|
} |
1535 |
|
|
1536 |
|
$verification_services_codes = get_option( 'verification_services_codes' ); |
1537 |
|
if ( |
1538 |
|
! is_array( $verification_services_codes ) |
1539 |
|
|| empty( $verification_services_codes ) |
1540 |
|
) { |
1541 |
|
return new WP_Error( |
1542 |
|
'empty', |
1543 |
|
esc_html__( 'Site not verified with any service.', 'jetpack' ), |
1544 |
|
array( 'status' => 404 ) |
1545 |
|
); |
1546 |
|
} |
1547 |
|
|
1548 |
|
$services = array(); |
1549 |
|
foreach ( jetpack_verification_services() as $name => $service ) { |