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


PHP print_thumbnail函数代码示例

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


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

示例1: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? 'Photostream' : $instance['title']);
        $posts_number = empty($instance['posts_number']) ? '' : $instance['posts_number'];
        $blog_category = empty($instance['blog_category']) ? '' : $instance['blog_category'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
	<div class="photostream clearfix">
		<?php 
        query_posts("showposts=" . $posts_number . "&cat=" . $blog_category);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>
			
				<?php 
                $thumb = '';
                $width = 67;
                $height = 67;
                $classtext = 'post-thumb';
                $titletext = get_the_title();
                $thumbnail = get_thumbnail($width, $height, $classtext, $titletext, $titletext, false, 'Entry');
                $thumb = $thumbnail["thumb"];
                ?>
			
				<div class="thumb">
					<a href="<?php 
                the_permalink();
                ?>
">
						<?php 
                print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext);
                ?>
						<span class="overlay"></span>
					</a>
				</div> 	<!-- end .post-thumbnail -->
		<?php 
            }
        }
        wp_reset_query();
        ?>
	</div> <!-- end .photostream -->
<?php 
        echo $after_widget;
    }
开发者ID:natduffy,项目名称:wp-sandbox,代码行数:49,代码来源:widget-photostream.php

示例2: bt_slides_funcs

 function bt_slides_funcs($atts, $content)
 {
     extract(shortcode_atts(array('id' => '0', 'type' => 'carousel', 'auto' => '0'), $atts));
     if ((int) $id <= 0) {
         return '';
     }
     $_rand_id = 'carousel_' . rand();
     $portfolio_sliders = get_post_meta($id, THEME_SLUG . '_portfolio_slider', true);
     $portfolio_sliders = unserialize($portfolio_sliders);
     $portfolio_slider_config = get_post_meta($id, THEME_SLUG . '_portfolio_slider_config', true);
     $portfolio_slider_config = unserialize($portfolio_slider_config);
     if (is_array($portfolio_slider_config) && count($portfolio_slider_config) > 0) {
         $portfolio_slider_config_width = (int) $portfolio_slider_config['portfolio_slider_config_width'];
         $portfolio_slider_config_height = (int) $portfolio_slider_config['portfolio_slider_config_height'];
     }
     $control_html = $slides_html = '';
     $active_class = "active";
     foreach ($portfolio_sliders as $index => $_this_slider) {
         $img_html = '';
         $crop_img = $_this_slider['image_url'];
         if ($portfolio_slider_config_width > 0) {
             $img_html .= " width=\"{$portfolio_slider_config_width}\"";
             $crop_img = print_thumbnail($_this_slider['image_url'], true, '', $portfolio_slider_config_width, '', '', false, true);
         }
         if ($portfolio_slider_config_height > 0) {
             $img_html .= " height=\"{$portfolio_slider_config_height}\"";
             $crop_img = print_thumbnail($_this_slider['image_url'], true, '', '', $portfolio_slider_config_height, '', false, true);
         }
         if ($portfolio_slider_config_height > 0 && $portfolio_slider_config_width > 0) {
             $crop_img = print_thumbnail($_this_slider['image_url'], true, '', $portfolio_slider_config_width, $portfolio_slider_config_height, '', false, true);
         }
         $control_html .= "<li data-target=\"#{$_rand_id}\" data-slide-to=\"{$index}\" class=\"{$active_class}\"></li>";
         $slides_html .= "\n\t\t\t\t<div class=\"item {$active_class}\">\n\t\t\t\t\t\t<img src=\"{$crop_img}\" alt=\"{$_this_slider['alt']}\" title=\"{$_this_slider['title']}\" {$img_html}>\n                    <div class=\"carousel-caption\">\n\t\t\t\t\t\t<a href=\"{$_this_slider['url']}\"><h4>{$_this_slider['slide_title']}</h4></a>\n\t\t\t\t\t\t<p>{$_this_slider['slide_content']}</p>\n                    </div>\n                </div>";
         $active_class = '';
     }
     $control_html = "<ol class=\"carousel-indicators\">" . $control_html . "</ol>";
     $slides_html = "<div class=\"carousel-inner\">" . $slides_html . "</div>";
     $end_html = "\n\t\t    <a class=\"left carousel-control\" href=\"#{$_rand_id}\" data-slide=\"prev\">&lsaquo;</a>\n            <a class=\"right carousel-control\" href=\"#{$_rand_id}\" data-slide=\"next\">&rsaquo;</a>\n\t\t";
     $result = "<div class='carousel slide' id='{$_rand_id}'>{$control_html}{$slides_html}{$end_html}</div>";
     return $result;
 }
开发者ID:mynein,项目名称:myne,代码行数:41,代码来源:bt_carousel.php

示例3: print_thumbnail

<?php 
}
?>
</div> <!-- end #featured -->

<div id="controllers" class="clearfix">
	<ul>
		<?php 
for ($i = 0; $i < $featured_num; $i++) {
    ?>
			<li>
				<div class="controller">
					<a href="#"<?php 
    if ($i == 0) {
        echo ' class="active"';
    }
    ?>
>
						<?php 
    print_thumbnail($arr[$i]['thumbnail']['thumb'], $arr[$i]['thumbnail']["use_timthumb"], $arr[$i]['titletext'], $small_width, $small_height);
    ?>
						<span class="overlay"></span>
					</a>
				</div>	
			</li>
		<?php 
}
?>
	</ul>
	<div id="active_item"></div>
</div> <!-- end #controllers -->
开发者ID:natduffy,项目名称:wp-sandbox,代码行数:31,代码来源:featured.php

示例4: shortcode_callback


//.........这里部分代码省略.........
                $no_thumb_class = '' === $thumb || 'off' === $show_thumbnail ? ' et_pb_no_thumb' : '';
                if (in_array($post_format, array('video', 'gallery'))) {
                    $no_thumb_class = '';
                }
                ?>

			<article id="post-<?php 
                the_ID();
                ?>
" <?php 
                post_class('et_pb_post clearfix' . $no_thumb_class . $overlay_class);
                ?>
>

			<?php 
                et_divi_post_format_content();
                if (!in_array($post_format, array('link', 'audio', 'quote'))) {
                    if ('video' === $post_format && false !== ($first_video = et_get_first_video())) {
                        printf('<div class="et_main_video_container">
								%1$s
							</div>', $first_video);
                    } elseif ('gallery' === $post_format) {
                        et_pb_gallery_images('slider');
                    } elseif ('' !== $thumb && 'on' === $show_thumbnail) {
                        if ('on' !== $fullwidth) {
                            echo '<div class="et_pb_image_container">';
                        }
                        ?>
							<a href="<?php 
                        esc_url(the_permalink());
                        ?>
" class="entry-featured-image-url">
								<?php 
                        print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height);
                        ?>
								<?php 
                        if ('on' === $use_overlay) {
                            echo $overlay_output;
                        }
                        ?>
							</a>
					<?php 
                        if ('on' !== $fullwidth) {
                            echo '</div> <!-- .et_pb_image_container -->';
                        }
                    }
                }
                ?>

			<?php 
                if ('off' === $fullwidth || !in_array($post_format, array('link', 'audio', 'quote'))) {
                    ?>
				<?php 
                    if (!in_array($post_format, array('link', 'audio'))) {
                        ?>
					<h2 class="entry-title"><a href="<?php 
                        esc_url(the_permalink());
                        ?>
"><?php 
                        the_title();
                        ?>
</a></h2>
				<?php 
                    }
                    ?>
开发者ID:pacificano,项目名称:pacificano,代码行数:66,代码来源:main-modules.php

示例5: shortcode_callback


//.........这里部分代码省略.........
                the_permalink();
                ?>
';" style="cursor:pointer;" id="post-<?php 
                the_ID();
                ?>
"  class="new-post  <?php 
                $cat_color = get_the_category();
                echo $cat_color[1]->slug;
                echo ' ';
                ?>
"<?php 
                post_class('et_pb_post' . $no_thumb_class);
                ?>
>
			<?php 
                et_divi_post_format_content();
                if (!in_array($post_format, array('link', 'audio', 'quote'))) {
                    if ('video' === $post_format && false !== ($first_video = et_get_first_video())) {
                        printf('<div class="et_main_video_container">
								%1$s
							</div>', $first_video);
                    } elseif ('gallery' === $post_format) {
                        et_pb_gallery_images('slider');
                    } elseif ('' !== $thumb && 'on' === $show_thumbnail) {
                        if ('on' !== $fullwidth) {
                            echo '<div class="et_pb_image_container">';
                        }
                        ?>
							<a href="<?php 
                        the_permalink();
                        ?>
">
								<?php 
                        print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height);
                        ?>
							</a>
					<?php 
                        if ('on' !== $fullwidth) {
                            echo '</div> <!-- .et_pb_image_container -->';
                        }
                    }
                }
                ?>

			<?php 
                if ('off' === $fullwidth || !in_array($post_format, array('link', 'audio', 'quote'))) {
                    ?>
				<?php 
                    if (!in_array($post_format, array('link', 'audio'))) {
                        ?>
					<h2 class="entry-title"><a href="<?php 
                        the_permalink();
                        ?>
"><?php 
                        the_title();
                        ?>
</a></h2>
				<?php 
                    }
                    ?>

				<?php 
                    if ('on' === $show_author || 'on' === $show_date || 'on' === $show_categories || 'on' === $show_comments) {
                        printf('<p class="post-meta"> %2$s %3$s %4$s %5$s %6$s </p>', 'on' === $show_author ? sprintf(__('by %s', 'et_builder'), '<span class="author vcard">' . et_pb_get_the_author_posts_link() . '</span>') : '', 'on' === $show_author && 'on' === $show_date ? '  ' : '  ', 'on' === $show_date ? sprintf(__('%s', 'et_builder'), '<span class="published">' . get_the_date('j F') . '</span>') : '  ', ('on' === $show_author || 'on' === $show_date) && 'on' === $show_categories ? '  ~  ' : '', 'on' === $show_categories ? get_the_category_list(' | ') : '   ', ('on' === $show_author || 'on' === $show_date || 'on' === $show_categories) && 'on' === $show_comments ? '  ' : '  ', 'on' === $show_comments ? sprintf(_nx('1 Comment', '%s Comments', get_comments_number(), 'number of comments', 'et_builder'), number_format_i18n(get_comments_number())) : '  ');
                    }
                    $post_content = get_the_content();
开发者ID:skonina,项目名称:M20_masonry,代码行数:67,代码来源:main-modules.php

示例6: get_the_ID

    $post_id = get_the_ID();
    $slide_more_link = get_post_meta($post_id, '_et_slide_more_link', true);
    $more_link = '' != $slide_more_link ? $slide_more_link : get_permalink();
    $width = (int) apply_filters('et_slider_image_width', 539);
    $height = (int) apply_filters('et_slider_image_height', 480);
    $title = get_the_title();
    $thumbnail = get_thumbnail($width, $height, '', $title, $title, false, 'Featured');
    $thumb = $thumbnail["thumb"];
    ?>
		<div class="et-slide">
			<a href="<?php 
    echo esc_url($more_link);
    ?>
">
				<?php 
    print_thumbnail($thumb, $thumbnail["use_timthumb"], $title, $width, $height, 'et-main-image');
    ?>
			</a>

			<div class="et-description">
				<h2><a href="<?php 
    echo esc_url($more_link);
    ?>
"><?php 
    the_title();
    ?>
</a></h2>
				<p><?php 
    truncate_post(170);
    ?>
</p>
开发者ID:Rehabescapi,项目名称:GVSU-Senior-Project-Hola,代码行数:31,代码来源:featured.php

示例7: while

            while (have_posts()) {
                the_post();
                ?>

						<?php 
                $width = 207;
                $height = 136;
                $titletext = get_the_title();
                $thumbnail = get_thumbnail($width, $height, 'portfolio', $titletext, $titletext, true, 'Portfolio');
                $thumb = $thumbnail["thumb"];
                ?>

						<div class="et_pt_gallery_entry">
							<div class="et_pt_item_image">
								<?php 
                print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, 'portfolio');
                ?>
								<span class="overlay"></span>

								<a class="zoom-icon fancybox" title="<?php 
                the_title_attribute();
                ?>
" rel="gallery" href="<?php 
                echo $thumbnail['fullpath'];
                ?>
"><?php 
                esc_html_e('Zoom in', 'MyCuisine');
                ?>
</a>
								<a class="more-icon" href="<?php 
                the_permalink();
开发者ID:javierdlahoz,项目名称:paella-development,代码行数:31,代码来源:page-gallery.php

示例8: et_show_ajax_project

function et_show_ajax_project()
{
    global $wp_embed;
    $project_id = (int) $_POST['et_project_id'];
    $portfolio_args = array('post_type' => 'project', 'p' => $project_id);
    $portfolio_query = new WP_Query(apply_filters('et_ajax_portfolio_args', $portfolio_args));
    while ($portfolio_query->have_posts()) {
        $portfolio_query->the_post();
        global $post;
        $width = (int) apply_filters('et_ajax_media_width', 600);
        $height = (int) apply_filters('et_ajax_media_height', 480);
        $titletext = get_the_title();
        $media = get_post_meta(get_the_ID(), '_et_used_images', true);
        echo '<div class="et_media">';
        if ($media) {
            echo '<div class="flexslider"><ul class="slides">';
            foreach ((array) $media as $et_media) {
                echo '<li class="slide">';
                if (is_numeric($et_media)) {
                    $et_fullimage_array = wp_get_attachment_image_src($et_media, 'full');
                    if ($et_fullimage_array) {
                        $et_fullimage = $et_fullimage_array[0];
                        echo '<img src="' . esc_attr(et_new_thumb_resize(et_multisite_thumbnail($et_fullimage), $width, $height, '', true)) . '" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" alt="' . esc_attr($titletext) . '" />';
                    }
                } else {
                    $video_embed = apply_filters('the_content', $wp_embed->shortcode('', esc_url($et_media)));
                    $video_embed = preg_replace('/<embed /', '<embed wmode="transparent" ', $video_embed);
                    $video_embed = preg_replace('/<\\/object>/', '<param name="wmode" value="transparent" /></object>', $video_embed);
                    $video_embed = preg_replace("/height=\"[0-9]*\"/", "height={$height}", $video_embed);
                    $video_embed = preg_replace("/width=\"[0-9]*\"/", "width={$width}", $video_embed);
                    echo $video_embed;
                }
                echo '</li>';
            }
            echo '</ul></div>';
        } else {
            $thumb = '';
            $classtext = '';
            $titletext = get_the_title();
            $thumbnail = get_thumbnail($width, $height, $classtext, $titletext, $titletext, false, 'Ajaximage');
            $thumb = $thumbnail["thumb"];
            echo '<a href="' . esc_url(get_permalink()) . '">';
            print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext);
            echo '</a>';
        }
        echo '</div> <!-- end .et_media -->';
        echo '<div class="et_media_description">' . '<h2 class="title">' . '<a href="' . get_permalink() . '">' . get_the_title() . '</a>' . '</h2>' . truncate_post(560, false);
        echo '</div> <!-- end .et_media_description -->';
        echo '<a class="more" href="' . get_permalink() . '">' . __('More info &raquo;', 'Flexible') . '</a>';
    }
    wp_reset_postdata();
    die;
}
开发者ID:AttyC,项目名称:elizafilby,代码行数:53,代码来源:functions.php

示例9: esc_html_e

        esc_html_e('Read More', 'Fusion');
    }
    ?>
					</a>
				</div> <!-- .description -->

			<?php 
    $width = (int) apply_filters('slider_image_width', 535);
    $height = (int) apply_filters('slider_image_height', 572);
    $title = get_the_title();
    $thumbnail = get_thumbnail($width, $height, '', $title, $title, false, 'Featured');
    $thumb = $thumbnail["thumb"];
    ?>
				<div class="featured-image">
					<a href="<?php 
    the_permalink();
    ?>
