Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: do_meta_boxes

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

This hook occurs 2 times in this file.

Line Code
147           check_admin_referer( 'edit-dashboard-widget_' . $_POST['widget_id'], 'dashboard-widget-nonce' );
148           ob_start(); // Hack - but the same hack wp-admin/widgets.php uses.
149           wp_dashboard_trigger_widget_control( $_POST['widget_id'] );
150           ob_end_clean();
151           wp_redirect( remove_query_arg( 'edit' ) );
152           exit;
153      }
154
155      /** This action is documented in wp-admin/includes/meta-boxes.php */
156      do_action( 'do_meta_boxes', $screen->id, 'normal', '' );
157
158      /** This action is documented in wp-admin/includes/meta-boxes.php */
159      do_action( 'do_meta_boxes', $screen->id, 'side', '' );
160 }
161
162 /**
163  * Adds a new dashboard widget.
164  *
165  * @since 2.7.0
166  * @since 5.6.0 The `$context` and `$priority` parameters were added.
167  *
168  * @global callable[] $wp_dashboard_control_callbacks