WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Customize_Widgets::tally_sidebars_via_dynamic_sidebar_calls() public WP 3.9.0

Tallies the sidebars rendered via dynamic_sidebar().

Keep track of the times that dynamic_sidebar() is called in the template, and assume this means the sidebar would be rendered on the template if there were widgets populating it.

Это метод класса: WP_Customize_Widgets{}

Хуков нет.

Возвращает

true/false. Whether the current sidebar has widgets.

Использование

$WP_Customize_Widgets = new WP_Customize_Widgets();
$WP_Customize_Widgets->tally_sidebars_via_dynamic_sidebar_calls( $has_widgets, $sidebar_id );
$has_widgets(true/false) (обязательный)
Whether the current sidebar has widgets.
$sidebar_id(строка) (обязательный)
Sidebar ID.

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

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

Код WP_Customize_Widgets::tally_sidebars_via_dynamic_sidebar_calls() WP 5.5.1

wp-includes/class-wp-customize-widgets.php
<?php
public function tally_sidebars_via_dynamic_sidebar_calls( $has_widgets, $sidebar_id ) {
	if ( is_registered_sidebar( $sidebar_id ) ) {
		$this->rendered_sidebars[ $sidebar_id ] = true;
	}

	/*
	 * We may need to force this to true, and also force-true the value
	 * for 'is_active_sidebar' if we want to ensure there is an area to
	 * drop widgets into, if the sidebar is empty.
	 */
	return $has_widgets;
}