Example #1
0
 /**
  *
  */
 function widget($args, $instance)
 {
     global $wpdb, $shortname, $irish_framework_params;
     $prefix = MISS_PREFIX;
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts', MISS_TEXTDOMAIN) : $instance['title'], $instance, $this->id_base);
     $tagline = apply_filters('widget_tagline', empty($instance['tagline']) ? '' : '<h6>' . $instance['tagline'] . '</h6>', $instance, $this->id_base);
     if (!($number = (int) $instance['number'])) {
         $number = 3;
     } else {
         if ($number < 1) {
             $number = 1;
         } else {
             if ($number > 15) {
                 $number = 15;
             }
         }
     }
     $out = $before_widget;
     $out .= $before_title . $title . $after_title . $tagline;
     $disable_thumb = $instance['disable_thumb'] ? '1' : '0';
     $show_rating = isset($instance['show_rating']) ? '1' : '0';
     $recent_query = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'post_status' => 'publish', 'category__not_in' => array(miss_exclude_category_string($minus = false)), 'ignore_sticky_posts' => 1));
     if ($recent_query->have_posts()) {
         $out .= '<ul class="post_list small_post_list">';
         while ($recent_query->have_posts()) {
             $recent_query->the_post();
             $out .= '<li class="post_list_module">';
             /*				
             					$out .= miss_get_post_image( $filter_args );
             				$get_year = get_the_time( 'Y', get_the_ID() );
             				$get_month = get_the_time( 'm', get_the_ID() );
              else {
             					$out .= '<div class="month pull-left">';
             					$out .= '<span class="day">';
             					$out .= get_the_date('d');
             					$out .= '</span>';
             					$out .= get_the_date('M');
             					$out .= '</div>';
             				}
             */
             if (!$disable_thumb) {
                 $widget_thumb_img = $irish_framework_params->layout['big_sidebar_images']['small_post_list'];
                 $out .= miss_get_post_image(array('width' => $widget_thumb_img[0], 'height' => $widget_thumb_img[1], 'img_class' => 'image', 'preload' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
             }
             $out .= '<p class="post_title">';
             $out .= '<a rel="bookmark" href="' . esc_url(get_permalink()) . '" title="' . esc_attr(get_the_title()) . '">' . get_the_title() . '</a>';
             $out .= '</p>';
             $out .= '<div class="post_excerpt">';
             $out .= miss_excerpt(get_the_excerpt(), apply_filters('miss_home_spotlight_excerpt', 60), apply_filters('miss_excerpt', THEME_ELLIPSIS));
             $out .= '</div>';
             $out .= '<div class="clearboth"></div>';
             $out .= '</li>';
         }
         $out .= '</ul>';
     }
     $out .= $after_widget;
     wp_reset_postdata();
     echo $out;
 }
Example #2
0
 /**
  *
  */
 function widget($args, $instance)
 {
     global $wpdb, $shortname, $irish_framework_params;
     $prefix = MISS_PREFIX;
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Top Rated', MISS_TEXTDOMAIN) : $instance['title'], $instance, $this->id_base);
     if (!($number = (int) $instance['number'])) {
         $number = 3;
     } else {
         if ($number < 1) {
             $number = 1;
         } else {
             if ($number > 15) {
                 $number = 15;
             }
         }
     }
     $out = $before_widget;
     $out .= $before_title . $title . $after_title;
     $disable_thumb = $instance['disable_thumb'] ? '1' : '0';
     $show_rating = $instance['show_rating'] ? '1' : '0';
     $top_query = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'meta_key' => '_review_0', 'orderby' => 'meta_value', 'order' => 'DESC', 'post_status' => 'publish', 'category__not_in' => array(miss_exclude_category_string($minus = false)), 'ignore_sticky_posts' => 1));
     if ($top_query->have_posts()) {
         $out .= '<ul class="post_list small_post_list">';
         while ($top_query->have_posts()) {
             $top_query->the_post();
             $out .= '<li class="post_list_module">';
             if (!$disable_thumb) {
                 $widget_thumb_img = $irish_framework_params->layout['big_sidebar_images']['small_post_list'];
                 $out .= miss_get_post_image(array('width' => $widget_thumb_img[0], 'height' => $widget_thumb_img[1], 'img_class' => 'post_list_image', 'preload' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
             }
             $out .= '<div class="post_list_content">';
             $out .= '<p class="post_title">';
             $out .= '<a rel="bookmark" href="' . esc_url(get_permalink()) . '" title="' . esc_attr(get_the_title()) . '">' . get_the_title() . '</a>';
             $out .= '</p>';
             $get_year = get_the_time('Y', get_the_ID());
             $get_month = get_the_time('m', get_the_ID());
             if ($show_rating && score_value(get_the_ID()) != 0) {
                 $postid = get_the_ID();
                 $score = score_value($postid);
                 $out .= '<div class="rating_box">' . score_output($score, 'small') . '</div>';
             }
             $out .= '</div>';
             $out .= '</li>';
         }
         $out .= '</ul>';
     }
     $out .= $after_widget;
     wp_reset_postdata();
     echo $out;
 }
Example #3
0
 /**
  *
  */
 function widget($args, $instance)
 {
     global $wpdb, $irish_framework_params;
     $prefix = MISS_PREFIX;
     $title = apply_filters('widget_title', empty($instance['title']) ? __('In Focus', MISS_TEXTDOMAIN) : $instance['title'], $instance, $this->id_base);
     extract($args);
     $post_id = array($instance['post_id']) ? array($instance['post_id']) : false;
     $args = array('showposts' => 1, 'post_status' => 'publish');
     if (isset($post_id) && $post_id) {
         $args['post__in'] = $post_id;
     }
     $infocus_query = new WP_Query($args);
     $out = '';
     echo $before_widget;
     $out .= '<div class="in_focus">';
     while ($infocus_query->have_posts()) {
         $infocus_query->the_post();
         if (!isset($disable_thumb)) {
             $widget_thumb_img = $irish_framework_params->layout['images']['blog_layout5'];
             $out .= miss_get_post_image(array('width' => $widget_thumb_img[0], 'height' => $widget_thumb_img[1], 'img_class' => 'in_focus_image', 'preload' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
         }
         $out .= '<div class="in_focus_bottom">';
         $out .= '	<div class="bottom_bulk_box_field">';
         $out .= '		<div class="box">';
         $out .= '			<div class="post_title">';
         $out .= '				<a rel="bookmark" href="' . esc_url(get_permalink()) . '" title="' . esc_attr(get_the_title()) . '">' . get_the_title() . '</a>';
         $out .= '			</div>';
         $out .= '		</div>';
         /*
         			$out .= '		<div class="bulk">';
         			$out .= '		</div>';
         			$out .= '		<div class="shadow">';
         			$out .= '		</div>';
         */
         $out .= '	</div><!--  class="bottom_bulk_box_field" -->';
         $out .= '</div><!--  class="in_focus_bottom" -->';
     }
     $out .= '</div><!--  class="in_focus" -->';
     echo $out;
     echo $after_widget;
 }
Example #4
0
 /**
  *
  */
 function miss_related_posts($args = array())
 {
     global $post;
     $backup = $post;
     $out = '';
     extract($args);
     $tags = wp_get_post_tags($post->ID);
     $tagIDs = array();
     $related_post_found = false;
     if ($tags) {
         $tagcount = count($tags);
         for ($i = 0; $i < $tagcount; $i++) {
             $tagIDs[$i] = $tags[$i]->term_id;
         }
         $related_query = new WP_Query(array('tag__in' => $tagIDs, 'post__not_in' => array($post->ID), 'showposts' => $showposts, 'category__not_in' => array(miss_exclude_category_array($minus = false)), 'ignore_sticky_posts' => 1));
         if ($related_query->have_posts()) {
             $related_post_found = true;
         }
     }
     if (!$related_post_found) {
         $related_query = new WP_Query(array('showposts' => $showposts, 'nopaging' => 0, 'post_status' => 'publish', 'category__not_in' => array(miss_exclude_category_array($minus = false)), 'ignore_sticky_posts' => 1));
     }
     if ($related_query->have_posts()) {
         global $irish_framework_params;
         $img_sizes = $module == 'column' ? 'small_post_list' : 'additional_posts_grid';
         $_layout = get_post_meta($post->ID, '_layout', true);
         $img_layout = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
         $out .= $module == 'column' ? '<ul class="post_list small_post_list">' : '<div class="post_grid four_column_blog">';
         $i = 1;
         while ($related_query->have_posts()) {
             $related_query->the_post();
             $out .= $module == 'column' ? '<li class="post_list_module">' : '<div class="' . ($i % $showposts == 0 ? 'span3 last' : 'span3') . '">';
             $out .= $module == 'tab' ? '<div class="post_grid_module">' : '';
             $out .= miss_get_post_image(array('width' => $irish_framework_params->layout[$img_layout][$img_sizes][0], 'height' => $irish_framework_params->layout[$img_layout][$img_sizes][1], 'img_class' => $module == 'tab' ? 'post_grid_image image-resize w' : 'post_list_image', 'preload' => false, 'link_to' => get_permalink(), 'prettyphoto' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
             $out .= '<div class="' . ($module == 'tab' ? 'post_grid_content' : 'post_list_content') . '">';
             $out .= the_title('<p class="post_title"><a href="' . esc_url(get_permalink()) . '" title="' . esc_attr(the_title_attribute('echo=0')) . '" rel="bookmark">', '</a></p>', false);
             $out .= $module == 'column' ? '<p class="post_meta">' . apply_filters('miss_widget_meta', do_shortcode('[post_date]')) . '</p>' : '';
             // $out .= the_rate();
             $out .= '</div>';
             $out .= $module == 'column' ? '</li>' : '</div></div>';
             $i++;
         }
         $out .= $module == 'column' ? '</ul>' : '</div>';
     }
     $post = $backup;
     wp_reset_postdata();
     if (!empty($out)) {
         return $out;
     } else {
         return false;
     }
 }
Example #5
0
        <div class="span1">
            <div class="date-post">
                <?php 
        echo mb_substr(get_the_time('F'), 0, 3);
        ?>
                <span><?php 
        the_time('j');
        ?>
</span>
            </div>
        </div>
        <div class="span7">
          <div class="article-body">
                <div class="article-image-container">
                    <?php 
        echo miss_get_post_image($filter_args);
        ?>
                </div>
                <div class="text-container">
                    <div class="article-name"><a href="<?php 
        echo esc_url(get_permalink());
        ?>
"><?php 
        echo miss_post_title($filter_args);
        ?>
</a></div>
                    <div class="article-info">
                        <span class="item"><span>Posted</span> <?php 
        the_author();
        ?>
</span>
Example #6
0
 /**
  *
  */
 function widget($args, $instance)
 {
     global $wpdb, $irish_framework_params;
     $prefix = MISS_PREFIX;
     extract($args);
     $out = '';
     if (!($popular_number = (int) $instance['popular_number'])) {
         $popular_number = 3;
     } else {
         if ($popular_number < 1) {
             $popular_number = 1;
         } else {
             if ($popular_number > 15) {
                 $popular_number = 15;
             }
         }
     }
     if (!($recent_number = (int) $instance['recent_number'])) {
         $recent_number = 3;
     } else {
         if ($recent_number < 1) {
             $recent_number = 1;
         } else {
             if ($recent_number > 15) {
                 $recent_number = 15;
             }
         }
     }
     if (!($comments_number = (int) $instance['comments_number'])) {
         $comments_number = 3;
     } else {
         if ($comments_number < 1) {
             $comments_number = 1;
         } else {
             if ($comments_number > 15) {
                 $comments_number = 15;
             }
         }
     }
     $datastore = array('top' => array('title' => __('Popular', MISS_TEXTDOMAIN), 'data' => array()), 'new' => array('title' => __('Recent', MISS_TEXTDOMAIN), 'data' => array()), 'all' => array('icon' => 'fa-icon-comment', 'data' => array()));
     echo $before_widget;
     $count = !empty($count) ? trim($count) : '3';
     $disable_thumb = $instance['disable_thumb'] ? '1' : '0';
     $popular_query = new WP_Query(array('showposts' => $popular_number, 'nopaging' => 0, 'orderby' => 'comment_count', 'post_status' => 'publish', 'category__not_in' => array(miss_exclude_category_string($minus = false)), 'ignore_sticky_posts' => 1));
     $i = 0;
     while ($popular_query->have_posts()) {
         $popular_query->the_post();
         $i++;
         if (!$disable_thumb) {
             $widget_thumb_img = $irish_framework_params->layout['big_sidebar_images']['small_post_list'];
             $datastore['top']['data'][$i]['image'] = miss_get_post_image(array('width' => $widget_thumb_img[0], 'height' => $widget_thumb_img[1], 'img_class' => 'image', 'preload' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
         } else {
             $widget_thumb_img = array('', '');
         }
         $datastore['top']['data'][$i]['url'] = esc_url(get_permalink());
         $datastore['top']['data'][$i]['title'] = get_the_title();
         $datastore['top']['data'][$i]['content'] = miss_excerpt(get_the_excerpt(), 40, THEME_ELLIPSIS);
     }
     $recent_query = new WP_Query(array('showposts' => $recent_number, 'nopaging' => 0, 'orderby' => 'post_date', 'post_status' => 'publish', 'category__not_in' => array(miss_exclude_category_string($minus = false)), 'ignore_sticky_posts' => 1));
     $i = 0;
     while ($recent_query->have_posts()) {
         $recent_query->the_post();
         $i++;
         if (!$disable_thumb) {
             $widget_thumb_img = $irish_framework_params->layout['big_sidebar_images']['small_post_list'];
             $datastore['new']['data'][$i]['image'] = miss_get_post_image(array('width' => $widget_thumb_img[0], 'height' => $widget_thumb_img[1], 'img_class' => 'image', 'preload' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
         } else {
             $widget_thumb_img = array('', '');
         }
         $datastore['new']['data'][$i]['url'] = esc_url(get_permalink());
         $datastore['new']['data'][$i]['title'] = get_the_title();
         $datastore['new']['data'][$i]['content'] = miss_excerpt(get_the_excerpt(), 40, THEME_ELLIPSIS);
         $datastore['new']['data'][$i]['d'] = get_the_date('d');
         $datastore['new']['data'][$i]['M'] = get_the_date('M');
     }
     $comments = get_comments(array('number' => $comments_number, 'status' => 'approve'));
     foreach ($comments as $comment) {
         $i++;
         $datastore['all']['data'][$i] = array('content' => $comment->comment_content, 'post_id' => $comment->comment_post_ID, 'url' => get_permalink($comment->comment_post_ID), 'title' => get_the_title($comment->comment_post_ID));
     }
     $out .= '<div class="module-posts">';
     $out .= '<div class="posts-heading"><ul class="posts-row">';
     $i = 0;
     foreach ($datastore as $key => $items) {
         $class = $i == 0 ? ' active' : '';
         //			print_r($items);
         $out .= '<li class="posts-cell ' . $class . '">';
         $out .= '<a href="#" data-block="' . $key . '-posts">';
         $out .= isset($items['icon']) ? '<i class="' . $items['icon'] . '"></i> ' : '';
         $out .= isset($items['title']) ? $items['title'] : '';
         $out .= '</a>';
         $out .= '</li>';
         $i++;
     }
     $out .= '<div class="clearboth"></div>';
     $out .= '</ul></div>';
     $out .= '<div class="posts-content">';
     foreach ($datastore as $key => $items) {
         $out .= '<div class="posts-block ' . $key . '-posts">';
         foreach ($items['data'] as $id => $item) {
             if (isset($item['content']) && !empty($item['content'])) {
                 $out .= '<div class="author">';
                 $out .= isset($item['image']) && !empty($item['image']) ? $item['image'] : '';
                 $out .= '<div class="desc">';
                 $out .= isset($item['title']) && !empty($item['title']) ? '<div class="name">' . $item['title'] . '</div>' : '';
                 $out .= '<div class="position">Position</div>';
                 $out .= '<div class="text">';
                 $out .= isset($item['content']) && !empty($item['content']) ? $item['content'] : '';
                 $out .= '</div>';
                 $out .= '</div>';
                 $out .= '</div>';
             }
         }
         $out .= '<a href="/?post_type=post" class="read-all">Read all</a>';
         $out .= '</div>';
     }
     $out .= '</div><!-- /.hot_updates -->';
     $out .= '</div><!-- /.module-posts -->';
     echo $out;
     echo $after_widget;
 }
Example #7
0
 /**
  *
  */
 public static function im_posttypelayout($atts, $content = null, $code = null)
 {
     $posttypes = array(__('Posts', MISS_ADMIN_TEXTDOMAIN) => 'post', __('News', MISS_ADMIN_TEXTDOMAIN) => 'news', __('Portfolio', MISS_ADMIN_TEXTDOMAIN) => 'portfolio', __('Staff', MISS_ADMIN_TEXTDOMAIN) => 'staff', __('Testimonials', MISS_ADMIN_TEXTDOMAIN) => 'testimonials', __('Services', MISS_ADMIN_TEXTDOMAIN) => 'service');
     $classes = array(__('Grid', MISS_ADMIN_TEXTDOMAIN) => 'grid', __('Comments Slider', MISS_ADMIN_TEXTDOMAIN) => 'comslider', __('List', MISS_ADMIN_TEXTDOMAIN) => 'list', __('more-links', MISS_ADMIN_TEXTDOMAIN) => 'more-links', __('Portfolio small', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-small', __('Portfolio fullwidth', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-fullwidth', __('Portfolio two columns', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-two', __('Portfolio three columns', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-three');
     $entries = get_categories('orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $categories[$entry->name] = $entry->term_id;
     }
     $entries = get_terms('portfolio_category', 'orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $portfolio_categories[$entry->name] = $entry->slug;
     }
     if ($atts == 'generator') {
         return array('name' => __('Posts/Pages Layout', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_posttypelayout', 'icon' => 'im-icon-grid-5', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Caption <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Here you can add section title (leave blank to hide).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'type' => 'textfield', 'value' => ''), array('heading' => __('Tagline <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Here you can add section tagline that will appears right from section title.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'tagline', 'type' => 'textfield', 'value' => ''), array('heading' => __('Post types', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select post types to populate items from.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'posttype', 'type' => 'dropdown', 'value' => $posttypes), array('heading' => __('Layout Type', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select layout type.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'class', 'type' => 'dropdown', 'value' => $classes), array('heading' => __('Number of Columns', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Set number of columns in a row.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'column', 'min' => 1, 'max' => 4, 'step' => 1, 'unit' => __('columns', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range', 'dependency' => array('element' => 'class', 'value' => array('grid', 'comslider'))), array('heading' => __('Number of Posts', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select the number of posts you wish to have displayed on each page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'showposts', 'min' => 1, 'value' => 5, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Offset Posts <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('This will skip a number of posts at the beginning.<br /><br />Useful if you are using multiple blog shortcodes on the same page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'offset', 'min' => 0, 'value' => 0, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Disable Post Elements <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('You can hide certain elements from displaying here.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'disable', 'type' => 'checkbox', 'value' => array(__('Disable Post Image', MISS_ADMIN_TEXTDOMAIN) => 'image', __('Disable Post Title', MISS_ADMIN_TEXTDOMAIN) => 'title', __('Disable Post Content', MISS_ADMIN_TEXTDOMAIN) => 'content', __('Disable Post Meta', MISS_ADMIN_TEXTDOMAIN) => 'meta', __('Disable Read More', MISS_ADMIN_TEXTDOMAIN) => 'more')), array('heading' => __('Posts Categories', MISS_ADMIN_TEXTDOMAIN), 'description' => __('By default shortcode will pushing recent posts from all categories.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'category_in', 'type' => 'checkbox', 'value' => $categories, 'dependency' => array('element' => 'posttype', 'value' => array('post'))), array('heading' => __('Portfolio Categories', MISS_ADMIN_TEXTDOMAIN), 'description' => __('By default shortcode will pushing recent work from all categories.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'portfolio_terms', 'type' => 'checkbox', 'value' => $portfolio_categories, 'dependency' => array('element' => 'posttype', 'value' => array('portfolio'))), array("type" => "dropdown", "heading" => __("Viewport Animation", MISS_ADMIN_TEXTDOMAIN), "param_name" => "animation", "value" => miss_js_composer_css_animation(), "description" => __("Viewport animation will be triggered when this element is being viewed when you scroll page down. you only need to choose the animation style from this option. please note that this only works in moderns. We have disabled this feature in touch devices to increase browsing speed.", MISS_ADMIN_TEXTDOMAIN))));
     }
     global $post, $wp_rewrite, $wp_query, $irish_framework_params;
     $defaults = array('caption' => '', 'tagline' => '', 'posttype' => 'post', 'class' => 'grid', 'column' => '', 'showposts' => '', 'offset' => '', 'disable' => '', 'category_in' => '', 'portfolio_terms' => '', 'animation' => '');
     extract(shortcode_atts($defaults, $atts));
     $out = '';
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $posttype = array_search($posttype, $posttypes) != false ? $posttype : 'post';
     $class = array_search($class, $classes) != false ? $class : 'grid';
     $category_in = !empty($category_in) && $posttype == 'post' ? explode(",", trim($category_in)) : '';
     $query_args = array('post_type' => $posttype, 'showposts' => $showposts, 'category__in' => $category_in, 'offset' => $offset, 'nopaging' => 0, 'ignore_sticky_posts' => 1);
     if (!empty($portfolio_terms) && $posttype == 'portfolio') {
         $taxonomy = 'portfolio_category';
         $term = explode(",", trim($portfolio_terms)) ? explode(",", trim($portfolio_terms)) : $portfolio_terms;
         $query_args['taxonomy'] = 'portfolio_category';
         $query_args['tax_query'] = array(array('taxonomy' => 'portfolio_category', 'field' => 'slug', 'terms' => $term));
     } else {
         $taxonomy = '';
         $portfolio_terms = '';
     }
     if (is_front_page()) {
         $_layout = miss_get_setting('homepage_layout') ? miss_get_setting('homepage_layout') : 'full_width';
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } elseif ($wp_query->get_queried_object()) {
         $post_obj = $wp_query->get_queried_object();
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $_layout = 'full_width';
         $images = 'images';
     }
     $sc_post_query = new WP_Query();
     $sc_post_query->query($query_args);
     if ($sc_post_query->have_posts()) {
         $img_sizes = $irish_framework_params->layout[$images];
         $width = '';
         $height = '';
         if ($class == 'list') {
             $column_class = 'span12 content-item';
             $excerpt_lenth = 180;
             $width = $img_sizes['small_post_list'][0];
             $height = $img_sizes['small_post_list'][1];
         } else {
             $column = $column > 0 || $column < 4 ? $column : 4;
             switch ($column) {
                 case 1:
                     $column_class = 'content-item span12';
                     $excerpt_lenth = 400;
                     $width = $img_sizes['blog_layout1'][0];
                     $height = $img_sizes['blog_layout1'][1];
                     break;
                 case 2:
                     $column_class = 'content-item span6';
                     $excerpt_lenth = 150;
                     $width = $img_sizes['blog_layout3'][0];
                     $height = $img_sizes['blog_layout3'][1];
                     break;
                 case 3:
                     $column_class = 'content-item span4';
                     $excerpt_lenth = 138;
                     $width = $img_sizes['blog_layout4'][0];
                     $height = $img_sizes['blog_layout4'][1];
                     break;
                 case 4:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 default:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
             }
         }
         $img_class = 'image';
         $filter_args = array('width' => $width, 'height' => $height, 'img_class' => $img_class, 'link_class' => 'sc_image_load', 'preload' => true, 'disable' => $disable, 'column' => $column, 'type' => $posttype, 'shortcode' => true, 'echo' => false);
         /*if ( $class == 'comslider') {
         			$carousel_item_start = '<li class="embedded">';
         			$carousel_item_end = '</li><!-- /.embedded -->';
         		} else {
         			$carousel_item_start = '';
         			$carousel_item_end = '';
         		}*/
         $spans_in_row = $column;
         $span_walk = 0;
         $row_walk = 1;
         /**
          * Возвращение контента в зависимости от класса
          * 
          * */
         $out_caption = '';
         if ($caption != '') {
             $out_caption = '<header class="section-header span12">
                           <h1 class="header">
                             <span>' . $caption . '</span>
                           </h1>';
             if ($tagline != '') {
                 $out_caption .= '<h3 class="header">' . $tagline . '</h3>';
             }
             $out_caption .= '</header>';
         }
         if ($class == 'grid') {
             $row_delimeter = '</div><!-- /.inner-wrapp --><div class="inner-wrapp">';
             $out .= '<div class="inner-wrapp">';
             while ($sc_post_query->have_posts()) {
                 if ($spans_in_row * $row_walk == $span_walk) {
                     $out .= $row_delimeter;
                 }
                 if ($spans_in_row * $row_walk == $span_walk) {
                     $row_walk++;
                 }
                 $span_walk++;
                 $sc_post_query->the_post();
                 $out .= '<section class="' . $column_class . $animation . '">';
                 $out .= '   <header class="header">';
                 $out .= miss_post_icon($filter_args);
                 $out .= miss_post_title($filter_args);
                 $out .= '   </header>';
                 $out .= '   <article class="article">';
                 if (strpos($disable, 'content') === false) {
                     $out .= '<p>' . miss_excerpt(get_the_excerpt(), $excerpt_lenth, THEME_ELLIPSIS) . '</p>';
                     // описание
                 }
                 $out .= '   </article><!-- /.content -->';
                 $out .= miss_full_read_more();
                 $out .= '</section><!-- /.' . $column_class . ' -->';
             }
             $out .= '</div><!-- /.row-fluid -->';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'list') {
             $filter_args['wraptitle'] = false;
             $row_delimeter = '</div><!-- /.inner-wrapp --><div class="inner-wrapp">';
             $out .= '<div class="inner-wrapp">';
             while ($sc_post_query->have_posts()) {
                 if ($spans_in_row * $row_walk == $span_walk) {
                     $out .= $row_delimeter;
                 }
                 if ($spans_in_row * $row_walk == $span_walk) {
                     $row_walk++;
                 }
                 $span_walk++;
                 $sc_post_query->the_post();
                 $filter_args['get_src'] = true;
                 $filter_args['width'] = 300;
                 $filter_args['height'] = 220;
                 //print_r($filter_args);
                 $out .= '<section class="content-item span4 hover-slide-effect ' . $animation . '">';
                 $out .= '<div class="preview" data-src="' . miss_get_post_image($filter_args) . '" style="background-image: url(' . miss_get_post_image($filter_args) . ');"></div>';
                 $out .= '<div class="desc">
                       <header class="header">
                         <h4>' . miss_post_title($filter_args) . '</h4>
                       </header>';
                 $out .= '<article class="article">';
                 $out .= '<p>' . miss_excerpt(get_the_excerpt(), $excerpt_lenth, THEME_ELLIPSIS) . '</p>';
                 // описание
                 $out .= '</article><!-- /.content -->';
                 $out .= '<a href="' . esc_url(get_permalink()) . '" class="btn ribbon-style smallest-ribbon">View details</a>';
                 $out .= '</div></section>';
             }
             $out .= '</div><!-- /.inner-wrapp -->';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'more-links') {
             $out .= '<div class="span12 ' . $class . ' ' . $posttype . '">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<a class="nav-item" href="' . esc_url(get_permalink()) . '" title="' . esc_attr(the_title_attribute('echo=0')) . '">' . miss_excerpt(the_title('', '', false), 30, THEME_ELLIPSIS) . '</a>';
             }
             $out .= '</div><!-- /.inner-wrapp -->';
             $out = '<div class="row sc_layout">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'comslider') {
             $out .= '<div class="flex_slideshow_container arrows_top span12">
         			<div class="flexslider text-slider">
                     <div class="additional-layer left-layer">
                         <div class="triangle top left"></div>
                         <div class="triangle bottom left"></div>
                     </div>
         			<ul class="slides">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<li>
                         <div class="testimonial">
                             <div class="descr"><span class="quot ql"></span>' . miss_excerpt(get_the_excerpt(), 90, THEME_ELLIPSIS) . '<span class="quot qr"></span></div> 
                             <div class="name">' . miss_excerpt(the_title('', '', false), 30, THEME_ELLIPSIS) . '</div>
                             <div class="caption">' . get_post_meta(get_the_ID(), 'testimonial_caption', true) . '</div>
                         </div>
                     </li>';
             }
             $out .= '</ul>
                     <div class="additional-layer right-layer">
                         <div class="triangle top right"></div>
                         <div class="triangle bottom right"></div>
                     </div>
         			</div>
     			</div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'portfolio-small') {
             $out .= '<div class="inner-wrapp span12"><div class="row gallery">';
             $filter_args['width'] = $filter_args['height'] = 220;
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<div class="content-item span3 ' . $animation . '">
                           <div class="preview-container preview-small base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . esc_url(get_permalink()) . '" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                         </div>';
             }
             $out .= '</div></div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . ' works">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'portfolio-fullwidth') {
             $filter_args['width'] = 940;
             $filter_args['height'] = 587;
             $out .= '<div class="inner-wrapp span12 works"><div class="row gallery">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<div class="content-item span12 ' . $animation . '">
                           <div class="preview-container preview-largest base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . esc_url(get_permalink()) . '" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                         </div>';
                 //print_r($filter_args);
             }
             $out .= '</div></div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'portfolio-two') {
             $filter_args['width'] = 460;
             $filter_args['height'] = 300;
             $out .= '<div class="inner-wrapp span12 gallery"><div class="row">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<div class="content-item span6 ' . $animation . '">
                           <div class="preview-container preview-large base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . esc_url(get_permalink()) . '" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                         </div>';
                 //print_r($filter_args);
             }
             $out .= '</div></div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         } elseif ($class == 'portfolio-three') {
             $filter_args['width'] = 300;
             $filter_args['height'] = 300;
             $out .= '<div class="inner-wrapp span12 gallery"><div class="row">';
             while ($sc_post_query->have_posts()) {
                 $sc_post_query->the_post();
                 $out .= '<div class="content-item span4 ' . $animation . '">
                           <div class="preview-container preview-normal base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . esc_url(get_permalink()) . '" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                         </div>';
                 //print_r($filter_args);
             }
             $out .= '</div></div>';
             $out = '<div class="row sc_layout ' . $class . ' ' . $posttype . '">' . $out_caption . $out . '</div><!-- /.sc_layout ' . $class . '-->';
         }
     }
     return $out;
 }
Example #8
0
 /**
  *
  */
 public static function im_lastpost($atts, $content = null, $code = null)
 {
     $posttypes = array(__('Posts', MISS_ADMIN_TEXTDOMAIN) => 'post', __('News', MISS_ADMIN_TEXTDOMAIN) => 'news', __('Portfolio', MISS_ADMIN_TEXTDOMAIN) => 'portfolio', __('Staff', MISS_ADMIN_TEXTDOMAIN) => 'staff', __('Testimonials', MISS_ADMIN_TEXTDOMAIN) => 'testimonials', __('Services', MISS_ADMIN_TEXTDOMAIN) => 'services');
     $entries = get_categories('orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $categories[$entry->name] = $entry->term_id;
     }
     $entries = get_terms('portfolio_category', 'orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $portfolio_categories[$entry->name] = $entry->slug;
     }
     if ($atts == 'generator') {
         return array('name' => __('Last posts Layout', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_lastpost', 'icon' => 'im-icon-grid-5', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Caption <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Here you can add section title (leave blank to hide).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'type' => 'textfield', 'value' => ''), array('heading' => __('Post types', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select post types to populate items from.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'posttype', 'type' => 'dropdown', 'value' => $posttypes), array('heading' => __('Number of Posts', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select the number of posts you wish to have displayed on each page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'showposts', 'min' => 1, 'value' => 5, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Posts Categories', MISS_ADMIN_TEXTDOMAIN), 'description' => __('By default shortcode will pushing recent posts from all categories.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'category_in', 'type' => 'checkbox', 'value' => $categories, 'dependency' => array('element' => 'posttype', 'value' => array('post'))), array("type" => "dropdown", "heading" => __("Viewport Animation", MISS_ADMIN_TEXTDOMAIN), "param_name" => "animation", "value" => miss_js_composer_css_animation(), "description" => __("Viewport animation will be triggered when this element is being viewed when you scroll page down. you only need to choose the animation style from this option. please note that this only works in moderns. We have disabled this feature in touch devices to increase browsing speed.", MISS_ADMIN_TEXTDOMAIN))));
     }
     global $post, $wp_rewrite, $wp_query, $irish_framework_params;
     $defaults = array('caption' => '', 'posttype' => 'post', 'showposts' => '', 'category_in' => '', 'animation' => '');
     extract(shortcode_atts($defaults, $atts));
     $out = '';
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $posttype = array_search($posttype, $posttypes) != false ? $posttype : 'post';
     $category_in = !empty($category_in) && $posttype == 'post' ? explode(",", trim($category_in)) : '';
     $offset = $showposts;
     $query_args = array('post_type' => $posttype, 'showposts' => $offset, 'category__in' => $category_in, 'nopaging' => 0, 'ignore_sticky_posts' => 1, 'orderby' => 'post_date', 'order' => 'DESC');
     if (is_front_page()) {
         $_layout = miss_get_setting('homepage_layout') ? miss_get_setting('homepage_layout') : 'full_width';
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } elseif ($wp_query->get_queried_object()) {
         $post_obj = $wp_query->get_queried_object();
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $_layout = 'full_width';
         $images = 'images';
     }
     $sc_post_query = new WP_Query();
     $sc_post_query->query($query_args);
     if ($sc_post_query->have_posts()) {
         $img_sizes = $irish_framework_params->layout[$images];
         $width = '';
         $height = '';
         $img_class = 'image';
         $filter_args = array('width' => 220, 'height' => 220, 'img_class' => $img_class, 'link_class' => 'sc_image_load', 'preload' => true, 'disable' => $disable, 'column' => $column, 'type' => $posttype, 'shortcode' => true, 'echo' => false, 'wraptitle' => false);
         $out_caption = '';
         if ($caption != '') {
             $out_caption = '<header class="section-header span12">
                           <h1 class="header">
                             <span>' . $caption . '</span>
                           </h1>';
             if ($tagline != '') {
                 $out_caption .= '<h3 class="header">' . $tagline . '</h3>';
             }
             $out_caption .= '</header>';
         }
         $rand = rand(1000, 9999);
         $excerpt_lenth = 150;
         $row_delimeter = '</div><!-- /.inner-wrapp --> ' . $carousel_item_end . $carousel_item_start . '<div class="inner-wrapp">';
         $out .= '<div class="inner-wrapp" id="lposts' . $rand . '">';
         $i = 1;
         while ($sc_post_query->have_posts()) {
             $sc_post_query->the_post();
             $out .= '<div class="span3 content-item">';
             if ($i % 2 == 1) {
                 $out .= '<div class="preview-container preview-small extended-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <!--a href="#" class="control zoom"><i class="marker im-icon-zoom-in"></i></a-->
                                 <a title="" href="' . miss_get_post_image(array('width' => 'auto', 'height' => 'auto', 'get_src' => true, 'echo' => false)) . '" class="control zoom" rel="prettyPhoto[' . get_post_type() . '_' . get_the_ID() . ']"><i class="marker im-icon-zoom-in"></i></a>
                                 <a href="' . esc_url(get_permalink()) . '" class="control link"><i class="marker im-icon-link"></i></a>
                               </div>
                             </div>
                           </div>';
             }
             $out .= '<div class="content">';
             $out .= '<h4 class="header">' . miss_post_title($filter_args) . '</h4>
                     <div class="article-info">
                       <div class="published">On <span class="date">' . get_the_date() . '</span></div>';
             $out .= '<div class="comments"><i class="marker im-icon-bubble-10"></i>';
             $num_comments = get_comments_number();
             // возвратит число
             if (comments_open()) {
                 if ($num_comments == 0) {
                     $comments = __('No Comments');
                 } elseif ($num_comments > 1) {
                     $comments = $num_comments . __(' Comments');
                 } else {
                     $comments = __('1 Comment');
                 }
                 $out .= '<a class="caption" href="' . get_comments_link() . '">' . $comments . '</a>';
             } else {
                 $out .= __('Comments are off for this post.');
             }
             $out .= '</div>
                     </div>';
             if ($i % 2 != 1) {
                 $out .= '<div class="article">
                           <p>' . miss_excerpt(get_the_excerpt(), $excerpt_lenth, THEME_ELLIPSIS) . '</p>
                         </div>';
             }
             $out .= '<a href="' . esc_url(get_permalink()) . '" class="btn ribbon-style smallest-ribbon">View details</a>';
             $out .= '</div>';
             $out .= '</div>';
             $i++;
         }
         $out .= '</div><!-- /.row-fluid -->';
         $button_more = '<div class="more-posts span12 big-ribbon-style" onclick="get_lastpost_ajax(lpost_posttype, lpost_limit, lpost_offset, lpost_catin);">
                           <div class="wrapper">
                             <div class="additional-wrapper">
                               <div class="remaining"></div>
                               <div class="title">
                                 <span>Show more posts</span>
                               </div>
                             </div>
                           </div>
                         </div>';
         $script = '<script>
                     var lpost_posttype = "' . $posttype . '";
                     var lpost_limit = "' . $offset . '";
                     var lpost_offset = "' . $offset . '";
                     var lpost_catin = "' . implode(',', $category_in) . '";
                     var lpost_id = "lposts' . $rand . '";
                  </script>';
         $out = $script . '<div class="row sc_layout last-posts ' . $class . ' ' . $posttype . '">' . $out_caption . $out . $button_more . '</div><!-- /.sc_layout ' . $class . '-->';
     }
     return $out;
 }
Example #9
0
 /**
  *
  */
 public static function im_woocommerce($atts, $content = null, $code = null)
 {
     $classes = array(__('Grid', MISS_ADMIN_TEXTDOMAIN) => 'grid', __('Comments Slider', MISS_ADMIN_TEXTDOMAIN) => 'comslider', __('List', MISS_ADMIN_TEXTDOMAIN) => 'list', __('more-links', MISS_ADMIN_TEXTDOMAIN) => 'more-links', __('Portfolio small', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-small', __('Portfolio fullwidth', MISS_ADMIN_TEXTDOMAIN) => 'portfolio-fullwidth');
     $entries = get_categories('orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $categories[$entry->name] = $entry->term_id;
     }
     $entries = get_terms('portfolio_category', 'orderby=name&hide_empty=0');
     foreach ($entries as $key => $entry) {
         $portfolio_categories[$entry->name] = $entry->slug;
     }
     if ($atts == 'generator') {
         return array('name' => __('WooCommerce Layout', MISS_ADMIN_TEXTDOMAIN), 'base' => 'im_woocommerce', 'icon' => 'im-icon-grid-5', 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), 'params' => array(array('heading' => __('Caption <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Here you can add section title (leave blank to hide).', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'caption', 'type' => 'textfield', 'value' => ''), array('heading' => __('Number of Columns', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Set number of columns in a row.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'column', 'min' => 1, 'max' => 4, 'step' => 1, 'unit' => __('columns', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range', 'value' => 3), array('heading' => __('Number of Posts', MISS_ADMIN_TEXTDOMAIN), 'description' => __('Select the number of posts you wish to have displayed on each page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'showposts', 'min' => 1, 'value' => 5, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array('heading' => __('Offset Posts <small>(optional)</small>', MISS_ADMIN_TEXTDOMAIN), 'description' => __('This will skip a number of posts at the beginning.<br /><br />Useful if you are using multiple blog shortcodes on the same page.', MISS_ADMIN_TEXTDOMAIN), 'param_name' => 'offset', 'min' => 0, 'value' => 0, 'max' => 40, 'step' => 1, 'unit' => __('posts', MISS_ADMIN_TEXTDOMAIN), 'type' => 'range'), array("type" => "dropdown", "heading" => __("Viewport Animation", MISS_ADMIN_TEXTDOMAIN), "param_name" => "animation", "value" => miss_js_composer_css_animation(), "description" => __("Viewport animation will be triggered when this element is being viewed when you scroll page down. you only need to choose the animation style from this option. please note that this only works in moderns. We have disabled this feature in touch devices to increase browsing speed.", MISS_ADMIN_TEXTDOMAIN))));
     }
     global $post, $wp_rewrite, $wp_query, $irish_framework_params, $woocommerce;
     $defaults = array('caption' => '', 'tagline' => '', 'posttype' => 'post', 'class' => 'grid', 'column' => '', 'showposts' => '', 'offset' => '', 'disable' => '', 'category_in' => '', 'portfolio_terms' => '', 'animation' => '');
     extract(shortcode_atts($defaults, $atts));
     $out = '';
     if ($animation != '') {
         $animation = ' im-animate-element ' . $animation . ' ';
     }
     $class = array_search($class, $classes) != false ? $class : 'grid';
     $query_args = array('post_type' => 'product', 'showposts' => $showposts, 'offset' => $offset, 'nopaging' => 0, 'ignore_sticky_posts' => 1);
     if (is_front_page()) {
         $_layout = miss_get_setting('homepage_layout') ? miss_get_setting('homepage_layout') : 'full_width';
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } elseif ($wp_query->get_queried_object()) {
         $post_obj = $wp_query->get_queried_object();
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $_layout = 'full_width';
         $images = 'images';
     }
     $sc_post_query = new WP_Query();
     $sc_post_query->query($query_args);
     if ($sc_post_query->have_posts()) {
         $img_sizes = $irish_framework_params->layout[$images];
         $width = '';
         $height = '';
         if ($class == 'list') {
             $column_class = 'span12 content-item';
             $excerpt_lenth = 180;
             $width = $img_sizes['small_post_list'][0];
             $height = $img_sizes['small_post_list'][1];
         } else {
             $column = $column > 0 || $column < 4 ? $column : 4;
             switch ($column) {
                 case 1:
                     $column_class = 'content-item span12';
                     $excerpt_lenth = 400;
                     $width = $img_sizes['blog_layout1'][0];
                     $height = $img_sizes['blog_layout1'][1];
                     break;
                 case 2:
                     $column_class = 'content-item span6';
                     $excerpt_lenth = 150;
                     $width = $img_sizes['blog_layout3'][0];
                     $height = $img_sizes['blog_layout3'][1];
                     break;
                 case 3:
                     $column_class = 'content-item span4';
                     $excerpt_lenth = 138;
                     $width = $img_sizes['blog_layout4'][0];
                     $height = $img_sizes['blog_layout4'][1];
                     break;
                 case 4:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 default:
                     $column_class = 'content-item span3';
                     $excerpt_lenth = 115;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
             }
         }
         $img_class = 'image';
         $filter_args = array('width' => 220, 'height' => 220, 'img_class' => $img_class, 'link_class' => 'sc_image_load', 'preload' => true, 'disable' => $disable, 'column' => $column, 'type' => 'product', 'shortcode' => true, 'echo' => false, 'wraptitle' => false);
         $spans_in_row = $column;
         $span_walk = 0;
         $row_walk = 1;
         /**
          * ¬озвращение контента в зависимости от класса
          * 
          * */
         if (is_user_logged_in()) {
             $linkprofile = '<a class="nav-item text small-text" href=' . get_permalink(get_option('woocommerce_myaccount_page_id')) . ' title="My Account">My Account</a>';
         } else {
             $linkprofile = '<a class="nav-item text small-text" href="' . get_permalink(get_option('woocommerce_myaccount_page_id')) . '" title="My Account">My Account</a>';
         }
         if (sizeof($woocommerce->cart->cart_contents) > 0) {
             $linkcheck = '<a href="' . $woocommerce->cart->get_checkout_url() . '" class="nav-item text small-text">Checkout</a>';
         } else {
             $linkcheck = '';
         }
         $out_caption = '';
         if ($caption != '') {
             $out_caption = '<header class="section-header span12">
                           <nav class="basket-cpanel breaking-alignment">
                             <a class="basket" href="' . $woocommerce->cart->get_cart_url() . '">
                               <i class="marker"></i>
                             </a>
             
                             <div class="text-link-wrapper">
                               <a class="nav-item text" href="' . $woocommerce->cart->get_cart_url() . '">Cart</a>
                               <span class="nav-item text cost">Total ' . $woocommerce->cart->get_cart_total() . '</span>
             
                               <div class="break"></div>
                               ' . $linkprofile . '
                               <span class="nav-item separator">&nbsp;|&nbsp;</span>
                               ' . $linkcheck . '
                             </div>
                           </nav>
                           <h1 class="header">
                             <span>' . $caption . '</span>
                           </h1>';
             if ($tagline != '') {
                 $out_caption .= '<h3 class="header">' . $tagline . '</h3>';
             }
             $out_caption .= '</header>';
         }
         $out .= '<div class="inner-wrapp span12">';
         while ($sc_post_query->have_posts()) {
             if ($spans_in_row * $row_walk == $span_walk) {
                 $row_walk++;
             }
             $span_walk++;
             $sc_post_query->the_post();
             $price = get_post_meta(get_the_id(), '_regular_price', true);
             $price_disc = get_post_meta(get_the_id(), '_sale_price', true);
             $out .= '<section class="content-item ' . $column_class . ' ' . $animation . '">
                         <header class="header">
                           <div class="preview-container preview-small base-preview">
                             <div class="preview-image">
                               ' . miss_get_post_image($filter_args) . '
                             </div>
                             <div class="preview-info-wrapper">
                               <div class="controls">
                                 <a href="' . miss_get_post_image(array('width' => 'auto', 'height' => 'auto', 'get_src' => true, 'echo' => false)) . '" rel="prettyPhoto[' . get_post_type() . '_' . get_the_ID() . ']" class="control zoom"><i class="marker im-icon-zoom-in"></i></a>
                               </div>
                             </div>
                           </div>
                             <div class="price">';
             if ($price) {
                 $out .= '<span class="small">' . get_woocommerce_currency_symbol() . ' ' . $price . '</span>
                 <span class="big">' . get_woocommerce_currency_symbol() . ' ' . $price_disc . '</span>';
             }
             $out .= '</div>
                         </header>
         
                         <article class="article">
                           <p>' . miss_post_title($filter_args) . '</p>
                         </article>
                         
                         <a href="' . esc_url(get_permalink()) . '" class="btn ribbon-style small-ribbon">Read more</a>
                       </section>';
         }
         $out .= '</div><!-- /.row-fluid -->';
         $out = '<div class="row featured-products">' . $out_caption . $out . '</div><!-- /.sc_layout-->';
     }
     return $out;
 }
Example #10
0
" class="control zoom" rel="prettyPhoto"><i class="marker im-icon-zoom-in"></i></a>
                              </div>
                            </div>
                        </div>
                    </div>
                    <?php 
                    }
                    ?>
                    <?php 
                }
                ?>
                <?php 
            }
            ?>
                <?php 
            if (miss_get_post_image(array('width' => 490, 'height' => 267, 'echo' => false)) != '' || $_post_feature_display_type == 'sound_cloud' || $_post_feature_display_type == 'image_left' || $_post_feature_display_type == 'additional_images' || get_post_meta(get_the_ID(), '_featured_video', true)) {
                ?>
                    </div>
                <?php 
            }
            ?>
                <div class="text-container">
                    <div class="article-name"><a href="<?php 
            echo esc_url(get_permalink());
            ?>
"><?php 
            echo miss_post_title($filter_args);
            ?>
</a></div>
                    <div class="article-info">
                        <span class="item"><span>Posted</span> <?php 
Example #11
0
                    echo miss_video(array('url' => $_featured_video, 'width' => 490, 'height' => 270, 'parse' => 1));
                    ?>
                    <?php 
                } else {
                    ?>
                    <div class="image-row">
                        <div class="preview-container preview-largest base-preview" style="height: 267px; line-height: 267px;">
                            <div class="preview-image">
                              <?php 
                    echo miss_get_post_image(array('width' => 490, 'height' => 267, 'echo' => false));
                    ?>
                            </div>
                            <div class="preview-info-wrapper">
                              <div class="controls">
                                <a href="<?php 
                    miss_get_post_image(array('width' => 'auto', 'height' => 'auto', 'get_src' => true, 'echo' => true));
                    ?>
" class="control zoom" rel="prettyPhoto"><i class="marker im-icon-zoom-in"></i></a>
                              </div>
                            </div>
                        </div>
                    </div>
                    <?php 
                }
                ?>
                <?php 
            }
            ?>
                </div>
    
                <div class="text-container">
Example #12
0
 /**
  *
  */
 function widget($args, $instance)
 {
     global $irish_framework_params;
     $prefix = MISS_PREFIX;
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Popular Posts', MISS_TEXTDOMAIN) : $instance['title'], $instance, $this->id_base);
     if (!($number = (int) $instance['number'])) {
         $number = 3;
     } else {
         if ($number < 1) {
             $number = 1;
         } else {
             if ($number > 15) {
                 $number = 15;
             }
         }
     }
     echo $before_widget;
     echo $before_title . $title . $after_title;
     $count = !empty($count) ? trim($count) : '3';
     $disable_thumb = $instance['disable_thumb'] ? '1' : '0';
     $show_rating = !empty($instance['show_rating']) ? '1' : '0';
     $show_date = !empty($instance['show_date']) ? '1' : '0';
     $popular_query = new WP_Query(array('showposts' => $number, 'nopaging' => 0, 'orderby' => 'comment_count', 'post_status' => 'publish', 'category__not_in' => array(miss_exclude_category_string($minus = false)), 'ignore_sticky_posts' => 1));
     $out = '<ul class="post_list small_post_list">';
     while ($popular_query->have_posts()) {
         $popular_query->the_post();
         $out .= '<li class="post_list_module">';
         if (!$disable_thumb) {
             $widget_thumb_img = $irish_framework_params->layout['small_sidebar_images']['small_post_list'];
             $out .= miss_get_post_image(array('width' => $widget_thumb_img[0], 'height' => $widget_thumb_img[1], 'img_class' => 'image', 'preload' => false, 'placeholder' => true, 'echo' => false, 'wp_resize' => miss_get_setting('image_resize_type') == 'wordpress' ? true : false));
         }
         $out .= '<div class="post_list_content">';
         if ($show_rating && score_value(get_the_ID()) != 0) {
             $postid = get_the_ID();
             $score = score_value($postid);
             $out .= '<div class="rating_box">' . score_output($score, 'small') . '</div>';
         }
         $out .= '<p class="post_title">';
         $out .= '<a rel="bookmark" href="' . esc_url(get_permalink()) . '" title="' . esc_attr(get_the_title()) . '">' . get_the_title() . '</a>';
         $out .= '</p>';
         $out .= '<div class="post_excerpt">';
         $out .= miss_excerpt(get_the_excerpt(), apply_filters('miss_home_spotlight_excerpt', 55), apply_filters('miss_excerpt', THEME_ELLIPSIS));
         $out .= '</div>';
         $out .= '<div class="clearboth"></div>';
         /*
         			$get_year = get_the_time( 'Y', get_the_ID() );
         			$get_month = get_the_time( 'm', get_the_ID() );
         */
         if ($show_date) {
             $out .= '<p class="post_meta">';
             $out .= apply_filters('miss_widget_meta', do_shortcode('[post_date]'));
             $out .= '</p>';
         }
         $out .= '</div>';
         $out .= '</li>';
     }
     $out .= '</ul>';
     echo $out;
     echo $after_widget;
     wp_reset_postdata();
 }
Example #13
0
 function _staff_shortcode($args = array())
 {
     global $post, $wp_rewrite, $wp_query, $irish_framework_params;
     extract($args['atts']);
     $out = '';
     $showposts = trim($showposts);
     $column = !empty($column) ? trim($column) : '3';
     $thumb = !empty($thumb) ? trim($thumb) : 'medium';
     $offset = isset($offset) ? trim($offset) : '';
     $post_in = !empty($post_in) ? explode(",", trim($post_in)) : '';
     $category_in = !empty($category_in) ? explode(",", trim($category_in)) : '';
     $tag_in = !empty($tag_in) ? explode(",", trim($tag_in)) : '';
     if (is_front_page()) {
         $_layout = miss_get_setting('homepage_layout');
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' ? 'small_sidebar_images' : 'big_sidebar_images');
     } else {
         $post_obj = $wp_query->get_queried_object();
         $_layout = get_post_meta($post_obj->ID, '_layout', true);
         $template = get_post_meta($post_obj->ID, '_wp_page_template', true);
         $images = $_layout == 'full_width' ? 'images' : ($_layout == 'left_sidebar' || $template == 'templates/template-wiki.php' ? 'small_sidebar_images' : 'big_sidebar_images');
     }
     $post_img = '';
     $staff_query = new WP_Query();
     if (trim($pagination) == 'true') {
         $paged = miss_get_page_query();
         $staff_query->query(array('post__in' => $post_in, 'category__in' => $category_in, 'tag__in' => $tag_in, 'post_type' => 'staff', 'posts_per_page' => $showposts, 'paged' => $paged, 'offset' => $offset, 'ignore_sticky_posts' => 1));
     } else {
         $staff_query->query(array('post__in' => $post_in, 'category__in' => $category_in, 'tag__in' => $tag_in, 'post_type' => 'staff', 'showposts' => $showposts, 'nopaging' => 0, 'offset' => $offset, 'ignore_sticky_posts' => 1));
     }
     if ($staff_query->have_posts()) {
         $img_sizes = $irish_framework_params->layout[$images];
         $width = '';
         $height = '';
         if ($args['type'] == 'staff_grid') {
             $column = $column > 0 || $column < 4 ? $column : 4;
             switch ($column) {
                 case 1:
                     $main_class = 'grid one_column staff';
                     $post_class = 'post_grid_module';
                     $content_class = 'post_grid_content';
                     $img_class = 'image';
                     $excerpt_lenth = 400;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 case 2:
                     $main_class = 'grid two_column staff';
                     $post_class = 'post_grid_module';
                     $content_class = 'post_grid_content';
                     $img_class = 'image';
                     $column_class = 'span6';
                     $excerpt_lenth = 150;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 case 3:
                     $main_class = 'grid three_column staff';
                     $post_class = 'post_grid_module';
                     $content_class = 'post_grid_content';
                     $img_class = 'image';
                     $column_class = 'span4';
                     $excerpt_lenth = 75;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 case 4:
                     $main_class = 'grid four_column staff';
                     $post_class = 'post_grid_module';
                     $content_class = 'post_grid_content';
                     $img_class = 'image';
                     $column_class = 'span3';
                     $excerpt_lenth = 10;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
                 default:
                     $main_class = 'grid four_column staff';
                     $post_class = 'post_grid_module';
                     $content_class = 'post_grid_content';
                     $img_class = 'image';
                     $column_class = 'span3';
                     $excerpt_lenth = 10;
                     $width = $img_sizes['blog_layout5'][0];
                     $height = $img_sizes['blog_layout5'][1];
                     break;
             }
         }
         if ($caption != '') {
             $out .= '					<div class="blog_header">';
             $out .= '						<h4 class="pull-left caption">';
             $out .= '							' . $caption;
             $out .= '						</h4>';
             $out .= '						<h6 class="pull-left tagline">';
             $out .= '							' . $tagline;
             $out .= '						</h6>';
             $out .= '						<div class="clearboth">';
             $out .= '						</div>';
             $out .= '					</div><!-- /.blog_header-->';
         }
         $filter_args = array('width' => $width, 'height' => $height, 'img_class' => $img_class, 'link_class' => 'staff_sc_image_load', 'preload' => true, 'no_link' => true, 'post_content' => $post_content, 'disable' => $disable, 'column' => $column, 'thumb' => $thumb, 'type' => $args['type'], 'shortcode' => true, 'echo' => false);
         $out .= $args['type'] == 'staff_grid' ? '<div class="sc_layout ' . $main_class . '"><div class="row-fluid">' : '<ul class="' . $main_class . '">';
         $spans_in_row = $column;
         $span_walk = 0;
         $row_walk = 1;
         while ($staff_query->have_posts()) {
             $staff_query->the_post();
             if ($spans_in_row * $row_walk == $span_walk) {
                 $out .= '</div><!-- /.row-fluid --> <div class="row-fluid">';
             } else {
                 $out .= '';
             }
             if ($spans_in_row * $row_walk == $span_walk) {
                 $row_walk++;
             }
             $span_walk++;
             if (!empty($animation)) {
                 $animation = ' im-transform im-animate-element ' . $animation;
             }
             $out .= $args['type'] == 'staff_list' ? '' : ($column != 1 ? '<div class="' . $column_class . $animation . '">' : '');
             $out .= $args['type'] == 'staff_grid' ? '<div class="' . join(' ', get_post_class($post_class, get_the_ID())) . '">' : '<li class="' . join(' ', get_post_class($post_class, get_the_ID())) . '">';
             if (in_array('post_list_image', $filter_args)) {
                 $filter_args = array_merge($filter_args, array('inline_width' => true));
             }
             if (strpos($filter_args['disable'], 'image') === false) {
                 //				$image = miss_get_post_image( $filter_args );
                 //				$out .= str_replace( array( '<a', '</a' ), array( '<span', '</span' ), $image) ;
                 $out .= miss_get_post_image($filter_args);
             }
             if (strpos($filter_args['disable'], 'title') === false) {
                 $out .= $title = the_title('<h2 class="post_title">', '</h2>', false);
             }
             if (strpos($filter_args['disable'], 'meta') === false) {
                 $out .= miss_post_meta_diferent($filter_args);
             }
             $out .= '<div class="employee_position">' . get_post_meta(get_the_id(), 'position', true) . '</div>';
             $out .= '<div class="' . $content_class . '">';
             $out .= '<div class="post_excerpt">';
             if (strpos($disable, 'content') === false) {
                 $out .= miss_excerpt(get_the_excerpt(), 115, THEME_ELLIPSIS);
                 if (!empty($disable) && strpos($disable, 'more') === false || empty($disable)) {
                     $out .= miss_full_read_more();
                 }
             }
             $out .= '</div>';
             //		$out .= miss_after_entry_sc( $filter_args );
             $sociable_pages = get_post_meta(get_the_id(), 'sociable');
             foreach ($sociable_pages[0] as $key => $value) {
                 //$out .= $key ;
                 if ($key != '#' and $key != 'keys') {
                     $out .= '<a class="sociable_icon" href="' . $value['link'] . '"><i class="fs-icon-' . $value['icon'] . '"></i></a>';
                 }
             }
             $out .= '<div class="clearboth"></div>';
             $out .= '</div><!-- .post_class -->';
             $out .= $args['type'] == 'staff_grid' ? '</div>' : '</li>';
             $out .= $args['type'] == 'staff_list' ? '' : ($column != 1 ? '</div>' : '');
         }
         $out .= $args['type'] == 'staff_grid' ? '</div></div>' : '</ul>';
         if ($pagination == 'true') {
             $out .= miss_pagenavi('', '', $staff_query);
         }
     }
     wp_reset_query();
     return $out;
 }
Example #14
0
 /**
  * Create recent posts dropdown mini blog
  * method: recent_posts_dropdown 
  *
  * @since 1.8
  */
 function recent_posts_dropdown(&$output, $args)
 {
     global $wpdb, $shortname, $irish_framework_params;
     // Menu type
     $menu_type = get_post_meta($args['menu_main_parent'], '_menu_item_type', true);
     $showposts = get_post_meta($args['menu_main_parent'], '_miss_submenu_columns', true) * 2;
     // WP Query template
     $menu_query = array('showposts' => $showposts, 'nopaging' => 0, 'post_status' => 'publish', 'ignore_sticky_posts' => 1);
     // Check if category selected
     if (isset($menu_type)) {
         $category_id = get_post_meta($args['menu_main_parent'], '_menu_item_object_id', true);
         $category_term = get_post_meta($args['menu_main_parent'], '_menu_item_object', true);
         if (isset($category_term) && !empty($category_term) && (isset($category_id) && !empty($category_id) && $menu_type == "taxonomy")) {
             // $menu_query[$category_term] = $category_id;
             $menu_query['tax_query'] = array(array('taxonomy' => $category_term, 'field' => 'id', 'terms' => array($category_id)));
         }
     }
     $columns = get_post_meta($args['menu_main_parent'], '_miss_submenu_columns', true);
     $enable_full_width = get_post_meta($args['menu_main_parent'], '_miss_submenu_enable_full_width', true);
     $dropdown_width = get_post_meta($args['menu_main_parent'], '_miss_submenu_enable_full_width', true) == true ? 1170 - 30 : 479 - 30;
     // 30 - padding 30px
     $item_width_height = floor($dropdown_width / $columns);
     $details_height = floor($dropdown_width / 3);
     // Get menu items
     $recent_query = get_posts($menu_query);
     if (count($recent_query)) {
         foreach ($recent_query as $key => $post_object) {
             $output .= '<li class="post_preview li-menu-type-' . $menu_type . '">';
             $output .= '<a rel="bookmark" href="' . esc_url(get_permalink($post_object->ID)) . '" title="' . esc_attr($post_object->post_title) . '">';
             if (wp_get_attachment_image_src(get_post_thumbnail_id($post_object->ID), 'full')) {
                 $width = $irish_framework_params->layout['images']['menu_static_span6'][0];
                 $height = $irish_framework_params->layout['images']['menu_static_span6'][1];
                 $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post_object->ID), 'full');
                 $output .= miss_get_post_image($args = array('pid' => $post_object->ID, 'img_class' => 'hover_fade_js image-resize w', 'width' => $item_width_height, 'height' => $item_width_height, 'echo' => false, 'preview_info_wrap' => false));
             } else {
                 $output .= get_post_meta($post_object->ID, '_icon', true) ? '<i class="' . get_post_meta($post_object->ID, '_icon', true) . '"></i> ' : '<i class="im-icon-quill-2"></i>';
             }
             $output .= '</a>';
             $output .= '<div class="after_menu_details">';
             if (get_post_thumbnail_id($post_object->ID) != false) {
                 $width = $irish_framework_params->layout['images']['menu_static_span12'][0];
                 $height = $irish_framework_params->layout['images']['menu_static_span12'][1];
                 $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post_object->ID), 'full');
                 if (miss_wp_image($thumb[0], $width, $height)) {
                     $output .= miss_get_post_image($args = array('pid' => $post_object->ID, 'img_class' => 'hover_fade_js image-resize w', 'width' => $dropdown_width, 'height' => $details_height, 'echo' => false, 'preview_info_wrap' => false));
                 }
             }
             $output .= '<div class="post_icon pull-left"><i class="' . get_post_meta($post_object->ID, '_icon', true) . '"></i></div>';
             $output .= '<div class="post_title">';
             $output .= '<a rel="bookmark" href="' . esc_url(get_permalink($post_object->ID)) . '" title="' . esc_attr($post_object->post_title) . '">' . $post_object->post_title . '</a>';
             $output .= '</div>';
             $output .= '<div class="post_excerpt">';
             $output .= miss_excerpt($post_object->post_content, apply_filters('miss_home_spotlight_excerpt', 60), apply_filters('miss_excerpt', THEME_ELLIPSIS));
             $output .= '</div>';
             $output .= '</div><!-- .after_menu_details -->';
             $output .= '</li><!-- .post_preview -->';
         }
         // end od foreach
     }
     $output .= '<li class="clearboth"></li><!-- .clearboth -->';
 }