Yoast\WP\SEO\Generators\Schema
Person::url_social_site() protected Yoast 1.0
Returns an author's social site URL.
{} Это метод класса: Person{}
Хуков нет.
Возвращает
Строку.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->url_social_site( $social_site, $user_id );
- $social_site(строка) (обязательный)
- The social site to retrieve the URL for.
- $user_id(смешанный)
- The user ID to use function outside of the loop.
По умолчанию: false
Код Person::url_social_site() Person::url social site Yoast 15.6.2
protected function url_social_site( $social_site, $user_id = false ) {
$url = \get_the_author_meta( $social_site, $user_id );
if ( ! empty( $url ) && $social_site === 'twitter' ) {
$url = 'https://twitter.com/' . $url;
}
return $url;
}