"><?php 
    print_thumbnail($thumb, $thumbnail["use_timthumb"], $title, $width, $height, '');
    ?>
</a>
				</div> <!-- .featured-image -->
			</div> <!-- .container -->
		</div> <!-- .et-slide -->
	<?php 
}
wp_reset_postdata();
?>

	</div> <!-- #et-slides -->
</div> <!-- #et-slider-wrapper -->
开发者ID:iinspiration,项目名称:theme,代码行数:31,代码来源:featured.php

示例10: shortcode_callback

    function shortcode_callback($atts, $content = null, $function_name)
    {
        $module_id = $this->shortcode_atts['module_id'];
        $module_class = $this->shortcode_atts['module_class'];
        $fullwidth = $this->shortcode_atts['fullwidth'];
        $posts_number = $this->shortcode_atts['posts_number'];
        $include_categories = $this->shortcode_atts['include_categories'];
        $show_title = $this->shortcode_atts['show_title'];
        $show_categories = $this->shortcode_atts['show_categories'];
        $show_pagination = $this->shortcode_atts['show_pagination'];
        $background_layout = $this->shortcode_atts['background_layout'];
        $zoom_icon_color = $this->shortcode_atts['zoom_icon_color'];
        $hover_overlay_color = $this->shortcode_atts['hover_overlay_color'];
        $hover_icon = $this->shortcode_atts['hover_icon'];
        global $paged;
        $module_class = ET_Builder_Element::add_module_order_class($module_class, $function_name);
        if ('' !== $zoom_icon_color) {
            ET_Builder_Element::set_style($function_name, array('selector' => '%%order_class%% .et_overlay:before', 'declaration' => sprintf('color: %1$s !important;', esc_html($zoom_icon_color))));
        }
        if ('' !== $hover_overlay_color) {
            ET_Builder_Element::set_style($function_name, array('selector' => '%%order_class%% .et_overlay', 'declaration' => sprintf('background-color: %1$s;', esc_html($hover_overlay_color))));
        }
        $container_is_closed = false;
        $args = array('posts_per_page' => (int) $posts_number, 'post_type' => 'staff');
        $et_paged = is_front_page() ? get_query_var('page') : get_query_var('paged');
        if (is_front_page()) {
            $paged = $et_paged;
        }
        if ('' !== $include_categories) {
            $args['tax_query'] = array(array('taxonomy' => 'project_category', 'field' => 'id', 'terms' => explode(',', $include_categories), 'operator' => 'IN'));
        }
        if (!is_search()) {
            $args['paged'] = $et_paged;
        }
        $main_post_class = sprintf('et_pb_portfolio_item%1$s', 'on' !== $fullwidth ? ' et_pb_grid_item' : '');
        ob_start();
        query_posts($args);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>

				<div id="post-<?php 
                the_ID();
                ?>
" <?php 
                post_class($main_post_class);
                ?>
>

			<?php 
                $thumb = '';
                $width = 'on' === $fullwidth ? 1080 : 400;
                $width = (int) apply_filters('et_pb_portfolio_image_width', $width);
                $height = 'on' === $fullwidth ? 9999 : 284;
                $height = (int) apply_filters('et_pb_portfolio_image_height', $height);
                $classtext = 'on' === $fullwidth ? 'et_pb_post_main_image' : '';
                $titletext = get_the_title();
                $thumbnail = get_thumbnail($width, $height, $classtext, $titletext, $titletext, false, 'Blogimage');
                $thumb = $thumbnail["thumb"];
                if ('' !== $thumb) {
                    ?>
					<a href="<?php 
                    the_permalink();
                    ?>
">
					<?php 
                    if ('on' !== $fullwidth) {
                        ?>
						<span class="et_portfolio_image">
					<?php 
                    }
                    ?>
							<?php 
                    print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height);
                    ?>
					<?php 
                    if ('on' !== $fullwidth) {
                        $data_icon = '' !== $hover_icon ? sprintf(' data-icon="%1$s"', esc_attr(et_pb_process_font_icon($hover_icon))) : '';
                        printf('<span class="et_overlay%1$s"%2$s></span>', '' !== $hover_icon ? ' et_pb_inline_icon' : '', $data_icon);
                        ?>
						</span>
					<?php 
                    }
                    ?>
					</a>
			<?php 
                }
                ?>

				<?php 
                if ('on' === $show_title) {
                    ?>
					<h2><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a></h2>
//.........这里部分代码省略.........
开发者ID:GrowDesign,项目名称:GD-staff,代码行数:101,代码来源:gd-staff.php

示例11: print_thumbnail

				
				<?php 
for ($i = 1; $i <= $featured_num; $i++) {
    ?>
					<div class="item<?php 
    if ($i == 1) {
        echo ' active';
    }
    if ($i == $featured_num) {
        echo ' last';
    }
    ?>
">
						<a href="#" class="product">
							<?php 
    print_thumbnail($arr[$i]["thumb_small"], $arr[$i]["use_timthumb"], $arr[$i]["fulltitle"], $width_small, $height_small);
    ?>
							<?php 
    if ($arr[$i]["price"] != '') {
        ?>
								<span class="tag"><span><?php 
        echo esc_html($arr[$i]["price"]);
        ?>
</span></span>
							<?php 
    }
    ?>
						</a>
					</div> <!-- .item -->
				<?php 
}
开发者ID:nimishavyas,项目名称:proiti,代码行数:30,代码来源:featured.php

示例12: recent_works_function

    function recent_works_function($atts, $content = false)
    {
        extract(shortcode_atts(array('count_items' => '10', 'show_items' => 4, 'gallery' => ''), $atts));
        wp_reset_query();
        $args = array('post_type' => 'portfolio', 'showposts' => $count_items);
        if (strlen($gallery) > 0) {
            $args = array('post_type' => 'portfolio', 'showposts' => $count_items, 'tax_query' => array(array('taxonomy' => 'gallery', 'field' => 'slug', 'terms' => $gallery)));
        }
        $num_count = count(query_posts($args));
        if (have_posts()) {
            $id_widget = 'recent-works-shortcode' . rand(0, 1000);
            ob_start();
            ?>
			
			<div id="<?php 
            echo $id_widget;
            ?>
" class="shortcode-recent-works flexslider">
				<div class="slider-div">
					<ul class="slides">
					<?php 
            $i = 0;
            while (have_posts()) {
                the_post();
                global $post;
                ?>
							<li class="item<?php 
                if ($i == 0) {
                    echo ' first';
                }
                if (++$i == $num_count) {
                    echo ' last';
                }
                ?>
">
								<?php 
                $thumb_arr = get_thumbnail(300, 170, '', get_the_title(), get_the_title());
                $thumb = $thumb_arr["fullpath"];
                $url_video = get_post_meta($post->ID, THEME_SLUG . 'video_portfolio', true);
                if (strlen(trim($url_video)) > 0) {
                    if (strstr($url_video, 'youtube.com') || strstr($url_video, 'youtu.be')) {
                        $thumburl = array(get_thumbnail_video_src($url_video, 500, 500));
                        $item_class = "thumb-video youtube-fancy";
                    }
                    if (strstr($url_video, 'vimeo.com')) {
                        $thumburl = array(wp_parse_thumbnail_vimeo(wp_parse_vimeo_link($url_video), 500, 500));
                        $item_class = "thumb-video vimeo-fancy";
                    }
                    $light_box_url = $url_video;
                } else {
                    $thumb = get_post_thumbnail_id($post->ID);
                    $thumburl = wp_get_attachment_image_src($thumb, 'full');
                    $item_class = "thumb-image";
                    $light_box_url = $thumburl[0];
                }
                ?>
								<div class="image <?php 
                echo $id_widget;
                ?>
">
									<a class="thumbnail" href="<?php 
                the_permalink();
                ?>
"><?php 
                echo print_thumbnail($thumburl[0], true, $post_title, 500, 330);
                ?>
</a>
									<div class="icons">
										<div>
											<a class="zoom-gallery fancybox" title="<?php 
                echo get_the_title();
                ?>
" rel="fancybox" href="<?php 
                echo $light_box_url;
                ?>
"></a>
											<a class="link-gallery " title="<?php 
                echo get_the_title();
                ?>
" href="<?php 
                echo get_permalink();
                ?>
"></a>
										</div>
									</div>	
								</div>
								<div class="detail<?php 
                if (!$thumb) {
                    echo ' noimage';
                }
                ?>
">
									<p class="title"><h4 class="heading-title"><a  class="wpt_title" href="<?php 
                echo get_permalink($post->ID);
                ?>
"><?php 
                echo get_the_title($post->ID);
                ?>
</a></h4></p>
									<span class="author-time"><span class="author"><?php 
//.........这里部分代码省略.........
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:101,代码来源:recent_post.php

示例13: print_thumbnail

<?php 
}
?>
</div> <!-- end #featured -->

<div id="controllers" class="clearfix">
	<ul>
		<?php 
for ($i = 0; $i < $featured_num; $i++) {
    ?>
			<li>
				<div class="controller">
					<a href="#"<?php 
    if ($i == 0) {
        echo ' class="active"';
    }
    ?>
>
						<?php 
    print_thumbnail(array('thumbnail' => $arr[$i]["thumbnail"]["thumb"], 'use_timthumb' => $arr[$i]["thumbnail"]["use_timthumb"], 'alttext' => $arr[$i]["titletext"], 'width' => (int) $small_width, 'height' => (int) $small_height, 'et_post_id' => $arr[$i]['post_id']));
    ?>
						<span class="overlay"></span>
					</a>
				</div>
			</li>
		<?php 
}
?>
	</ul>
	<div id="active_item"></div>
</div> <!-- end #controllers -->
开发者ID:damiansu,项目名称:wordpress-es,代码行数:31,代码来源:featured.php

示例14: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? 'Recent From ' : $instance['title']);
        $posts_number = empty($instance['posts_number']) ? '' : (int) $instance['posts_number'];
        $blog_category = empty($instance['blog_category']) ? '' : (int) $instance['blog_category'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
		<?php 
        query_posts("posts_per_page=" . $posts_number . "&cat=" . $blog_category);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>
			<div class="block-post clearfix">
				<?php 
                $thumb = '';
                $width = 40;
                $height = 40;
                $classtext = 'post-image';
                $titletext = get_the_title();
                $thumbnail = get_thumbnail($width, $height, $classtext, $titletext, $titletext, false, 'Recent');
                $thumb = $thumbnail["thumb"];
                ?>

				<?php 
                if ($thumb != '' && get_option('aggregate_thumbnails_index') == 'on') {
                    ?>
					<div class="thumb">
						<a href="<?php 
                    the_permalink();
                    ?>
">
							<?php 
                    print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext);
                    ?>
							<span class="overlay"></span>
						</a>
					</div> 	<!-- end .post-thumbnail -->
				<?php 
                }
                ?>

				<h3 class="title"><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a></h3>
				<p class="meta-info"><?php 
                esc_html_e('Posted', 'Aggregate');
                ?>
 <?php 
                esc_html_e('by', 'Aggregate');
                ?>
 <?php 
                the_author_posts_link();
                ?>
 <?php 
                esc_html_e('on', 'Aggregate');
                ?>
 <?php 
                the_time('n-j-y');
                ?>
</p>
			</div> <!-- end .block-post -->
		<?php 
            }
        }
        wp_reset_query();
        ?>

	<a href="<?php 
        echo esc_url(get_category_link($blog_category));
        ?>
