wakirby/wp-post-formats — comment on commit 2c8f881347f335d02217d7095f4777978d18e32c
File:  line 0
By wakirby:

This works, but should probably move away from `do_shortcode` to using something along the lines of:

$args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'post_parent' => $post->ID
);

$attachments = get_posts( $args );
if ( $attachments ) {
echo '

';
foreach ( $attachments as $attachment ) {
echo '
'.wp_get_attachment_image( $attachment->ID, 'full' ).'
';
}
echo '

';
}

Since this will allow complete control over HTML output, and won't be affected if theme developer has implemented their own `[gallery]` shortcode.