esc_html__('A widget that promote you busincess visual way', 'sparklestore') )); } private function widget_fields() { $fields = array( 'banner_start_group_left' => array( 'sparklestore_widgets_name' => 'banner_start_group_left', 'sparklestore_widgets_title' => esc_html__('Promo Section One', 'sparklestore'), 'sparklestore_widgets_field_type' => 'group_start', ), 'sparklestore_promo_one' => array( 'sparklestore_widgets_name' => 'sparklestore_promo_one', 'sparklestore_widgets_title' => esc_html__('Select Promo Page', 'sparklestore'), 'sparklestore_widgets_field_type' => 'selectpage' ), 'sparklestore_promo_one_button_link' => array( 'sparklestore_widgets_name' => 'sparklestore_promo_one_button_link', 'sparklestore_widgets_title' => esc_html__('Promo One Button Link', 'sparklestore'), 'sparklestore_widgets_field_type' => 'url', ), 'banner_end_group_left' => array( 'sparklestore_widgets_name' => 'banner_end_group_left', 'sparklestore_widgets_field_type' => 'group_end', ), // Promo two Area 'banner_start_group_left_two' => array( 'sparklestore_widgets_name' => 'banner_start_group_left_two', 'sparklestore_widgets_title' => esc_html__('Promo Section Two', 'sparklestore'), 'sparklestore_widgets_field_type' => 'group_start', ), 'sparklestore_promo_two' => array( 'sparklestore_widgets_name' => 'sparklestore_promo_two', 'sparklestore_widgets_title' => esc_html__('Select Promo Page', 'sparklestore'), 'sparklestore_widgets_field_type' => 'selectpage' ), 'sparklestore_promo_two_button_link' => array( 'sparklestore_widgets_name' => 'sparklestore_promo_two_button_link', 'sparklestore_widgets_title' => esc_html__('Promo Two Button Link', 'sparklestore'), 'sparklestore_widgets_field_type' => 'url', ), 'banner_end_group_left_two' => array( 'sparklestore_widgets_name' => 'banner_end_group_left_two', 'sparklestore_widgets_field_type' => 'group_end', ), // Promo three Area 'banner_start_group_left_three' => array( 'sparklestore_widgets_name' => 'banner_start_group_left_three', 'sparklestore_widgets_title' => esc_html__('Promo Section Three', 'sparklestore'), 'sparklestore_widgets_field_type' => 'group_start', ), 'sparklestore_promo_three' => array( 'sparklestore_widgets_name' => 'sparklestore_promo_three', 'sparklestore_widgets_title' => esc_html__('Select Promo Page', 'sparklestore'), 'sparklestore_widgets_field_type' => 'selectpage' ), 'sparklestore_promo_three_button_link' => array( 'sparklestore_widgets_name' => 'sparklestore_promo_three_button_link', 'sparklestore_widgets_title' => esc_html__('Promo Three Button Link', 'sparklestore'), 'sparklestore_widgets_field_type' => 'url', ), 'banner_end_group_left_three' => array( 'sparklestore_widgets_name' => 'banner_end_group_left_three', 'sparklestore_widgets_field_type' => 'group_end', ), 'sparklestore_promo_info' => array( 'sparklestore_widgets_name' => 'sparklestore_promo_info', 'sparklestore_widgets_title' => esc_html__('Check to Disable Promo Information', 'sparklestore'), 'sparklestore_widgets_field_type' => 'checkbox', ), ); return $fields; } public function widget($args, $instance) { extract($args); extract($instance); $promo_one = empty( $instance['sparklestore_promo_one'] ) ? '' : $instance['sparklestore_promo_one']; $promo_one_button_link = empty( $instance['sparklestore_promo_one_button_link'] ) ? '' : $instance['sparklestore_promo_one_button_link']; $promo_two = empty( $instance['sparklestore_promo_two'] ) ? '' : $instance['sparklestore_promo_two']; $promo_two_button_link = empty( $instance['sparklestore_promo_two_button_link'] ) ? '' : $instance['sparklestore_promo_two_button_link']; $promo_three = empty( $instance['sparklestore_promo_three'] ) ? '' : $instance['sparklestore_promo_three']; $promo_three_button_link = empty( $instance['sparklestore_promo_three_button_link'] ) ? '' : $instance['sparklestore_promo_three_button_link']; $promo_info = empty( $instance['sparklestore_promo_info'] ) ? '' : $instance['sparklestore_promo_info']; echo $before_widget; ?>