首页 WordPress函数大全 get_dashboard_url()

get_dashboard_url()

2020-05-01 / 3394阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_dashboard_url( int $user_id, string $path = '', string $scheme = 'admin' )

Retrieves the URL to the user’s dashboard.

描述

If a user does not belong to any site, the global user dashboard is used. If the user belongs to the current site, the dashboard for the current site is returned. If the user cannot edit the current site, the dashboard to the user’s primary site is returned.

参数

$user_id

(int)
(Optional)
User ID. Defaults to current user.

$path

(string)
(Optional)
path relative to the dashboard. Use>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) Dashboard URL link with optional path appended.

大家谈论
    我的见解