rest_after_save_widget WordPress Action Hook
The rest_after_save_widget hook is called after a widget is saved via the REST API. This hook gives developers an opportunity to perform an action after a widget is saved. This is useful for tasks such as logging or sending a notification.
do_action( 'rest_after_save_widget', string $id , string $sidebar_id , WP_REST_Request $request , bool $creating ) #
Fires after a widget is created or updated via the REST API.
Parameters
- $id
(string)ID of the widget being saved.
- $sidebar_id
(string)ID of the sidebar containing the widget being saved.
- $request
(WP_REST_Request)Request object.
- $creating
(bool)True when creating a widget, false when updating.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php
Changelog
Version | Description |
---|---|
5.8.0 | Introduced. |