login_form_middle
云策文档标注
概述
login_form_middle 是一个 WordPress 过滤器钩子,用于在登录表单的中间位置添加自定义内容。它位于 'login-password' 字段之后执行,允许开发者修改或插入内容。
关键要点
- 这是一个过滤器钩子,用于在登录表单中间显示内容。
- 它接收两个参数:$content(默认空字符串)和 $args(登录表单参数数组)。
- 钩子位置在 'login-password' 字段之后,便于在密码输入框后添加额外元素。
- 常用于 wp_login_form() 函数中,以增强登录表单功能。
- 自 WordPress 3.0.0 版本引入,是一个稳定的核心钩子。
原文内容
Filters content to display in the middle of the login form.
Description
The filter evaluates just following the location where the ‘login-password’ field is displayed.
Parameters
$contentstring-
Content to display. Default empty.
$argsarray-
Array of login form arguments.
Source
$login_form_middle = apply_filters( 'login_form_middle', '', $args );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |