Yoast\WP\SEO\Helpers
Options_Helper::is_social_url_valid()
Checks whether a social URL is valid, with empty strings being valid social URLs.
Метод класса: Options_Helper{}
Хуков нет.
Возвращает
true|false
. Whether the URL is valid.
Использование
$Options_Helper = new Options_Helper(); $Options_Helper->is_social_url_valid( $url );
- $url(строка) (обязательный)
- The url to be checked.
Код Options_Helper::is_social_url_valid() Options Helper::is social url valid Yoast 22.4
public function is_social_url_valid( $url ) { return $url === '' || WPSEO_Option_Social::get_instance()->validate_social_url( $url ); }