You appear to be a bot. Output may be restricted
Description
Get the thumbnail of the specified size
Usage
$$thumbnail = bw_thumbnail( $post_id, $atts, $attachment );
Parameters
- $post_id
- ( integer ) required – ID of the post
- $atts
- ( array ) optional – shortcode attributes
- $attachment
- ( bool ) optional – true if we're finding the thumbnail for an attachment
Returns
$thumbnail formatted <img> tagSource
File name: oik/includes/bw_images.incLines:
1 to 31 of 31
function bw_thumbnail( $post_id, $atts=NULL, $attachment=false ) { $atts['post_id'] = $post_id; $thumbnail = bw_get_thumbnail_size( $atts ); if ( $thumbnail ) { //bw_trace( $post_id, __FUNCTION__, __LINE__, __FILE__, "post_id" ); switch ( $thumbnail ) { case 'full'; // From oik v1.17 onwards we do get here. if ( $attachment ) { $thumbnail = bw_get_attachment_thumbnail( $post_id, $thumbnail, $atts ); } else { $thumbnail = bw_get_fullimage( $post_id, $thumbnail, $atts ); } break; case 'thumbnail': case 'medium': case 'large': default: if ( $attachment ) { $thumbnail = bw_get_attachment_thumbnail( $post_id, $thumbnail, $atts ); } else { $thumbnail = bw_get_thumbnail( $post_id, $thumbnail, $atts ); } break; } } return( $thumbnail ); }View on GitHub View on Trac