note_sidebar_being_rendered()WP 1.0

Make a note of the sidebar being rendered before WordPress starts rendering it. This lets us get to the current sidebar in render_block_core_widget_group().

No Hooks.

Return

null. Nothing.

Usage

note_sidebar_being_rendered( $index );
$index(int|string) (required)
Index, name, or ID of the dynamic sidebar.

note_sidebar_being_rendered() code WP 6.1.1

function note_sidebar_being_rendered( $index ) {
	global $_sidebar_being_rendered;
	$_sidebar_being_rendered = $index;
}