wpseek.com
A WordPress-centric search engine for devs and theme authors



note_sidebar_being_rendered › WordPress Function

Since5.9.0
Deprecatedn/a
note_sidebar_being_rendered ( $index )
Parameters:
  • (int|string) $index Index, name, or ID of the dynamic sidebar.
    Required: Yes
Defined at:
Codex:

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().



Source

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