acf_get_select_input()
acf_select_input
Returns the HTML of a select input.
No Hooks.
Returns
String.
Usage
acf_get_select_input( $attrs );
- $attrs(array)
- The array of attrs.
Default:array()
Changelog
| Since 5.0.0 | Introduced. |
acf_get_select_input() acf get select input code ACF 6.0.4
function acf_get_select_input( $attrs = array() ) {
$value = (array) acf_extract_var( $attrs, 'value' );
$choices = (array) acf_extract_var( $attrs, 'choices' );
return sprintf(
'<select %s>%s</select>',
acf_esc_attrs( $attrs ),
acf_walk_select_input( $choices, $value )
);
}