__( 'A widget To Display Contact Info', 'accesspress-basic' ) ) ); } /** * Helper function that holds widget fields * Array is used in update and form functions */ private function widget_fields() { $fields = array( 'contact_title' => array( 'apbasic_widgets_name' => 'contact_title', 'apbasic_widgets_title' => __('Title','accesspress-basic'), 'apbasic_widgets_field_type' => 'text' ), 'contact_phone' => array( 'apbasic_widgets_name' => 'contact_phone', 'apbasic_widgets_title' => __('Phone','accesspress-basic'), 'apbasic_widgets_field_type' => 'text' ), 'contact_email' => array( 'apbasic_widgets_name' => 'contact_email', 'apbasic_widgets_title' => __('Email','accesspress-basic'), 'apbasic_widgets_field_type' => 'text' ), 'contact_address' => array( 'apbasic_widgets_name' => 'contact_address', 'apbasic_widgets_title' => __('Address','accesspress-basic'), 'apbasic_widgets_field_type' => 'textarea' ) ); 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 ); extract($instance); echo $before_widget; ?>