Yoast\WP\SEO\Helpers
Taxonomy_Helper::get_excluded_taxonomies_for_indexables
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() Taxonomy Helper::get excluded taxonomies for indexables Yoast 27.9
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;
}