Ejemplo n.º 1
0
 protected function _render($args)
 {
     $args = wp_parse_args($args, array('numeric' => false, 'checked' => null));
     extract($args);
     if (!is_array($checked)) {
         $checked = array();
     }
     $opts = '';
     foreach ($choices as $value => $title) {
         $single_input = scbFormField::_checkbox(array('name' => $name . '[]', 'type' => 'checkbox', 'value' => $value, 'checked' => in_array($value, $checked), 'desc' => $title, 'desc_pos' => 'after'));
         $opts .= str_replace(scbForms::TOKEN, $single_input, $wrap_each);
     }
     return scbFormField::add_desc($opts, $desc, $desc_pos);
 }