Summery Summery
Retrieves the URL to the admin area for a given site.
Syntax Syntax
Parameters Parameters
- $blog_id
-
(Optional) Site ID. Default null (current site).
Default value: null
- $path
-
(Optional) Path relative to the admin URL.
Default value: ''
- $scheme
-
(Optional) The scheme to use. Accepts 'http' or 'https', to force those schemes. Default 'admin', which obeys force_ssl_admin() and is_ssl().
Default value: 'admin'
Return Return
(string) Admin URL link with optional path appended.
Source Source
File: wp-includes/link-template.php
* 'http' or 'https' can be passed to force those schemes. * @return string Admin URL link with optional path appended. */ function admin_url( $path = '', $scheme = 'admin' ) { return get_admin_url( null, $path, $scheme ); } /** * Retrieves the URL to the admin area for a given site. * * @since 3.0.0 * * @param int $blog_id Optional. Site ID. Default null (current site). * @param string $path Optional. Path relative to the admin URL. Default empty. * @param string $scheme Optional. The scheme to use. Accepts 'http' or 'https', * to force those schemes. Default 'admin', which obeys * force_ssl_admin() and is_ssl(). * @return string Admin URL link with optional path appended.
Advertisement
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |