Yoast\WP\SEO\Helpers

Crawl_Cleanup_Helper::query_var_page_url()publicYoast 1.0

Returns the proper URL for url with page param.

Метод класса: Crawl_Cleanup_Helper{}

Хуков нет.

Возвращает

Строку. The proper URL.

Использование

$Crawl_Cleanup_Helper = new Crawl_Cleanup_Helper();
$Crawl_Cleanup_Helper->query_var_page_url( $proper_url );
$proper_url(строка) (обязательный)
The proper URL.

Код Crawl_Cleanup_Helper::query_var_page_url() Yoast 23.5

public function query_var_page_url( $proper_url ) {
	global $wp_query;
	if ( \is_search( $proper_url ) ) {
		return \home_url() . '/page/' . $wp_query->query_vars['paged'] . '/?s=' . \rawurlencode( \get_search_query() );
	}
	return \user_trailingslashit( \trailingslashit( $proper_url ) . 'page/' . $wp_query->query_vars['paged'] );
}