You appear to be a bot. Output may be restricted
Description
Is this option selected?Return the selected value if the $option_key or $option_value == $value or the $option_key is IN the $value array
[0] => _oik_api_calls [1] => Array ( [0] => 6410 [1] => 6251 [2] => 6409 ) [2] => Array ( [#type] => oik_api [#multiple] => 1 [#options] => Array ( [6410] => aalt() - aalt [6251] => abbr() - Create an <abbr> tag [6409] => aclass() - aclass
Usage
is_selected( $option_key, $option_value, $value );
Parameters
- $option_key
- ( string ) required –
- $option_value
- ( string ) required –
- $value
- ( mixed ) required –
Returns
voidSource
File name: oik-bwtrace/libs/bobbforms.phpLines:
1 to 13 of 13
function is_selected( $option_key, $option_value, $value ) { if ( is_array( $value ) ) { $vals = bw_assoc( $value ); $val = bw_array_get( $vals, $option_key, null ); } else { $val = $value; } $selected = selected( $option_key, $val, false ); if ( !$selected ) { $selected = selected( $option_value, $val, false ); } return( $selected ); }View on GitHub View on Trac