WPSEO_Metabox_Form_Tab::__construct()publicYoast 1.0

Constructor.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Metabox_Form_Tab = new WPSEO_Metabox_Form_Tab();
$WPSEO_Metabox_Form_Tab->__construct( $name, $content, $link_content, $options );
$name(строка) (обязательный)
The name of the tab, used as an identifier in the html.
$content(строка) (обязательный)
The tab content.
$link_content(строка) (обязательный)
The text content of the tab link.
$options(массив)
Optional link attributes.
По умолчанию: []

Код WPSEO_Metabox_Form_Tab::__construct() Yoast 22.4

public function __construct( $name, $content, $link_content, array $options = [] ) {
	$default_options = [
		'tab_class'       => '',
		'link_class'      => '',
		'link_title'      => '',
		'link_aria_label' => '',
		'single'          => false,
	];

	$options = array_merge( $default_options, $options );

	$this->name            = $name;
	$this->content         = $content;
	$this->link_content    = $link_content;
	$this->tab_class       = $options['tab_class'];
	$this->link_class      = $options['link_class'];
	$this->link_title      = $options['link_title'];
	$this->link_aria_label = $options['link_aria_label'];
	$this->single          = $options['single'];
}