Yoast\WP\SEO\Presenters\Slack

Enhanced_Data_Presenter::present()publicYoast 1.0

Presents the enhanced data for Slack

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

Хуков нет.

Возвращает

Строку. The Twitter tags for Slack.

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

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

Код Enhanced_Data_Presenter::present() Yoast 19.11

public function present() {
	$enhanced_data = $this->get();
	$twitter_tags  = '';
	$i             = 1;
	$class         = \is_admin_bar_showing() ? ' class="yoast-seo-meta-tag"' : '';
	foreach ( $enhanced_data as $label => $value ) {
		$twitter_tags .= \sprintf( "\t" . '<meta name="twitter:label%1$d" content="%2$s"' . $class . ' />' . "\n", $i, $label );
		$twitter_tags .= \sprintf( "\t" . '<meta name="twitter:data%1$d" content="%2$s"' . $class . ' />' . "\n", $i, $value );
		++$i;
	}

	return \trim( $twitter_tags );
}