You appear to be a bot. Output may be restricted
Description
Format the Nivo output for posts which have attached imagesWhen the thumbnail size is "full" then this will only work when there is an attached image. It won't find the featured image. This is a limitation of bw_thumbnail(). Note: This routine only supports link=y or link=n. It doesn't support link=file nor link=full as it's intended for creating links to the particular post not to the attached image.
Usage
bw_format_nivo( $post, $atts );
Parameters
- $post
- ( post ) required – a post object
- $atts
- ( array ) required – array of shortcode parameters
Returns
voidSource
File name: oik-nivo-slider/nivo.phpLines:
1 to 22 of 22
function bw_format_nivo( $post, $atts ) { $alt = null; if ( bw_validate_torf( $atts['caption'] ) ) { $title = get_the_title( $post->ID ); if ( $format = bw_array_get( $atts, "format", false ) ) { $alt = $title; $title = "#" . $atts['slider-id'] . "-" . $post->ID; } else { } } else { $title = null; } $atts['title'] = $title; $atts['thumbnail'] = bw_array_get( $atts, "thumbnail", "full" ); $thumbnail = bw_thumbnail( $post->ID, $atts ); $permalink = get_permalink( $post->ID ); if ( bw_validate_torf( $atts['link'] ) ) { BW_::alink( null, $permalink , $thumbnail, $alt ); } else { e( $thumbnail ); } }View on GitHub View on Trac