getBossList($instance)?:[]; if(empty($bosses)){ return 0; } $done = 0; foreach($bosses as $boss){ if(!empty($boss['date'])){ $done++; } } return ($done/count($bosses))*100; } public function form($instance) { $raid_name = !empty($instance['raid_name']) ? $instance['raid_name'] : ""; ?>
" name="get_field_name("raid_name")); ?>" value="">
" name="get_field_name("bosses[$i][name]")); ?>" value="">
" name="get_field_name("bosses[$i][date]")); ?>" value="">