Yoast_Form::is_control_disabled
Checks whether a given control should be disabled.
Метод класса: Yoast_Form{}
Хуков нет.
Возвращает
true|false. True if control should be disabled, false otherwise.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_control_disabled( $variable );
- $variable(строка) (обязательный)
- The variable within the option to check whether its control should be disabled.
Код Yoast_Form::is_control_disabled() Yoast Form::is control disabled Yoast 27.4
protected function is_control_disabled( $variable ) {
if ( $this->option_instance === null ) {
return false;
}
// Disable the Usage tracking feature for multisite subsites.
if ( $this->is_tracking_on_subsite( $variable ) ) {
return true;
}
return $this->option_instance->is_disabled( $variable );
}