wpseek.com
A WordPress-centric search engine for devs and theme authors



checked › WordPress Function

Since1.0.0
Deprecatedn/a
checked ( $checked, $current = true, $display = true )
Parameters: (3)
  • (mixed) $checked One of the values to compare.
    Required: Yes
  • (mixed) $current Optional. The other value to compare if not just true. Default true.
    Required: No
    Default: true
  • (bool) $display Optional. Whether to echo or just return the string. Default true.
    Required: No
    Default: true
Returns:
  • (string) HTML attribute or empty string.
Defined at:
Codex:

Outputs the HTML checked attribute.

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


Source

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