WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

WPSEO_Replacevar_Editor::__construct() public Yoast 1.0

Constructs the object.

Это метод класса: WPSEO_Replacevar_Editor{}

Хуков нет.

Возвращает

Null. Ничего.

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

$WPSEO_Replacevar_Editor = new WPSEO_Replacevar_Editor();
$WPSEO_Replacevar_Editor->__construct( $yform, $arguments );
$yform(Yoast_Form) (обязательный)
Yoast forms.
$arguments(массив) (обязательный)

The arguments that can be given.

  • title(строка)
    The title field id.

  • description(строка)
    The description field id.

  • page_type_recommended(строка)
    The page type for the context of the recommended replace vars.

  • page_type_specific(строка)
    The page type for the context of the editor specific replace vars.

  • paper_style(true/false)
    Optional. Whether the editor has paper style.

Код WPSEO_Replacevar_Editor::__construct() Yoast 15.1.1

<?php
public function __construct( Yoast_Form $yform, $arguments ) {
	$arguments = wp_parse_args(
		$arguments,
		[
			'paper_style' => true,
		]
	);

	$this->validate_arguments( $arguments );

	$this->yform     = $yform;
	$this->arguments = [
		'title'                 => (string) $arguments['title'],
		'description'           => (string) $arguments['description'],
		'page_type_recommended' => (string) $arguments['page_type_recommended'],
		'page_type_specific'    => (string) $arguments['page_type_specific'],
		'paper_style'           => (bool) $arguments['paper_style'],
	];
}