@@ 487-489 (lines=3) @@ | ||
484 | * @return \WP_REST_Response|WP_Error |
|
485 | */ |
|
486 | public function connection_register( $request ) { |
|
487 | if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) { |
|
488 | return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) ); |
|
489 | } |
|
490 | ||
491 | if ( isset( $request['from'] ) ) { |
|
492 | $this->connection->add_register_request_param( 'from', (string) $request['from'] ); |
@@ 1721-1723 (lines=3) @@ | ||
1718 | public static function register_site( $request ) { |
|
1719 | _deprecated_function( __METHOD__, 'jetpack-9.7.0', '\Automattic\Jetpack\Connection\REST_Connector::connection_register' ); |
|
1720 | ||
1721 | if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) { |
|
1722 | return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) ); |
|
1723 | } |
|
1724 | ||
1725 | if ( isset( $request['from'] ) ) { |
|
1726 | Jetpack::connection()->add_register_request_param( 'from', (string) $request['from'] ); |