Filter hook 'network_home_url'

in WP Core File wp-includes/link-template.php at line 3808

View Source

network_home_url

Filter Hook
Description
Filters the network home URL.

Hook Information

File Location wp-includes/link-template.php View on GitHub
Hook Type Filter
Line Number 3808

Hook Parameters

Type Name Description
string $url The complete network home URL including scheme and path.
string $path Path relative to the network home URL. Blank string if no path is specified.
string|null $orig_scheme Scheme to give the URL context. Accepts 'http', 'https', 'relative' or null.

Usage Examples

Basic Usage
<?php
// Hook into network_home_url
add_filter('network_home_url', 'my_custom_filter', 10, 3);

function my_custom_filter($url, $path, $orig_scheme) {
    // Your custom filtering logic here
    return $url;
}

Source Code Context

wp-includes/link-template.php:3808 - How this hook is used in WordPress core
<?php
3803  	 * @param string      $path        Path relative to the network home URL. Blank string
3804  	 *                                 if no path is specified.
3805  	 * @param string|null $orig_scheme Scheme to give the URL context. Accepts 'http', 'https',
3806  	 *                                 'relative' or null.
3807  	 */
3808  	return apply_filters( 'network_home_url', $url, $path, $orig_scheme );
3809  }
3810  
3811  /**
3812   * Retrieves the URL to the admin area for the network.
3813   *

PHP Documentation

<?php
/**
	 * Filters the network home URL.
	 *
	 * @since 3.0.0
	 *
	 * @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.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/link-template.php
Related Hooks

Related hooks will be displayed here in future updates.