type = 'checkbox'; } public function prepare_field($name, $field){ if(!empty($field) && is_array($field)){ parent::prepare_field($name, $field); $this->set_property('checked', isset($field['checked']) ? $field['checked'] : 0 ); } } } endif;