do_action( 'rest_delete_widget', string $widget_id, string $sidebar_id, WP_REST_Response $response, WP_REST_Request $request )

Fires after a widget is deleted via the REST API.

Parameters

$widget_id

(string) ID of the widget marked for deletion.

$sidebar_id

(string) ID of the sidebar the widget was deleted from.

$response

(WP_REST_Response) The response data.

$request

(WP_REST_Request) The request sent to the API.

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php

View on Trac

Changelog

Version Description
5.8.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_delete_widget