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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
109 | wp_dashboard_trigger_widget_control( $_POST['widget_id'] ); |
110 | ob_end_clean(); |
111 | wp_redirect( remove_query_arg( 'edit' ) ); |
112 | exit; |
113 | } |
114 |
|
115 | if ( $update ) |
116 | update_option( 'dashboard_widget_options', $widget_options ); |
117 |
|
118 | do_action('do_meta_boxes', 'dashboard', 'normal', ''); |
119 | do_action('do_meta_boxes', 'dashboard', 'side', ''); |
120 | } |
121 |
|
122 | function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null ) { |
123 | global $wp_dashboard_control_callbacks; |
124 | if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) { |
125 | $wp_dashboard_control_callbacks[$widget_id] = $control_callback; |
126 | if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) { |
127 | list($url) = explode( '#', add_query_arg( 'edit', false ), 2 ); |
128 | $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( $url ) . '">' . __( 'Cancel' ) . '</a></span>'; |