函数原型
disabled( mixed $disabled, mixed $current = true, bool $echo = true ): string
函数描述
Outputs the HTML disabled attribute.
是否弃用
未弃用
函数参数
-
$disabled
mixed
Required - One of the values to compare.
-
$current
mixed
Optional - The other value to compare if not just true.
Default:
true -
$echo
bool
Optional - Whether to echo or just return the string.
Default:
true
函数返回值
string HTML attribute or empty string.
函数位置
File: wp-includes/general-template.php.
函数源码
function disabled( $disabled, $current = true, $echo = true ) {
return __checked_selected_helper( $disabled, $current, $echo, 'disabled' );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |

