disabled()
disabled( mixed $disabled, mixed $current = true, bool …
disabled( mixed $disabled, mixed $current = true, bool $echo = true )
输出禁用html的属性。
Outputs the html disabled attribute.
目录锚点:#说明#参数#返回#源码#笔记
说明(Description)
比较前两个参数,如果相同的标记被禁用
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| $disabled | (mixed) | 必需 | 要比较的值之一 |
| $current | (mixed) | 可选 | (true)要比较的另一个值(如果不只是true) |
| $echo | (bool) | 可选 | 是回显还是返回字符串 |
返回(Return)
(string)html属性或空string
源码(Source)
/**
* Outputs the html disabled attribute.
*
* Compares the first two arguments and if identical marks as disabled
*
* @since 3.0.0
*
* @param mixed $disabled One of the values to compare
* @param mixed $current (true) The other value to compare if not just true
* @param bool $echo Whether to echo or just return the string
* @return string html attribute or empty string
*/
function disabled( $disabled, $current = true, $echo = true ) {
return __checked_selected_helper( $disabled, $current, $echo, 'disabled' );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 3.0.0 | wp-includes/general-template.php:4670 | 6 | 1 function |
笔记(Notes)
根据给定值启用/禁用文本字段。
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!