Filters the REST API response for a widget.
$responseWP_REST_Response|WP_Error$widgetarray$requestWP_REST_Requestwp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php:742WP_REST_Widgets_Controller::prepare_item_for_response() * @since 5.8.0 * * @param WP_REST_Response|WP_Error $response The response object, or WP_Error object on failure. * @param array $widget The registered widget data. * @param WP_REST_Request $request Request used to generate the response. */ return apply_filters( 'rest_prepare_widget', $response, $widget, $request ); } /** * Prepares links for the widget. * * @since 5.8.0Introduced in 5.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.