--- dialog.module	2010-11-04 13:25:47.000000000 -0700
+++ dialog_patched.module	2010-11-04 13:25:55.000000000 -0700
@@ -164,7 +164,16 @@ function dialog_form_render($form_state,
     $commands[] = ctools_ajax_command_settings($form_state['js settings']);
   }
 
-  $commands[] = dialog_command_display($title, $output);
+  // allow $form_state['args'] to provide options to dialog 
+  $args = isset($form_state['args']) ? $form_state['args'] : array();
+  $options = NULL;
+  foreach ($args as $arg) {
+    if (is_array($arg) && array_key_exists('dialog_options', $arg)) {
+      $options = $arg['dialog_options'];
+    }
+  }
+
+  $commands[] = dialog_command_display($title, $output, $options);
   return $commands;
 }
 
