wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



selected › WordPress Function

Depuis1.0.0
Dépréciéen/a
selected ( $selected, $current = true, $display = true )
Paramètres: (3)
  • (mixed) $selected One of the values to compare.
    Requis: Oui
  • (mixed) $current Optional. The other value to compare if not just true. Default true.
    Requis: Non
    Défaut: true
  • (bool) $display Optional. Whether to echo or just return the string. Default true.
    Requis: Non
    Défaut: true
Retourne:
  • (string) HTML attribute or empty string.
Défini(e) dans:
Codex:

Outputs the HTML selected attribute.

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


Source

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