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 | 
|---|---|
| 276 |       * | 
| 277 |       * @since 3.9.0 | 
| 278 |       * @access public | 
| 279 |       */ | 
| 280 |      public function customize_controls_init() { | 
| 281 |           /** This action is documented in wp-admin/includes/ajax-actions.php */ | 
| 282 |           do_action( 'load-widgets.php' ); | 
| 283 |  | 
| 284 |           /** This action is documented in wp-admin/includes/ajax-actions.php */ | 
| 285 |           do_action( 'widgets.php' ); | 
| 286 |  | 
| 287 |           /** This action is documented in wp-admin/widgets.php */ | 
| 288 |           do_action( 'sidebar_admin_setup' ); | 
| 289 |      } | 
| 290 |  | 
| 291 |      /** | 
| 292 |       * Ensure widgets are available for all types of previews. | 
| 293 |       * | 
| 294 |       * When in preview, hook to 'customize_register' for settings | 
| Line | Code | 
| 1423 |  | 
| 1424 |           if ( empty( $_POST['widget-id'] ) ) { | 
| 1425 |                wp_send_json_error( 'missing_widget-id' ); | 
| 1426 |           } | 
| 1427 |  | 
| 1428 |           /** This action is documented in wp-admin/includes/ajax-actions.php */ | 
| 1429 |           do_action( 'load-widgets.php' ); | 
| 1430 |  | 
| 1431 |           /** This action is documented in wp-admin/includes/ajax-actions.php */ | 
| 1432 |           do_action( 'widgets.php' ); | 
| 1433 |  | 
| 1434 |           /** This action is documented in wp-admin/widgets.php */ | 
| 1435 |           do_action( 'sidebar_admin_setup' ); | 
| 1436 |  | 
| 1437 |           $widget_id = $this->get_post_value( 'widget-id' ); | 
| 1438 |           $parsed_id = $this->parse_widget_id( $widget_id ); | 
| 1439 |           $id_base = $parsed_id['id_base']; | 
| 1440 |  | 
| 1441 |           $is_updating_widget_template = ( |