Yoast\WP\SEO\Helpers
Options_Helper::get_twitter_id
Gets the twitter id from a twitter id, with or without a leading @, or a twitter profile URL.
The id is cleaned up exactly like the twitter_site option is.
Метод класса: Options_Helper{}
Хуков нет.
Возвращает
string|false. The twitter id, or false if it is not valid.
Использование
$Options_Helper = new Options_Helper(); $Options_Helper->get_twitter_id( $twitter_id );
- $twitter_id(строка) (обязательный)
- The twitter id or profile URL.
Код Options_Helper::get_twitter_id() Options Helper::get twitter id Yoast 28.9
public function get_twitter_id( $twitter_id ) {
return WPSEO_Option_Social::get_instance()->validate_twitter_id( $twitter_id );
}