コード例 #1
0
ファイル: newspaper.php プロジェクト: nikintharan/campaign
function blog_newspaper_style($atts, $current)
{
    global $post;
    extract($atts);
    global $mk_options;
    $image_height = $grid_image_height;
    switch ($column) {
        case 1:
            if ($layout == 'full') {
                $image_width = round($grid_width - 66);
            } else {
                $image_width = round($content_width / 100 * $grid_width - 66);
            }
            $mk_column_css = 'one-column';
            break;
        case 2:
            if ($layout == 'full') {
                $image_width = round($grid_width / 2 - 46);
            } else {
                $image_width = round($content_width / 100 * $grid_width / 2 - 46);
            }
            $mk_column_css = 'two-column';
            break;
        case 3:
            $image_width = $grid_width / 3 - 44;
            $mk_column_css = 'three-column';
            break;
        case 4:
            $image_width = $grid_width / 4 - 36;
            $mk_column_css = 'four-column';
            break;
        default:
            $image_width = $grid_width / 3 - 42;
            $mk_column_css = 'three-column';
            break;
    }
    $output = $has_image = '';
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    switch ($image_size) {
        case 'full':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'crop':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
        case 'large':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'medium':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium', true);
            $image_output_src = $image_src_array[0];
            break;
        default:
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
    }
    $lightbox_full_size = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    if ($post_type == '') {
        $post_type = 'image';
    }
    $output .= '<article id="' . get_the_ID() . '" class="mk-blog-newspaper-item newspaper-' . $item_id . ' mk-isotop-item ' . $mk_column_css . '"><div class="blog-item-holder">';
    if ($post_type == 'image' || $post_type == '') {
        if (has_post_thumbnail()) {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-newspaper-lightbox" data-fancybox-group="blog-newspaper" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '<div class="post-type-badge" href="' . get_permalink() . '"><i class="mk-li-' . $post_type . '"></i></div>';
            $output .= '</a></div>';
        }
    }
    if ($post_type == 'portfolio') {
        $featured_image_id = get_post_thumbnail_id();
        $attachment_ids = get_post_meta($post->ID, '_gallery_images', true);
        if (!empty($attachment_ids)) {
            if (!empty($featured_image_id)) {
                $final_attachment_ids = $featured_image_id . ',' . $attachment_ids;
            } else {
                $final_attachment_ids = $attachment_ids;
            }
            $output .= '<div class="blog-gallery-type">';
            $output .= do_shortcode('[mk_swipe_slideshow images="' . $final_attachment_ids . '" image_width="' . $image_width . '" image_height="' . $image_height . '"]');
            $output .= '</div>';
        } else {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-modern-lightbox" data-fancybox-group="blog-modern" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '<div class="post-type-badge" href="' . get_permalink() . '"><i class="mk-li-' . $post_type . '"></i></div>';
            $output .= '</a></div>';
        }
    }
    if ($post_type == 'video') {
        $video_id = get_post_meta($post->ID, '_single_video_id', true);
        $video_site = get_post_meta($post->ID, '_single_video_site', true);
        $output .= '<div class="featured-image">';
        if ($video_site == 'vimeo') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://player.vimeo.com/video/' . $video_id . '?title=0&amp;byline=0&amp;portrait=0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'youtube') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.youtube.com/embed/' . $video_id . '?showinfo=0&amp;theme=light&amp;color=white&amp;rel=0&amp;html5=1" frameborder="0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'dailymotion') {
            $output .= '<div style="width:' . $image_width . 'px;" class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/embed/video/' . $video_id . '?logo=0" frameborder="0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        $output .= '</div>';
    }
    if ($post_type == 'audio') {
        $iframe = get_post_meta($post->ID, '_audio_iframe', true);
        if (empty($iframe)) {
            $mp3_file = get_post_meta($post->ID, '_mp3_file', true);
            $ogg_file = get_post_meta($post->ID, '_ogg_file', true);
            $audio_author = get_post_meta($post->ID, '_single_audio_author', true);
            $remove_thumb = $column == 4 ? "true" : 'false';
            $output .= do_shortcode('[mk_audio mp3_file="' . $mp3_file . '" large_player_class="" remove_thumb="' . $remove_thumb . '" ogg_file="' . $ogg_file . '" thumb="' . $image_src_array[0] . '" img_dimension="100"]');
        } else {
            $output .= '<div class="audio-iframe">' . $iframe . '</div>';
        }
    }
    $output .= '<div class="mk-blog-meta">';
    $output .= '<h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
    $output .= '<div class="mk-blog-meta-wrapper">';
    $output .= '<time datetime="' . get_the_date() . '">';
    $output .= '<a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>';
    $output .= '</time>';
    $output .= '</div>';
    // end:[mk-blog-meta-wrapper]
    if ($full_content == 'true') {
        $content = str_replace(']]>', ']]&gt;', apply_filters('the_content', get_the_content()));
        $output .= '<div class="the-excerpt"><p>' . $content . '</p></div>';
    } else {
        if ($excerpt_length != 0) {
            ob_start();
            mk_excerpt_max_charlength($excerpt_length);
            $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
        }
    }
    $output .= '</div>';
    if ($disable_comments_share != 'false') {
        $output .= '<div class="newspaper-item-footer"><div class="newspaper-item-footer-holder">';
        $output .= '<a class="mk-readmore" href="' . get_permalink() . '"><i class="mk-moon-arrow-right-2"></i>' . __('Read More', 'mk_framework') . '</a>';
        if (function_exists('mk_love_this')) {
            ob_start();
            mk_love_this();
            $output .= '<div class="mk-love-holder newspapre-footer-icons">' . ob_get_clean() . '</div>';
        }
        if ($mk_options['enable_blog_single_comments'] == 'true') {
            if (get_post_meta($post->ID, '_disable_comments', true) != 'false') {
                ob_start();
                comments_number(__('0', 'mk_framework'), __('1', 'mk_framework'), __('%', 'mk_framework'));
                $output .= '<span class="newspaper-item-comment newspapre-footer-icons"><i class="mk-moon-bubble-9"></i> ' . ob_get_clean() . '</span>';
            }
        }
        if ($mk_options['single_blog_social'] == 'true') {
            $output .= '<span class="newspaper-item-share newspapre-footer-icons"><i class="mk-moon-share-2"></i></span>';
        }
        $output .= '<div class="clearboth"></div></div>';
        if ($mk_options['enable_blog_single_comments'] == 'true') {
            if (get_post_meta($post->ID, '_disable_comments', true) != 'false') {
                $c_args = array('number' => '4', 'status' => 'approve', 'post_id' => $post->ID);
                $comments = get_comments($c_args);
                $output .= '<ul class="newspaper-comments-list">';
                foreach ($comments as $comment) {
                    $output .= '<li>';
                    $output .= get_avatar($comment->comment_author_email, 35);
                    if (!empty($comment->comment_author_url)) {
                        $output .= '<span class="comment-author"><a href="' . $comment->comment_author_url . '">' . $comment->comment_author . '</a></span>';
                    } else {
                        $output .= '<span class="comment-author">' . $comment->comment_author . '</span>';
                    }
                    $stripped_comment = strip_tags($comment->comment_content);
                    $output .= '<span class="comment-content">' . substr($stripped_comment, 0, 45) . '...</span>';
                    $output .= '<div class="clearboth"></div></li>';
                }
                $output .= '</ul>';
            }
        }
        if ($mk_options['single_blog_social'] == 'true') {
            $output .= '<ul class="newspaper-social-share">';
            $output .= '<li><a class="facebook-share" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-facebook"></i></a></li>';
            $output .= '<li><a class="twitter-share" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-moon-twitter"></i></a></li>';
            $output .= '<li><a class="googleplus-share" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-googleplus"></i></a></li>';
            $output .= '<li><a class="pinterest-share" data-image="' . $lightbox_full_size[0] . '" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-pinterest"></i></a></li>';
            $output .= '<li><a class="linkedin-share" data-desc="' . strip_tags(get_the_excerpt()) . '" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-linkedin"></i></a></li>';
            $output .= '</ul>';
        }
        $output .= '</div>';
    }
    $output .= '</div></article>' . "\n\n\n";
    return $output;
}
コード例 #2
0
ファイル: classic.php プロジェクト: nikintharan/campaign
function blog_classic_style($atts, $current)
{
    global $post, $mk_options;
    extract($atts);
    $image_height = $grid_image_height;
    $orientation = get_post_meta($post->ID, '_classic_orientation', true);
    switch ($orientation) {
        case 'landscape':
            $orientation_class = 'mk-blog-landscape';
            if ($layout == 'full') {
                $image_width = $grid_width - 42;
            } else {
                $image_width = $content_width / 100 * $grid_width - 42;
            }
            break;
        case 'portraite':
            $orientation_class = 'mk-blog-portraite';
            if ($layout == 'full') {
                $image_width = 550;
            } else {
                $image_width = 400;
            }
            break;
        default:
            $orientation_class = 'mk-blog-landscape';
            if ($layout == 'full') {
                $image_width = $grid_width;
            } else {
                $image_width = $content_width / 100 * $grid_width;
            }
    }
    $output = $has_image = '';
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    switch ($image_size) {
        case 'full':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'crop':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
        case 'large':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'medium':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium', true);
            $image_output_src = $image_src_array[0];
            break;
        default:
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
    }
    $lightbox_full_size = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    if ($post_type == '') {
        $post_type = 'image';
    }
    $output .= '<article id="' . get_the_ID() . '" class="mk-blog-classic-item classic-' . $item_id . ' mk-isotop-item ' . $post_type . '-post-type ' . $orientation_class . '">' . "\n";
    if ($post_type == 'image' || $post_type == '') {
        if (has_post_thumbnail()) {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-classic-lightbox" data-fancybox-group="blog-classic" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '<div class="post-type-badge" href="' . get_permalink() . '"><i class="mk-li-' . $post_type . '"></i></div>';
            $output .= '</a></div>';
        }
    }
    if ($post_type == 'portfolio') {
        $featured_image_id = get_post_thumbnail_id();
        $attachment_ids = get_post_meta($post->ID, '_gallery_images', true);
        if (!empty($attachment_ids)) {
            if (!empty($featured_image_id)) {
                $final_attachment_ids = $featured_image_id . ',' . $attachment_ids;
            } else {
                $final_attachment_ids = $attachment_ids;
            }
            $output .= '<div class="blog-gallery-type">';
            $output .= do_shortcode('[mk_swipe_slideshow images="' . $final_attachment_ids . '" image_width="' . $image_width . '" image_height="' . $image_height . '"]');
            $output .= '</div>';
        } else {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-modern-lightbox" data-fancybox-group="blog-modern" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '<div class="post-type-badge" href="' . get_permalink() . '"><i class="mk-li-' . $post_type . '"></i></div>';
            $output .= '</a></div>';
        }
    }
    if ($post_type == 'video') {
        $video_id = get_post_meta($post->ID, '_single_video_id', true);
        $video_site = get_post_meta($post->ID, '_single_video_site', true);
        $output .= '<div class="featured-image">';
        if ($video_site == 'vimeo') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://player.vimeo.com/video/' . $video_id . '?title=0&amp;byline=0&amp;portrait=0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'youtube') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.youtube.com/embed/' . $video_id . '?showinfo=0&amp;theme=light&amp;color=white&amp;rel=0" frameborder="0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'dailymotion') {
            $output .= '<div style="width:' . $image_width . 'px;" class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/embed/video/' . $video_id . '?logo=0" frameborder="0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        $output .= '</div>';
    }
    if ($post_type == 'audio') {
        $iframe = get_post_meta($post->ID, '_audio_iframe', true);
        if (empty($iframe)) {
            $mp3_file = get_post_meta($post->ID, '_mp3_file', true);
            $ogg_file = get_post_meta($post->ID, '_ogg_file', true);
            $audio_author = get_post_meta($post->ID, '_single_audio_author', true);
            $output .= do_shortcode('[mk_audio mp3_file="' . $mp3_file . '" ogg_file="' . $ogg_file . '" thumb="' . $image_src_array[0] . '" audio_author="' . $audio_author . '"]');
        } else {
            $output .= '<div class="audio-iframe">' . $iframe . '</div>';
        }
    }
    $output .= '<div class="mk-blog-meta">';
    $output .= '<div class="mk-blog-meta-wrapper">';
    $output .= '<div class="mk-blog-author">' . __('By', 'mk_framework') . ' ';
    ob_start();
    the_author_posts_link();
    $output .= ob_get_contents();
    ob_end_clean();
    $output .= '</div>';
    // end:[mk-blog-author]
    $output .= '<span class="mk-categories">' . __('In', 'mk_framework') . ' ' . get_the_category_list(', ') . ' ' . __('Posted', 'mk_framework') . ' </span>';
    $output .= '<time datetime="' . get_the_date() . '">';
    $output .= '<a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>';
    $output .= '</time>';
    $output .= '</div>';
    // end:[mk-blog-meta-wrapper]
    $output .= '<div class="clearboth"></div>';
    $output .= '<h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
    if ($full_content == 'true') {
        $content = str_replace(']]>', ']]&gt;', apply_filters('the_content', get_the_content()));
        $output .= '<div class="the-excerpt"><p>' . $content . '</p></div>';
    } else {
        if ($excerpt_length != 0) {
            ob_start();
            mk_excerpt_max_charlength($excerpt_length);
            $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
        }
    }
    if ($disable_comments_share != 'false') {
        if ($mk_options['enable_blog_single_comments'] == 'true') {
            if (get_post_meta($post->ID, '_disable_comments', true) != 'false') {
                ob_start();
                comments_number('0', '1', '%');
                $output .= '<a href="' . get_permalink() . '#comments" class="mk-classic-comments"><i class="mk-moon-bubble-13"></i><span>' . ob_get_contents() . '</span></a>';
                ob_end_clean();
            }
        }
        if ($mk_options['single_blog_social'] == 'true') {
            $output .= '<span class="blog-share-container">';
            $output .= '<span class="mk-blog-share mk-toggle-trigger"><i class="mk-moon-share-2"></i></span>';
            $output .= '<ul class="blog-social-share mk-box-to-trigger">';
            $output .= '<li><a class="facebook-share" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-facebook"></i></a></li>';
            $output .= '<li><a class="twitter-share" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-moon-twitter"></i></a></li>';
            $output .= '<li><a class="googleplus-share" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-googleplus"></i></a></li>';
            $output .= '<li><a class="pinterest-share" data-image="' . $lightbox_full_size[0] . '" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-pinterest"></i></a></li>';
            $output .= '<li><a class="linkedin-share" data-desc="' . strip_tags(get_the_excerpt()) . '" data-title="' . get_the_title() . '" data-url="' . get_permalink() . '" href="#"><i class="mk-jupiter-icon-simple-linkedin"></i></a></li>';
            $output .= '</ul>';
            $output .= '</span>';
        }
    }
    $output .= '<a class="mk-readmore" href="' . get_permalink() . '"><i class="mk-moon-arrow-right-2"></i>' . __('Read More', 'mk_framework') . '</a>';
    $output .= '<div class="clearboth"></div>';
    $output .= '</div>';
    // end:[mk-blog-meta]
    $output .= '</article>' . "\n\n\n";
    return $output;
}
コード例 #3
0
$output .= '<div class="mk-shortcode mk-blog-showcase ' . $el_class . '">';
$output .= '<ul>';
$i = 0;
if ($r->have_posts()) {
    while ($r->have_posts()) {
        $r->the_post();
        $i++;
        $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
        require_once THEME_FUNCTIONS . "/bfi_cropping.php";
        $image_src = bfi_thumb($image_src_array[0], array('width' => 260, 'height' => 180));
        $first_el_class = $i == 1 ? 'mk-blog-first-el' : '';
        $output .= '<li class="' . $first_el_class . '">';
        $output .= '<div class="mk-blog-showcase-thumb"><div class="showcase-blog-overlay"></div><a href="' . get_permalink() . '"><i class="mk-jupiter-icon-plus-circle"></i></a><img src="' . mk_thumbnail_image_gen($image_src, 260, 180) . '" alt="' . get_the_title() . '" title="' . get_the_title() . '" /></div>';
        $output .= '<div class="blog-showcase-extra-info">';
        $output .= '<time datetime="' . get_the_date() . '">';
        $output .= '<a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>';
        $output .= '</time>';
        $output .= '<a class="blog-showcase-title" href="' . get_permalink() . '">' . get_the_title() . '</a><div class="clearboth"></div>';
        if ($excerpt_length != 0) {
            ob_start();
            mk_excerpt_max_charlength($excerpt_length);
            $output .= '<div class="the-excerpt">' . ob_get_clean() . '</div>';
        }
        $output .= '<a href="' . get_permalink() . '" class="blog-showcase-more">' . __('Read more', 'mk_framework') . '<i class="mk-icon-double-angle-right"></i></a>';
        $output .= '</div>';
        $output .= '</li>';
    }
    wp_reset_query();
}
$output .= '<div class="clearboth"></div></ul></div>';
echo $output;
コード例 #4
0
                }
            }
            ?>
									<span class="mk-search-cats">On <?php 
            echo implode(', ', $terms_name);
            ?>
