@@ 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'] ); |
@@ 1769-1771 (lines=3) @@ | ||
1766 | public static function register_site( $request ) { |
|
1767 | _deprecated_function( __METHOD__, 'jetpack-9.7.0', '\Automattic\Jetpack\Connection\REST_Connector::connection_register' ); |
|
1768 | ||
1769 | if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) { |
|
1770 | return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) ); |
|
1771 | } |
|
1772 | ||
1773 | if ( isset( $request['from'] ) ) { |
|
1774 | Jetpack::connection()->add_register_request_param( 'from', (string) $request['from'] ); |