wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



selected › WordPress Function

Seit1.0.0
Veraltetn/v
selected ( $selected, $current = true, $display = true )
Parameter: (3)
  • (mixed) $selected One of the values to compare.
    Erforderlich: Ja
  • (mixed) $current Optional. The other value to compare if not just true. Default true.
    Erforderlich: Nein
    Standard: true
  • (bool) $display Optional. Whether to echo or just return the string. Default true.
    Erforderlich: Nein
    Standard: true
Gibt zurück:
  • (string) HTML attribute or empty string.
Definiert in:
Codex:

Outputs the HTML selected attribute.

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


Quellcode

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