You are here

function wysiwyg_deliver_dialog_page in Wysiwyg 7.2

See also

drupal_deliver_html_page()

1 string reference to 'wysiwyg_deliver_dialog_page'
wysiwyg_menu in ./wysiwyg.module
Implementation of hook_menu().

File

./wysiwyg.dialog.inc, line 105
Wysiwyg dialog page handling functions.

Code

function wysiwyg_deliver_dialog_page($page_callback_result) {

  // Menu status constants are integers; page content is a string or array.
  if (is_int($page_callback_result)) {
    return drupal_deliver_html_page($page_callback_result);
  }

  // Emit the correct charset HTTP header, but not if the page callback
  // result is NULL, since that likely indicates that it printed something
  // in which case, no further headers may be sent, and not if code running
  // for this page request has already set the content type header.
  if (isset($page_callback_result) && is_null(drupal_get_http_header('Content-Type'))) {
    drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
  }

  // Send appropriate HTTP-Header for browsers and search engines.
  global $language;
  drupal_add_http_header('Content-Language', $language->language);
  if (isset($page_callback_result)) {

    // Print anything besides a menu constant, assuming it's not NULL or
    // undefined.
    print wysiwyg_render_dialog_page($page_callback_result);
  }

  // Perform end-of-request tasks.
  drupal_page_footer();
}