WPSEO_Metabox_Collapsibles_Sections::display_content()publicYoast 1.0

Outputs the section content if any tab has been added.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Metabox_Collapsibles_Sections = new WPSEO_Metabox_Collapsibles_Sections();
$WPSEO_Metabox_Collapsibles_Sections->display_content();

Код WPSEO_Metabox_Collapsibles_Sections::display_content() Yoast 22.4

public function display_content() {
	if ( $this->has_sections() ) {
		printf( '<div id="%1$s" class="wpseo-meta-section">', esc_attr( 'wpseo-meta-section-' . $this->name ) );
		echo '<div class="wpseo_content_wrapper">';

		add_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_forms' ] );
		add_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_a11y' ] );
		foreach ( $this->collapsibles as $collapsible ) {
			echo wp_kses_post( $collapsible->content() );
		}
		remove_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_forms' ] );
		remove_filter( 'wp_kses_allowed_html', [ 'WPSEO_Utils', 'extend_kses_post_with_a11y' ] );

		echo '</div></div>';
	}
}