| @@ 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'] ); |
|
| @@ 1798-1800 (lines=3) @@ | ||
| 1795 | public static function register_site( $request ) { |
|
| 1796 | _deprecated_function( __METHOD__, 'jetpack-9.7.0', '\Automattic\Jetpack\Connection\REST_Connector::connection_register' ); |
|
| 1797 | ||
| 1798 | if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) { |
|
| 1799 | return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) ); |
|
| 1800 | } |
|
| 1801 | ||
| 1802 | if ( isset( $request['from'] ) ) { |
|
| 1803 | Jetpack::connection()->add_register_request_param( 'from', (string) $request['from'] ); |
|