maybe_network_admin_url. see #15840.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-12-16 06:06:59 +00:00
parent ded6118548
commit bba5e919af
1 changed files with 17 additions and 0 deletions

View File

@ -2269,6 +2269,23 @@ function self_admin_url($path = '', $scheme = 'admin') {
return admin_url($path, $scheme);
}
/**
* Retrieve the url to the admin area for either the current blog or the network
* depending on whether multisite is enabled.
*
* @since 3.1.0
*
* @param string $path Optional path relative to the admin url
* @param string $scheme 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.
* @return string Admin url link with optional path appended
*/
function maybe_network_admin_url( $path = '', $scheme = 'admin' ) {
if ( is_multisite() )
return network_admin_url( $path, $scheme );
else
return admin_url( $path, $scheme );
}
/**
* Get the URL to the user's dashboard.
*