rest_request_before_callbacks

rest_request_before_callbacks

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

See hook in core

Displaying hooks found in version: wordpress-6.7.1

do_action('rest_request_before_callbacks') is found 1 times:

  • /wp-includes/rest-api/class-wp-rest-server.php line 1255
    		 *                                                                   Usually a WP_REST_Response or WP_Error.
    		 * @param array                                            $handler  Route handler used for the request.
    		 * @param WP_REST_Request                                  $request  Request used to generate the response.
    		 */
    		$response = apply_filters( 'rest_request_before_callbacks', $response, $handler, $request );
    
    		// Check permission specified on the route.
    		if ( ! is_wp_error( $response ) && ! empty( $handler['permission_callback'] ) ) {
    			$permission = call_user_func( $handler['permission_callback'], $request );
    
    			if ( is_wp_error( $permission ) ) {
    

See this hook used in plugins: