Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ( $images as $attach_id ) {
- $i++;
- if ($attach_id > 0) {
- $post_thumbnail = wpb_getImageBySize(array( 'attach_id' => $attach_id, 'thumb_size' => $img_size ));
- $post_thumbnail_link = wp_get_attachment_image_src( $attach_id, 'full');
- }
- else {
- $different_kitten = 400 + $i;
- $post_thumbnail = array();
- $post_thumbnail['thumbnail'] = '<img src="http://placekitten.com/g/'.$different_kitten.'/300" />';
- $post_thumbnail['p_img_large'][0] = 'http://placekitten.com/g/1024/768';
- $post_thumbnail_link = array();
- $post_thumbnail_link[0] = null;
- }
- $thumbnail = $post_thumbnail['thumbnail'];
- $p_img_large = $post_thumbnail['p_img_large'];
- $link_start = $link_end = '';
- if ( $onclick == 'link_image' ) {
- $link_start = '<a href="'.$post_thumbnail_link[0].'"'.$pretty_rel_random.'>';
- $link_end = '</a>';
- }
Advertisement
Add Comment
Please, Sign In to add comment