WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта с помощью браузерных PUSH уведомлений
функция не описана

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.

  • label_title(строка)
    Optional. The label to use for the title field.

  • label_description(строка)
    Optional. The label to use for the description field.

  • description_placeholder(строка)
    Optional. The placeholder text to use for the description field.

Код WPSEO_Replacevar_Editor::__construct() Yoast 16.2

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

	$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'],
		'label_title'             => (string) $arguments['label_title'],
		'label_description'       => (string) $arguments['label_description'],
		'description_placeholder' => (string) $arguments['description_placeholder'],
	];
}