function self_admin_url($path = '', $scheme = 'admin') {}

Retrieve the url to the admin area for either the current blog or the network depending on context.


  • string $path: Optional path relative to the admin url.
  • 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 values

returns:Admin url link with optional path appended.

Source code

function self_admin_url($path = '', $scheme = 'admin') {

	if ( is_network_admin() )

		return network_admin_url($path, $scheme);

	elseif ( is_user_admin() )

		return user_admin_url($path, $scheme);


		return admin_url($path, $scheme);



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 1,485 other followers

%d bloggers like this: