public function form($instance) { $defaults = array('title' => esc_html__('Daily Deal', 'couponhut')); $instance = wp_parse_args((array) $instance, $defaults); ?> <p> <label for="<?php echo esc_attr($this->get_field_id('title')); ?> "><?php esc_html_e('Title', 'couponhut'); ?> :</label> <input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?> " name="<?php echo esc_attr($this->get_field_name('title')); ?> " type="text" value="<?php echo esc_attr($instance['title']); ?> " /> </p> <p> <?php if (class_exists(SSD_Widget_Fields)) { $args = array('id' => $this->get_field_id('daily_deal'), 'name' => $this->get_field_name('daily_deal'), 'value' => esc_attr($instance['daily_deal']), 'type' => 'multi-select', 'label' => __('Daily Deal', 'couponhut'), 'choices' => fw_ssd_get_post_names('deal')); SSD_Widget_Fields::field($args); } ?> </p> <?php }
<?php if (!defined('FW')) { die('Forbidden'); } $options = array('id' => array('type' => 'unique'), 'featured_posts' => array('label' => esc_html__('Featured Posts', 'couponhut'), 'type' => 'addable-option', 'option' => array('type' => 'multi-select', 'population' => 'array', 'choices' => fw_ssd_get_post_names('deal'), 'limit' => 1), 'desc' => esc_html__('Add Deals that will appear in the carousel.', 'couponhut')));