1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<?php
class CMB2_Type_Select extends CMB2_Type_Multi_Base {
public function render() {
$a = $this->parse_args( 'select', array(
'class' => 'cmb2_select',
'name' => $this->_name(),
'id' => $this->_id(),
'desc' => $this->_desc( true ),
'options' => $this->concat_items(),
) );
$attrs = $this->concat_attrs( $a, array( 'desc', 'options' ) );
return $this->rendered(
sprintf( '<select%s>%s</select>%s', $attrs, $a['options'], $a['desc'] )
);
}
}