network_home_url
Filters the network home URL.
Usage
add_filter( 'network_home_url', 'wp_kama_network_home_url_filter', 10, 3 ); /** * Function for `network_home_url` filter-hook. * * @param string $url The complete network home URL including scheme and path. * @param string $path Path relative to the network home URL. Blank string if no path is specified. * @param string|null $orig_scheme Scheme to give the URL context. Accepts 'http', 'https', 'relative' or null. * * @return string */ function wp_kama_network_home_url_filter( $url, $path, $orig_scheme ){ // filter... return $url; }
- $url(string)
- The complete network home URL including scheme and path.
- $path(string)
- Path relative to the network home URL. Blank string if no path is specified.
- $orig_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_home_url
wp-includes/link-template.php 3777
return apply_filters( 'network_home_url', $url, $path, $orig_scheme );