delete_widget WordPress Action Hook

The delete_widget hook is called when a widget is deleted from a sidebar. It is passed the id of the sidebar and the id of the widget.

do_action( 'delete_widget', string $widget_id, string $sidebar_id, string $id_base ) #

Fires immediately after a widget has been marked for deletion.


Parameters

$widget_id

(string)ID of the widget marked for deletion.

$sidebar_id

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

$id_base

(string)ID base for the widget.


Top ↑

Source

File: wp-admin/widgets-form.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.