__('A widget that shows quick contact information', 'buzzstore') )); } private function widget_fields() { $fields = array( 'buzzstore_quick_contact_title' => array( 'buzzstore_widgets_name' => 'buzzstore_quick_contact_title', 'buzzstore_widgets_title' => __('Title', 'buzzstore'), 'buzzstore_widgets_field_type' => 'title', ), 'buzzstore_quick_address' => array( 'buzzstore_widgets_name' => 'buzzstore_quick_address', 'buzzstore_widgets_title' => __('Contact Address', 'buzzstore'), 'buzzstore_widgets_field_type' => 'textarea', 'buzzstore_widgets_row' => 2, ), 'buzzstore_quick_phone' => array( 'buzzstore_widgets_name' => 'buzzstore_quick_phone', 'buzzstore_widgets_title' => __('Contact Number', 'buzzstore'), 'buzzstore_widgets_field_type' => 'text', ), 'buzzstore_quick_email' => array( 'buzzstore_widgets_name' => 'buzzstore_quick_email', 'buzzstore_widgets_title' => __('Contact Email Address', 'buzzstore'), 'buzzstore_widgets_field_type' => 'text', ), 'buzzstore_opening_time' => array( 'buzzstore_widgets_name' => 'buzzstore_opening_time', 'buzzstore_widgets_title' => __('Store Opening Time', 'buzzstore'), 'buzzstore_widgets_field_type' => 'textarea', 'buzzstore_widgets_row' => 2, ), ); return $fields; } public function widget($args, $instance) { extract($args); extract($instance); $title = esc_attr( $instance['buzzstore_quick_contact_title'] ); $contact_address = wp_strip_all_tags ( $instance['buzzstore_quick_address'] ); $contact_number = esc_attr( $instance['buzzstore_quick_phone'] ); $contact_email = esc_attr( $instance['buzzstore_quick_email'] ); $opening_time = wp_strip_all_tags ( $instance['buzzstore_opening_time'] ); echo $before_widget; if(!empty($title)) { echo '