| @@ 1734-1736 (lines=3) @@ | ||
| 1731 | public static function register_site( $request ) { |
|
| 1732 | _deprecated_function( __METHOD__, 'jetpack-9.7.0', '\Automattic\Jetpack\Connection\REST_Connector::connection_register' ); |
|
| 1733 | ||
| 1734 | if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) { |
|
| 1735 | return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) ); |
|
| 1736 | } |
|
| 1737 | ||
| 1738 | if ( isset( $request['from'] ) ) { |
|
| 1739 | Jetpack::connection()->add_register_request_param( 'from', (string) $request['from'] ); |
|
| @@ 445-447 (lines=3) @@ | ||
| 442 | * @return \WP_REST_Response|WP_Error |
|
| 443 | */ |
|
| 444 | public function connection_register( $request ) { |
|
| 445 | if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) { |
|
| 446 | return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) ); |
|
| 447 | } |
|
| 448 | ||
| 449 | if ( isset( $request['from'] ) ) { |
|
| 450 | $this->connection->add_register_request_param( 'from', (string) $request['from'] ); |
|