__('Resume Skill Widget', 'resumee'), 'customize_selective_refresh' => true )); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance){ $title = isset( $instance['title'] ) ? apply_filters('widget_title', $instance['title'] ) : __('Skills','resumee'); $skill1 = isset( $instance['skill1'] ) ? apply_filters('widget_title', $instance['skill1'] ) : __(' - Computer Skill: Proficient in Windows and Apple applications, Excel Wizardy','resumee'); $skill2 = isset( $instance['skill2'] ) ? apply_filters('widget_title', $instance['skill2'] ) : __(' - Programming Skill: C++, PHP, Java, Python, JavaScript, Scala, Go, MySQL, Erlang, Ruby, Swift, Perl and Linux','resumee'); $skill3 = isset( $instance['skill3'] ) ? apply_filters('widget_title', $instance['skill3'] ) : __(' - Language Skill: English, French, Spanish, Urdu, Arabic and sign language','resumee'); $skill4 = isset( $instance['skill4'] ) ? apply_filters('widget_title', $instance['skill4'] ) : __(' - Typing Skill: English[90 WPM], French[30 WPM], Spanish[60 WPM] and Urdu[10 WPM]','resumee'); /* Before widget (defined by themes). */ echo $args['before_widget'] ; echo '
'; if(isset($title) && !empty($title)){ echo '

'. do_shortcode($title) .'

'; } echo '
'; if(isset($skill1) && !empty($skill1)){ echo '

'. do_shortcode($skill1) .'

'; } if(isset($skill2) && !empty($skill2)){ echo '

'. do_shortcode($skill2) .'

'; } if(isset($skill3) && !empty($skill3)){ echo '

'. do_shortcode($skill3) .'

'; } if(isset($skill4) && !empty($skill4)){ echo '

'. do_shortcode($skill4) .'

'; } if(!isset($skill4) && empty($skill4)){ echo ''; } echo '
'; /* After widget (defined by themes). */ echo $args['after_widget'] ; } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form($instance){ /* Set up some default widget settings. */ $defaults = array( 'title' => __('Skill', 'resumee'), 'skill1' => __(' - Computer Skill: Proficient in Windows and Apple applications, Excel Wizardy', 'resumee'), 'skill2' => __(' - Programming Skill: C++, PHP, Java, Python, JavaScript, Scala, Go, MySQL, Erlang, Ruby, Swift, Perl and Linux', 'resumee'), 'skill3' => __(' - Language Skill: English, French, Spanish, Urdu, Arabic and sign language', 'resumee'), 'skill4' => __(' - Typing Skill: English[90 WPM], French[30 WPM], Spanish[60 WPM] and Urdu[10 WPM]', 'resumee') ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>