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 |
---|---|
334 | * Ensures all widgets get loaded into the Customizer. |
335 | * |
336 | * Note: these actions are also fired in wp_ajax_update_widget(). |
337 | * |
338 | * @since 3.9.0 |
339 | * @access public |
340 | */ |
341 | public function customize_controls_init() { |
342 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
343 | do_action( 'load-widgets.php' ); |
344 |
|
345 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
346 | do_action( 'widgets.php' ); |
347 |
|
348 | /** This action is documented in wp-admin/widgets.php */ |
349 | do_action( 'sidebar_admin_setup' ); |
350 | } |
351 |
|
352 | /** |
Line | Code |
1537 | if ( ! current_user_can( 'edit_theme_options' ) ) { |
1538 | wp_die( -1 ); |
1539 | } |
1540 |
|
1541 | if ( empty( $_POST['widget-id'] ) ) { |
1542 | wp_send_json_error( 'missing_widget-id' ); |
1543 | } |
1544 |
|
1545 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
1546 | do_action( 'load-widgets.php' ); |
1547 |
|
1548 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
1549 | do_action( 'widgets.php' ); |
1550 |
|
1551 | /** This action is documented in wp-admin/widgets.php */ |
1552 | do_action( 'sidebar_admin_setup' ); |
1553 |
|
1554 | $widget_id = $this->get_post_value( 'widget-id' ); |
1555 | $parsed_id = $this->parse_widget_id( $widget_id ); |