You are here

function pwa_deliver_json in Progressive Web App 7.2

Deliver a json response, don't involve the theme layer for a 'quick' check.

Parameters

$page_callback_result:

2 string references to 'pwa_deliver_json'
pwa_menu in ./pwa.module
Implements hook_menu().
pwa_webpush_menu in modules/pwa_webpush/pwa_webpush.module
Implements hook_menu().

File

./pwa.module, line 591

Code

function pwa_deliver_json($page_callback_result) {
  if (_pwa_check_page_callback_result($page_callback_result)) {
    drupal_add_http_header('Content-Type', 'application/json');
    print drupal_json_encode($page_callback_result);
  }
  ajax_footer();
}