getThumbnail( $id, 1, true, $is_default ); if ( ! $is_default ) { $ret[$id] = $url; } } } wp_send_json($ret); } /** * Accepts AJAX request containing an array matching any allowable params for the [dg] shortcode. * Returns the resultant gallery HTML. */ public static function generateGallery() { if ( isset( $_REQUEST['atts'] ) ) { @header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); echo DocumentGallery::doShortcode( $_REQUEST['atts'] ); } wp_die(); } }