WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get admin url

Description

Retrieve the url to the admin area for a given site. This function is similar to admin_url() but includes additional support for WordPress MS.

Usage

<?php get_admin_url$blog_id$path$scheme ); ?>

Parameters

$blog_id
(int) (optional) Blog ID. Defaults to current blog.
Default: null
$path
(string) (optional) Path relative to the admin url
Default: empty string
$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 Values

(string) 
Admin url link with optional path appended

Change Log

Since: 3.0

Source File

get_admin_url() is located in wp-includes/link-template.php