advantage_display_post_thumbnail

The Advantage advantage display post thumbnail function.

Description

advantage_display_post_thumbnail( $post_id ); 

Parameters (1)

0. $post_id
The post id.

Usage

  1. if ( !function_exists( 'advantage_display_post_thumbnail' ) ) { 
  2. require_once '/inc/lib-content.php'; 
  3.  
  4. // The post id. 
  5. $post_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = advantage_display_post_thumbnail($post_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/inc/lib-content.php  
  1. function advantage_display_post_thumbnail( $post_id ) { 
  2. global $advantage_layout; 
  3. if ( has_post_thumbnail() ) { 
  4. if ( ! is_single() ) { 
  5. printf ('<a href="%1$s" title="%2$s">',  
  6. get_permalink(),  
  7. get_the_title() );  
  8. the_post_thumbnail( 'large', array( 'class' => 'img-polaroid featured-image', 'title' => get_the_title() ) ); 
  9. echo '</a>'; 
  10. else { 
  11. if ( 2 == $advantage_layout )  
  12. the_post_thumbnail( 'full', array( 'class' => 'fullscreen-image' ) );  
  13. else 
  14. the_post_thumbnail( 'large', array( 'class' => 'img-polaroid featured-image', 'title' => get_the_title() ) );