Filter hook 'network_admin_url'

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

View Source

network_admin_url

Filter Hook
Description
Filters the network admin URL.

Hook Information

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

Hook Parameters

Type Name Description
string $url The complete network admin URL including scheme and path.
string $path Path relative to the network admin URL. Blank string if no path is specified.
string|null $scheme The scheme to use. Accepts 'http', 'https', 'admin', or null. Default is 'admin', which obeys force_ssl_admin() and is_ssl().

Usage Examples

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

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

Source Code Context

wp-includes/link-template.php:3844 - How this hook is used in WordPress core
<?php
3839  	 * @param string      $path   Path relative to the network admin URL. Blank string if
3840  	 *                            no path is specified.
3841  	 * @param string|null $scheme The scheme to use. Accepts 'http', 'https',
3842  	 *                            'admin', or null. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
3843  	 */
3844  	return apply_filters( 'network_admin_url', $url, $path, $scheme );
3845  }
3846  
3847  /**
3848   * Retrieves the URL to the admin area for the current user.
3849   *

PHP Documentation

<?php
/**
	 * Filters the network admin URL.
	 *
	 * @since 3.0.0
	 * @since 5.8.0 The `$scheme` parameter was added.
	 *
	 * @param string      $url    The complete network admin URL including scheme and path.
	 * @param string      $path   Path relative to the network admin URL. Blank string if
	 *                            no path is specified.
	 * @param string|null $scheme The scheme to use. Accepts 'http', 'https',
	 *                            'admin', or null. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/link-template.php
Related Hooks

Related hooks will be displayed here in future updates.