Yoast\WP\SEO\Dashboard\Infrastructure\Taxonomies
Taxonomies_Collector::get_fallback_taxonomy()
Returns the fallback, WP-native category taxonomy, if it's associated with the specific content type.
Метод класса: Taxonomies_Collector{}
Хуков нет.
Возвращает
Taxonomy|null
. The taxonomy object for the category taxonomy.
Использование
$Taxonomies_Collector = new Taxonomies_Collector(); $Taxonomies_Collector->get_fallback_taxonomy( $content_type ): ?Taxonomy;
- $content_type(строка) (обязательный)
- The content type.
Код Taxonomies_Collector::get_fallback_taxonomy() Taxonomies Collector::get fallback taxonomy Yoast 24.4
public function get_fallback_taxonomy( string $content_type ): ?Taxonomy { return $this->get_taxonomy( 'category', $content_type ); }