Yoast\WP\SEO\Presenters\Admin

Light_Switch_Presenter::__constructpublicYoast 1.0

Light_Switch_Presenter constructor.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$Light_Switch_Presenter = new Light_Switch_Presenter();
$Light_Switch_Presenter->__construct( $variable, $label, $buttons, $name, $value, $reverse, $help, $strong, $disabled_attribute );
$variable(строка) (обязательный)
The variable to create the checkbox for.
$label(строка) (обязательный)
The visual label text for the toggle.
$buttons(массив) (обязательный)
Array of two visual labels for the buttons (defaults Disabled/Enabled).
$name(строка) (обязательный)
The name of the underlying checkbox.
$value(строка|true|false) (обязательный)
The variable current value, to determine the checked attribute.
$reverse(true|false)
Reverse order of buttons (default true).
По умолчанию: true
$help(строка)
Inline Help HTML that will be printed out before the toggle.
По умолчанию: ''
$strong(true|false)
Whether the visual label is displayed in strong text. Starting from Yoast SEO 16.5, the visual label is forced to bold via CSS.
По умолчанию: false
$disabled_attribute(строка)
The disabled HTML attribute.
По умолчанию: ''

Код Light_Switch_Presenter::__construct() Yoast 26.5

public function __construct(
	$variable,
	$label,
	$buttons,
	$name,
	$value,
	$reverse = true,
	$help = '',
	$strong = false,
	$disabled_attribute = ''
) {
	$this->var                = $variable;
	$this->label              = $label;
	$this->buttons            = $buttons;
	$this->name               = $name;
	$this->value              = $value;
	$this->reverse            = $reverse;
	$this->help               = $help;
	$this->strong             = $strong;
	$this->disabled_attribute = $disabled_attribute;
}