set_url_scheme хук-фильтрWP 3.4.0

Filters the resulting URL after setting the scheme.

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

add_filter( 'set_url_scheme', 'wp_kama_set_url_scheme_filter', 10, 3 );

/**
 * Function for `set_url_scheme` filter-hook.
 * 
 * @param string      $url         The complete URL including scheme and path.
 * @param string      $scheme      Scheme applied to the URL. One of 'http', 'https', or 'relative'.
 * @param string|null $orig_scheme Scheme requested for the URL. One of 'http', 'https', 'login', 'login_post', 'admin', 'relative', 'rest', 'rpc', or null.
 *
 * @return string
 */
function wp_kama_set_url_scheme_filter( $url, $scheme, $orig_scheme ){

	// filter...
	return $url;
}
$url(строка)
The complete URL including scheme and path.
$scheme(строка)
Scheme applied to the URL. One of 'http', 'https', or 'relative'.
$orig_scheme(строка|null)
Scheme requested for the URL. One of 'http', 'https', 'login', 'login_post', 'admin', 'relative', 'rest', 'rpc', or null.

Список изменений

С версии 3.4.0 Введена.

Где вызывается хук

set_url_scheme()
set_url_scheme
wp-includes/link-template.php 3957
return apply_filters( 'set_url_scheme', $url, $scheme, $orig_scheme );

Где используется хук в WordPress

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