__('A widget that shows quick contact information', 'sparklestore') )); } private function widget_fields() { $fields = array( 'sparklestore_quick_contact_title' => array( 'sparklestore_widgets_name' => 'sparklestore_quick_contact_title', 'sparklestore_widgets_title' => __('Title', 'sparklestore'), 'sparklestore_widgets_field_type' => 'title', ), 'sparklestore_quick_address' => array( 'sparklestore_widgets_name' => 'sparklestore_quick_address', 'sparklestore_widgets_title' => __('Contact Address', 'sparklestore'), 'sparklestore_widgets_field_type' => 'textarea', 'sparklestore_widgets_row' => 4, ), 'sparklestore_quick_phone' => array( 'sparklestore_widgets_name' => 'sparklestore_quick_phone', 'sparklestore_widgets_title' => __('Contact Number', 'sparklestore'), 'sparklestore_widgets_field_type' => 'text', ), 'sparklestore_quick_email' => array( 'sparklestore_widgets_name' => 'sparklestore_quick_email', 'sparklestore_widgets_title' => __('Contact Email Address', 'sparklestore'), 'sparklestore_widgets_field_type' => 'text', ) ); return $fields; } public function widget($args, $instance) { extract($args); extract($instance); $title = esc_attr( $instance['sparklestore_quick_contact_title'] ); $contact_address = esc_textarea( $instance['sparklestore_quick_address'] ); $contact_number = esc_attr( $instance['sparklestore_quick_phone'] ); $contact_email = esc_attr( $instance['sparklestore_quick_email'] ); echo $before_widget; if(!empty($title)) { echo '