Description
Format an accordion block
Usage
bw_format_accordion( $post, $atts );Parameters
- $post
- ( object ) required – A post object
- $atts
- ( array ) required – Attributes array – passed from the shortcode Should we not do this using apply_filters( "bw_format_accordion", $post, $atts ); or even do_action( "bw_format_accordion", … ); ?
Returns
voidSource
File name: oik/shortcodes/oik-accordion.phpLines:
1 to 17 of 17
function bw_format_accordion( $post, $atts ) { $atts['title'] = get_the_title( $post->ID ); sdiv( 'bw_accordion_item'); stag( 'details'); stag( 'summary'); e( $atts['title']); etag( 'summary'); $thumbnail = bw_thumbnail( $post->ID, $atts ); //h3( $atts['title'] ); if ( $thumbnail ) { bw_format_thumbnail( $thumbnail, $post, $atts ); } e( bw_excerpt( $post ) ); bw_format_read_more( $post, $atts ); etag( 'details'); ediv(); }View on GitHub View on Trac
Invoked by
Calls
1 to 8 of 8
- bw_excerpt() – Return the excerpt from the $post
- bw_format_read_more() – Produce a read_more link as required ( block )
- bw_format_thumbnail() – Format the thumbnail when displayed in a block
- bw_thumbnail() – Get the thumbnail of the specified size
- e() – Outputs some translated / non-translatable text
- ediv() – End a div
- h3() –
- sdiv() – Start a div
