customize_control_active хук-фильтрWP 4.0.0

Filters response of WP_Customize_Control::active().

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

add_filter( 'customize_control_active', 'wp_kama_customize_control_active_filter', 10, 2 );

/**
 * Function for `customize_control_active` filter-hook.
 * 
 * @param bool                 $active  Whether the Customizer control is active.
 * @param WP_Customize_Control $control WP_Customize_Control instance.
 *
 * @return bool
 */
function wp_kama_customize_control_active_filter( $active, $control ){

	// filter...
	return $active;
}
$active(true|false)
Whether the Customizer control is active.
$control(WP_Customize_Control)
WP_Customize_Control instance.

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

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

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

WP_Customize_Control::active()
customize_control_active
wp-includes/class-wp-customize-control.php 270
$active = apply_filters( 'customize_control_active', $active, $control );

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

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