You appear to be a bot. Output may be restricted
Description
Format a NextGEN gallery image for the nivo slider
The nggImage object already contains the fields we need in order to display an image: imageURL and description Don't yet know the requirements for using other data. So currently just display without any links
[14] => nggImage Object ( [errmsg] => [error] => [imageURL] => http://qw/wordpress/wp-content/gallery/nextgen-gallery/RCGC-7th-green-cherry-blossom-972x300.jpg [thumbURL] => http://qw/wordpress/wp-content/gallery/nextgen-gallery/thumbs/thumbs_RCGC-7th-green-cherry-blossom-972x300.jpg [imagePath] => C:/apache/htdocs/wordpress/wp-content/gallery/nextgen-gallery/RCGC-7th-green-cherry-blossom-972x300.jpg [thumbPath] => C:/apache/htdocs/wordpress/wp-content/gallery/nextgen-gallery/thumbs/thumbs_RCGC-7th-green-cherry-blossom-972x300.jpg [href] => <a href="http://qw/wordpress/wp-content/gallery/nextgen-gallery/RCGC-7th-green-cherry-blossom-972x300.jpg" title="Here is a description for the cherry blossom" class="thickbox" rel="nextgen-gallery"> <img alt="RCGC-7th-green-cherry-blossom-972x300" src="http://qw/wordpress/wp-content/gallery/nextgen-gallery/thumbs/thumbs_RCGC-7th-green-cherry-blossom-972x300.jpg"/> </a> [thumbPrefix] => thumbs_ [thumbFolder] => /thumbs/ [galleryid] => 1 [pid] => 14 [filename] => RCGC-7th-green-cherry-blossom-972x300.jpg [description] => Here is a description for the cherry blossom [alttext] => RCGC-7th-green-cherry-blossom-972x300 [imagedate] => 2011-04-20 01:01:42 [exclude] => 0 [thumbcode] => class="thickbox" rel="nextgen-gallery" [name] => nextgen-gallery [path] => wp-content/gallery/nextgen-gallery [title] => NextGen gallery [pageid] => 3091 [previewpic] => 18 [permalink] => [image_slug] => rcgc-7th-green-cherry-blossom-972x300-2 [post_id] => 0 [sortorder] => 0 [meta_data] => Array ( [0] => [aperture] => F 9 [credit] => [camera] => DSC-W80 [caption] => [created_timestamp] => April 20, 2011 1:01 am [copyright] => [focal_length] => 6.6 mm [iso] => 125 [shutter_speed] => 1/130 sec [flash] => Not fired [title] => [keywords] => [width] => 972 [height] => 300 [saved] => 1 [thumbnail] => Array ( [width] => 100 [height] => 75 ) ) [gid] => 1 [slug] => nextgen-gallery [galdesc] => [author] => 1 [imageHTML] => <a href="http://qw/wordpress/wp-content/gallery/nextgen-gallery/RCGC-7th-green-cherry-blossom-972x300.jpg" title="Here is a description for the cherry blossom" class="thickbox" rel="nextgen-gallery"> <img alt="RCGC-7th-green-cherry-blossom-972x300" src="http://qw/wordpress/wp-content/gallery/nextgen-gallery/RCGC-7th-green-cherry-blossom-972x300.jpg"/> </a> [thumbHTML] => <a href="http://qw/wordpress/wp-content/gallery/nextgen-gallery/RCGC-7th-green-cherry-blossom-972x300.jpg" title="Here is a description for the cherry blossom" class="thickbox" rel="nextgen-gallery"> <img alt="RCGC-7th-green-cherry-blossom-972x300" src="http://qw/wordpress/wp-content/gallery/nextgen-gallery/thumbs/thumbs_RCGC-7th-green-cherry-blossom-972x300.jpg"/> </a> )
Usage
bw_format_nivo_nggallery( $nggImage, $atts );
Parameters
- $nggImage
- ( object ) required – a NextGEN gallery nggImage object
- $atts
- ( array ) required – array of shortcode parameters
Returns
void
Source
File name: oik-nivo-slider/nivo.php
Lines:
1 to 11 of 11
function bw_format_nivo_nggallery( $nggImage, $atts ) { if ( bw_validate_torf( $atts['caption'] ) ) { $caption = $nggImage->description; } else { $caption = null; } $fileurl = $nggImage->imageURL; $thumburl = $nggImage->thumbURL; $image = retimage( null, $fileurl, $caption, null, null, kv("data-thumb", $thumburl ) ); e( $image ); }