network_home_url
Filters the network home URL.
Использование
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(строка)
- The complete network home URL including scheme and path.
- $path(строка)
- Path relative to the network home URL. Blank string if no path is specified.
- $orig_scheme(строка|null)
- Scheme to give the URL context. Accepts 'http', 'https', 'relative' or null.
Список изменений
| С версии 3.0.0 | Введена. |
Где вызывается хук
network_home_url
wp-includes/link-template.php 3817
return apply_filters( 'network_home_url', $url, $path, $orig_scheme );