function popups_render_as_json in Popups API (Ajax Dialogs) 6.2
Same name and namespace in other branches
- 5 popups.module \popups_render_as_json()
- 6 popups.module \popups_render_as_json()
Render the page contents in a custom json wrapper.
Parameters
$content: themed html.:
Return value
$content in a json wrapper with metadata.
1 call to popups_render_as_json()
- popups_init in ./
popups.module - Implementation of hook_init().
File
- ./
popups.module, line 133 - This module provides a hook_popups for links to be opened in an Ajax Popup Modal Dialog.
Code
function popups_render_as_json($content) {
// Call theme_page so modules like jquery_update can do their thing. We don't
// really care about the mark up though.
$ignore = theme('page', $content);
$path = $_GET['q'];
// Get current path from params.
return drupal_json(array(
'title' => drupal_get_title(),
'messages' => theme('status_messages'),
'path' => $path,
'content' => $content,
'js' => popups_get_js(),
'css' => popups_get_css(),
));
}