Created
September 7, 2010 14:01
-
-
Save oquno/568373 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (have_posts()): while (have_posts()): the_post(); ?> | |
<?php preg_match('/<img\ssrc="(http:\/\/farm\d+\.static\.flickr\.com\/.*\.jpg)/', $post->post_content, $matches); ?> | |
<?php if($matches[1]): ?> | |
<?php $thumbnail_image_url = preg_replace('/_.\.jpg$/', '_s.jpg', $matches[1]); ?> | |
<img src="<?php echo $thumbnail_image_url; ?>" width="75" height="75" /> | |
<?php endif ?> | |
<?php endwhile; endif ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment