| @@ 518-521 (lines=4) @@ | ||
| 515 | $json = false; |
|
| 516 | } |
|
| 517 | ||
| 518 | if ( empty( $json->jetpack_secret ) || ! is_string( $json->jetpack_secret ) ) { |
|
| 519 | restore_current_blog(); |
|
| 520 | return new Jetpack_Error( 'jetpack_secret', '', $code ); |
|
| 521 | } |
|
| 522 | ||
| 523 | if ( isset( $json->jetpack_public ) ) { |
|
| 524 | $jetpack_public = (int) $json->jetpack_public; |
|
| @@ 5330-5332 (lines=3) @@ | ||
| 5327 | return new Jetpack_Error( 'unknown_error', __( 'Unknown error registering your Jetpack site', 'jetpack' ), wp_remote_retrieve_response_code( $response ) ); |
|
| 5328 | } |
|
| 5329 | ||
| 5330 | if ( empty( $registration_details->jetpack_secret ) || ! is_string( $registration_details->jetpack_secret ) ) { |
|
| 5331 | return new Jetpack_Error( 'jetpack_secret', '', wp_remote_retrieve_response_code( $response ) ); |
|
| 5332 | } |
|
| 5333 | ||
| 5334 | if ( isset( $registration_details->jetpack_public ) ) { |
|
| 5335 | $jetpack_public = (int) $registration_details->jetpack_public; |
|