Yoast\WP\SEO\Presenters\Admin

Meta_Fields_Presenter::present()publicYoast 1.0

Presents the Meta Fields.

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

Хуков нет.

Возвращает

Строку. The styled Alert.

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

$Meta_Fields_Presenter = new Meta_Fields_Presenter();
$Meta_Fields_Presenter->present();

Код Meta_Fields_Presenter::present() Yoast 22.4

public function present() {
	$output = '';

	foreach ( $this->meta_fields as $key => $meta_field ) {
		$form_key   = \esc_attr( WPSEO_Meta::$form_prefix . $key );
		$meta_value = WPSEO_Meta::get_value( $key, $this->post->ID );

		$default = '';
		if ( isset( $meta_field['default'] ) ) {
			$default = \sprintf( ' data-default="%s"', \esc_attr( $meta_field['default'] ) );
		}

		$output .= '<input type="hidden" id="' . $form_key . '" name="' . $form_key . '" value="' . \esc_attr( $meta_value ) . '"' . $default . '/>' . "\n";
	}

	return $output;
}