Yoast\WP\SEO\Generators\Schema
Article::add_sections()
Adds categories as sections, if categories are assigned.
Метод класса: Article{}
Хуки из метода
Возвращает
Массив
. Article data.
Использование
// private - только в коде основоного (родительского) класса $result = $this->add_sections( $data );
- $data(массив) (обязательный)
- Article data.
Код Article::add_sections() Article::add sections Yoast 24.4
private function add_sections( $data ) { /** * Filter: 'wpseo_schema_article_sections_taxonomy' - Allow changing the taxonomy used to assign keywords to a post type Article data. * * @param string $taxonomy The chosen taxonomy. */ $taxonomy = \apply_filters( 'wpseo_schema_article_sections_taxonomy', 'category' ); return $this->add_terms( $data, 'articleSection', $taxonomy ); }