/**
  * Taxonomy Tiles widget constructor
  *
  * @since  1.0.0
  */
 public function __construct()
 {
     $this->widget_name = esc_html__('King News Taxonomy Tiles Widget', 'king_news');
     $this->widget_description = esc_html__('This widget displays images from taxonomy.', 'king_news');
     $this->widget_id = 'widget-taxonomy-tiles';
     $this->widget_cssclass = 'widget-taxonomy-tiles';
     $this->settings = array('title' => array('type' => 'text', 'value' => '', 'label' => esc_html__('Widget title', 'king_news')), 'terms_type' => array('type' => 'radio', 'value' => 'category', 'options' => array('category' => array('label' => esc_html__('Category', 'king_news')), 'post_tag' => array('label' => esc_html__('Tag', 'king_news'))), 'label' => esc_html__('Choose taxonomy type', 'king_news')), 'category' => array('type' => 'select', 'multiple' => true, 'value' => '', 'options' => false, 'options_callback' => array($this, 'get_terms_list'), 'label' => esc_html__('Select category to show', 'king_news')), 'post_tag' => array('type' => 'select', 'multiple' => true, 'value' => '', 'options' => false, 'options_callback' => array($this, 'get_terms_list', array('post_tag')), 'label' => esc_html__('Select tags to show', 'king_news')), 'description_length' => array('type' => 'stepper', 'value' => '0', 'max_value' => '500', 'min_value' => '0', 'step_value' => '1', 'label' => esc_html__('Description words length ( Set 0 to hide description. )', 'king_news')), 'show_post_count' => array('type' => 'checkbox', 'value' => array('show_post_count_check' => 'true'), 'options' => array('show_post_count_check' => esc_html__('Show post count', 'king_news'))), 'columns_number' => array('type' => 'stepper', 'value' => '2', 'max_value' => '4', 'min_value' => '1', 'step_value' => '1', 'label' => esc_html__('Columns number', 'king_news')), 'first_item' => array('type' => 'checkbox', 'value' => array('first_item_check' => 'false'), 'options' => array('first_item_check' => esc_html__('Tiles first item', 'king_news'))), 'items_padding' => array('type' => 'stepper', 'value' => '5', 'max_value' => '50', 'min_value' => '2', 'step_value' => '1', 'label' => esc_html__('Items padding ( size in pixels )', 'king_news')));
     parent::__construct();
 }
 /**
  * Featured Posts Block widget constructor.
  *
  * @since 1.0
  */
 public function __construct()
 {
     $this->widget_name = esc_html__('Featured Posts Block', '__tm');
     $this->widget_description = esc_html__('This widget displays latest posts');
     $this->widget_id = 'widget-featured-posts-block';
     $this->widget_cssclass = 'widget-featured-posts-block';
     $this->settings = array('layout' => array('type' => 'select', 'multiple' => false, 'value' => $this->_default_layout, 'options' => false, 'options_callback' => array($this, 'get_layouts'), 'label' => esc_html__('Layout', '__tm')), 'checkboxes' => array('type' => 'checkbox', 'value' => array('title' => 'false', 'excerpt' => 'false', 'categories' => 'false', 'tags' => 'false', 'author' => 'false', 'date' => 'false', 'comments_count' => 'false'), 'options' => array('title' => esc_html__('Show post title', '__tm'), 'excerpt' => esc_html__('Show post excerpt', '__tm'), 'categories' => esc_html__('Show post categories', '__tm'), 'tags' => esc_html__('Show post tags', '__tm'), 'author' => esc_html__('Show post author', '__tm'), 'date' => esc_html__('Show post date', '__tm'), 'comments_count' => esc_html__('Show post comments count', '__tm'))), 'excerpt_length' => array('type' => 'stepper', 'value' => 55, 'min_value' => 1, 'label' => esc_html__('Excerpt length', '__tm')));
     parent::__construct();
 }
 /**
  * Constructor
  *
  * @since  1.0.0
  */
 public function __construct()
 {
     $this->widget_cssclass = 'cherry widget_smart_slider';
     $this->widget_description = esc_html__('Display smart slider on your site.', 'king_news');
     $this->widget_id = 'widget_smart_slider';
     $this->widget_name = esc_html__('King News Smart Slider Widget', 'king_news');
     $this->settings = array('title' => array('type' => 'text', 'value' => esc_html__('Smart Slider', 'king_news'), 'label' => esc_html__('Title', 'king_news')), 'terms_type' => array('type' => 'radio', 'value' => 'category', 'options' => array('category' => array('label' => esc_html__('Category', 'king_news')), 'post_tag' => array('label' => esc_html__('Tag', 'king_news'))), 'label' => esc_html__('Choose taxonomy type', 'king_news')), 'categories' => array('type' => 'select', 'size' => 1, 'value' => '', 'options_callback' => array($this, 'get_terms_list', array('category', 'slug')), 'options' => false, 'label' => esc_html__('Select category', 'king_news'), 'multiple' => true, 'placeholder' => esc_html__('Select category', 'king_news')), 'tags' => array('type' => 'select', 'size' => 1, 'value' => '', 'options_callback' => array($this, 'get_terms_list', array('post_tag', 'slug')), 'options' => false, 'label' => esc_html__('Select tags', 'king_news'), 'multiple' => true, 'placeholder' => esc_html__('Select tags', 'king_news')), 'posts_per_page' => array('type' => 'stepper', 'value' => 3, 'max_value' => 50, 'min_value' => 1, 'label' => esc_html__('Posts count', 'king_news')), 'post_title' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display title', 'king_news')), 'content' => array('type' => 'switcher', 'value' => 'false', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display content', 'king_news')), 'more_button' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display more button', 'king_news')), 'more_button_text' => array('type' => 'text', 'value' => esc_html__('Read more', 'king_news'), 'label' => esc_html__('More button text', 'king_news')), 'trim_words' => array('type' => 'slider', 'value' => 15, 'max_value' => 55, 'min_value' => 1, 'step_value' => 1, 'label' => esc_html__('Content words trimmed count', 'king_news')), 'width' => array('type' => 'text', 'value' => '100%', 'label' => esc_html__('Slider width', 'king_news')), 'height' => array('type' => 'text', 'value' => '800', 'label' => esc_html__('Slider height', 'king_news')), 'orientation' => array('type' => 'select', 'size' => 1, 'value' => 'horizontal', 'options' => array('horizontal' => esc_html__('Horizontal', 'king_news'), 'vertical' => esc_html__('Vertical', 'king_news')), 'label' => esc_html__('Slider orientation', 'king_news')), 'slide_distance' => array('type' => 'slider', 'value' => 10, 'max_value' => 100, 'min_value' => 0, 'label' => esc_html__('Slide distance(px)', 'king_news')), 'slide_duration' => array('type' => 'slider', 'value' => 500, 'max_value' => 3000, 'min_value' => 100, 'step_value' => 100, 'label' => esc_html__('Slide duration(ms)', 'king_news')), 'slide_fade' => array('type' => 'switcher', 'value' => 'false', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Use fade effect?', 'king_news')), 'navigation' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Use navigation?', 'king_news')), 'fade_navigation' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Indicates whether the arrows will fade in only on hover', 'king_news')), 'pagination' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Use pagination?', 'king_news')), 'autoplay' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Use autoplay?', 'king_news')), 'fullScreen' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display fullScreen button?', 'king_news')), 'shuffle' => array('type' => 'switcher', 'value' => 'false', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Indicates if the slides will be shuffled', 'king_news')), 'loop' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Use infinite scrolling?', 'king_news')), 'thumbnails' => array('type' => 'switcher', 'value' => 'false', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display thumbnails?', 'king_news')), 'thumbnails_arrows' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display thumbnails arrows?', 'king_news')), 'thumbnails_position' => array('type' => 'select', 'size' => 1, 'value' => 'bottom', 'options' => array('top' => esc_html__('Top', 'king_news'), 'bottom' => esc_html__('Bottom', 'king_news'), 'right' => esc_html__('Right', 'king_news'), 'left' => esc_html__('Left', 'king_news')), 'label' => esc_html__('Sets the position of the thumbnail scroller', 'king_news')));
     parent::__construct();
     add_action('wp_enqueue_scripts', array($this, 'enqueue_assets'), 9);
 }
 /**
  * Image grid widget constructor
  *
  * @since  1.0.0
  */
 public function __construct()
 {
     $this->widget_name = esc_html__('Image Grid Widget', 'king_news');
     $this->widget_description = esc_html__('This widget displays images from post.', 'king_news');
     $this->widget_id = 'widget-image-grid';
     $this->widget_cssclass = 'widget-image-grid';
     $this->settings = array('title' => array('type' => 'text', 'value' => '', 'label' => esc_html__('Widget title', 'king_news')), 'terms_type' => array('type' => 'radio', 'value' => 'category_name', 'options' => array('category_name' => array('label' => esc_html__('Category', 'king_news')), 'tag' => array('label' => esc_html__('Tag', 'king_news'))), 'label' => esc_html__('Choose taxonomy type', 'king_news')), 'category_name' => array('type' => 'select', 'multiple' => true, 'value' => '', 'options' => false, 'options_callback' => array($this, 'get_terms_list', array('category')), 'label' => esc_html__('Select categories to show', 'king_news')), 'tag' => array('type' => 'select', 'multiple' => true, 'value' => '', 'options' => false, 'options_callback' => array($this, 'get_terms_list', array('post_tag')), 'label' => esc_html__('Select tags to show', 'king_news')), 'post_sort' => array('type' => 'select', 'value' => 'date', 'options' => array('date' => esc_html__('Publish Date', 'king_news'), 'title' => esc_html__('Post Title', 'king_news'), 'comment_count' => esc_html__('Comment Count', 'king_news')), 'label' => esc_html__('Post sorted', 'king_news')), 'post_number' => array('type' => 'stepper', 'value' => '5', 'max_value' => '100', 'min_value' => '1', 'step_value' => '1', 'label' => esc_html__('Posts number', 'king_news')), 'post_offset' => array('type' => 'stepper', 'value' => '0', 'max_value' => '10000', 'min_value' => '0', 'step_value' => '1', 'label' => esc_html__('Offset post', 'king_news')), 'title_length' => array('type' => 'stepper', 'value' => '10', 'max_value' => '500', 'min_value' => '0', 'step_value' => '1', 'label' => esc_html__('Title words length ( Set 0 to hide title. )', 'king_news')), 'columns_number' => array('type' => 'stepper', 'value' => '3', 'max_value' => '4', 'min_value' => '1', 'step_value' => '1', 'label' => esc_html__('Columns number', 'king_news')), 'items_padding' => array('type' => 'stepper', 'value' => '5', 'max_value' => '50', 'min_value' => '0', 'step_value' => '1', 'label' => esc_html__('Items padding ( size in pixels )', 'king_news')));
     $this->get_terms_list();
     parent::__construct();
 }
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->widget_cssclass = 'king_news widget_carousel';
     $this->widget_description = esc_html__('Display a list of your posts on your site.', 'king_news');
     $this->widget_id = 'widget_carousel';
     $this->widget_name = esc_html__('King News Carousel Widget', 'king_news');
     $this->settings = array('title' => array('type' => 'text', 'value' => esc_html__('Carousel', 'king_news'), 'label' => esc_html__('Title', 'king_news')), 'terms_type' => array('type' => 'radio', 'value' => 'category', 'options' => array('category' => array('label' => esc_html__('Category', 'king_news')), 'post_tag' => array('label' => esc_html__('Tag', 'king_news'))), 'label' => esc_html__('Choose taxonomy type', 'king_news')), 'categories' => array('type' => 'select', 'size' => 1, 'value' => '', 'options_callback' => array($this, 'get_terms_list', array('category', 'slug')), 'options' => false, 'label' => esc_html__('Select category', 'king_news'), 'multiple' => true, 'placeholder' => esc_html__('Select category', 'king_news')), 'tags' => array('type' => 'select', 'size' => 1, 'value' => '', 'options_callback' => array($this, 'get_terms_list', array('post_tag', 'slug')), 'options' => false, 'label' => esc_html__('Select tags', 'king_news'), 'multiple' => true, 'placeholder' => esc_html__('Select tags', 'king_news')), 'posts_per_page' => array('type' => 'stepper', 'value' => 10, 'max_value' => 20, 'min_value' => 1, 'label' => esc_html__('Posts count', 'king_news')), 'post_title' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display title', 'king_news')), 'content' => array('type' => 'switcher', 'value' => 'false', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display content', 'king_news')), 'more_button' => array('type' => 'switcher', 'value' => 'false', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display more button', 'king_news')), 'more_button_text' => array('type' => 'text', 'value' => esc_html__('Read more', 'king_news'), 'label' => esc_html__('More button text', 'king_news')), 'trim_words' => array('type' => 'slider', 'value' => 15, 'max_value' => 55, 'min_value' => 1, 'step_value' => 1, 'label' => esc_html__('Content words trimmed count', 'king_news')), 'slides_per_view' => array('type' => 'slider', 'max_value' => 25, 'min_value' => 1, 'value' => 5, 'label' => esc_html__('Number of slides per view', 'king_news')), 'slides_per_group' => array('type' => 'slider', 'max_value' => 25, 'min_value' => 1, 'value' => 1, 'label' => esc_html__('Number slides per group', 'king_news')), 'slides_per_column' => array('type' => 'slider', 'max_value' => 5, 'min_value' => 1, 'value' => 1, 'label' => esc_html__('Multi Row Slides Layout', 'king_news')), 'space_between_slides' => array('type' => 'slider', 'max_value' => 100, 'min_value' => 0, 'value' => 30, 'label' => esc_html__('Width of the space between slides(px)', 'king_news')), 'duration_speed' => array('type' => 'slider', 'max_value' => 5000, 'min_value' => 100, 'value' => 500, 'label' => esc_html__('Duration of transition between slides (ms)', 'king_news')), 'navigation' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Slider navigation', 'king_news')), 'pagination' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Slider pagination', 'king_news')));
     parent::__construct();
     add_action('wp_enqueue_scripts', array($this, 'enqueue_assets'), 9);
 }
 /**
  * Constructor.
  */
 public function __construct()
 {
     $this->widget_cssclass = 'widget-instagram';
     $this->widget_description = esc_html__('Display a list of photos from Instagram network.', 'king_news');
     $this->widget_id = 'king_news_widget_instagram';
     $this->widget_name = esc_html__('Instagram', 'king_news');
     $this->settings = array('title' => array('type' => 'text', 'value' => esc_html__('Instagram', 'king_news'), 'label' => esc_html__('Title', 'king_news')), 'client_id' => array('type' => 'text', 'value' => '', 'label' => esc_html__('Client ID', 'king_news')), 'tag' => array('type' => 'text', 'value' => '', 'label' => esc_html__('Hashtag (enter without `#` symbol)', 'king_news')), 'image_counter' => array('type' => 'stepper', 'value' => '6', 'max_value' => '12', 'min_value' => '1', 'step_value' => '1', 'label' => esc_html__('Number of photos', 'king_news')), 'display_caption' => array('type' => 'checkbox', 'value' => array('display_caption_check' => 'false'), 'options' => array('display_caption_check' => esc_html__('Caption', 'king_news'))), 'display_date' => array('type' => 'checkbox', 'value' => array('display_date_check' => 'false'), 'options' => array('display_date_check' => esc_html__('Date', 'king_news'))));
     add_action('cherry_widget_after_update', array($this, 'delete_cache'));
     parent::__construct();
 }
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->widget_cssclass = 'king_news widget-about-author';
     $this->widget_description = __('Display an information about selected user.', 'king_news');
     $this->widget_id = 'king_news_widget_about_author';
     $this->widget_name = __('About Author', 'king_news');
     $this->settings = array('title' => array('type' => 'text', 'value' => __('About Author', 'king_news'), 'label' => __('Title', 'king_news')), 'user_id' => array('type' => 'select', 'size' => 1, 'value' => '', 'options_callback' => array($this, 'get_users_list'), 'options' => false, 'label' => __('Select user to show', 'king_news')), 'avatar_size' => array('type' => 'slider', 'max_value' => 512, 'min_value' => 0, 'value' => 250, 'step_value' => 1, 'label' => __('Author avatar size (set 0 to hide avatar, applied only for Gravatar)', 'king_news')), 'avatar_img' => array('type' => 'media', 'value' => '', 'multi_upload' => false, 'library_type' => 'image', 'upload_button_text' => __('Select image', 'king_news'), 'label' => __('Custom avatar image (override default user avatar)', 'king_news')), 'link' => array('type' => 'text', 'value' => '', 'label' => __('Link (leave empty to hide)', 'king_news')), 'link_text' => array('type' => 'text', 'value' => __('Read More', 'king_news'), 'label' => __('Link label', 'king_news')));
     remove_filter('pre_user_description', 'wp_filter_kses');
     add_filter('pre_user_description', 'wp_filter_post_kses');
     parent::__construct();
 }
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->widget_cssclass = 'king_news widget_news_smart_box';
     $this->widget_description = esc_html__('Display a list of your posts on your site.', 'king_news');
     $this->widget_id = 'widget_news_smart_box';
     $this->widget_name = esc_html__('New Smart Box Widget', 'king_news');
     $this->settings = array('title' => array('type' => 'text', 'value' => esc_html__('News Smart Box', 'king_news'), 'label' => esc_html__('Title', 'king_news')), 'layout_type' => array('type' => 'radio', 'value' => 'layout_type_1', 'options' => array('layout_type_1' => array('label' => esc_html__('Layout type 1', 'king_news'), 'img_src' => KING_NEWS_THEME_URI . '/assets/images/admin/widgets/news-smart-box/news-smart-box-layout-1.svg'), 'layout_type_2' => array('label' => esc_html__('Layout type 2', 'king_news'), 'img_src' => KING_NEWS_THEME_URI . '/assets/images/admin/widgets/news-smart-box/news-smart-box-layout-2.svg'), 'layout_type_3' => array('label' => esc_html__('Layout type 3', 'king_news'), 'img_src' => KING_NEWS_THEME_URI . '/assets/images/admin/widgets/news-smart-box/news-smart-box-layout-3.svg')), 'label' => esc_html__('Choose layout type', 'king_news')), 'terms_type' => array('type' => 'radio', 'value' => 'category', 'options' => array('category' => array('label' => esc_html__('Category', 'king_news')), 'post_tag' => array('label' => esc_html__('Tag', 'king_news'))), 'label' => esc_html__('Choose taxonomy type', 'king_news')), 'current_category' => array('type' => 'select', 'value' => '', 'options_callback' => array($this, 'get_terms_list', array('category', 'slug')), 'options' => false, 'label' => esc_html__('Select category', 'king_news'), 'placeholder' => esc_html__('Select category', 'king_news')), 'categories' => array('type' => 'select', 'size' => 1, 'value' => '', 'options_callback' => array($this, 'get_terms_list', array('category', 'slug')), 'options' => false, 'label' => esc_html__('Select category', 'king_news'), 'multiple' => true, 'placeholder' => esc_html__('Select categories', 'king_news')), 'current_tag' => array('type' => 'select', 'value' => '', 'options_callback' => array($this, 'get_terms_list', array('post_tag', 'slug')), 'options' => false, 'label' => esc_html__('Select tag', 'king_news'), 'placeholder' => esc_html__('Select tags', 'king_news')), 'tags' => array('type' => 'select', 'size' => 1, 'value' => '', 'options_callback' => array($this, 'get_terms_list', array('post_tag', 'slug')), 'options' => false, 'label' => esc_html__('Select tags', 'king_news'), 'multiple' => true, 'placeholder' => esc_html__('Select tags', 'king_news')), 'posts_per_page' => array('type' => 'stepper', 'value' => 6, 'max_value' => 20, 'min_value' => 1, 'label' => esc_html__('Posts count', 'king_news')), 'trim_title_words' => array('type' => 'slider', 'value' => 5, 'max_value' => 55, 'min_value' => 1, 'step_value' => 1, 'label' => esc_html__('Title words trimmed count', 'king_news')), 'trim_content_words' => array('type' => 'slider', 'value' => 15, 'max_value' => 55, 'min_value' => 1, 'step_value' => 1, 'label' => esc_html__('Content words trimmed count', 'king_news')), 'date_visibility' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display date', 'king_news')), 'author_visibility' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display author', 'king_news')), 'comment_visibility' => array('type' => 'switcher', 'value' => 'true', 'style' => wp_is_mobile() ? 'normal' : 'small', 'label' => esc_html__('Display comments', 'king_news')));
     parent::__construct();
     add_action('wp_ajax_new_smart_box_instance', array($this, 'new_smart_box_instance'));
     add_action('wp_ajax_nopriv_new_smart_box_instance', array($this, 'new_smart_box_instance'));
 }
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->widget_cssclass = 'king_news widget-subscribe';
     $this->widget_description = __('Display subscribe form and follow links.', 'king_news');
     $this->widget_id = 'king_news_widget_subscribe_follow';
     $this->widget_name = __('King News Subscribe and Follow', 'king_news');
     $this->settings = array('enable_subscribe' => array('type' => 'checkbox', 'value' => array('enable_subscribe' => 'true'), 'options' => array('enable_subscribe' => __('Enable Subscribe Box', 'king_news'))), 'subscribe_title' => array('type' => 'text', 'value' => __('Subscribe', 'king_news'), 'label' => __('Subscribe Title', 'king_news')), 'subscribe_message' => array('type' => 'textarea', 'label' => __('Subscribe text message', 'king_news')), 'subscribe_input' => array('type' => 'text', 'value' => __('Enter your email', 'king_news'), 'label' => __('Subscribe input placeholder', 'king_news')), 'subscribe_submit' => array('type' => 'text', 'value' => __('Subscribe', 'king_news'), 'label' => __('Subscribe submit label', 'king_news')), 'subscribe_success' => array('type' => 'text', 'value' => __('You successfully subscribed', 'king_news'), 'label' => __('Subscribe success', 'king_news')), 'enable_follow' => array('type' => 'checkbox', 'value' => array('enable_follow' => 'true'), 'options' => array('enable_follow' => __('Enable Follow Box', 'king_news'))), 'follow_title' => array('type' => 'text', 'value' => __('Follow', 'king_news'), 'label' => __('Follow Title', 'king_news')), 'follow_message' => array('type' => 'textarea', 'label' => __('Follow text message', 'king_news')));
     add_action('wp_ajax_king_news_subscribe', array($this, 'process_subscribe'));
     add_action('wp_ajax_nopriv_king_news_subscribe', array($this, 'process_subscribe'));
     $this->errors = array('nonce' => esc_html__('Security validation failed', 'king_news'), 'mail' => esc_html__('Please, provide valid mail', 'king_news'), 'mailchimp' => esc_html__('Please, set up MailChimp API key and List ID', 'king_news'), 'internal' => esc_html__('Internal error. Please, try again later', 'king_news'));
     parent::__construct();
 }
 /**
  * Featured Posts Block widget constructor.
  *
  * @since 1.0
  */
 public function __construct()
 {
     $this->widget_name = esc_html__('Featured Posts Block', '__tm');
     $this->widget_description = esc_html__('This widget displays latest posts');
     $this->widget_id = 'widget-featured-posts-block';
     $this->widget_cssclass = 'widget-featured-posts-block';
     $layouts = $this->get_layouts();
     $layout_options = array();
     foreach ($layouts as $layout_id => $layout_label) {
         $layout_options[$layout_id] = array('label' => $layout_label, 'img_src' => KING_NEWS_THEME_URI . '/assets/images/admin/widgets/featured-posts-block/featured-posts-block-' . $layout_id . '.svg');
     }
     $this->settings = array('layout' => array('type' => 'radio', 'value' => $this->_default_layout, 'label' => esc_html__('Layout', '__tm'), 'options' => $layout_options), 'posts_ids' => array('type' => 'text', 'value' => '', 'label' => esc_html__('Posts IDs (Optional)', '__tm')), 'checkboxes' => array('type' => 'checkbox', 'label' => esc_html__('Post Meta', '__tm'), 'value' => array('title' => 'false', 'excerpt' => 'false', 'categories' => 'false', 'tags' => 'false', 'author' => 'false', 'date' => 'false', 'comments_count' => 'false'), 'options' => array('title' => esc_html__('Show post title', '__tm'), 'excerpt' => esc_html__('Show post excerpt', '__tm'), 'categories' => esc_html__('Show post categories', '__tm'), 'tags' => esc_html__('Show post tags', '__tm'), 'author' => esc_html__('Show post author', '__tm'), 'date' => esc_html__('Show post date', '__tm'), 'comments_count' => esc_html__('Show post comments count', '__tm'))), 'excerpt_length' => array('type' => 'stepper', 'value' => 55, 'min_value' => 1, 'label' => esc_html__('Excerpt length', '__tm')));
     parent::__construct();
 }