Retrieves the URL to the admin area for the current site.
$pathstringoptional
Default:''
$schemestringoptional
'admin', which obeys force_ssl_admin() and is_ssl() .'http' or 'https' can be passed to force those schemes.Default:'admin'
function admin_url( $path = '', $scheme = 'admin' ) {
return get_admin_url( null, $path, $scheme );
}
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/admin_url