1 AND us_get_option( 'ajax_load_js', FALSE ) == FALSE ) { wp_enqueue_script( 'us-isotope' ); } } // With titles $with_titles = FALSE; if ( isset( $meta ) AND $meta == 'true' ) { $with_titles = TRUE; $classes .= ' with_meta'; } // With indents if ( isset( $indents ) AND $indents == 'true' ) { $classes .= ' with_indents'; } // Filter classes $classes = apply_filters( 'us_gallery_listing_classes', $classes ); // Get images $query_args = array( 'include' => $ids, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'post__in', ); if ( $orderby == 'rand' ) { $query_args['orderby'] = 'rand'; } $attachments = get_posts( $query_args ); if ( ! is_array( $attachments ) OR empty( $attachments ) ) { return; } // Gallery shortcode usage in feeds if ( is_feed() ) { $output = "\n"; foreach ( $attachments as $attachment ) { $output .= wp_get_attachment_link( $attachment->ID, 'thumbnail', TRUE ) . "\n"; } return $output; } // Output the element $output = '