You appear to be a bot. Output may be restricted
Description
List attachmentsThis function is similar to bw_pages but formats attachments It works in conjunction with Artisteer blocks – to enable the page list to be styled as a series of blocks Well, that's the plan
[bw_attachments class="classes for bw_block"
- post_type='attachment'
- post_mime_type='
- application/pdf
- image/gif
- video/mp4
- post_parent
- orderby='title'
- order='ASC'
- posts_per_page=-1
- block=true or false
- thumbnail=specification - see bw_thumbnail()
- customcategoryname=custom category value
Usage
bw_attachments( $atts );
Parameters
- $atts
- ( mixed ) optional –
Returns
voidSource
File name: oik/shortcodes/oik-attachments.phpLines:
1 to 15 of 15
function bw_attachments( $atts = NULL ) { $atts[ 'post_type'] = bw_array_get( $atts, "post_type", "attachment" ); $id = bw_array_get_from( $atts, "id,0", null ); if ( null !== $id ) { $atts['id']=$id; } $atts['post_status'] = 'inherit'; $posts = bw_get_posts( $atts ); //bw_trace2( $posts, 'posts', true, BW_TRACE_DEBUG ); foreach ( $posts as $post ) { bw_format_attachment( $post, $atts ); } return( bw_ret() ); }View on GitHub View on Trac