^ 回到顶部
  • 人生没有定律,每个人都有自己的节奏
  • 本站wordpress建站教程均通过实践后发布,希望对你有帮助
  • 希望你的坚持,都是因为热爱,而不是因为不甘心
  • 8年wordpress建站经验,5星服务品质
  • 那些不愿意让你吃亏的人,才是真正值得你深交的人,也是值得你付出时间的人
  • 阿里云2核2g仅需86元/年

wordpress函数get_edit_profile_url()用法示例

get_edit_profile_url( int $user_id,  string $scheme = 'admin' )

Retrieves the URL to the user’s profile editor.


描述


参数

$user_id

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

新用户2核2g仅需86元/年    领取1153套模板    免费cdn流量包    ¥3188礼包

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


源代码

File: wp-includes/link-template.php

function get_edit_profile_url( $user_id = 0, $scheme = 'admin' ) {
	$user_id = $user_id ? (int) $user_id : get_current_user_id();

	if ( is_user_admin() )
		$url = user_admin_url( 'profile.php', $scheme );
	elseif ( is_network_admin() )
		$url = network_admin_url( 'profile.php', $scheme );
	else
		$url = get_dashboard_url( $user_id, 'profile.php', $scheme );

	/**
	 * Filters the URL for a user's profile editor.
	 *
	 * @since 3.1.0
	 *
	 * @param string $url     The complete URL including scheme and path.
	 * @param int    $user_id The user ID.
	 * @param string $scheme  Scheme to give the URL context. Accepts 'http', 'https', 'login',
	 *                        'login_post', 'admin', 'relative' or null.
	 */
	return apply_filters( 'edit_profile_url', $url, $user_id, $scheme);
}

更新日志

Version 描述
3.1.0 Introduced.

相关函数

Uses

  • wp-includes/load.php:
    is_user_admin()
  • wp-includes/load.php:
    is_network_admin()
  • wp-includes/link-template.php:
    get_dashboard_url()
  • wp-includes/link-template.php:
    edit_profile_url
  • wp-includes/link-template.php:
    user_admin_url()
  • wp-includes/link-template.php:
    network_admin_url()
  • wp-includes/plugin.php:
    apply_filters()
  • wp-includes/user.php:
    get_current_user_id()
  • Show 3 more uses


Used By

  • wp-admin/includes/user.php:
    default_password_nag()
  • wp-includes/link-template.php:
    get_edit_user_link()
  • wp-includes/admin-bar.php:
    wp_admin_bar_my_account_item()
  • wp-includes/admin-bar.php:
    wp_admin_bar_my_account_menu()

让小雨知道,这篇文章帮到了你
扫码关注微信公众号zs40086(微搜片)随时随地微信看片,抢先福利电影等你来

热门推荐

如有疑问,请前往问答中心反馈!

反馈