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



selected › WordPress Function

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

Outputs the HTML selected attribute.

Compares the first two arguments and if identical marks as selected.


源码

function selected( $selected, $current = true, $display = true ) {
	return __checked_selected_helper( $selected, $current, $display, 'selected' );
}