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 |
---|---|
329 | * Note: these actions are also fired in wp_ajax_update_widget(). |
330 | * |
331 | * @since 3.9.0 |
332 | */ |
333 | public function customize_controls_init() { |
334 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
335 | do_action( 'load-widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
336 |
|
337 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
338 | do_action( 'widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
339 |
|
340 | /** This action is documented in wp-admin/widgets.php */ |
341 | do_action( 'sidebar_admin_setup' ); |
342 | } |
343 |
|
344 | /** |
345 | * Ensures widgets are available for all types of previews. |
346 | * |
347 | * When in preview, hook to {@see 'customize_register'} for settings after WordPress is loaded |
Line | Code |
1667 |
|
1668 | if ( empty( $_POST['widget-id'] ) ) { |
1669 | wp_send_json_error( 'missing_widget-id' ); |
1670 | } |
1671 |
|
1672 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
1673 | do_action( 'load-widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1674 |
|
1675 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
1676 | do_action( 'widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1677 |
|
1678 | /** This action is documented in wp-admin/widgets.php */ |
1679 | do_action( 'sidebar_admin_setup' ); |
1680 |
|
1681 | $widget_id = $this->get_post_value( 'widget-id' ); |
1682 | $parsed_id = $this->parse_widget_id( $widget_id ); |
1683 | $id_base = $parsed_id['id_base']; |
1684 |
|
1685 | $is_updating_widget_template = ( |