wordpress / latest / functions / admin_url.html

admin_url( string $path = '', string $scheme = 'admin' ): string

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

Parameters

$path string Optional
Path relative to the admin URL.

Default: ''

$scheme string 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.

Default: 'admin'

Return

string Admin URL link with optional path appended.

Source

File: wp-includes/link-template.php. View all references

function admin_url( $path = '', $scheme = 'admin' ) {
	return get_admin_url( null, $path, $scheme );
}

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
2.6.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/admin_url