edit_profile_url
云策文档标注
概述
edit_profile_url 是一个 WordPress 过滤器钩子,用于修改用户个人资料编辑器的 URL。它允许开发者自定义 URL 的生成逻辑,基于用户 ID 和 URL 方案等参数。
关键要点
- 这是一个过滤器钩子,用于过滤用户个人资料编辑器的 URL。
- 接受三个参数:$url(完整 URL)、$user_id(用户 ID)和 $scheme(URL 方案,如 'http'、'https'、'admin' 等)。
- 在 get_edit_profile_url() 函数中被调用,用于生成或修改 URL。
- 自 WordPress 3.1.0 版本引入。
原文内容
Filters the URL for a user’s profile editor.
Parameters
$urlstring-
The complete URL including scheme and path.
$user_idint-
The user ID.
$schemestring-
Scheme to give the URL context. Accepts
'http','https','login','login_post','admin','relative'or null.
Source
return apply_filters( 'edit_profile_url', $url, $user_id, $scheme );
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |