Action hook 'rest_delete_widget'

in WP Core File wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php at line 468

Description

Fires after a widget is deleted via the REST API.

Occurrences

Filename Line Number
wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php 468

Parameters

Type Name Description
string $widget_id ID of the widget marked for deletion.
string $sidebar_id ID of the sidebar the widget was deleted from.
WP_REST_Response|WP_Error $response The response data, or WP_Error object on failure.
WP_REST_Request $request The request sent to the API.

PHP Doc

/**
		 * Fires after a widget is deleted via the REST API.
		 *
		 * @since 5.8.0
		 *
		 * @param string                    $widget_id  ID of the widget marked for deletion.
		 * @param string                    $sidebar_id ID of the sidebar the widget was deleted from.
		 * @param WP_REST_Response|WP_Error $response   The response data, or WP_Error object on failure.
		 * @param WP_REST_Request           $request    The request sent to the API.
		 */