wppaste
WordPress

network_admin_url( string $path = '', string $scheme = 'admin' ): string

Since
3.0.0
Source
wp-includes/link-template.php:3822
Retrieves the URL to the admin area for the network.

Parameters

$pathstringoptional
Optional path relative to the admin URL. Default empty.Default: ''
$schemestringoptional
The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.Default: 'admin'

Return

string
Admin URL link with optional path appended.

Hooks fired · 1

One hook fires while network_admin_url() runs, in this order:

  1. apply_filters( network_admin_url )filterline 3845 (+23 into the body)

    Filters the network admin URL.

Uses · 4

Used by · 38

Show all 38

Source

function network_admin_url( $path = '', $scheme = 'admin' ) {	if ( ! is_multisite() ) {		return admin_url( $path, $scheme );	} 	$url = network_site_url( 'wp-admin/network/', $scheme ); 	if ( $path && is_string( $path ) ) {		$url .= ltrim( $path, '/' );	} 	/**	 * 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().	 */	return apply_filters( 'network_admin_url', $url, $path, $scheme );}

History

Introduced in 3.0.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/link-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.