WPSEO_Metabox::render_tabs()protectedYoast 1.0

Renders the metabox tabs.

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

Хуков нет.

Возвращает

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

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->render_tabs();

Код WPSEO_Metabox::render_tabs() Yoast 22.3

protected function render_tabs() {
	echo '<div class="wpseo-metabox-content">';
	// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: $this->get_product_title() returns a hard-coded string.
	printf( '<div class="wpseo-metabox-menu"><ul role="tablist" class="yoast-aria-tabs" aria-label="%s">', $this->get_product_title() );

	$tabs = $this->get_tabs();

	foreach ( $tabs as $tab ) {
		if ( $tab->name === 'premium' ) {
			continue;
		}

		$tab->display_link();
	}

	echo '</ul></div>';

	foreach ( $tabs as $tab ) {
		$tab->display_content();
	}

	echo '</div>';
}