@@ 1797-1799 (lines=3) @@ | ||
1794 | public static function register_site( $request ) { |
|
1795 | _deprecated_function( __METHOD__, 'jetpack-9.7.0', '\Automattic\Jetpack\Connection\REST_Connector::connection_register' ); |
|
1796 | ||
1797 | if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) { |
|
1798 | return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) ); |
|
1799 | } |
|
1800 | ||
1801 | if ( isset( $request['from'] ) ) { |
|
1802 | Jetpack::connection()->add_register_request_param( 'from', (string) $request['from'] ); |
@@ 469-471 (lines=3) @@ | ||
466 | * @return \WP_REST_Response|WP_Error |
|
467 | */ |
|
468 | public function connection_register( $request ) { |
|
469 | if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) { |
|
470 | return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) ); |
|
471 | } |
|
472 | ||
473 | if ( isset( $request['from'] ) ) { |
|
474 | $this->connection->add_register_request_param( 'from', (string) $request['from'] ); |