network_site_url хук-фильтрWP 3.0.0

Filters the network site URL.

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

add_filter( 'network_site_url', 'wp_kama_network_site_url_filter', 10, 3 );

/**
 * Function for `network_site_url` filter-hook.
 * 
 * @param string      $url    The complete network site URL including scheme and path.
 * @param string      $path   Path relative to the network site URL. Blank string if no path is specified.
 * @param string|null $scheme Scheme to give the URL context. Accepts 'http', 'https', 'relative' or null.
 *
 * @return string
 */
function wp_kama_network_site_url_filter( $url, $path, $scheme ){

	// filter...
	return $url;
}
$url(строка)
The complete network site URL including scheme and path.
$path(строка)
Path relative to the network site URL. Blank string if no path is specified.
$scheme(строка|null)
Scheme to give the URL context. Accepts 'http', 'https', 'relative' or null.

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

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

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

network_site_url()
network_site_url
wp-includes/link-template.php 3734
return apply_filters( 'network_site_url', $url, $path, $scheme );

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

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