'agency_ecommerce_widget_features', 'description' => esc_html__('Widget to display features with icon (font awesome) and description.', 'agency-ecommerce'), ); parent::__construct('agency-ecommerce-features', esc_html__('AE - Features', 'agency-ecommerce'), $opts); } function widget_fields() { $fields = array( 'icon_one' => array( 'name' => 'icon_one', 'title' => esc_html__('Icon One', 'agency-ecommerce'), 'type' => 'icon-picker', 'default' => 'fa-refresh' ), 'feature_one' => array( 'name' => 'feature_one', 'title' => esc_html__('Feature One', 'agency-ecommerce'), 'type' => 'text', 'default' => esc_html__('FREE SHIPPING & RETURN', 'agency-ecommerce'), ), 'text_one' => array( 'name' => 'text_one', 'title' => esc_html__('Description One', 'agency-ecommerce'), 'type' => 'text', 'default' => esc_html__('Free shipping on all orders over $99', 'agency-ecommerce'), ), 'icon_two' => array( 'name' => 'icon_two', 'title' => esc_html__('Icon Two', 'agency-ecommerce'), 'type' => 'icon-picker', 'default' => 'fa-heart' ), 'feature_two' => array( 'name' => 'feature_two', 'title' => esc_html__('Feature Two', 'agency-ecommerce'), 'type' => 'text', 'default' => esc_html__('MONEY BACK GUARANTEE', 'agency-ecommerce'), ), 'text_two' => array( 'name' => 'text_two', 'title' => esc_html__('Description Two', 'agency-ecommerce'), 'type' => 'text', 'default' => esc_html__('100% money back guarantee', 'agency-ecommerce'), ), 'icon_three' => array( 'name' => 'icon_three', 'title' => esc_html__('Icon Three', 'agency-ecommerce'), 'type' => 'icon-picker', 'default' => 'fa-money' ), 'feature_three' => array( 'name' => 'feature_three', 'title' => esc_html__('Feature Three', 'agency-ecommerce'), 'type' => 'text', 'default' => esc_html__('ONLINE SUPPORT 24/7', 'agency-ecommerce'), ), 'text_three' => array( 'name' => 'text_three', 'title' => esc_html__('Description Three', 'agency-ecommerce'), 'type' => 'text', 'default' => esc_html__('Lorem ipsum dolor sit amet.', 'agency-ecommerce'), ) ); return $fields; } function widget($args, $instance) { $valid_widget_instance = Agency_Ecommerce_Widget_Validation::instance()->validate($instance, $this->widget_fields()); echo $args['before_widget']; ?>