Yoast\WP\SEO\Helpers

Taxonomy_Helper::get_excluded_taxonomies_for_indexables()publicYoast 1.0

Returns an array of taxonomies that are excluded from being indexed for the indexables.

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

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

Возвращает

Массив. The excluded taxonomies.

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

$Taxonomy_Helper = new Taxonomy_Helper();
$Taxonomy_Helper->get_excluded_taxonomies_for_indexables();

Код Taxonomy_Helper::get_excluded_taxonomies_for_indexables() Yoast 22.4

public function get_excluded_taxonomies_for_indexables() {
	/**
	 * Filter: 'wpseo_indexable_excluded_taxonomies' - Allow developers to prevent a certain taxonomy
	 * from being saved to the indexable table.
	 *
	 * @param array $excluded_taxonomies The currently excluded taxonomies.
	 */
	$excluded_taxonomies = \apply_filters( 'wpseo_indexable_excluded_taxonomies', [] );

	// Failsafe, to always make sure that `excluded_taxonomies` is an array.
	if ( ! \is_array( $excluded_taxonomies ) ) {
		return [];
	}

	return $excluded_taxonomies;
}