Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function arras_get_thumbnail($w = 630, $h = 250) {
- global $post;
- if ( function_exists('has_post_thumbnail') && has_post_thumbnail($post->ID) ) {
- $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), full );
- if (!$thumbnail[0]) return false;
- else return get_bloginfo('template_directory') . '/library/timthumb.php?src=' . $thumbnail[0] . '&w=' . $w . '&h=' . $h . '&zc=1';
- } else {
- $thumbnail = get_post_meta($post->ID, ARRAS_POST_THUMBNAIL, true);
- }
- if (!$thumbnail) {
- return false;
- } else {
- if (ARRAS_THUMB == 'phpthumb') {
- return get_bloginfo('template_directory') . '/library/phpthumb/phpThumb.php?src=' . $thumbnail . '&w=' . $w . '&h=' . $h . '&zc=1';
- } else {
- return get_bloginfo('template_directory') . '/library/timthumb.php?src=' . $thumbnail . '&w=' . $w . '&h=' . $h . '&zc=1';
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement