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 |
|---|---|
| 2391 | $sidebar = array_diff( $sidebar, array( $widget_id ) ); |
| 2392 | $_POST = array( |
| 2393 | 'sidebar' => $sidebar_id, |
| 2394 | 'widget-' . $id_base => array(), |
| 2395 | 'the-widget-id' => $widget_id, |
| 2396 | 'delete_widget' => '1', |
| 2397 | ); |
| 2398 | |
| 2399 | /** This action is documented in wp-admin/widgets.php */ |
| 2400 | do_action( 'delete_widget', $widget_id, $sidebar_id, $id_base ); |
| 2401 | |
| 2402 | } elseif ( $settings && preg_match( '/__i__|%i%/', key( $settings ) ) ) { |
| 2403 | if ( ! $multi_number ) { |
| 2404 | wp_die( $error ); |
| 2405 | } |
| 2406 | |
| 2407 | $_POST[ 'widget-' . $id_base ] = array( $multi_number => reset( $settings ) ); |
| 2408 | $widget_id = $id_base . '-' . $multi_number; |
| 2409 | $sidebar[] = $widget_id; |