WordPress开发者和主题制作者的搜索引擎



readonly ›

Since4.9.0
已弃用n/a
readonly ( $readonly, $current = true, $echo = true )
参数: (3)
  • (mixed) $readonly One of the values to compare
    Required: Yes
  • (mixed) $current (true) The other value to compare if not just true
    Required: No
    默认: true
  • (bool) $echo Whether to echo or just return the string
    Required: No
    默认: true
返回:
  • (string) html attribute or empty string
定义在:
文档:

Outputs the html readonly attribute.

Compares the first two arguments and if identical marks as readonly



源码

function readonly( $readonly, $current = true, $echo = true ) {
	return __checked_selected_helper( $readonly, $current, $echo, 'readonly' );
}