You are here

function heartbeat_print_json in Heartbeat 7

Helper function to print JSON data.

1 call to heartbeat_print_json()
heartbeat_comments_form_submit in modules/heartbeat_comments/heartbeat_comments.module
User submitted a heartbeat comment.

File

./heartbeat.module, line 1620
Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.

Code

function heartbeat_print_json($data) {
  drupal_add_http_header('Content-Type', 'text/javascript; charset=utf-8');
  print drupal_json_encode($data);
}