Yoast\WP\SEO\Helpers
Url_Helper::ensure_absolute_url()
Ensures that the given url is an absolute url.
Метод класса: Url_Helper{}
Хуков нет.
Возвращает
Строку
. The absolute url.
Использование
$Url_Helper = new Url_Helper(); $Url_Helper->ensure_absolute_url( $url );
- $url(строка) (обязательный)
- The url that needs to be absolute.
Код Url_Helper::ensure_absolute_url() Url Helper::ensure absolute url Yoast 24.9
public function ensure_absolute_url( $url ) { if ( ! \is_string( $url ) || $url === '' ) { return $url; } if ( $this->is_relative( $url ) === true ) { return $this->build_absolute_url( $url ); } return $url; }