admin_url()
最后更新于:2021-11-25 19:46:32
admin_url( string$path=”, string$scheme=’admin’)Retrieves the URL to the admin area for the current site.
参数
- $path
-
(string) (Optional) Path relative to the admin URL. Default ‘admin’.
Default value: ”
- $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 value: ‘admin’
响应
(string) Admin URL link with optional path appended.
源文件
文件: gc-includes/link-template.php
function admin_url( $path = '', $scheme = 'admin' ) {
return get_admin_url( null, $path, $scheme );
}