esc_html__('A widget to display Personal Information', 'business-shuffle') ) ); } /** * Helper function that holds widget fields * Array is used in update and form functions */ private function widget_fields() { $fields = array( 'title' => array( 'business_shuffle_widgets_name' => 'title', 'business_shuffle_widgets_title' => esc_html__('Title', 'business-shuffle'), 'business_shuffle_widgets_field_type' => 'text', ), 'image' => array( 'business_shuffle_widgets_name' => 'image', 'business_shuffle_widgets_title' => esc_html__('Image', 'business-shuffle'), 'business_shuffle_widgets_field_type' => 'upload', ), 'intro' => array( 'business_shuffle_widgets_name' => 'intro', 'business_shuffle_widgets_title' => esc_html__('Short Intro', 'business-shuffle'), 'business_shuffle_widgets_field_type' => 'textarea', 'business_shuffle_widgets_row' => '4' ), 'signature' => array( 'business_shuffle_widgets_name' => 'name', 'business_shuffle_widgets_title' => esc_html__('Name', 'business-shuffle'), 'business_shuffle_widgets_field_type' => 'text', ) ); return $fields; } /** * 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) { extract($args); $title = isset( $instance['title'] ) ? $instance['title'] : '' ; $image = isset( $instance['image'] ) ? $instance['image'] : '' ; $intro = isset( $instance['intro'] ) ? $instance['intro'] : '' ; $name = isset( $instance['name'] ) ? $instance['name'] : '' ; echo $before_widget; // WPCS: XSS OK. ?>