Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: delete_widget

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
156           /**
157            * Fires immediately after a widget has been marked for deletion.
158            *
159            * @since 4.4.0
160            *
161            * @param string $widget_id  ID of the widget marked for deletion.
162            * @param string $sidebar_id ID of the sidebar the widget was deleted from.
163            * @param string $id_base    ID base for the widget.
164            */
165           do_action( 'delete_widget', $widget_id, $sidebar_id, $id_base );
166      }
167
168      $_POST['widget-id'] = $sidebar;
169
170      foreach ( (array) $wp_registered_widget_updates as $name => $control ) {
171           if ( $name != $id_base || !is_callable($control['callback']) )
172                continue;
173
174           ob_start();