WPSEO_Replace_Vars::retrieve_userid()privateYoast 1.0

Retrieve the post/page/cpt author's user id for use as replacement string.

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

Хуков нет.

Возвращает

Строку.

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

// private - только в коде основоного (родительского) класса
$result = $this->retrieve_userid();

Код WPSEO_Replace_Vars::retrieve_userid() Yoast 22.4

private function retrieve_userid() {
	// The user ID is an integer, let's cast to string.
	$replacement = ! empty( $this->args->post_author ) ? (string) $this->args->post_author : (string) get_query_var( 'author' );

	return $replacement;
}