Permalink
Browse files

Update to match changeset 21778 in WordPress, which allows for an 'id…

…s' parameter to explicitly set the images and order the images are shown. http://core.trac.wordpress.org/changeset/21778
  • Loading branch information...
1 parent b30a9a4 commit c645d7b6b3806b08f00c3d13a4d36c63e3cd917e @justintadlock committed Sep 11, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 extensions/cleaner-gallery.php
@@ -63,6 +63,7 @@ function cleaner_gallery( $output, $attr ) {
'captiontag' => 'dd',
'columns' => 3,
'size' => 'thumbnail',
+ 'ids' => '',
'include' => '',
'exclude' => '',
'numberposts' => -1,
@@ -87,9 +88,9 @@ function cleaner_gallery( $output, $attr ) {
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => $order,
- 'orderby' => $orderby,
+ 'orderby' => !empty( $ids ) ? 'post__in' : $orderby,
'exclude' => $exclude,
- 'include' => $include,
+ 'include' => !empty( $ids ) ? $ids : $include,
'numberposts' => $numberposts,
'offset' => $offset,
'suppress_filters' => true

0 comments on commit c645d7b

Please sign in to comment.