/**
  * 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();
 }