/**
  * Get blog post for widget
  *
  * @since roen 1.0
  */
 function roen_get_blog_recent_post($type, $num, $style = 1, $ids = '', $rand = "")
 {
     global $posts_recent_post_content;
     if ($type == "recent") {
         if ($rand == "yes") {
             $rand = "rand";
         } else {
             $rand = "";
         }
         $posts = penguin_get_custom_blog_posts('recent', $num, $rand);
     } else {
         if ($type == "featured") {
             $posts = penguin_get_custom_blog_posts('featured', $num, '', '', '', $ids);
         } else {
             if ($type == "popular") {
                 $posts = penguin_get_custom_blog_posts('popular', $num);
             }
         }
     }
     $output = "";
     if ($posts != "" && $posts->have_posts()) {
         $output .= '<ul class="widget-blog-recent mline">';
         while ($posts->have_posts()) {
             $posts->the_post();
             $posts_recent_post_content = "";
             $output .= '<li>';
             get_template_part('template/blog/widget/recent-style', esc_attr($style));
             $output .= $posts_recent_post_content;
             $output .= '</li>';
         }
         $output .= '</ul>';
     }
     wp_reset_postdata();
     return $output;
 }
function roen_blog_scroll_list_func($atts, $content = null)
{
    global $blog_shortcode_content, $blog_shortcode_thumbnail_size;
    extract(shortcode_atts(array('number' => '8', 'columns' => '4', 'type' => '', 'style' => '1', 'orderby' => '', 'cat__in' => '', 'tag__in' => '', 'post__in' => '', 'post__not_in' => '', 'nocrop' => '', 'effect' => '', 'space' => 'yes', 'position' => 'side'), $atts));
    $output = "";
    $blog_posts = penguin_get_custom_blog_posts($type, $number, $orderby, $cat__in, $tag__in, $post__in, $post__not_in);
    if ($blog_posts != "" && $blog_posts->have_posts()) {
        $blog_shortcode_thumbnail_size = roen_get_thumbnail_size(intval($columns) - 2, $nocrop);
        if ($effect != "" && $effect != "none") {
            $output .= '<div class="roen-shortcode-scroll-post roen-shortcode-blog-post row animate-list' . ($space == 'yes' ? '' : ' no-space') . '" data-columns="' . esc_attr($columns) . '">';
        } else {
            $output .= '<div class="roen-shortcode-scroll-post roen-shortcode-blog-post row' . ($space == 'yes' ? '' : ' no-space') . '" data-columns="' . esc_attr($columns) . '">';
        }
        if ($position == 'top') {
            $output .= '<div class="roen-shortcode-scroll-nav top"><a href="#" class="roen-shortcode-scroll-prev disalbed"><i class="fa fa-chevron-left"></i></a><a href="#" class="roen-shortcode-scroll-next disalbed"><i class="fa fa-chevron-right"></i></a></div>';
        }
        $output .= '<div class="roen-shortcode-scroll-container"><div class="roen-shortcode-scroll-post-list">';
        while ($blog_posts->have_posts()) {
            $blog_posts->the_post();
            $blog_shortcode_content = "";
            if ($effect != "" && $effect != "none") {
                $output .= '<article id="post-' . get_the_ID() . '" class="' . implode(' ', get_post_class('shortcode-post-entry blog-shortcode-style-' . esc_attr($style))) . ' animate-item" data-effect="' . esc_attr($effect) . '" itemscope itemtype="http://schema.org/Article">';
            } else {
                $output .= '<article id="post-' . get_the_ID() . '" class="' . implode(' ', get_post_class('shortcode-post-entry blog-shortcode-style-' . esc_attr($style))) . '" itemscope itemtype="http://schema.org/Article">';
            }
            get_template_part('template/blog/shortcode/content-style', esc_attr($style));
            $output .= $blog_shortcode_content;
            $output .= '</article>';
        }
        $output .= '</div></div>';
        if ($position != 'top') {
            $output .= '<div class="roen-shortcode-scroll-nav ' . ($position == 'side' ? 'side' : 'bottom') . '"><a href="#" class="roen-shortcode-scroll-prev disalbed"><i class="fa fa-chevron-left"></i></a><a href="#" class="roen-shortcode-scroll-next disalbed"><i class="fa fa-chevron-right"></i></a></div>';
        }
        $output .= '</div>';
    }
    wp_reset_postdata();
    return $output;
}