[ create a new paste ] login | about

Link: http://codepad.org/vFbB1uCF    [ raw code | fork ]

PHP, pasted on Jun 9:
1
2
3
4
5
6
7
8
9
10
11
12
13
    <?php $sumOfWidths = 0; ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <!-- some code here -->
	
    <?php $image = wp_get_attachment_image_src (get_post_thumbnail_id($post_id), 'gallery-thumbnail'); ?>
    <?php $sizeOfImage = getimagesize($image[0]); ?>
        <?php  if(isset($sizeOfImage[0])): ?>
	    <?php $sumOfWidths = $sumOfWidths + $sizeOfImage[0]; ?>
	<?php endif; ?>
	
    <?php endwhile; else: ?>
    <!-- some code here -->
    <?php endif; ?>


Create a new paste based on this one


Comments: