当前位置: 首页>>代码示例>>PHP>>正文


PHP mk_thumbnail_image_gen函数代码示例

本文整理汇总了PHP中mk_thumbnail_image_gen函数的典型用法代码示例。如果您正苦于以下问题:PHP mk_thumbnail_image_gen函数的具体用法?PHP mk_thumbnail_image_gen怎么用?PHP mk_thumbnail_image_gen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了mk_thumbnail_image_gen函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: blog_thumbnail_style

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;
}
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:59,代码来源:thumbnail.php

示例2: mk_get_attachment_id_from_url

    $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)) {
开发者ID:namleduc,项目名称:thqc,代码行数:31,代码来源:mk_image.php

示例3: extract

<?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;
开发者ID:namleduc,项目名称:thqc,代码行数:27,代码来源:mk_swipe_slideshow.php

示例4: while

    $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 = '';
开发者ID:kaydwithers,项目名称:crossfittanjongpagar,代码行数:31,代码来源:mk_clients.php

示例5: get_the_excerpt

                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;
开发者ID:namleduc,项目名称:thqc,代码行数:31,代码来源:mk_blog_carousel.php

示例6: mk_news_loop

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" />';
            }
//.........这里部分代码省略.........
开发者ID:boozzywoozzy,项目名称:tvoya-peremoga,代码行数:101,代码来源:news-loop.php

示例7: get_post_meta

        $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>';
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:31,代码来源:mk_testimonials.php

示例8: get_the_terms

 }
 $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 {
开发者ID:kaydwithers,项目名称:crossfittanjongpagar,代码行数:31,代码来源:mk_portfolio_carousel.php

示例9: blog_magazine_style

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>';
        }
//.........这里部分代码省略.........
开发者ID:namleduc,项目名称:thqc,代码行数:101,代码来源:magazine.php

示例10: get_the_title

 }
 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') {
开发者ID:kaydwithers,项目名称:crossfittanjongpagar,代码行数:31,代码来源:mk_employees.php

示例11: uniqid

    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;
开发者ID:kaydwithers,项目名称:crossfittanjongpagar,代码行数:31,代码来源:mk_lcd_slideshow.php

示例12: while

    $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 . ' -->';
开发者ID:kaydwithers,项目名称:crossfittanjongpagar,代码行数:31,代码来源:mk_slideshow_box.php

示例13: extract

<?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;
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:27,代码来源:mk_swipe_slideshow.php

示例14: function

										},
										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>
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:31,代码来源:single.php

示例15: bfi_thumb

                $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 
开发者ID:namleduc,项目名称:thqc,代码行数:31,代码来源:content-product.php


注:本文中的mk_thumbnail_image_gen函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。