__('Displays Percent', "business-elite")); $control_ops = array('width' => 400, 'height' => 500); parent::__construct(false,$name='Percent',$widget_ops,$control_ops); } /* Displays the Widget in the front-end */ function widget($args, $instance){ extract($args); $title = $instance['title']; $percent = $instance['percent']; $completed_color = $instance['completed_color']; $to_do_color = $instance['to_do_color']; $percent_text_color = $instance['percent_text_color']; $radius = $instance['radius']; $line_width = $instance['line_width']; $time = $instance['time']; $percent_text = $instance['percent_text']; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $id = $this->get_field_id('title'); preg_match_all('!\d+!', $id, $matches); $match = $matches[0][0]; ?>
'', 'percent' => '75', 'completed_color' => '0A7ED5', 'to_do_color' => 'DDDDDD', 'percent_text_color' => '000000', 'radius' => '80', 'line_width' => '10', 'time' => '10', 'percent_text' => "" ); $instance = wp_parse_args((array)$instance, $defaults); $title = esc_attr( $instance['title'] ); $percent = esc_attr( $instance['percent'] ); $completed_color = $instance['completed_color']; $to_do_color = $instance['to_do_color']; $percent_text_color = $instance['percent_text_color']; $radius = $instance['radius']; $line_width = $instance['line_width']; $time = $instance['time']; $percent_text = $instance['percent_text']; ?>

%

px

second