WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 351 | $_POST = array( |
| 352 | 'sidebar' => $sidebar_id, |
| 353 | "widget-$id_base" => array(), |
| 354 | 'the-widget-id' => $widget_id, |
| 355 | 'delete_widget' => '1', |
| 356 | ); |
| 357 | $_REQUEST = $_POST; |
| 358 | |
| 359 | /** This action is documented in wp-admin/widgets-form.php */ |
| 360 | do_action( 'delete_widget', $widget_id, $sidebar_id, $id_base ); |
| 361 | |
| 362 | $callback = $wp_registered_widget_updates[ $id_base ]['callback']; |
| 363 | $params = $wp_registered_widget_updates[ $id_base ]['params']; |
| 364 | |
| 365 | if ( is_callable( $callback ) ) { |
| 366 | ob_start(); |
| 367 | call_user_func_array( $callback, $params ); |
| 368 | ob_end_clean(); |
| 369 | } |