" class="more"><span><?php 
        esc_html_e('More From ', 'Aggregate');
        echo get_categname($blog_category);
        ?>
</span></a>
<?php 
        echo $after_widget;
    }
开发者ID:damiansu,项目名称:wordpress-es,代码行数:87,代码来源:widget-fromblog.php

示例15: esc_attr

	
	<?php 
for ($i = 1; $i <= $featured_num; $i++) {
    ?>
		<div class="slide<?php 
    if ($i == 1) {
        echo ' active';
    }
    ?>
" style="background: <?php 
    if ($arr[$i]["color"] != '') {
        echo '#' . esc_attr($arr[$i]["color"]);
    }
    ?>
 url('<?php 
    print_thumbnail($arr[$i]["thumb"], $arr[$i]["use_timthumb"], $arr[$i]["fulltitle"], $width, $height, '', true, true);
    ?>
') no-repeat top center;">
			<div class="container<?php 
    if ($arr[$i]['variation'] == 2) {
        echo ' descright';
    }
    ?>
">
				<div class="description">
					<h2 class="title"><a href="<?php 
    echo esc_url($arr[$i]["permalink"]);
    ?>
"><?php 
    echo esc_html($arr[$i]["fulltitle"]);
    ?>
开发者ID:rmaloney,项目名称:simplewp_restaurant,代码行数:30,代码来源:featured.php


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