You appear to be a bot. Output may be restricted
Description
Format the "thumb"Format the 'post' in a block or div with image with link only
Usage
bw_format_thumb( $post, $atts );
Parameters
- $post
- ( object ) required – A post object
- $atts
- ( array ) required – Attributes array – passed from the shortcode Note: If the post_type is 'attachment' then we should not look for an attached image since this is probably already the attached image that we've loaded. Until we change this code the example won't work!
Returns
voidSource
File name: oik/shortcodes/oik-thumbs.phpLines:
1 to 19 of 19
function bw_format_thumb( $post, $atts ) { //setup_postdata( $post ); bw_trace( $post, __FUNCTION__, __LINE__, __FILE__, "post" ); $atts['title'] = get_the_title( $post->ID ); $thumbnail = bw_thumbnail( $post->ID, $atts ); $in_block = bw_validate_torf( bw_array_get( $atts, "block", false )); if ( $in_block ) { oik_require( "shortcodes/oik-blocks.php" ); e( bw_block( $atts )); bw_link_thumbnail( $thumbnail, $post->ID, $atts ); e( bw_eblock() ); } else { $class = bw_array_get( $atts, "class", "" ); sdiv( $class ); bw_link_thumbnail( $thumbnail, $post->ID, $atts ); //sediv( "cleared" ); ediv(); } }View on GitHub View on Trac