Yoast_Form::get_disabled_attribute()protectedYoast 1.0

Returns the disabled attribute HTML.

Метод класса: Yoast_Form{}

Хуков нет.

Возвращает

Строку. The disabled attribute HTML.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_disabled_attribute( $variable, $attr );
$variable(строка) (обязательный)
The variable within the option of the related form element.
$attr(массив) (обязательный)
Extra attributes added to the form element.

Код Yoast_Form::get_disabled_attribute() Yoast 22.3

protected function get_disabled_attribute( $variable, $attr ) {
	if ( $this->is_control_disabled( $variable ) || ( isset( $attr['disabled'] ) && $attr['disabled'] ) ) {
		return ' disabled';
	}

	return '';
}