WPSEO_Replacevar_Field::render()publicYoast 1.0

Renders a div for the react application to mount to, and hidden inputs where the app should store it's value so they will be properly saved when the form is submitted.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Replacevar_Field = new WPSEO_Replacevar_Field();
$WPSEO_Replacevar_Field->render();

Код WPSEO_Replacevar_Field::render() Yoast 22.0

public function render() {
	$this->yform->hidden( $this->field_id, $this->field_id );

	printf(
		'<div
			data-react-replacevar-field
			data-react-replacevar-field-id="%1$s"
			data-react-replacevar-field-label="%2$s"
			data-react-replacevar-page-type-recommended="%3$s"
			data-react-replacevar-page-type-specific="%4$s"></div>',
		esc_attr( $this->field_id ),
		esc_attr( $this->label ),
		esc_attr( $this->page_type_recommended ),
		esc_attr( $this->page_type_specific )
	);
}