function popups_render_as_json in Popups API (Ajax Dialogs) 5
Same name and namespace in other branches
- 6.2 popups.module \popups_render_as_json()
- 6 popups.module \popups_render_as_json()
1 call to popups_render_as_json()
- popups_init in ./
popups.module - hook_init
File
- ./
popups.module, line 146 - popups.module
Code
function popups_render_as_json($content) {
$path = $_GET['q'];
// Get current path from params.
drupal_set_header('Content-Type: text/javascript; charset=utf-8');
return drupal_to_js(array(
'title' => drupal_get_title(),
'messages' => theme('status_messages'),
'path' => $path,
'content' => $content,
));
}