WPSEO_Metabox_Section_Additional::__construct()publicYoast 1.0

Constructor.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Metabox_Section_Additional = new WPSEO_Metabox_Section_Additional();
$WPSEO_Metabox_Section_Additional->__construct( $name, $link_content, $content, $options );
$name(строка) (обязательный)
The name of the section, used as an identifier in the html. Can only contain URL safe characters.
$link_content(строка) (обязательный)
The text content of the section link.
$content(строка)
Content to use above the React root element.
По умолчанию: ''
$options(массив)
Optional link attributes.
По умолчанию: []

Код WPSEO_Metabox_Section_Additional::__construct() Yoast 22.4

public function __construct( $name, $link_content, $content = '', array $options = [] ) {
	$this->name            = $name;
	$this->content         = $content;
	$default_options       = [
		'link_class'      => '',
		'link_aria_label' => '',
		'content_class'   => 'wpseo-form',
	];
	$options               = wp_parse_args( $options, $default_options );
	$this->link_content    = $link_content;
	$this->link_class      = $options['link_class'];
	$this->link_aria_label = $options['link_aria_label'];
	$this->content_class   = $options['content_class'];
}