WPSEO_Replacevar_Editor::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_Editor{}

Хуков нет.

Возвращает

null. Ничего.

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

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

Код WPSEO_Replacevar_Editor::render() Yoast 19.11

public function render() {
	$this->yform->hidden( $this->arguments['title'], $this->arguments['title'] );
	$this->yform->hidden( $this->arguments['description'], $this->arguments['description'] );

	printf(
		'<div
			data-react-replacevar-editor
			data-react-replacevar-title-field-id="%1$s"
			data-react-replacevar-metadesc-field-id="%2$s"
			data-react-replacevar-page-type-recommended="%3$s"
			data-react-replacevar-page-type-specific="%4$s"
			data-react-replacevar-paper-style="%5$s"
			data-react-replacevar-label-title="%6$s"
			data-react-replacevar-label-description="%7$s"
			data-react-replacevar-description-placeholder="%8$s"
			data-react-replacevar-has-new-badge="%9$s"
			data-react-replacevar-is-disabled="%10$s"
			data-react-replacevar-has-premium-badge="%11$s"
		></div>',
		esc_attr( $this->arguments['title'] ),
		esc_attr( $this->arguments['description'] ),
		esc_attr( $this->arguments['page_type_recommended'] ),
		esc_attr( $this->arguments['page_type_specific'] ),
		esc_attr( $this->arguments['paper_style'] ),
		esc_attr( $this->arguments['label_title'] ),
		esc_attr( $this->arguments['label_description'] ),
		esc_attr( $this->arguments['description_placeholder'] ),
		esc_attr( $this->arguments['has_new_badge'] ),
		esc_attr( $this->arguments['is_disabled'] ),
		esc_attr( $this->arguments['has_premium_badge'] )
	);
}