'widget_about', 'description' => 'A widget that show about' ); /* Create the widget. */ parent::__construct( 'rst-about-widget', 'Agnilla - About', $widget_ops); } function widget($args, $instance) { $html = ''; $html .= $args['before_widget']; if( !empty($instance['title']) ) { $html .= $args['before_title']; $html .= $instance['title']; $html .= $args['after_title']; } $html .= '
'; if( !empty($instance['avatar']) ){ if( isset($instance['rst_avatar_circle']) && $instance['rst_avatar_circle'] ){ $class_circle="img-circle"; }else{ $class_circle=" "; } $html .= 'About Me'; } if( !empty($instance['name']) ){ $html .= '
'. $instance['name'] .'
'; } if( !empty($instance['description']) ){ $html .= '

'. $instance['description'] .'

'; } $html .= '
'; $html .= $args['after_widget']; echo force_balance_tags($html); } function update($new_instance, $old_instance) { return $new_instance; } function form($instance) { ?>


$this->get_field_name( 'avatar' ), 'type' => 'image', 'value' => isset($instance['avatar']) ? esc_attr($instance['avatar']) : '' ) ); ?>