user_admin_url

Definition:
function user_admin_url( $path = '', $scheme = 'admin' ) {}

Retrieve the url to the admin area for the current user.

Parameters

  • 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.

Defined filters

  • user_admin_url
    apply_filters('user_admin_url', $url, $path)

Source code

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

	$url = network_site_url('wp-admin/user/', $scheme);



	if ( !empty($path) && is_string($path) && strpos($path, '..') === false )

		$url .= ltrim($path, '/');



	return apply_filters('user_admin_url', $url, $path);

}

10503

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:

WordPress.com Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: