Ejemplo n.º 1
0
 /**
  * Constructor. Set the default widget options and create widget.
  *
  * @since 0.1.8
  */
 function __construct()
 {
     ThemeMix_Featured_Content::$self = $this;
     $gfwa = genesis_get_option('thememix_featured_content_gfwa');
     if ($gfwa) {
         ThemeMix_Featured_Content::$base = 'featured-post';
     }
     $this->defaults = apply_filters('thememix_featured_content_defaults', array('add_column_classes' => 0, 'archive_link' => '', 'byline_position' => 'after-title', 'class' => '', 'column_classes' => '', 'content_limit' => '', 'count' => 0, 'custom_field' => '', 'delete_transients' => 0, 'excerpt_cutoff' => '…', 'excerpt_limit' => 55, 'exclude_cat' => '', 'exclude_displayed' => 0, 'exclude_terms' => '', 'extra_format' => 'ul', 'extra_num' => 3, 'extra_posts' => '', 'extra_title' => '', 'gravatar_alignment' => '', 'gravatar_size' => '', 'image_alignment' => '', 'image_position' => 'before-title', 'image_size' => '', 'include_exclude' => '', 'link_gravatar' => 0, 'link_image' => 1, 'link_image_field' => '', 'link_title' => 1, 'link_title_field' => '', 'meta_key' => '', 'more_from_category' => '', 'more_from_category_text' => __('More Posts from this Category', 'thememix-pro-genesis'), 'more_text' => __('[Read More...]', 'thememix-pro-genesis'), 'optimize' => 0, 'order' => '', 'orderby' => '', 'page_id' => '', 'paged' => '', 'post_align' => '', 'post_id' => '', 'post_info' => '[post_date] ' . __('By', 'thememix-pro-genesis') . ' [post_author_posts_link] [post_comments]', 'post_meta' => '[post_categories] [post_tags]', 'post_type' => 'post', 'posts_cat' => '', 'posts_num' => 1, 'posts_offset' => 0, 'posts_term' => '', 'show_archive_line' => 0, 'show_byline' => 0, 'show_content' => '', 'show_gravatar' => 0, 'show_image' => 0, 'show_paged' => '', 'show_sticky' => '', 'show_title' => 0, 'title' => '', 'title_cutoff' => '…', 'title_limit' => '', 'transients_time' => 86400, 'widget_title_link' => 0, 'widget_title_link_href' => ''));
     $widget_ops = array('classname' => 'featured-content', 'description' => __('Displays featured content with thumbnails', 'thememix-pro-genesis'));
     $control_ops = array('id_base' => 'featured-content', 'width' => 505, 'height' => 350);
     $name = __('Genesis - All Featured Content', 'thememix-pro-genesis');
     if (defined('CHILD_NAME') && true === apply_filters('thememix_featured_content_widget_name', false)) {
         $name = CHILD_THEME_NAME;
     } elseif (apply_filters('thememix_featured_content_widget_name', false)) {
         $name = apply_filters('thememix_featured_content_widget_name', false);
     }
     parent::__construct('featured-content', $name, $widget_ops, $control_ops);
     ThemeMix_Featured_Content::add();
     do_action('thememix_featured_content_actions', $this);
 }