/**
  * Adds a post thumbnail and if one doesn't exist the first image from the post is used.
  */
 function mantra_set_featured_thumb()
 {
     global $mantra_options;
     foreach ($mantra_options as $key => $value) {
         ${"{$key}"} = $value;
     }
     global $post;
     $image_src = cryout_echo_first_image($post->ID);
     if (function_exists("has_post_thumbnail") && has_post_thumbnail() && $mantra_fpost == 'Enable') {
         the_post_thumbnail('custom', array("class" => "align" . strtolower($mantra_falign) . " post_thumbnail"));
     } else {
         if ($mantra_fpost == 'Enable' && $mantra_fauto == "Enable" && $image_src && ($mantra_excerptarchive != "Full Post" || $mantra_excerpthome != "Full Post")) {
             echo '<a title="' . the_title_attribute('echo=0') . '" href="' . get_permalink() . '" ><img width="' . $mantra_fwidth . '" title="" alt="" class="align' . strtolower($mantra_falign) . ' post_thumbnail" src="' . $image_src . '"></a>';
         }
     }
 }
Exemple #2
0
 /**
  * Adds a post thumbnail and if one doesn't exist the first image from the post is used.
  */
 function parabola_set_featured_thumb()
 {
     global $parabolas;
     foreach ($parabolas as $key => $value) {
         ${"{$key}"} = $value;
     }
     global $post;
     $image_src = cryout_echo_first_image($post->ID);
     if (function_exists("has_post_thumbnail") && has_post_thumbnail() && $parabola_fpost == 'Enable') {
         the_post_thumbnail('custom', array("class" => "align" . strtolower($parabola_falign) . " post_thumbnail"));
     } else {
         if ($parabola_fpost == 'Enable' && $parabola_fauto == "Enable" && $image_src) {
             echo '<a title="' . the_title_attribute('echo=0') . '" href="' . get_permalink() . '" ><img title="" alt="" class="align' . strtolower($parabola_falign) . ' post_thumbnail" src="' . $image_src . '"></a>';
         }
     }
 }