WordPress at Your Fingertips
action is not described

rest_delete_widget action-hook . WP 5.8.0

Fires after a widget is deleted via the REST API.


add_action( 'rest_delete_widget', 'action_function_name_3223', 10, 4 );
function action_function_name_3223( $widget_id, $sidebar_id, $response, $request ){
	// action...
ID of the widget marked for deletion.
ID of the sidebar the widget was deleted from.
The response data.
The request sent to the API.


Since 5.8.0 Introduced.

Where the hook is called

wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php 415
do_action( 'rest_delete_widget', $widget_id, $sidebar_id, $response, $request );

Where in WP core the hook is used WordPress

wp-includes/default-filters.php 264
add_action( $action, '_delete_option_fresh_site', 0 );