function nodequeue_js_output in Nodequeue 5.2
Same name and namespace in other branches
- 6.2 nodequeue.module \nodequeue_js_output()
- 7.3 nodequeue.module \nodequeue_js_output()
- 7.2 nodequeue.module \nodequeue_js_output()
Print the JSON output for our AJAX calls.
2 calls to nodequeue_js_output()
- nodequeue_admin_add_node in ./
nodequeue.module - Page callback to add a node to a queue.
- nodequeue_admin_remove_node in ./
nodequeue.module - Page callback to remove a node from a queue.
File
- ./
nodequeue.module, line 313
Code
function nodequeue_js_output($label, $href, $count = NULL, $sqid = NULL) {
$return = new stdClass();
$return->status = 1;
$return->label = check_plain($label);
$return->href = $href;
if (isset($count)) {
$return->count = $count;
}
if (isset($sqid)) {
$return->sqid = $sqid;
}
// let the world know this isn't normal output.
drupal_set_header('Content-type: text/javascript');
print drupal_to_js($return);
exit;
}