| @@ 601-603 (lines=3) @@ | ||
| 598 | $param = $request->get_params(); |
|
| 599 | ||
| 600 | // Exit if no parameters were passed. |
|
| 601 | if ( ! is_array( $param ) ) { |
|
| 602 | return new WP_Error( 'missing_setting', esc_html__( 'Missing setting.', 'jetpack' ), array( 'status' => 404 ) ); |
|
| 603 | } |
|
| 604 | ||
| 605 | // Get option name and value. |
|
| 606 | $option = key( $param ); |
|
| @@ 426-428 (lines=3) @@ | ||
| 423 | $params = $this->parse_settings_request_body( $request ); |
|
| 424 | ||
| 425 | // Exit if no parameters were passed. |
|
| 426 | if ( ! is_array( $params ) ) { |
|
| 427 | return new WP_Error( 'missing_options', esc_html__( 'Missing options.', 'jetpack' ), array( 'status' => 404 ) ); |
|
| 428 | } |
|
| 429 | ||
| 430 | // Get available module options. |
|
| 431 | $options = Jetpack_Core_Json_Api_Endpoints::get_updateable_data_list( 'any' === $request['slug'] |
|
| @@ 1045-1054 (lines=10) @@ | ||
| 1042 | } |
|
| 1043 | ||
| 1044 | $verification_services_codes = get_option( 'verification_services_codes' ); |
|
| 1045 | if ( |
|
| 1046 | ! is_array( $verification_services_codes ) |
|
| 1047 | || empty( $verification_services_codes ) |
|
| 1048 | ) { |
|
| 1049 | return new WP_Error( |
|
| 1050 | 'empty', |
|
| 1051 | esc_html__( 'Site not verified with any service.', 'jetpack' ), |
|
| 1052 | array( 'status' => 404 ) |
|
| 1053 | ); |
|
| 1054 | } |
|
| 1055 | ||
| 1056 | $services = array(); |
|
| 1057 | foreach ( jetpack_verification_services() as $name => $service ) { |
|