Yoast\WP\SEO\Generators
Breadcrumbs_Generator::get_system_page_crumb() private Yoast 1.0
Returns the modified system page crumb.
{} Это метод класса: Breadcrumbs_Generator{}
Хуков нет.
Возвращает
Массив. The crumb.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_system_page_crumb( $crumb, $ancestor );
- $crumb(массив) (обязательный)
- The crumb.
- $ancestor(Indexable) (обязательный)
- The indexable.
Код Breadcrumbs_Generator::get_system_page_crumb() Breadcrumbs Generator::get system page crumb Yoast 15.6.2
private function get_system_page_crumb( $crumb, $ancestor ) {
if ( $ancestor->object_sub_type === 'search-result' ) {
$crumb['text'] = $this->options->get( 'breadcrumbs-searchprefix' ) . ' ' . \esc_html( \get_search_query() );
$crumb['url'] = \get_search_link();
}
elseif ( $ancestor->object_sub_type === '404' ) {
$crumb['text'] = $this->options->get( 'breadcrumbs-404crumb' );
}
return $crumb;
}