Yoast\WP\SEO\Builders
Indexable_Link_Builder::build_permalink()
Builds the link's permalink.
Метод класса: Indexable_Link_Builder{}
Хуков нет.
Возвращает
Строку
. The link's permalink.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->build_permalink( $url, $home_url );
- $url(строка) (обязательный)
- The url of the link.
- $home_url(массив) (обязательный)
- The home url, as parsed by wp_parse_url.
Код Indexable_Link_Builder::build_permalink() Indexable Link Builder::build permalink Yoast 20.4
protected function build_permalink( $url, $home_url ) { $permalink = $this->get_permalink( $url, $home_url ); if ( $this->url_helper->is_relative( $permalink ) ) { // Make sure we're checking against the absolute URL, and add a trailing slash if the site has a trailing slash in its permalink settings. $permalink = $this->url_helper->ensure_absolute_url( \user_trailingslashit( $permalink ) ); } return $permalink; }