Yoast\WP\SEO\Helpers

Current_Page_Helper::get_author_id()publicYoast 1.0

Returns the id of the currently opened author archive.

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

Хуков нет.

Возвращает

int. The id of the currently opened author archive.

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

$Current_Page_Helper = new Current_Page_Helper();
$Current_Page_Helper->get_author_id();

Код Current_Page_Helper::get_author_id() Yoast 22.4

public function get_author_id() {
	$wp_query = $this->wp_query_wrapper->get_main_query();

	return $wp_query->get( 'author' );
}