Yoast\WP\SEO\Helpers

Crawl_Cleanup_Helper::taxonomy_url()publicYoast 1.0

Returns the proper URL for taxonomy page.

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

Хуков нет.

Возвращает

Строку. The proper URL.

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

$Crawl_Cleanup_Helper = new Crawl_Cleanup_Helper();
$Crawl_Cleanup_Helper->taxonomy_url();

Код Crawl_Cleanup_Helper::taxonomy_url() Yoast 23.8

public function taxonomy_url() {
	global $wp_query;
	$term = $wp_query->get_queried_object();

	if ( \is_feed() ) {
		return \get_term_feed_link( $term->term_id, $term->taxonomy );
	}
	return \get_term_link( $term, $term->taxonomy );
}