Esempio n. 1
0
        $width = $content_width / $grid;
        $height = $width * 0.7;
        if (has_post_thumbnail()) {
            ?>
			
	<li <?php 
            post_class();
            ?>
>
		<div class="entry-thumbnail">
			<a href="<?php 
            the_permalink();
            ?>
">
			<?php 
            echo veuse_retina_interchange_image($img_url, $width, $height, true);
            ?>
			</a>
		</div>
		<div class="entry-content">
			<div class="veuse-postlist-entry-date">
				<span class="day"><?php 
            the_time('j');
            ?>
</span>
				<span class="month"><?php 
            the_time('M');
            ?>
</span>
			</div>
			
Esempio n. 2
0
 function veuse_page($atts, $content = null)
 {
     extract(shortcode_atts(array('id' => '', 'imagesize' => 'medium', 'custom_imagesize' => '', 'link' => 'true', 'button_text' => __('Read more', 'veuse-uikit'), 'image' => 'true'), $atts));
     if (!empty($custom_imagesize)) {
         $custom_imagesize = str_replace(' ', '', $custom_imagesize);
         // Remove whitespace
         $string_parts = explode("*", $custom_imagesize);
         $custom_imagesize = array();
         $custom_imagesize['width'] = $string_parts[0];
         $custom_imagesize['height'] = $string_parts[1];
         $img_url = wp_get_attachment_url(get_post_thumbnail_id($id));
         $image_str = veuse_retina_interchange_image($img_url, $custom_imagesize['width'], $custom_imagesize['height'], true);
     } else {
         $img = wp_get_attachment_image_src(get_post_thumbnail_id($id), $imagesize);
         $image_str = veuse_retina_interchange_image($img[0], $img[1], $img[2], true);
     }
     $page = get_page($id);
     ob_start();
     require veuse_uikit_locate_part('featured-page');
     $out = ob_get_contents();
     ob_end_clean();
     return $out;
 }