dynamic_sidebar_before

dynamic_sidebar_before

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.6.2

do_action('dynamic_sidebar_before') is found 2 times:

  • /wp-includes/widgets.php line 715
     
    	$sidebars_widgets = wp_get_sidebars_widgets();
    	if ( empty( $wp_registered_sidebars[ $index ] ) || empty( $sidebars_widgets[ $index ] ) || ! is_array( $sidebars_widgets[ $index ] ) ) {
    		/** This action is documented in wp-includes/widget.php */
    		do_action( 'dynamic_sidebar_before', $index, false );
    		/** This action is documented in wp-includes/widget.php */
    		do_action( 'dynamic_sidebar_after', $index, false );
    		/** This filter is documented in wp-includes/widget.php */
    		return apply_filters( 'dynamic_sidebar_has_widgets', false, $index );
    	}
    
    
  • /wp-includes/widgets.php line 738
    	 * @param int|string $index       Index, name, or ID of the dynamic sidebar.
    	 * @param bool       $has_widgets Whether the sidebar is populated with widgets.
    	 *                                Default true.
    	 */
    	do_action( 'dynamic_sidebar_before', $index, true );
    
    	if ( ! is_admin() && ! empty( $sidebar['before_sidebar'] ) ) {
    		echo $sidebar['before_sidebar'];
    	}
    
    	$did_one = false;
    

See this hook used in plugins: