Esempio n. 1
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-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 .= '        <h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
    if ($excerpt_length != 0) {
        ob_start();
        the_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() . '"]' . __('READ MORE', 'mk_framework') . '[/mk_button]') . '
                            </div>';
    $output .= '        </div>';
    $output .= '    </div>';
    $output .= '<div class="clearboth"></div>';
    $output .= '</article>' . "\n\n\n";
    return $output;
}
Esempio n. 2
0
    $animation_css = 'mk-animate-element ' . $animation . ' ';
}
$image_id = mk_get_attachment_id_from_url($src);
$alt = get_post_meta($image_id, '_wp_attachment_image_alt', true);
$image_alt = !empty($alt) ? $alt : $title;
$image_title = !empty($title) ? $title : $alt;
$output .= '<div class="mk-image-shortcode mk-shortcode ' . $visibility . ' ' . $lightbox_enabled . ' align-' . $align . ' ' . $animation_css . $frame_style . '-frame ' . $caption_location . ' ' . $el_class . '" style="max-width: ' . $image_width . 'px; margin-bottom:' . $margin_bottom . 'px">';
if (!empty($heading_title)) {
    $output .= '<h3 class="mk-shortcode mk-fancy-title pattern-style mk-shortcode-heading"><span>' . $heading_title . '</span></h3>';
}
$svg = $svg == 'true' ? 'style="max-width:' . $image_width . 'px" ' : '';
$output .= '<div class="mk-image-inner">';
$output .= $link ? '<a href="' . $link . '" target="' . $target . '" class="mk-image-shortcode-link">' : '';
if ($crop == 'true') {
    $image_src = bfi_thumb($src, array('width' => $image_width, 'height' => $image_height));
    $output .= '<img class="lightbox-' . $lightbox . '" alt="' . $image_alt . '" title="' . $image_title . '" src="' . mk_thumbnail_image_gen($image_src, $image_width, $image_height) . '" ' . $svg . '/>';
} else {
    $output .= '<img class="lightbox-' . $lightbox . '" alt="' . $image_alt . '" title="' . $image_title . '" src="' . $src . '" ' . $svg . '/>';
}
$output .= $link ? '</a>' : '';
if ($lightbox == 'true') {
    $output .= '<div class="mk-image-overlay"></div>';
    $output .= '<a href="' . $src_lightbox . '" alt="' . $image_alt . '" data-fancybox-group="image-shortcode-' . $group . '" title="' . $title . '" class="mk-lightbox ' . $group . ' mk-image-shortcode-lightbox"><i class="mk-jupiter-icon-plus-circle"></i></a>';
}
/*if ( $link ) {
	$output .= '<a href="'.$link.'" target="'.$target.'" class="mk-image-shortcode-link">&nbsp;</a>';
}*/
$output .= '</div>';
if (!empty($title) || !empty($desc)) {
    $output .= '<div class="mk-image-caption">';
    if (!empty($title)) {
Esempio n. 3
0
<?php

extract(shortcode_atts(array("images" => '', "image_width" => 770, "image_height" => 350, "animation_speed" => 700, "slideshow_speed" => 7000, "direction" => 'horizontal', "direction_nav" => "true", "pagination" => "false", "freeModeFluid" => "true", "freeMode" => "false", 'loop' => 'true', "mousewheelControl" => 'false', "el_class" => ''), $atts));
if ($images == '') {
    return null;
}
require_once THEME_FUNCTIONS . "/bfi_cropping.php";
$id = uniqid();
$slides = $output = '';
$images = explode(',', $images);
$i = -1;
foreach ($images as $attach_id) {
    $i++;
    $image_src_array = wp_get_attachment_image_src($attach_id, 'full', true);
    $image_src = bfi_thumb($image_src_array[0], array('width' => $image_width, 'height' => $image_height));
    $slides .= '<div class="swiper-slide">';
    $slides .= '<img alt="' . trim(strip_tags(get_post_meta($attach_id, '_wp_attachment_image_alt', true))) . '" src="' . mk_thumbnail_image_gen($image_src, $image_width, $image_height) . '" />';
    $slides .= '</div>' . "\n\n";
}
$output .= '<div class="mk-swipe-slideshow" style="max-width:' . $image_width . 'px;"><div id="mk-swiper-' . $id . '" data-loop="' . $loop . '" data-freeModeFluid="' . $freeModeFluid . '" data-slidesPerView="1" data-pagination="' . $pagination . '" data-freeMode="' . $freeMode . '" data-mousewheelControl="' . $mousewheelControl . '" data-direction="' . $direction . '" data-slideshowSpeed="' . $slideshow_speed . '" data-animationSpeed="' . $animation_speed . '" data-directionNav="' . $direction_nav . '" class="mk-swiper-container mk-swiper-slider ' . $el_class . '">';
$output .= '<div class="mk-swiper-wrapper">' . $slides . '</div>';
if ($direction_nav == 'true') {
    $output .= '<a class="mk-swiper-prev swiper-arrows"><i class="mk-jupiter-icon-arrow-left"></i></a>';
    $output .= '<a class="mk-swiper-next swiper-arrows"><i class="mk-jupiter-icon-arrow-right"></i></a>';
}
$output .= '</div></div>';
echo $output;
    $container_border = !empty($border_color) && $gutter_space == 0 && $border_style != "opened_edges" ? ' style="border-left:1px solid ' . $border_color . ';border-top:1px solid ' . $border_color . ';" ' : '';
    $output .= '<div id="clients-' . $id . '" class="mk-clients-shortcode column-style bg-cover-' . $cover . ' ' . $column_css . ' ' . $el_class . ' border-' . $border_style . '">';
    if (!empty($title)) {
        $output .= '<h3 class="mk-shortcode mk-fancy-title pattern-style mk-shortcode-heading"><span>' . $title . '</span></h3>';
    }
    $row_counter = 0;
    $item_counter = 0;
    $output .= '<ul' . $container_border . '>';
    while ($loop->have_posts()) {
        $loop->the_post();
        $loop_items = $loop->post_count;
        $url = get_post_meta(get_the_ID(), '_url', true);
        $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
        $output .= '<li>';
        $output .= !empty($url) ? '<a target="' . $target . '" href="' . $url . '">' : '';
        $output .= '<div title="' . get_the_title() . '" class="client-logo" style="background-image:url(' . mk_thumbnail_image_gen($image_src_array[0], false, false) . '); ' . $height . '"></div>';
        $output .= !empty($url) ? '</a>' : '';
        $output .= '</li>';
        $row_counter++;
        $item_counter++;
        if ($row_counter % $per_row == 0 && $item_counter != $loop_items) {
            $output .= '</ul><ul' . $container_border . '>';
        }
    }
    wp_reset_query();
    $output .= '</ul></div>';
}
$gutter_space = $gutter_space == 0 ? '0 auto' : $gutter_space;
// Get global JSON contructor object for styles and create local variable
global $app_dynamic_styles;
$app_styles = '';
Esempio n. 5
0
                if ($enable_excerpt == 'true') {
                    $except = get_the_excerpt();
                    if ($except) {
                        $output .= '<p class="blog-carousel-excerpt">' . get_the_excerpt() . '</p>';
                    }
                }
                $output .= '</div>';
                $output .= '</div></li>';
            }
        } else {
            $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
            $output .= '<li><div><div class="blog-carousel-thumb"><a href="' . get_permalink() . '">';
            if (has_post_thumbnail()) {
                $image_src = bfi_thumb($image_src_array[0], array('width' => 245, 'height' => 180));
            } else {
                $image_src = bfi_thumb(THEME_IMAGES . '/empty-thumb.png', array('width' => 245, 'height' => 180));
            }
            $output .= '<img src="' . mk_thumbnail_image_gen($image_src, 245, 180) . '" alt="' . get_the_title() . '" title="' . get_the_title() . '" />';
            $output .= '<div class="blog-carousel-overlay"></div>';
            $output .= '</a></div>';
            $output .= '<h5 class="blog-carousel-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h5>';
            if ($enable_excerpt == 'true') {
                $output .= '<p class="blog-carousel-excerpt">' . get_the_excerpt() . '</p>';
            }
            $output .= '</div></li>';
        }
    }
}
wp_reset_query();
$output .= '</ul></div><div class="clearboth"></div></div>';
echo $output;
Esempio n. 6
0
function mk_news_loop($atts, $current)
{
    global $post;
    extract($atts);
    global $mk_options;
    $grid_width = $mk_options['grid_width'];
    $content_width = $mk_options['content_width'];
    $post_style = get_post_meta($post->ID, '_news_post_style', true);
    $terms = get_the_terms(get_the_id(), 'news_category');
    $terms_slug = array();
    $terms_name = array();
    if (is_array($terms)) {
        foreach ($terms as $term) {
            //$news_category = '<span><a href="'.get_term_link($term->slug, 'news_category').'">' . $term->name . '</a></span>';
            $news_category = '<span>' . $term->name . '</span>';
        }
    }
    switch ($post_style) {
        case 'full-with-image':
            if ($layout == 'full') {
                $image_width = round($grid_width - 55);
            } else {
                $image_width = round($content_width / 100 * $grid_width - 66);
            }
            break;
        case 'full-without-image':
            if ($layout == 'full') {
                $image_width = round($grid_width - 66);
            } else {
                $image_width = round($content_width / 100 * $grid_width - 66);
            }
            break;
        case 'half-with-image':
            $image_width = 537;
            break;
        case 'half-without-image':
            $image_width = 537;
            break;
        case 'fourth-with-image':
            $image_width = 262;
            break;
        case 'fourth-without-image':
            $image_width = 262;
        default:
    }
    $output = '<article id="' . get_the_ID() . '" class="mk-news-item news-' . $item_id . ' mk-isotop-item news-' . $post_style . '"><div class="item-holder" style="height:' . ($image_height + 2) . 'px">';
    switch ($post_style) {
        case 'full-with-image':
            $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));
            if (has_post_thumbnail()) {
                $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, $image_width, $image_height) . '" itemprop="image" />';
            }
            $output .= '<span class="news-date">' . get_the_date() . '</span>';
            $output .= '<div class="news-meta-wrapper">';
            $output .= '<div class="news-categories">' . $news_category . '</div>';
            $output .= '<div class="clearboth"></div>';
            $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>';
            $output .= '</div>';
            break;
        case 'full-without-image':
            $output .= '<div class="news-meta-wrapper">';
            $output .= '<div class="news-categories">' . $news_category . '</div>';
            $output .= '<div class="clearboth"></div>';
            $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>';
            $output .= '<span class="news-date">' . get_the_date() . '</span>';
            $output .= '</div>';
            $output .= '<div class="the-excerpt"><p>' . get_the_excerpt() . '</p></div>';
            $output .= '<a href="' . get_permalink() . '" class="mk-read-more">' . __('ЧИТАТЬ ДАЛЕЕ', 'mk_framework') . '<i class="mk-icon-double-angle-right"></i></a>';
            break;
        case 'half-with-image':
            $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));
            if (has_post_thumbnail()) {
                $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, $image_width, $image_height) . '" itemprop="image" />';
            }
            $output .= '<span class="news-date">' . get_the_date() . '</span>';
            $output .= '<div class="news-meta-wrapper">';
            $output .= '<div class="news-categories">' . $news_category . '</div>';
            $output .= '<div class="clearboth"></div>';
            $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>';
            $output .= '</div>';
            break;
        case 'half-without-image':
            $output .= '<div class="news-meta-wrapper">';
            $output .= '<div class="news-categories">' . $news_category . '</div>';
            $output .= '<div class="clearboth"></div>';
            $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>';
            $output .= '<span class="news-date">' . get_the_date() . '</span>';
            $output .= '<div class="clearboth"></div>';
            $output .= '</div>';
            $output .= '<div class="the-excerpt"><p>' . get_the_excerpt() . '</p></div>';
            $output .= '<a href="' . get_permalink() . '" class="mk-read-more">' . __('ЧИТАТЬ ДАЛЕЕ', 'mk_framework') . '<i class="mk-icon-double-angle-right"></i></a>';
            break;
        case 'fourth-with-image':
            $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));
            if (has_post_thumbnail()) {
                $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, $image_width, $image_height) . '" itemprop="image" />';
            }
            $output .= '<span class="news-date">' . get_the_date() . '</span>';
            $output .= '<div class="news-meta-wrapper">';
            $output .= '<div class="news-categories">' . $news_category . '</div>';
            $output .= '<div class="clearboth"></div>';
            $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>';
            $output .= '</div>';
            break;
        case 'fourth-without-image':
            $output .= '<div class="news-meta-wrapper">';
            $output .= '<div class="news-categories">' . $news_category . '</div>';
            $output .= '<div class="clearboth"></div>';
            $output .= '<div class="news-the-title"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a></span></div>';
            $output .= '<span class="news-date">' . get_the_date() . '</span>';
            $output .= '</div>';
            $output .= '<div class="the-excerpt"><p>' . get_the_excerpt() . '</p></div>';
            $output .= '<a href="' . get_permalink() . '" class="mk-read-more">' . __('ЧИТАТЬ ДАЛЕЕ', 'mk_framework') . '<i class="mk-icon-double-angle-right"></i></a>';
        default:
    }
    $output .= '</div></article>';
    return $output;
}
        $output .= '<p class="mk-testimonial-quote">' . get_post_meta(get_the_ID(), '_desc', true) . '</p>';
        $output .= '</div>';
        if (($style == 'boxed' || $style == 'avantgarde') && has_post_thumbnail()) {
            $output .= '<div class="mk-testimonial-image ' . $animation_css . '"><img width="95" height="95" src="' . mk_thumbnail_image_gen($image_src, 120, 120) . '" alt="' . strip_tags(get_post_meta(get_the_ID(), '_author', true)) . '" /></div>';
        }
        $output .= '<span class="mk-testimonial-author">' . strip_tags(get_post_meta(get_the_ID(), '_author', true)) . '</span>';
        $output .= !empty($url) ? '<a target="_blank" href="' . $url . '">' : '';
        $output .= !empty($company) ? '<span class="mk-testimonial-company">' . strip_tags($company) . '</span>' : '';
        $output .= !empty($url) ? '</a>' : '';
        $output .= '</li>' . "\n\n";
    } else {
        $output .= '<li class="' . $column_class . ' testimonial-item">';
        $output .= '<div class="mk-testimonial-content">';
        $output .= '<p class="mk-testimonial-quote">' . get_post_meta(get_the_ID(), '_desc', true) . '</p>';
        if (has_post_thumbnail()) {
            $output .= '<div class="mk-testimonial-image ' . $animation_css . '"><img width="50" height="50" src="' . mk_thumbnail_image_gen($image_src, 120, 120) . '" alt="' . strip_tags(get_post_meta(get_the_ID(), '_author', true)) . '" /></div>';
        }
        $output .= '<span class="mk-testimonial-author">' . strip_tags(get_post_meta(get_the_ID(), '_author', true)) . '</span>';
        $output .= !empty($company) ? '<a ' . (!empty($url) ? 'href="' . $url . '" target="_blank"' : '') . ' class="mk-testimonial-company">' . strip_tags($company) . '</a>' : '';
        $output .= '<div class="clearboth"></div></div>';
        $output .= '</li>' . "\n\n";
    }
    if ($show_as == 'column' && $i % $column == 0) {
        $output .= '<div class="clearboth"></div>';
    }
}
wp_reset_query();
$final_output = $heading_title;
$final_output .= '<div class="mk-testimonial mk-script-call ' . $style . '-style ' . $slideshow_class[0] . ' ' . $skin_css . $el_class . '" id="testimonial_' . $id . '" ' . $slideshow_class[2] . '>';
if ($style == 'simple') {
    $output .= '<i class="mk-moon-quotes-left"></i>';
 }
 $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[] = $term->name;
     }
 }
 $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
 $image_src = bfi_thumb($image_src_array[0], array('width' => 500 * $image_quality, 'height' => 350 * $image_quality));
 $output .= '<li>';
 $output .= '<div class="portfolio-modern-column mk-portfolio-item ' . $hover_scenarios . '-hover">';
 $output .= '<div class="featured-image">';
 $output .= '<img width="500" height="350" src="' . mk_thumbnail_image_gen($image_src, 500, 350) . '" alt="' . get_the_title() . '" title="' . get_the_title() . '"  class="item-featured-image" />';
 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' : '') . '://vimeo.com/' . $video_id . '?autoplay=0';
     } elseif ($video_site == 'youtube') {
         $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.youtube.com/watch?v=' . $video_id . '?autoplay=0';
     } elseif ($video_site == 'dailymotion') {
         $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/video/' . $video_id . '?logo=0';
     }
 }
 if ($hover_scenarios == 'fadebox') {
     $output .= '<div class="hover-overlay gradient"' . $hover_overlay . '></div>';
 } else {
Esempio n. 9
0
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();
            the_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;
}
 }
 if (!empty($twitter)) {
     $social_output .= '<li><a target="_blank" href="' . $twitter . '" title="' . get_the_title() . ' ' . __('On', 'mk_framework') . ' Twitter"><i class="mk-moon-twitter"></i></a></li>';
 }
 if (!empty($googleplus)) {
     $social_output .= '<li><a target="_blank" href="' . $googleplus . '" title="' . get_the_title() . ' ' . __('On', 'mk_framework') . ' Google Plus"><i class="mk-moon-google-plus"></i></a></li>';
 }
 if (!empty($linkedin)) {
     $social_output .= '<li><a target="_blank" href="' . $linkedin . '" title="' . get_the_title() . ' ' . __('On', 'mk_framework') . ' Linked In"><i class="mk-jupiter-icon-simple-linkedin"></i></a></li>';
 }
 $social_output .= '</ul>';
 $output .= '<li class="mk-employee-item ' . $first_column . ' ' . $blur_item_css . '">';
 $output .= '<div class="team-thumbnail rounded-' . $rounded_image . ' ' . $animation_css . '">';
 $output .= !empty($link) ? '<a href="' . $link . '">' : '';
 $output .= $single_post == 'true' ? '<a href="' . get_permalink() . '">' : '';
 $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, $image_dimension, $image_dimension) . '" />';
 $output .= !empty($link) ? '</a>' : '';
 $output .= $single_post == 'true' ? '</a>' : '';
 if ($style == 'classic') {
     $output .= $social_output;
     $output .= '<div class="employee-hover-overlay"></div>';
 }
 $output .= '</div>';
 $output .= '<div class="team-info-wrapper" ' . get_schema_markup('person') . '>';
 $output .= !empty($link) ? '<a href="' . $link . '">' : '';
 $output .= $single_post == 'true' ? '<a href="' . get_permalink() . '">' : '';
 $output .= '<span class="team-member-name">' . get_the_title() . '</span>';
 $output .= !empty($link) ? '</a>' : '';
 $output .= $single_post == 'true' ? '</a>' : '';
 $output .= '<span class="team-member-position">' . get_post_meta(get_the_ID(), '_position', true) . '</span>';
 if ($description == 'true') {
    return null;
}
$id = uniqid();
require_once THEME_FUNCTIONS . "/bfi_cropping.php";
$animation_css = '';
if ($animation != '') {
    $animation_css = ' mk-animate-element ' . $animation . ' ';
}
$script_out = '<script type="text/javascript">

        jQuery(document).ready(function() {
                jQuery("#flexslider_' . $id . '").find(".mk-lcd-image").fadeIn();
        });
        </script>';
$final_output = $heading_title = '';
if (!empty($title)) {
    $heading_title = '<h3 class="mk-shortcode mk-fancy-title pattern-style mk-shortcode-heading"><span>' . $title . '</span></h3>';
}
$output = '';
$images = explode(',', $images);
$i = -1;
foreach ($images as $attach_id) {
    $i++;
    $image_src_array = wp_get_attachment_image_src($attach_id, 'full', true);
    $image_src = bfi_thumb($image_src_array[0], array('width' => 810, 'height' => 475));
    $output .= '<li>';
    $output .= '<img alt="' . trim(strip_tags(get_post_meta($attach_id, '_wp_attachment_image_alt', true))) . '" src="' . mk_thumbnail_image_gen($image_src, 810, 475) . '" />';
    $output .= '</li>' . "\n\n";
}
$final_output .= $heading_title . '<div style="max-width:872px;" data-animation="fade" data-smoothHeight="false" data-animationSpeed="' . $animation_speed . '" data-slideshowSpeed="' . $slideshow_speed . '" data-pauseOnHover="' . $pause_on_hover . '" data-controlNav="false" data-directionNav="true" data-isCarousel="false" class="mk-lcd-slideshow mk-script-call mk-flexslider ' . $animation_css . $el_class . '" id="flexslider_' . $id . '"><img style="display:none" class="mk-lcd-image" src="' . THEME_IMAGES . '/theme-lcd-slideshow.png" alt="" /><div class="slideshow-container"><ul class="mk-flex-slides" style="max-width:838px;max-height:506px;">' . $output . '</ul></div></div>' . "\n\n\n\n" . $script_out;
echo $final_output;
    $mk_grid = '<div class="mk-grid">';
    $mk_grid_end = '</div>';
}
if ($slideshow_mask == "true") {
    $mk_mask = '<div class="mk-video-mask">';
    $mk_masl_end = '</div>';
}
if (!empty($overlay)) {
    $output_overlay = '<div style="background-color:' . $overlay . ';" class="mk-slideshow-box-color-mask"></div>';
}
if ($r->have_posts()) {
    $output_slideshow_box_items .= '<div class="mk-slideshow-box-items">';
    while ($r->have_posts()) {
        $r->the_post();
        $image_src_array = wp_get_attachment_image_src($post->ID, 'full', true);
        $output_slideshow_box_items .= '<div class="mk-slideshow-box-item" style="background-image:url(' . mk_thumbnail_image_gen($image_src_array[0], false, false) . ');"></div>';
    }
    wp_reset_query();
    $output_slideshow_box_items .= '</div>';
}
///////////////////////////////////////////////////////////
//
// HTML output
//
//////////////////////////////////////////////////////////
$output .= '<div id="mk-slideshow-box-' . $id . '" class="mk-slideshow-box mk-page-section full-width-' . $full_width_cnt . ' full-height-' . $full_height . ' ' . $el_class . '">';
$output .= '	' . $output_overlay;
$output .= '	' . $output_slideshow_box_items;
$output .= '	' . $mk_grid . '<div class="mk-slideshow-box-content ">' . wpb_js_remove_wpautop($content, true) . '</div>' . $mk_grid_end;
$output .= '	' . $mk_mask . $mk_mask_end;
$output .= '</div> <!-- mk-slideshow-box-' . $id . ' -->';
<?php

extract(shortcode_atts(array("images" => '', "image_width" => 770, "image_height" => 350, "animation_speed" => 700, "slideshow_speed" => 7000, "direction" => 'horizontal', "direction_nav" => "true", "pagination" => "false", "freeModeFluid" => "true", "freeMode" => "false", 'loop' => 'true', "mousewheelControl" => 'false', "el_class" => ''), $atts));
if ($images == '') {
    return null;
}
require_once THEME_FUNCTIONS . "/bfi_cropping.php";
$id = uniqid();
$slides = $output = '';
$images = explode(',', $images);
$i = -1;
foreach ($images as $attach_id) {
    $i++;
    $image_src_array = wp_get_attachment_image_src($attach_id, 'full', true);
    $image_src = bfi_thumb($image_src_array[0], array('width' => $image_width, 'height' => $image_height));
    $slides .= '<div class="swiper-slide">';
    $slides .= '<img alt="" src="' . mk_thumbnail_image_gen($image_src, $image_width, $image_height) . '" />';
    $slides .= '</div>' . "\n\n";
}
$output .= '<div class="mk-swipe-slideshow" style="max-width:' . $image_width . 'px;"><div id="mk-swiper-' . $id . '" data-loop="' . $loop . '" data-freeModeFluid="' . $freeModeFluid . '" data-slidesPerView="1" data-pagination="' . $pagination . '" data-freeMode="' . $freeMode . '" data-mousewheelControl="' . $mousewheelControl . '" data-direction="' . $direction . '" data-slideshowSpeed="' . $slideshow_speed . '" data-animationSpeed="' . $animation_speed . '" data-directionNav="' . $direction_nav . '" class="swiper-container mk-swiper-slider ' . $el_class . '">';
$output .= '<div class="swiper-wrapper">' . $slides . '</div>';
if ($direction_nav == 'true') {
    $output .= '<a class="mk-swiper-prev swiper-arrows"><i class="mk-jupiter-icon-arrow-left"></i></a>';
    $output .= '<a class="mk-swiper-next swiper-arrows"><i class="mk-jupiter-icon-arrow-right"></i></a>';
}
$output .= '</div></div>';
echo $output;
Esempio n. 14
0
										},
										play: function() { // To avoid both jPlayers playing together.
											$(this).jPlayer("pauseOthers");
										},
										swfPath: "' . THEME_JS . '",
										supplied: "mp3, ogg",
										cssSelectorAncestor: "#jp_container_' . $audio_id . '",
										wmode: "window"
									});

							})

							</script>';
                    echo '<div class="mk-audio-section" style="background-color:' . $audio_box_color[$random_colors] . '">';
                    if (has_post_thumbnail()) {
                        echo '<img class="audio-thumb" alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, 170, 170) . '" />';
                        $has_image = 'audio-has-img';
                    }
                    echo '<div data-mp3="' . $mp3_file . '" data-ogg="' . $ogg_file . '" id="jquery_jplayer_' . $audio_id . '" class="jp-jplayer mk-blog-audio"></div>
								<div id="jp_container_' . $audio_id . '" class="jp-audio ' . $has_image . '">
									<div class="jp-type-single">
										<div class="jp-gui jp-interface">
											<div class="jp-time-holder">
												<div class="jp-current-time"></div>
												<div class="jp-duration"></div>
											</div>

											<div class="jp-progress">
												<div class="jp-seek-bar">
													<div class="jp-play-bar"></div>
												</div>
Esempio n. 15
0
                $image_hover_src = bfi_thumb($image_src_hover_array[0], array('width' => $width * $quality, 'height' => $height * $quality));
                break;
            case 'large':
                $image_src_hover_array = wp_get_attachment_image_src($hover_image_id, 'large', true);
                $image_hover_src = $image_src_hover_array[0];
                break;
            case 'medium':
                $image_src_hover_array = wp_get_attachment_image_src($hover_image_id, 'medium', true);
                $image_hover_src = $image_src_hover_array[0];
                break;
            default:
                $image_src_hover_array = wp_get_attachment_image_src($hover_image_id, 'full', true);
                $image_hover_src = bfi_thumb($image_src_hover_array[0], array('width' => $width * $quality, 'height' => $height * $quality));
                break;
        }
        echo '<img src="' . mk_thumbnail_image_gen($image_hover_src, $width, $height) . '" alt="' . get_the_title() . '" class="product-hover-image" title="' . get_the_title() . '">';
    }
    echo '</a>';
} else {
    echo '<img src="' . woocommerce_placeholder_img_src() . '" alt="Placeholder" width="' . $width * $quality . '" height="' . $height * $quality . '" />';
}
?>
	
	<?php 
if ($mk_options['woocommerce_catalog'] == 'false') {
    ?>
	<div class="product-item-footer">
			<?php 
    if ($rating_html = $product->get_rating_html()) {
        ?>
				<span class="product-item-rating"><?php 
    $query['order'] = $order;
}
$r = new WP_Query($query);
$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();
Esempio n. 17
0
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)) {
            $audio_id = mt_rand(99, 999);
            $mp3_file = get_post_meta($post->ID, '_mp3_file', true);
            $ogg_file = get_post_meta($post->ID, '_ogg_file', true);
            $audio_box_color = array('#00c8d7', '#e1ba05', '#da4c26', '#f56a5f', '#00b89a', '#95c76a', '#acacac', '#d19760');
            $random_colors = array_rand($audio_box_color, 1);
            $image_src = bfi_thumb($image_src_array[0], array('width' => 100, 'height' => 100));
            $output .= '<div class="mk-audio-section" style="background-color:' . $audio_box_color[$random_colors] . '">';
            if (has_post_thumbnail() && $column > 4) {
                $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, 100, 100) . '" />';
                $has_image = 'audio-has-img';
            }
            $output .= '<div data-mp3="' . $mp3_file . '" data-ogg="' . $ogg_file . '" id="jquery_jplayer_' . $audio_id . '" class="jp-jplayer mk-blog-audio"></div>
               <div id="jp_container_' . $audio_id . '" class="jp-audio ' . $has_image . '">
                    <div class="jp-type-single">
                         <div class="jp-gui jp-interface">
                              <div class="jp-time-holder">
                                   <div class="jp-current-time"></div>
                                   <div class="jp-duration"></div>
                              </div>

                              <div class="jp-progress">
                                   <div class="jp-seek-bar">
                                        <div class="jp-play-bar"></div>
                                   </div>
                              </div>
                              <div class="jp-volume-bar">
                                   <i class="mk-moon-volume-mute"></i><div class="inner-value-adjust"><div class="jp-volume-bar-value"></div></div>
                              </div>
                              <ul class="jp-controls">
                                   <li><a href="javascript:;" class="jp-play" tabindex="1"><i class="mk-icon-play"></i></a></li>
                                   <li><a href="javascript:;" class="jp-pause" tabindex="1"><i class="mk-icon-pause"></i></a></li>
                              </ul></div>
                         <div class="jp-no-solution">
                              <span>Update Required</span>
                              To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
                         </div>
                    </div>
          </div>';
            $output .= '<div class="clearboth"></div></div>';
        } 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 .= '<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>';
    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();
            the_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;
}
Esempio n. 18
0
 function mk_portfolio_similar_posts()
 {
     global $single_layout, $post, $mk_options;
     $backup = $post;
     $cats = wp_get_object_terms($post->ID, 'portfolio_category');
     $catSlugs = array();
     $related_post_found = false;
     $width = $mk_options['grid_width'] / 4 * 2;
     $height = $width / 1.25;
     $output = '';
     if ($cats) {
         $catcount = count($cats);
         for ($i = 0; $i < $catcount; $i++) {
             $catSlugs[$i] = $cats[$i]->slug;
         }
         $query = array('post__not_in' => array($post->ID), 'showposts' => 4, 'ignore_sticky_posts' => 1, 'post_type' => 'portfolio');
         global $wp_version;
         if (version_compare($wp_version, "3.1", '>=')) {
             $query['tax_query'] = array(array('taxonomy' => 'portfolio_category', 'field' => 'slug', 'terms' => $catSlugs));
         } else {
             $query['taxonomy'] = 'portfolio_category';
             $query['term'] = implode(',', $catSlugs);
         }
         $output = '';
         $related = new WP_Query($query);
         if ($related->have_posts()) {
             $related_post_found = true;
             $output .= '<section class="portfolio-similar-posts">';
             $output .= '<div class="similar-post-title">' . __('Related Projects', 'mk_framework') . '</div>';
             $output .= '<div class="mk-grid">';
             $output .= '<ul>';
             while ($related->have_posts()) {
                 global $post;
                 $related->the_post();
                 if (has_post_thumbnail()) {
                     $output .= '<li>';
                     $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();
                     }
                     $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[] = $term->name;
                         }
                     }
                     $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
                     $image_src = bfi_thumb($image_src_array[0], array('width' => $width, 'height' => $height));
                     $output .= '<div class="portfolio-similar-posts-image"><img src="' . mk_thumbnail_image_gen($image_src, $width, $height) . '" alt="' . get_the_title() . '" title="' . get_the_title() . '" />';
                     $output .= '<div class="image-hover-overlay"></div>';
                     $output .= '<a title="' . get_the_title() . '" class="modern-post-type-icon" href="' . $permalink . '"><i class="mk-jupiter-icon-plus-circle"></i></a>';
                     $output .= '<div class="portfolio-similar-meta">';
                     $output .= '<a class="the-title" href="' . get_permalink() . '">' . get_the_title() . '</a><div class="clearboth"></div>';
                     $output .= '<div class="portfolio-categories">' . implode(' ', $terms_name) . '</div>';
                     $output .= '</div>';
                     $output .= '</div>';
                     $output .= '</li>';
                 }
             }
             $output .= '</ul></div>';
             $output .= '<div class="clearboth"></div></section>';
         }
         $post = $backup;
     }
     if (!$related_post_found) {
         $recent = new WP_Query(array('post_type' => 'portfolio', 'showposts' => 4, 'nopaging' => 0, 'post_status' => 'publish', 'ignore_sticky_posts' => 1));
         $output = '';
         if ($recent->have_posts()) {
             $related_post_found = false;
             $output .= '<section class="portfolio-similar-posts">';
             $output .= '<div class="similar-post-title">' . __('Most Recent Projects', 'mk_framework') . '</div>';
             $output .= '<div class="mk-grid">';
             $output .= '<ul>';
             while ($recent->have_posts()) {
                 global $post;
                 $recent->the_post();
                 if (has_post_thumbnail()) {
                     $output .= '<li>';
                     $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();
                     }
                     $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[] = $term->name;
                         }
                     }
                     $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
                     $image_src = bfi_thumb($image_src_array[0], array('width' => $width, 'height' => $height));
                     $output .= '<div class="portfolio-similar-posts-image"><img src="' . mk_thumbnail_image_gen($image_src, $width, $height) . '" alt="' . get_the_title() . '" title="' . get_the_title() . '" />';
                     $output .= '<div class="image-hover-overlay"></div>';
                     $output .= '<a title="' . get_the_title() . '" class="modern-post-type-icon" href="' . $permalink . '"><i class="mk-jupiter-icon-plus-circle"></i></a>';
                     $output .= '<div class="portfolio-similar-meta">';
                     $output .= '<a class="the-title" href="' . get_permalink() . '">' . get_the_title() . '</a><div class="clearboth"></div>';
                     $output .= '<div class="portfolio-categories">' . implode(' ', $terms_name) . '</div>';
                     $output .= '</div>';
                     $output .= '</div>';
                     $output .= '</li>';
                 }
             }
             $output .= '</ul></div>';
             $output .= '<div class="clearboth"></div></section>';
         }
     }
     wp_reset_postdata();
     echo $output;
 }
Esempio n. 19
0
			<?php 
        if ($mk_options['single_disable_featured_image'] == 'true' && get_post_meta($post->ID, '_disable_featured_image', true) != 'false') {
            if ($post_type == 'image') {
                ?>
				<?php 
                if (has_post_thumbnail()) {
                    ?>
						<div class="single-featured-image">
							<img alt="<?php 
                    the_title();
                    ?>
" title="<?php 
                    the_title();
                    ?>
" src="<?php 
                    echo mk_thumbnail_image_gen($image_src, $image_width, $image_height);
                    ?>
" height="<?php 
                    echo $image_height;
                    ?>
" width="<?php 
                    echo $image_width;
                    ?>
" itemprop="image" />
						</div>
				<?php 
                }
                ?>
			<?php 
            } elseif ($post_type == 'portfolio') {
                $featured_image_id = get_post_thumbnail_id();
Esempio n. 20
0
function blog_spotlight_style($atts, $current)
{
    global $post, $mk_options;
    extract($atts);
    $image_height = $grid_image_height;
    $output = $has_image = '';
    $post_type = get_post_meta($post->ID, '_single_post_type', true);
    switch ($column) {
        case 1:
            if ($layout == 'full') {
                $image_width = round($grid_width);
            } else {
                $image_width = round($content_width / 100 * $grid_width);
            }
            $mk_column_css = 'one-column';
            break;
        case 2:
            if ($layout == 'full') {
                $image_width = round($grid_width / 2);
            } else {
                $image_width = round($content_width / 100 * $grid_width / 2);
            }
            $mk_column_css = 'two-column';
            break;
        case 3:
            $image_width = $grid_width / 3;
            $mk_column_css = 'three-column';
            break;
        case 4:
            $image_width = $grid_width / 4;
            $mk_column_css = 'four-column';
            break;
        default:
            $image_width = $grid_width / 3;
            $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';
    }
    if (has_post_thumbnail()) {
        $output .= '<article id="' . get_the_ID() . '" class="mk-blog-spotlight-item spotlight-' . $item_id . ' mk-isotop-item ' . $mk_column_css . ' ' . $post_type . '-post-type">' . "\n";
        $output .= '<div class="featured-image"><a title="' . get_the_title() . '">';
        $output .= '    <img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_output_src, $image_width, $image_height) . '" itemprop="image" /></a>';
        $output .= '    <div class="image-hover-overlay"></div>';
        $output .= '    <div class="mk-spotlight-content-container">';
        $output .= '        <div class="mk-blog-meta">
                                        <time datetime="' . get_the_date() . '">
                                            <a href="' . get_month_link(get_the_time("Y"), get_the_time("m")) . '">' . get_the_date() . '</a>
                                        </time>';
        $output .= '            <h3 class="the-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
        $output .= do_shortcode('[mk_button dimension="outline" corner_style="pointed" outline_skin="light" text_color="light" size="medium" align="center" url="' . get_permalink() . '"]' . __('READ MORE', 'mk_framework') . '[/mk_button]');
        $output .= '        </div>';
        $output .= '    </div>';
        $output .= '</div>';
        $output .= '<div class="clearboth"></div>';
        $output .= '</article>' . "\n\n\n";
    }
    return $output;
}
<?php

extract(shortcode_atts(array('mp3_file' => '', 'ogg_file' => '', 'audio_author' => '', 'thumb' => '', 'remove_thumb' => 'false', 'el_class' => '', 'large_player_class' => 'mk-audio-shortcode', 'img_dimension' => 170), $atts));
$output = $has_image = '';
$audio_id = uniqid();
/* Random Color variations for Audio box background */
$audio_box_color = array('#00c8d7', '#e1ba05', '#da4c26', '#f56a5f', '#00b89a', '#95c76a', '#acacac', '#d19760');
$random_colors = array_rand($audio_box_color, 1);
$output .= '<div class="mk-audio-section ' . $large_player_class . '" style="background-color:' . $audio_box_color[$random_colors] . '" ' . get_schema_markup('audio') . '>';
if ($thumb && $remove_thumb == 'false') {
    require_once THEME_FUNCTIONS . "/bfi_cropping.php";
    $image_src = bfi_thumb($thumb, array('width' => $img_dimension, 'height' => $img_dimension));
    $output .= '<img class="audio-thumb" alt="" title="" src="' . mk_thumbnail_image_gen($image_src, $img_dimension, $img_dimension) . '" />';
    $has_image = 'audio-has-img';
}
$output .= '<div id="jquery_jplayer_' . $audio_id . '" class="jp-jplayer mk-blog-audio" data-mp3="' . $mp3_file . '" data-ogg="' . $ogg_file . '"></div>
    <div id="jp_container_' . $audio_id . '" class="jp-audio ' . $has_image . '">
        <div class="jp-type-single">
            <div class="jp-gui jp-interface">
                <div class="jp-time-holder">
                    <div class="jp-current-time"></div>
                    <div class="jp-duration"></div>
                </div>

                <div class="jp-progress">
                    <div class="jp-seek-bar">
                        <div class="jp-play-bar"></div>
                    </div>
                </div>
                <div class="jp-volume-bar">
                    <i class="mk-moon-volume-mute"></i><div class="inner-value-adjust"><div class="jp-volume-bar-value"></div></div>
Esempio n. 22
0
<?php

extract(shortcode_atts(array('heading_title' => '', 'image_diameter' => 770, 'image_height' => 350, 'src' => '', 'animation' => '', 'link' => '', 'visibility' => '', 'el_class' => ''), $atts));
require_once THEME_FUNCTIONS . "/bfi_cropping.php";
$image_src = bfi_thumb($src, array('width' => $image_diameter, 'height' => $image_diameter));
$animation_css = '';
if ($animation != '') {
    $animation_css = 'mk-animate-element ' . $animation . ' ';
}
$output .= '<div class="mk-circle-image  mk-shortcode ' . $visibility . ' ' . $animation_css . $el_class . '">';
if (!empty($heading_title)) {
    $output .= '<h3 class="mk-shortcode mk-fancy-title pattern-style mk-shortcode-heading"><span>' . $heading_title . '</span></h3>';
}
$output .= '<span class="item-holder">';
if ($link) {
    $output .= '<a href="' . $link . '"><img alt="' . $heading_title . '" title="' . $heading_title . '" src="' . $image_src . '" /></a>';
} else {
    $output .= '<img alt="' . $heading_title . '" title="' . $heading_title . '" src="' . mk_thumbnail_image_gen($image_src, $image_diameter, $image_diameter) . '" />';
}
$output .= '</span></div><div class="clearboth"></div>';
echo $output;
Esempio n. 23
0
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;
}
Esempio n. 24
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-grid-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 . '>';
            $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 .= '</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 .= '<i class="mk-li-portfolio blog-grid-hover-icon"></i>';
            $output .= '<div class="image-hover-overlay"></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&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();
            the_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;
}
Esempio n. 25
0
if ($r->have_posts()) {
    while ($r->have_posts()) {
        $r->the_post();
        if ($i == 0) {
            $image_width = $grid_width * 0.4 - 8;
            $item_class = 'full-item';
        } else {
            $image_width = $grid_width * 0.2 - 8;
            $item_class = 'half-item';
        }
        $output .= '<article id="entry-' . get_the_ID() . '" class="blog-teaser-side-item ' . $item_class . '"><div class="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="thumb-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 .= '<div class="image-hover-overlay"></div>';
            $output .= '</a></div>';
        }
        $output .= '<div class="blog-meta">';
        $output .= '<h2 class="blog-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
        $output .= '<div class="blog-categories">' . get_the_category_list(', ') . '</div>';
        $output .= '<div class="clearboth"></div></div>';
        $output .= '</div></article>';
        $i++;
    }
}
$output .= '</div>';
$output .= '</section><div class="clearboth"></div>';
wp_reset_postdata();
echo $output;
Esempio n. 26
0
 function mk_post_type_featured_image($post_type, $width, $height, $el_class = false)
 {
     if (get_the_post_thumbnail() != '') {
         $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' => $width, 'height' => $height));
         $output = '<div class="' . $post_type . '-featured-image ' . $el_class . '">';
         $output .= '<img alt="' . get_the_title() . '" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, $width, $height) . '" height="' . $height . '" width="' . $width . '" />';
         $output .= '</div>';
         echo $output;
     }
 }
Esempio n. 27
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>';
    }
    $output .= '<div class="portfolio-categories">' . implode(', ', $terms_name) . ' </div>';
    if ($disable_excerpt == 'true') {
        $output .= '<p class="the-excerpt">' . get_the_excerpt() . '</p>';
    }
    $output .= '</div>';
    $output .= '<div class="clearboth"></div></div></article>' . "\n\n\n";
    return $output;
}
Esempio n. 28
0
function mk_portfolio_masonry_loop(&$r, $atts)
{
    global $post;
    extract($atts);
    global $mk_options;
    $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[] = '<span>' . $term->name . '</span>';
        }
    }
    $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);
    $hover_overlay_value = get_post_meta($post->ID, '_hover_skin', true);
    $hover_overlay = !empty($hover_overlay_value) ? ' style="background-color:' . $hover_overlay_value . '"' : '';
    $column = get_post_meta(get_the_ID(), '_masonry_img_size', true);
    $column = !empty($column) ? $column : 'x_x';
    switch ($column) {
        case 'x_x':
            $width = 300;
            $height = 300;
            break;
        case 'two_x_x':
            //
            $width = 600 + $grid_spacing;
            $height = 300;
            break;
        case 'three_x_x':
            $width = 900 + $grid_spacing * 2;
            $height = 300;
            break;
        case 'four_x_x':
            $width = 1200 + $grid_spacing * 3;
            $height = 300;
            break;
        case 'x_two_x':
            $width = 300;
            $height = 600 + $grid_spacing;
            break;
        case 'two_x_two_x':
            $width = 600 + $grid_spacing;
            $height = 600 + $grid_spacing;
            break;
        case 'three_x_two_x':
            $width = 900 + $grid_spacing * 2;
            $height = 600 + $grid_spacing;
            break;
        case 'four_x_two_x':
            $width = 1200 + $grid_spacing * 3;
            $height = 600 + $grid_spacing;
            break;
        default:
            $width = 300;
            $height = 300;
            break;
    }
    $lightbox_full_size = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', 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 ($ajax == 'true' || empty($permalink)) {
        $permalink = get_permalink();
    }
    $output .= '<article id="' . get_the_ID() . '" class="mk-portfolio-item mk-portfolio-masonry-item masonry-' . $item_id . ' mk-isotop-item  ' . $hover_scenarios . '-hover size_' . $column . ' portfolio-' . $post_type . ' ' . implode(' ', $terms_slug) . '"
                 style="border-top-width:0;
                        border-right-width:' . $grid_spacing / 2 . 'px;
                        border-bottom-width:' . $grid_spacing . 'px;
                        border-left-width:' . $grid_spacing / 2 . 'px;
                        border-style: solid;
                        border-color: transparent;
                        box-sizing: border-box;
                        " >';
    // $output .= '<article id="' . get_the_ID() . '" class="mk-portfolio-item mk-portfolio-masonry-item masonry-'.$item_id.' mk-isotop-item  ' . $hover_scenarios . '-hover size_' . $column . ' portfolio-' . $post_type . ' ' . implode(' ', $terms_slug) . '">';
    $image_src_array = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full', true);
    $image_src = bfi_thumb($image_src_array[0], array('width' => $width * $image_quality, 'height' => $height * $image_quality));
    $item_bg_color_value = get_post_meta($post->ID, '_hover_skin', true);
    $item_bg_color = !empty($item_bg_color_value) ? ' background-color:' . $item_bg_color_value . '!important' : '';
    $output .= '<div class="item-holder">';
    // $output .= '<div style="margin:0 ' . ($grid_spacing / 2) . 'px ' . $grid_spacing . 'px;" class="item-holder">';
    //$output .= ($hover_scenarios == 'fadebox' || $hover_scenarios == 'none') ? '<a class="project-load" data-post-id="' . get_the_ID() . '" href="' . $permalink . '">' : '';
    $output .= '<div class="featured-image">';
    $output .= '<img alt="' . get_the_title() . '" class="item-featured-image" title="' . get_the_title() . '" src="' . mk_thumbnail_image_gen($image_src, $width, $height) . '" itemprop="image" />';
    if ($hover_scenarios == 'fadebox') {
        $output .= '<div class="hover-overlay gradient"' . $hover_overlay . '></div>';
    } else {
        if ($hover_scenarios == 'zoomout') {
            $output .= '<div class="image-hover-overlay" style="' . $item_bg_color . '"></div>';
        } else {
            $output .= '<div class="image-hover-overlay"></div>';
        }
    }
    if ($hover_scenarios == 'fadebox') {
        $output .= '<div class="grid-hover-icons">';
        if ($disable_permalink == 'true') {
            $output .= '<a class="permalink-badge project-load" data-fancybox-group="portfolio-grid" data-post-id="' . get_the_ID() . '" rel="portfolio-grid" target="' . $target . '" href="' . $permalink . '"><i class="mk-jupiter-icon-arrow-circle"></i></a>';
        }
        if ($post_type == 'image' || $post_type == '') {
            if ($disable_zoom_link == 'true') {
                $output .= '<a rel="portfolio-grid" title="' . get_the_title() . '" data-fancybox-group="portfolio-masonry-item" class="zoom-badge mk-lightbox" href="' . $image_src_array[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' : '') . '://vimeo.com/' . $video_id . '?autoplay=0';
                } elseif ($video_site == 'youtube') {
                    $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.youtube.com/watch?v=' . $video_id . '?autoplay=0';
                } elseif ($video_site == 'dailymotion') {
                    $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/video/' . $video_id . '?logo=0';
                }
                if ($disable_zoom_link == 'true') {
                    $output .= '<a title="' . get_the_title() . '" class="video-badge mk-lightbox" data-fancybox-group="portfolio-masonry-item" href="' . $video_url . '"><i class="mk-jupiter-icon-plus-circle"></i></a>';
                }
            }
        }
        $output .= '</div>';
    }
    if ($hover_scenarios == 'light-zoomin') {
        $output .= '<div class="grid-hover-icons">';
        if ($disable_permalink == 'true') {
            $output .= '<a class="permalink-badge project-load" data-fancybox-group="portfolio-grid" data-post-id="' . get_the_ID() . '" rel="portfolio-grid" target="' . $target . '" href="' . $permalink . '"><i class="mk-jupiter-icon-arrow-circle"></i></a>';
        }
        if ($post_type == 'image' || $post_type == '') {
            if ($disable_zoom_link == 'true') {
                $output .= '<a rel="portfolio-grid" title="' . get_the_title() . '" data-fancybox-group="portfolio-masonry-item" class="zoom-badge mk-lightbox" href="' . $image_src_array[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' : '') . '://vimeo.com/' . $video_id . '?autoplay=0';
                } elseif ($video_site == 'youtube') {
                    $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.youtube.com/watch?v=' . $video_id . '?autoplay=0';
                } elseif ($video_site == 'dailymotion') {
                    $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/video/' . $video_id . '?logo=0';
                }
                if ($disable_zoom_link == 'true') {
                    $output .= '<a title="' . get_the_title() . '" class="video-badge mk-lightbox" data-fancybox-group="portfolio-masonry-item" href="' . $video_url . '"><i class="mk-jupiter-icon-plus-circle"></i></a>';
                }
            }
        }
        $output .= '</div>';
    }
    if ($hover_scenarios != 'fadebox' && $hover_scenarios != 'light-zoomin' && $hover_scenarios != 'none') {
        $output .= '<div class="grid-hover-icons">';
        if ($disable_permalink == 'true') {
            $output .= '<a class="permalink-badge project-load" data-fancybox-group="portfolio-grid" data-post-id="' . get_the_ID() . '" rel="portfolio-grid" target="' . $target . '" href="' . $permalink . '"><i class="mk-jupiter-icon-arrow-circle"></i></a>';
        }
        if ($post_type == 'image' || $post_type == '') {
            if ($disable_zoom_link == 'true') {
                $output .= '<a data-fancybox-group="portfolio-grid" title="' . get_the_title() . '" class="zoom-badge mk-lightbox" 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' : '') . '://vimeo.com/' . $video_id . '?autoplay=0';
                } elseif ($video_site == 'youtube') {
                    $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.youtube.com/watch?v=' . $video_id . '?autoplay=0';
                } elseif ($video_site == 'dailymotion') {
                    $video_url = 'http' . (is_ssl() ? 's' : '') . '://www.dailymotion.com/video/' . $video_id . '?logo=0';
                }
                if ($disable_zoom_link == 'true') {
                    $output .= '<a title="' . get_the_title() . '" class="video-badge mk-lightbox" href="' . $video_url . '"><i class="mk-jupiter-icon-plus-circle"></i></a>';
                }
            }
        }
        $output .= '</div>';
    }
    if ($hover_scenarios != 'none') {
        $output .= $hover_scenarios == 'slidebox' ? '<div class="portfolio-meta"' . $hover_overlay . '>' : '<div class="portfolio-meta">';
        $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>';
        }
        $output .= '</div><!-- Portfolio meta -->';
    }
    $output .= '</div><!-- Featured Image -->';
    //$output .= ($hover_scenarios == 'fadebox' || $hover_scenarios == 'none') ? '</a><!-- project load -->' : '';
    $output .= '</div>';
    $output .= '</article>' . "\n\n\n";
    return $output;
}
Esempio n. 29
0
 $social_output = '<ul class="mk-tab-slider-share" style="">';
 if ($share_button == "true") {
     $social_output .= '<li><a class="facebook-share" data-title="' . $title . '" data-url="' . $page_permalink . '" href="#"><i class="mk-icon-facebook"></i></a></li>';
     $social_output .= '<li><a class="twitter-share" data-title="' . $title . '" data-url="' . $page_permalink . '" href="#"><i class="mk-moon-twitter"></i></a></li>';
     $social_output .= '<li><a class="googleplus-share" data-title="' . $title . '" data-url="' . $page_permalink . '" href="#"><i class="mk-icon-google-plus"></i></a></li>';
 }
 $social_output .= '</ul>';
 $output .= '<div id="' . $id . '" class="mk-tab-slider-item float-' . $image_align . ' skin-' . $skin_color . '" style="background-color:' . $content_background . ';">';
 if ($image_align == 'left') {
     $output .= '<div class="mk-slider-image">';
     $output .= '<img src="' . mk_thumbnail_image_gen($image_src_array[0], false, false) . '" alt="" />';
     $output .= '</div>';
     $output .= '<div class="mk-slider-content" style="float:right;">';
 } else {
     $output .= '<div class="mk-slider-image">';
     $output .= '<img src="' . mk_thumbnail_image_gen($image_src_array[0], false, false) . '" alt="" />';
     $output .= '</div>';
     $output .= '<div class="mk-slider-content" style="float:left;">';
 }
 $output .= '<div class="mk-slider-content-inside">';
 $output .= '<h3 class="mk-slider-title"><span>' . $title . '</span><hr /></h3>';
 $output .= '<div class="mk-slider-description">' . wpb_js_remove_wpautop($desc, true) . '</div>';
 if ($skin_color == 'dark') {
     $output .= !empty($button_url) ? do_shortcode('[mk_button dimension="outline" corner_style="pointed" outline_skin="dark" size="medium" align="left" url="' . $button_url . '" el_class="mk-slider-read-more"]' . $button_text . '[/mk_button]') : '';
 } else {
     $output .= !empty($button_url) ? do_shortcode('[mk_button dimension="outline" corner_style="pointed" outline_skin="light" size="medium" align="left" url="' . $button_url . '" el_class="mk-slider-read-more"]' . $button_text . '[/mk_button]') : '';
 }
 $output .= $social_output;
 $output .= '</div>';
 $output .= '</div>';
 $output .= '</div>';
Esempio n. 30
0
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;
}