wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



selected › WordPress Function

Desde1.0.0
Obsoleton/a
selected ( $selected, $current = true, $display = true )
Parâmetros: (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
    Padrão: true
  • (bool) $display Optional. Whether to echo or just return the string. Default true.
    Required: No
    Padrão: true
Retorna:
  • (string) HTML attribute or empty string.
Definido em:
Codex:

Outputs the HTML selected attribute.

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


Fonte

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