WPDev.one
Core Function
View Source on Trac ↗

get_dashboard_url()

get_dashboard_url( mixed $user_id = 0, mixed $path = '', mixed $scheme = 'admin' )

Retrieves the URL to the user's dashboard.

Parameters 2 required

Name / Type Description
$user_id
int

Optional. User ID. Defaults to current user.

string

$path Optional path relative to the dashboard. Use only paths known to both site and user admins. Default empty.

Required
string

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

Required

Return Value

(string)
Dashboard URL link with optional path appended.

Function Information

Since Version
3.1.0
Source File
wp-includes/link-template.php
Advertisement