WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта с помощью браузерных PUSH уведомлений
функция не описана

Yoast\WP\SEO\Integrations\Blocks

Breadcrumbs_Block::present() public Yoast 1.0

Presents the breadcrumbs output for the current page or the available post_id.

{} Это метод класса: Breadcrumbs_Block{}

Хуки из метода
Возвращает

Строку. The block output.

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

$Breadcrumbs_Block = new Breadcrumbs_Block();
$Breadcrumbs_Block->present( $attributes );
$attributes(массив) (обязательный)
The block attributes.

Код Breadcrumbs_Block::present() Yoast 16.1.1

<?php
public function present( $attributes ) {
	$presenter = new Breadcrumbs_Presenter();
	// $this->context_memoizer->for_current_page only works on the frontend. To render the right breadcrumb in the
	// editor, we need the repository.
	if ( $this->request_helper->is_rest_request() || \is_admin() ) {
		$post_id = \get_the_ID();
		if ( $post_id ) {
			$indexable = $this->indexable_repository->find_by_id_and_type( $post_id, 'post' );
			$context   = $this->context_memoizer->get( $indexable, 'Post_Type' );
		}
	}
	if ( ! isset( $context ) ) {
		$context = $this->context_memoizer->for_current_page();
	}

	/** This filter is documented in src/integrations/front-end-integration.php */
	$presentation            = \apply_filters( 'wpseo_frontend_presentation', $context->presentation, $context );
	$presenter->presentation = $presentation;
	$presenter->replace_vars = $this->replace_vars;
	$presenter->helpers      = $this->helpers;
	$class_name              = 'yoast-breadcrumbs';

	if ( ! empty( $attributes['className'] ) ) {
		$class_name .= ' ' . \esc_attr( $attributes['className'] );
	}

	return '<div class="' . $class_name . '">' . $presenter->present() . '</div>';
}