Description
Gallery logicThe gallery shortcode allows media to be displayed Here we take values from the page's metadata gallery-columns = 1,2, etc gallery-size = 'thumbnail', 'medium', 'large', 'full' and apply them to the gallery shortcode If the meta data is not set in the post the default values are: [gallery columns="1" size="medium"] For more information on gallery see http://codex.wordpress.org/Gallery_Shortcode For more information on sizes see WordPress admin panel under Settings > Media
Usage
bw_gallery();Parameters
Returns
voidSource
File name: oik/bobbfunc.incLines:
1 to 13 of 13
function bw_gallery() { _bw_c( "gallery processing"); global $post; bw_trace( $post, __FUNCTION__, __LINE__, __FILE__, "post" ); $columns = get_post_meta( $post->ID, "gallery-columns", true ); $columns = bw_default( $columns, "1"); $size = get_post_meta( $post->ID, "gallery-size", true ); $size = bw_default( $size, "medium" ); $gallery_options = array( 'columns' => $columns, 'size' => $size ); e( gallery_shortcode( $gallery_options )); }View on GitHub View on Trac
Called by
Invoked by
Calls
1 to 6 of 6
