WP_Customize_Control::active()
Check whether control is active to current Customizer preview.
Метод класса: WP_Customize_Control{}
Хуки из метода
Возвращает
true|false
. Whether the control is active to the current preview.
Использование
$WP_Customize_Control = new WP_Customize_Control(); $WP_Customize_Control->active();
Список изменений
С версии 4.0.0 | Введена. |
Код WP_Customize_Control::active() WP Customize Control::active WP 6.7.1
final public function active() { $control = $this; $active = call_user_func( $this->active_callback, $this ); /** * Filters response of WP_Customize_Control::active(). * * @since 4.0.0 * * @param bool $active Whether the Customizer control is active. * @param WP_Customize_Control $control WP_Customize_Control instance. */ $active = apply_filters( 'customize_control_active', $active, $control ); return $active; }