</span>
								<?php 
        }
        ?>



							</div>
							<div class="the-excerpt"><p><?php 
        mk_excerpt_max_charlength(200);
        ?>
</p></div>
						</article>



					<?php 
        $post_type = '';
    }
    mk_post_pagination(NULL, $paged);
    wp_reset_query();
}
?>

			</section>
コード例 #5
0
function blog_thumbnail_style($atts, $current)
{
    global $post, $mk_options;
    extract($atts);
    $image_height = $grid_image_height;
    if ($thumbnail_align == 'left') {
        $align_class = ' content-align-right';
    } else {
        $align_class = ' content-align-left';
    }
    if ($layout == 'full') {
        $image_width = $grid_width - 40;
    } else {
        $image_width = $content_width / 100 * $grid_width - 40;
    }
    $output = $has_image = '';
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    /*
     * Image Width : 600px
     * Image Height : 460px
     */
    $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    $image_output_src = bfi_thumb($image_src_array[0], array('width' => '600', 'height' => '460'));
    if ($post_type == '') {
        $post_type = 'image';
    }
    $output .= '<article id="' . get_the_ID() . '" class="mk-blog-thumbnail-item thumbnail-' . $item_id . ' mk-isotop-item ' . $post_type . '-post-type' . $align_class . '">' . "\n";
    if (has_post_thumbnail()) {
        $output .= '<div class="featured-image" ><a href="' . get_permalink() . '" title="' . get_the_title() . '">';
        $output .= '    <img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, 600, 460) . '" itemprop="image" />';
        $output .= '    <div class="image-hover-overlay"></div>';
        $output .= '    <div class="post-type-badge" href="' . get_permalink() . '"><i class="mk-li-' . $post_type . '"></i></div>';
        $output .= '</a></div>';
    }
    $output .= '<div class="mk-thumbnail-content-container">';
    $output .= '    <div class="mk-blog-meta">';
    $output .= '    <div class="mk-blog-meta-wrapper">';
    $output .= '        <div class="mk-blog-author">';
    ob_start();
    the_author_posts_link();
    $output .= ob_get_contents() . '</div>';
    ob_get_clean();
    $output .= '        <span class="mk-categories"> / ' . __('', 'mk_framework') . ' ' . get_the_category_list(', ') . ' </span> /
                            <time datetime="' . get_the_date() . '">
                                <a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>
                            </time>';
    $output .= '    </div>';
    // end:[mk-blog-meta-wrapper]
    $output .= '        <h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
    if ($excerpt_length != 0) {
        ob_start();
        mk_excerpt_max_charlength($excerpt_length);
        $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
    }
    $output .= '        <div class="mk-teader-button">' . do_shortcode('[mk_button dimension="outline" corner_style="pointed" outline_skin="custom" outline_active_color="#000000" outline_hover_color="#fff" margin_bottom="0" size="medium" align="left" url="' . get_permalink() . '"]' . __('ЧИТАТЬ ДАЛЕЕ', 'mk_framework') . '[/mk_button]') . '
                            </div>';
    $output .= '        </div>';
    $output .= '    </div>';
    $output .= '<div class="clearboth"></div>';
    $output .= '</article>' . "\n\n\n";
    return $output;
}
コード例 #6
0
function blog_grid_style($atts, $current)
{
    global $post;
    extract($atts);
    $image_height = $grid_image_height;
    switch ($column) {
        case 1:
            if ($layout == 'full') {
                $image_width = round($grid_width - 66);
            } else {
                $image_width = round($content_width / 100 * $grid_width - 66);
            }
            $mk_column_css = 'one-column';
            break;
        case 2:
            if ($layout == 'full') {
                $image_width = round($grid_width / 2 - 46);
            } else {
                $image_width = round($content_width / 100 * $grid_width / 2 - 46);
            }
            $mk_column_css = 'two-column';
            break;
        case 3:
            $image_width = $grid_width / 3 - 42;
            $mk_column_css = 'three-column';
            break;
        case 4:
            $image_width = $grid_width / 4 - 28;
            $mk_column_css = 'four-column';
            break;
        default:
            $image_width = $grid_width / 3 - 42;
            $mk_column_css = 'three-column';
            break;
    }
    $output = $has_image = '';
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    switch ($image_size) {
        case 'full':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'crop':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
        case 'large':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'medium':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium', true);
            $image_output_src = $image_src_array[0];
            break;
        default:
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
            break;
    }
    $lightbox_full_size = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    if ($post_type == '') {
        $post_type = 'image';
    }
    $output .= '<article id="entry-' . get_the_ID() . '" class="mk-blog-grid-item mk-isotop-item grid-' . $item_id . ' ' . $mk_column_css . '"><div class="blog-grid-holder">';
    if ($post_type == 'image' || $post_type == '') {
        if (has_post_thumbnail()) {
            $image_src = bfi_thumb($image_src_array[0], array('width' => $image_width, 'height' => $image_height));
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-lightbox" data-fancybox-group="blog-grid" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '></a>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<i class="mk-li-image blog-grid-hover-icon"></i>';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '</div>';
        }
    }
    if ($post_type == 'portfolio') {
        $featured_image_id = get_post_thumbnail_id();
        $attachment_ids = get_post_meta($post->ID, '_gallery_images', true);
        if (!empty($attachment_ids)) {
            if (!empty($featured_image_id)) {
                $final_attachment_ids = $featured_image_id . ',' . $attachment_ids;
            } else {
                $final_attachment_ids = $attachment_ids;
            }
            $output .= '<div class="blog-gallery-type">';
            $output .= do_shortcode('[mk_swipe_slideshow images="' . $final_attachment_ids . '" image_width="' . $image_width . '" image_height="' . $image_height . '"]');
            $output .= '</div>';
        } else {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-lightbox" data-fancybox-group="blog-modern" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '></a>';
            $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '<i class="mk-li-portfolio blog-grid-hover-icon"></i>';
            $output .= '<div class="image-hover-overlay"></div>';
            $output .= '</div>';
        }
    }
    if ($post_type == 'video') {
        $video_id = get_post_meta($post->ID, '_single_video_id', true);
        $video_site = get_post_meta($post->ID, '_single_video_site', true);
        $output .= '<div class="featured-image">';
        if ($video_site == 'vimeo') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://player.vimeo.com/video/' . $video_id . '?title=0&amp;byline=0&amp;portrait=0&amp" width="' . $image_width . '" height="' . $image_height . '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'youtube') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.youtube.com/embed/' . $video_id . '?showinfo=0&amp;theme=light&amp;color=white&amp;rel=0" frameborder="0" width="' . $image_width . '" height="' . $image_height . '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        if ($video_site == 'dailymotion') {
            $output .= '<div class="mk-video-wrapper"><div class="mk-video-container"><iframe src="http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/embed/video/' . $video_id . '?logo=0" frameborder="0" width="' . $image_width . '" height="' . $image_height . '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div></div>';
        }
        $output .= '</div>';
    }
    if ($post_type == 'audio') {
        $iframe = get_post_meta($post->ID, '_audio_iframe', true);
        if (empty($iframe)) {
            $mp3_file = get_post_meta($post->ID, '_mp3_file', true);
            $ogg_file = get_post_meta($post->ID, '_ogg_file', true);
            $audio_author = get_post_meta($post->ID, '_single_audio_author', true);
            $remove_thumb = $column == 4 ? "true" : 'false';
            $output .= do_shortcode('[mk_audio mp3_file="' . $mp3_file . '" large_player_class="" remove_thumb="' . $remove_thumb . '" ogg_file="' . $ogg_file . '" thumb="' . $image_src_array[0] . '" img_dimension="100"]');
        } else {
            $output .= '<div class="audio-iframe">' . $iframe . '</div>';
        }
    }
    $output .= '<div class="mk-blog-meta">';
    $output .= '<h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
    if ($disable_meta != 'false') {
        $output .= '<div class="mk-blog-meta-wrapper">';
        $output .= '<time datetime="' . get_the_date() . '">';
        $output .= '<a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>';
        $output .= '</time>';
        $output .= '</div>';
        // end:[mk-blog-meta-wrapper]
    }
    if ($full_content == 'true') {
        $content = str_replace(']]>', ']]&gt;', apply_filters('the_content', get_the_content()));
        $output .= '<div class="the-excerpt"><p>' . $content . '</p></div>';
    } else {
        if ($excerpt_length != 0) {
            ob_start();
            mk_excerpt_max_charlength($excerpt_length);
            $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
        }
    }
    $output .= '</div>';
    $output .= '<div class="blog-grid-footer">';
    $output .= '<a class="mk-readmore" href="' . get_permalink() . '"><i class="mk-moon-arrow-right-2"></i>' . __('Read More', 'mk_framework') . '</a>';
    if (function_exists('mk_love_this')) {
        ob_start();
        mk_love_this();
        $output .= '<div class="mk-love-holder">' . ob_get_clean() . '</div>';
    }
    $output .= '</div>';
    $output .= '</div></article>';
    return $output;
}
コード例 #7
0
ファイル: magazine.php プロジェクト: nikintharan/campaign
function blog_magazine_style($atts, $i)
{
    global $post, $mk_options;
    extract($atts);
    $output = '';
    $image_height = $grid_image_height;
    $lightbox_full_size = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    if ($i == 1) {
        if ($layout == 'full') {
            $image_width = $grid_width - 40;
            $image_height = $image_width * 0.6;
        } else {
            $image_width = $content_width / 100 * $grid_width - 40;
            $image_height = $image_width * 0.6;
        }
        switch ($image_size) {
            case 'full':
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
                $image_output_src = $image_src_array[0];
                break;
            case 'crop':
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
                $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
                break;
            case 'large':
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large', true);
                $image_output_src = $image_src_array[0];
                break;
            case 'medium':
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium', true);
                $image_output_src = $image_src_array[0];
                break;
            default:
                $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
                $image_output_src = bfi_thumb($image_src_array[0], array('width' => $image_width * $image_quality, 'height' => $image_height * $image_quality));
                break;
        }
        if ($post_type == '') {
            $post_type = 'image';
        }
        $output .= '<article id="' . get_the_ID() . '" class="mk-blog-magazine-item magazine-featured-post mk-isotop-item"><div class="blog-item-holder">';
        if (has_post_thumbnail()) {
            $show_lightbox = get_post_meta($post->ID, '_disable_post_lightbox', true);
            if (($show_lightbox == 'true' || $show_lightbox == '') && $disable_lightbox == 'true') {
                $lightbox_code = ' class="mk-lightbox blog-newspaper-lightbox" data-fancybox-group="blog-magazine" href="' . $lightbox_full_size[0] . '"';
            } else {
                $lightbox_code = ' href="' . get_permalink() . '"';
            }
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '"' . $lightbox_code . '>';
            $output .= '  <img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '  <div class="image-gradient-overlay"></div>';
            $output .= '</a></div>';
        }
        $output .= '<div class="item-wrapper">';
        $output .= '  <h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
        $output .= '    <div class="mk-blog-meta">';
        $output .= '        <time datetime="' . get_the_date() . '">
                                <a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>
                            </time>
                        <span class="mk-categories">&nbsp;' . __('', 'mk_framework') . ' ' . get_the_category_list(', ') . '</span>
                            ';
        $output .= '    <div class="clearboth"></div>';
        $output .= '    </div>';
        if ($excerpt_length != 0) {
            ob_start();
            mk_excerpt_max_charlength($excerpt_length);
            $output .= '<div class="the-excerpt"><p>' . ob_get_clean() . '</p></div>';
        }
        if ($disable_comments_share != 'false') {
            $output .= '<div class="blog-magazine-social-section">';
            if ($mk_options['enable_blog_single_comments'] == 'true') {
                if (get_post_meta($post->ID, '_disable_comments', true) != 'false') {
                    ob_start();
                    comments_number('0', '1', '%');
                    $output .= '<a href="' . get_permalink() . '#comments" class="blog-magazine-comment"><i class="mk-moon-bubble-9"></i><span>' . ob_get_contents() . '</span></a>';
                    ob_get_clean();
                }
            }
            if (function_exists('mk_love_this')) {
                ob_start();
                mk_love_this();
                $output .= '<div class="mk-love-holder">' . ob_get_contents() . '</div>';
                ob_get_clean();
            }
            $output .= '</div>';
        }
        $output .= '</div>';
        $output .= '</article>' . "\n\n\n";
    } else {
        $image_width = 200;
        $image_height = 200;
        $output .= '<article id="' . get_the_ID() . '" class="mk-blog-magazine-item magazine-thumb-post"><div class="blog-item-holder">';
        $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
        $image_src = bfi_thumb($image_src_array[0], array('width' => $image_width, 'height' => $image_height, 'crop' => true));
        if (has_post_thumbnail()) {
            $output .= '<div class="featured-image"><a title="' . get_the_title() . '" href="' . get_permalink() . '">';
            $output .= '<img alt="' . get_the_title() . '" width="' . $image_width . '" class="item-featured-image" height="' . $image_height . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, $image_width, $image_height) . '" itemprop="image" />';
            $output .= '</a></div>';
        }
        $output .= '<div class="item-wrapper">';
        $output .= '  <h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
        $output .= '<div class="mk-blog-meta">';
        $output .= '  <time datetime="' . get_the_date() . '" itemprop="datePublished" pubdate>';
        $output .= '    <a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '&nbsp;</a>';
        $output .= '  </time>';
        $output .= '<span class="mk-categories">' . get_the_category_list(', ') . '</span>';
        $output .= '</div>';
        $output .= '</div>';
        $output .= '<div class="clearboth"></div>';
        $output .= '</article>';
    }
    return $output;
}
コード例 #8
0
function mk_portfolio_classic_loop(&$r, $atts)
{
    global $post;
    extract($atts);
    global $mk_options;
    if ($column > 6) {
        $column = 6;
    }
    switch ($column) {
        case 1:
            if ($layout == 'full') {
                $width = $mk_options['grid_width'] - 62;
            } else {
                $width = round($mk_options['content_width'] / 100 * $mk_options['grid_width']) - 62;
            }
            $column_css = 'portfolio-one-column';
            break;
        case 2:
            if ($layout == 'full') {
                $width = round($mk_options['grid_width'] / 2) - 42;
            } else {
                $width = round($mk_options['content_width'] / 100 * $mk_options['grid_width'] / 2) - 47;
            }
            $column_css = 'portfolio-two-column';
            break;
        case 3:
            if ($layout == 'full') {
                $width = round($mk_options['grid_width'] / 3) - 36;
            } else {
                $width = round($mk_options['content_width'] / 100 * $mk_options['grid_width'] / 2) - 47;
            }
            $column_css = 'portfolio-three-column';
            break;
        case 4:
            if ($layout == 'full') {
                $width = round($mk_options['grid_width'] / 4) - 32;
            } else {
                $width = round($mk_options['content_width'] / 100 * $mk_options['grid_width'] / 2) - 47;
            }
            $column_css = 'portfolio-four-column';
            break;
        case 5:
            if ($layout == 'full') {
                $width = round($mk_options['grid_width'] / 5) - 30;
            } else {
                $width = round($mk_options['content_width'] / 100 * $mk_options['grid_width'] / 2) - 47;
            }
            $column_css = 'portfolio-five-column';
            break;
        case 6:
            if ($layout == 'full') {
                $width = round($mk_options['grid_width'] / 6) - 32;
            } else {
                $width = round($mk_options['content_width'] / 100 * $mk_options['grid_width'] / 2) - 47;
            }
            $column_css = 'portfolio-six-column';
            break;
    }
    if ($layout == 'full') {
        $layout_class = 'portfolio-full-layout';
    } else {
        $layout_class = 'portfolio-with-sidebar';
    }
    $output = '';
    $terms = get_the_terms(get_the_id(), 'portfolio_category');
    $terms_slug = array();
    $terms_name = array();
    if (is_array($terms)) {
        foreach ($terms as $term) {
            $terms_slug[] = $term->slug;
            $terms_name[] = '<a href="' . get_term_link($term->slug, 'portfolio_category') . '">' . $term->name . '</a>';
        }
    }
    $height = !empty($height) ? $height : 600;
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    $post_type = !empty($post_type) ? $post_type : 'image';
    $link_to = get_post_meta(get_the_ID(), '_portfolio_permalink', true);
    $permalink = '';
    if (!empty($link_to)) {
        $link_array = explode('||', $link_to);
        switch ($link_array[0]) {
            case 'page':
                $permalink = get_page_link($link_array[1]);
                break;
            case 'cat':
                $permalink = get_category_link($link_array[1]);
                break;
            case 'portfolio':
                $permalink = get_permalink($link_array[1]);
                break;
            case 'post':
                $permalink = get_permalink($link_array[1]);
                break;
            case 'manually':
                $permalink = $link_array[1];
                break;
        }
    }
    if (empty($permalink)) {
        $permalink = get_permalink();
    }
    $output .= '<article id="' . get_the_ID() . '" class="mk-portfolio-item mk-portfolio-classic-item classic-' . $item_id . ' mk-isotop-item ' . $column_css . ' ' . $layout_class . ' portfolio-' . $post_type . ' ' . implode(' ', $terms_slug) . '"><div class="portfolio-classic-holder">';
    switch ($image_size) {
        case 'full':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'crop':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $width * $image_quality, 'height' => $height * $image_quality));
            break;
        case 'large':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large', true);
            $image_output_src = $image_src_array[0];
            break;
        case 'medium':
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium', true);
            $image_output_src = $image_src_array[0];
            break;
        default:
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $image_output_src = bfi_thumb($image_src_array[0], array('width' => $width * $image_quality, 'height' => $height * $image_quality));
            break;
    }
    $lightbox_full_size = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    $lightbox = $single_hover_icon = '';
    if ($disable_permalink == 'false') {
        $single_hover_icon = ' hover-single-icon';
    }
    if ($post_type == 'image' || $post_type == '') {
        if ($disable_zoom_link == 'true') {
            $lightbox = '<a rel="portfolio-classic" title="' . get_the_title() . '" data-fancybox-group="portfolio-classic-item" class="zoom-badge portfolio-classic-lightbox mk-lightbox' . $single_hover_icon . '" href="' . $lightbox_full_size[0] . '"><i class="mk-jupiter-icon-plus-circle"></i></a>';
        }
    } else {
        if ($post_type == 'video') {
            $video_id = get_post_meta($post->ID, '_single_video_id', true);
            $video_site = get_post_meta($post->ID, '_single_video_site', true);
            $video_url = '';
            if ($video_site == 'vimeo') {
                $video_url = 'http' . (is_ssl() ? 's' : '') . '://player.vimeo.com/video/' . $video_id . '?autoplay=0';
            } elseif ($video_site == 'youtube') {
                $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.youtube.com/embed/' . $video_id . '?autoplay=0';
            } elseif ($video_site == 'dailymotion') {
                $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/embed/video/' . $video_id . '?logo=0';
            }
            if ($disable_zoom_link == 'true') {
                $lightbox = '<a data-title="' . get_the_title() . '" data-fancybox-group="portfolio-classic-item" class="video-badge mk-lightbox' . $single_hover_icon . '" href="' . $video_url . '"><i class="mk-jupiter-icon-plus-circle"></i></a>';
            }
        }
    }
    $output .= '<div class="featured-image">';
    $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $width, $height) . '"  />';
    $output .= '<div class="image-hover-overlay"></div>';
    if ($disable_permalink == 'true') {
        $output .= '<a class="permalink-badge" target="' . $target . '" href="' . $permalink . '"><i class="mk-jupiter-icon-arrow-circle"></i></a>';
    }
    $output .= $lightbox;
    $output .= '</div>';
    $output .= '<div class="portfolio-meta-wrapper">';
    if ($disable_permalink == 'true') {
        $output .= '<h3 class="the-title"><a target="' . $target . '" href="' . $permalink . '">' . get_the_title() . '</a></h3><div class="clearboth"></div>';
    } else {
        $output .= '<h3 class="the-title">' . get_the_title() . '</h3><div class="clearboth"></div>';
    }
    if ($meta_type == 'category') {
        $output .= '<div class="portfolio-categories">' . implode(', ', $terms_name) . ' </div>';
    } else {
        $output .= '<time class="portfolio-date" datetime="' . get_the_date() . '">' . get_the_date() . '</time>';
    }
    if ($disable_excerpt == 'true') {
        if ($excerpt_length != 0) {
            ob_start();
            mk_excerpt_max_charlength($excerpt_length);
            $output .= '<p class="the-excerpt">' . ob_get_clean() . '</p>';
        }
    }
    $output .= '</div>';
    $output .= '<div class="clearboth"></div></div></article>' . "\n\n\n";
    return $output;
}