Пример #1
0
</li>
				</ul>
			</div>
			<div class="bd"><?php 
        the_content('<p>' . __('Read the rest of this entry &raquo;', 'kubrick') . '</p>');
        ?>
</div>
		</div>
	</div>

	<div class="mod photo-frame">
		<div class="inner">
			<div class="photography">
				<?php 
        $title = the_title('', '', false);
        echo yapb_get_thumbnail('<p class=\'photo\'><a rel=\'bookmark\' title=\'' . $title . '\' href=\'' . get_permalink() . '\'>', array('alt' => $title, 'title' => $title), '</a></p>', array('w=618', 'q=90'));
        ?>
			</div>
		</div>
	</div>

	<div class="mod exif">
		<div class="inner">
			<div class="hd"><h3><?php 
        echo __("Exif: ", "exhibition");
        ?>
</h3><p class="explanation">Meta data recorded in photograph</p></div>
			<div class="bd">
				<ul>
				<?php 
        $exif = yapb_get_exif();
Пример #2
0
/**
 * Retrieves an image based on the attachments for a particular post.
 *
 * @param string $size
 * @param array $original
 * @param bool $get_original
 * @param bool $attachment_id
 * @param array $options
 * @return array|bool|mixed|string|void
 */
function suffusion_get_image_from_attachment($size = 'thumbnail', &$original = array(), $get_original = false, $attachment_id = false, $options = array())
{
    global $post;
    $img = "";
    if (!$attachment_id) {
        $attachments = get_children(array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order'));
        if (is_array($attachments)) {
            foreach ($attachments as $id => $attachment) {
                $img = wp_get_attachment_image_src($id, $size);
                if ($img && $get_original) {
                    $original = wp_get_attachment_image_src($id, 'full');
                }
                break;
            }
        }
    } else {
        $img = wp_get_attachment_image_src($attachment_id, $size);
    }
    // Try YAPB
    if (($img == "" || is_array($img) && count($img) == 0) && function_exists('yapb_is_photoblog_post') && yapb_is_photoblog_post()) {
        $standard_sizes = array('thumbnail', 'medium', 'large');
        if (!isset($width) || !isset($height)) {
            // Retrieve the physical sizes from the named size.
            global $_wp_additional_image_sizes;
            if (isset($_wp_additional_image_sizes[$size])) {
                $size_array = $_wp_additional_image_sizes[$size];
                $width = $size_array['width'];
                $height = $size_array['height'];
            } else {
                if (in_array($size, $standard_sizes)) {
                    $width = get_option($size . '_size_w');
                    $height = get_option($size . '_size_h');
                } else {
                    $width = get_option('full_size_w');
                    $height = get_option('full_size_h');
                }
            }
            if (isset($options["featured"]) || isset($options['featured-widget'])) {
                $img_class = "featured-excerpt-" . $options["excerpt_position"];
            } else {
                if (isset($options['mag-headline']) || isset($options['mag-excerpt']) || isset($options['tile-thumb'])) {
                    $img_class = '';
                } else {
                    if (isset($options['mosaic-thumb'])) {
                        $img_class = 'suf-mosaic-img';
                    } else {
                        if (isset($options['widget-thumb'])) {
                            $img_class = 'suf-widget-thumb';
                        } else {
                            global $suf_excerpt_thumbnail_alignment;
                            $img_class = $suf_excerpt_thumbnail_alignment . '-thumbnail';
                        }
                    }
                }
            }
            $img = yapb_get_thumbnail('', array('alt' => esc_attr($post->post_title)), '', array("w={$width}", "h={$height}", "q=100"), $img_class);
            $original['yapb'] = true;
        }
    }
    return $img;
}
Пример #3
0
	<?php 
    while (have_posts()) {
        the_post();
        ?>
		<?php 
        if (function_exists('yapb_is_photoblog_post')) {
            if (yapb_is_photoblog_post()) {
                ?>
		<li><a href="<?php 
                the_permalink();
                ?>
" rel="bookmark" title="<?php 
                the_title_attribute();
                ?>
"><?php 
                yapb_get_thumbnail();
                ?>
</a></li>
		<?php 
            }
        }
        ?>
	<?php 
    }
    ?>
</ol>

<?php 
} else {
    ?>
<p>No related photos.</p>
Пример #4
0
}
?>
	</ul>

	<div class="thumbnails">
		<ul>
			<?php 
while (have_posts()) {
    the_post();
    ?>
				<?php 
    if (yapb_is_photoblog_post()) {
        ?>
					<?php 
        $title = the_title('', '', false);
        echo yapb_get_thumbnail('<li class=\'preview\'><a rel=\'bookmark\' title=\'' . $title . '\' href=\'' . get_permalink() . '\'>', array('alt' => $title, 'title' => $title), '</a></li>', array('w=60', 'q=90'));
        ?>
				<?php 
    }
    ?>
			<?php 
}
?>
		</ul>
	</div>

	<div id="preview" class="previewer"><img src="<?php 
bloginfo('template_directory');
?>
/images/img_loading.png" /></div>