network_site_url
Filters the network site URL.
Usage
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(string)
- The complete network site URL including scheme and path.
- $path(string)
- Path relative to the network site URL. Blank string if no path is specified.
- $scheme(string|null)
- Scheme to give the URL context. Accepts 'http', 'https', 'relative' or null.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
network_site_url
wp-includes/link-template.php 3735
return apply_filters( 'network_site_url', $url, $path, $scheme );