WordPress at a glance
action is not described

dynamic_sidebar_before action-hook . WP 3.9.0

Fires before widgets are rendered in a dynamic sidebar.

Note: The action also fires for empty sidebars, and on both the front end and back end, including the Inactive Widgets sidebar on the Widgets screen.


add_action( 'dynamic_sidebar_before', 'action_function_name_3600', 10, 2 );
function action_function_name_3600( $index, $has_widgets ){
	// action...
Index, name, or ID of the dynamic sidebar.
Whether the sidebar is populated with widgets.
Default: true

Список изменений

С версии 3.9.0 Введена.

Где вызывается хук

wp-includes/widgets.php 706
do_action( 'dynamic_sidebar_before', $index, true );
wp-includes/widgets.php 687
do_action( 'dynamic_sidebar_before', $index, false );

Где используется хук в ядре WP

wp-includes/class-wp-customize-widgets.php 1627
add_action( 'dynamic_sidebar_before', array( $this, 'start_dynamic_sidebar' ) );