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 |
---|---|
333 | */ |
334 | public function customize_controls_init() { |
335 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
336 | do_action( 'load-widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
337 |
|
338 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
339 | do_action( 'widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
340 |
|
341 | /** This action is documented in wp-admin/widgets.php */ |
342 | do_action( 'sidebar_admin_setup' ); |
343 | } |
344 |
|
345 | /** |
346 | * Ensures widgets are available for all types of previews. |
347 | * |
348 | * When in preview, hook to {@see 'customize_register'} for settings after WordPress is loaded |
349 | * so that all filters have been initialized (e.g. Widget Visibility). |
350 | * |
351 | * @since 3.9.0 |
Line | Code |
1538 | } |
1539 |
|
1540 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
1541 | do_action( 'load-widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1542 |
|
1543 | /** This action is documented in wp-admin/includes/ajax-actions.php */ |
1544 | do_action( 'widgets.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1545 |
|
1546 | /** This action is documented in wp-admin/widgets.php */ |
1547 | do_action( 'sidebar_admin_setup' ); |
1548 |
|
1549 | $widget_id = $this->get_post_value( 'widget-id' ); |
1550 | $parsed_id = $this->parse_widget_id( $widget_id ); |
1551 | $id_base = $parsed_id['id_base']; |
1552 |
|
1553 | $is_updating_widget_template = ( |
1554 | isset( $_POST[ 'widget-' . $id_base ] ) |
1555 | && |
1556 | is_array( $_POST[ 'widget-' . $id_base ] ) |