__('A widget that shows contact information', 'ripple') ) ); } private function widget_fields() { $fields = array( 'gmap_contact_title' => array( 'ripple_widgets_name' => 'gmap_contact_title', 'ripple_widgets_title' => __('Title', 'ripple'), 'ripple_widgets_field_type' => 'text', ), 'gmap_contact_info' => array( 'ripple_widgets_name' => 'gmap_contact_info', 'ripple_widgets_title' => __('Info', 'ripple'), 'ripple_widgets_field_type' => 'text', ), 'gmap_support' => array( 'ripple_widgets_name' => 'gmap_support', 'ripple_widgets_title' => __(' Live Support', 'ripple'), 'ripple_widgets_field_type' => 'text', ), 'gmap_phone' => array( 'ripple_widgets_name' => 'gmap_phone', 'ripple_widgets_title' => __('Helpline', 'ripple'), 'ripple_widgets_field_type' => 'text', ), 'gmap_contact_email' => array( 'ripple_widgets_name' => 'gmap_contact_email', 'ripple_widgets_title' => __('Email Address', 'ripple'), 'ripple_widgets_field_type' => 'text', ), 'gmap_location' => array( 'ripple_widgets_name' => 'gmap_location', 'ripple_widgets_title' => __('HeadOffice Address', 'ripple'), 'ripple_widgets_field_type' => 'text', ), 'twitter' => array( 'ripple_widgets_name' => 'twitter', 'ripple_widgets_title' => esc_html__('Twitter', 'ripple'), 'ripple_widgets_field_type' => 'text', ), 'facebook' => array( 'ripple_widgets_name' => 'facebook', 'ripple_widgets_title' => esc_html__('Facebook', 'ripple'), 'ripple_widgets_field_type' => 'text', ), 'instagram' => array( 'ripple_widgets_name' => 'instagram', 'ripple_widgets_title' => esc_html__('Instagram', 'ripple'), 'ripple_widgets_field_type' => 'text', ), 'behance' => array( 'ripple_widgets_name' => 'behance', 'ripple_widgets_title' => esc_html__('Behance', 'ripple'), 'ripple_widgets_field_type' => 'text', ), ); return $fields; } /** * Front-end display of widget. * */ public function widget($args, $instance) { extract($args); if($instance!=null){ $gmap_contact_title = isset($instance['gmap_contact_title']) ? $instance['gmap_contact_title'] : ''; $gmap_contact_info = isset($instance['gmap_contact_info']) ? $instance['gmap_contact_info'] : ''; $gmap_support = isset($instance['gmap_support']) ? $instance['gmap_support'] : ''; $gmap_phone = isset($instance['gmap_phone']) ? $instance['gmap_phone'] : ''; $gmap_contact_email = isset($instance['gmap_contact_email']) ? $instance['gmap_contact_email'] : ''; $gmap_location = isset($instance['gmap_location']) ? $instance['gmap_location'] : ''; echo $before_widget; ?>