Yoast\WP\SEO\Generators\Schema

Article::add_sections()privateYoast 1.0

Adds categories as sections, if categories are assigned.

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

Хуки из метода

Возвращает

Массив. Article data.

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

// private - только в коде основоного (родительского) класса
$result = $this->add_sections( $data );
$data(массив) (обязательный)
Article data.

Код Article::add_sections() Yoast 22.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 );
}