Yoast\WP\SEO\Presenters\Admin

Beta_Badge_Presenter::present()publicYoast 1.0

Presents the Beta Badge. If a link has been passed, the badge is presented with the link. Otherwise a static badge is presented.

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

Хуков нет.

Возвращает

Строку. The styled Beta Badge.

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

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

Код Beta_Badge_Presenter::present() Yoast 24.1

public function present() {
	if ( $this->link !== '' ) {
		return \sprintf(
			'<a class="yoast-badge yoast-badge__is-link yoast-beta-badge" id="%1$s-beta-badge" href="%2$s">%3$s</a>',
			\esc_attr( $this->id ),
			\esc_url( $this->link ),
			'Beta' // We don't want this string to be translatable.
		);
	}

	return \sprintf(
		'<span class="yoast-badge yoast-beta-badge" id="%1$s-beta-badge">%2$s</span>',
		\esc_attr( $this->id ),
		'Beta' // We don't want this string to be translatable.
	);
}