Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // affichage maison plugin get_the_image avec timthumb
- function gd_get_image1 ($gd_w, $gd_h) {
- if ( function_exists( 'get_the_image' ) )
- global $post, $posts;
- $get_the_image_as_array = get_the_image( array( 'image_scan' => true, 'format' => 'array' ) );
- $img1 = $get_the_image_as_array[url];
- $url = get_bloginfo('url');
- $img1 = str_replace($url, '', $img1);
- echo '<a href="'.post_permalink().'">
- <img src="'.get_bloginfo("template_url").'/thumb.php?src='.$img1.'&w='.$gd_w.'&h='.$gd_h.'&zc=1 />" alt="'.$get_the_image_as_array[alt].'"/>
- </a>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement