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 |
|---|---|
| 354 | * Make sure all widgets get loaded into the Customizer. |
| 355 | * |
| 356 | * Note: these actions are also fired in wp_ajax_update_widget(). |
| 357 | * |
| 358 | * @since 3.9.0 |
| 359 | * @access public |
| 360 | */ |
| 361 | public function customize_controls_init() { |
| 362 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
| 363 | do_action( 'load-widgets.php' ); |
| 364 | |
| 365 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
| 366 | do_action( 'widgets.php' ); |
| 367 | |
| 368 | /** This action is documented in wp-admin/widgets.php */ |
| 369 | do_action( 'sidebar_admin_setup' ); |
| 370 | } |
| 371 | |
| 372 | /** |
| Line | Code |
| 1382 | if ( ! current_user_can( 'edit_theme_options' ) ) { |
| 1383 | wp_die( -1 ); |
| 1384 | } |
| 1385 | |
| 1386 | if ( ! isset( $_POST['widget-id'] ) ) { |
| 1387 | wp_send_json_error(); |
| 1388 | } |
| 1389 | |
| 1390 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
| 1391 | do_action( 'load-widgets.php' ); |
| 1392 | |
| 1393 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
| 1394 | do_action( 'widgets.php' ); |
| 1395 | |
| 1396 | /** This action is documented in wp-admin/widgets.php */ |
| 1397 | do_action( 'sidebar_admin_setup' ); |
| 1398 | |
| 1399 | $widget_id = $this->get_post_value( 'widget-id' ); |
| 1400 | $parsed_id = $this->parse_widget_id( $widget_id ); |