Function: user_admin_url

user_admin_url( string $path, string $scheme )

Retrieves the URL to the admin area for the current user.


Name Type(s) Default Value Description
$path string ''

Optional. Path relative to the admin URL. Default empty.

$scheme string 'admin'

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



Admin URL link with optional path appended.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.