Yoast\WP\SEO\Generators
Breadcrumbs_Generator::get_taxonomy_post_type_parent
Returns the post type parent of a given taxonomy.
Метод класса: Breadcrumbs_Generator{}
Хуков нет.
Возвращает
Строку|false. The parent if it exists, false otherwise.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_taxonomy_post_type_parent( $taxonomy );
- $taxonomy(строка) (обязательный)
- The taxonomy.
Код Breadcrumbs_Generator::get_taxonomy_post_type_parent() Breadcrumbs Generator::get taxonomy post type parent Yoast 26.3
protected function get_taxonomy_post_type_parent( $taxonomy ) {
$parent = $this->options->get( 'taxonomy-' . $taxonomy . '-ptparent' );
if ( empty( $parent ) || (string) $parent === '0' ) {
return false;
}
return $parent;
}