WPSEO_Replace_Vars::retrieve_userid
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() WPSEO Replace Vars::retrieve userid Yoast 27.3
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;
}