WPSEO_Schema_Person::url_social_site() protected Yoast 1.0
Устарела с версии 14.0. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.╳
Returns an author's social site URL.
{} Это метод класса: WPSEO_Schema_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.
Список изменений
Устарела с | 14.0 |
Код WPSEO_Schema_Person::url_social_site() WPSEO Schema Person::url social site Yoast 16.1.1
protected function url_social_site( $social_site, $user_id = false ) {
_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\Person::url_social_site' );
$url = \get_the_author_meta( $social_site, $user_id );
if ( ! empty( $url ) && $social_site === 'twitter' ) {
$url = 'https://twitter.com/' . $url;
}
return $url;
}