rest_pre_serve_request

rest_pre_serve_request

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

do_action('rest_pre_serve_request') is found 1 times:

  • /wp-includes/rest-api/class-wp-rest-server.php line 515
    		 * @param WP_HTTP_Response $result  Result to send to the client. Usually a `WP_REST_Response`.
    		 * @param WP_REST_Request  $request Request used to generate the response.
    		 * @param WP_REST_Server   $server  Server instance.
    		 */
    		$served = apply_filters( 'rest_pre_serve_request', false, $result, $request, $this );
    
    		if ( ! $served ) {
    			if ( 'HEAD' === $request->get_method() ) {
    				return null;
    			}
    
    

See this hook used in plugins: