WPSEO_Metabox_Section_React::__construct
Constructor.
Метод класса: WPSEO_Metabox_Section_React{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WPSEO_Metabox_Section_React = new WPSEO_Metabox_Section_React(); $WPSEO_Metabox_Section_React->__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_React::__construct() WPSEO Metabox Section React:: construct Yoast 26.9
public function __construct( $name, $link_content, $content = '', array $options = [] ) {
$this->name = $name;
$this->content = $content;
$default_options = [
'link_class' => '',
'link_aria_label' => '',
'html_after' => '',
];
$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->html_after = $options['html_after'];
}