You are here

function radioactivity_ajax_render_alter in Radioactivity 7.2

Implements hook_ajax_render_alter(). This is one of the two ways the emitters end up on the page, the other is hook_page_alter().

File

./radioactivity.module, line 722
Radioactivity core functionality

Code

function radioactivity_ajax_render_alter(&$commands) {
  radioactivity_update_emitters();

  // Add the JS we have generated (this is a blatant copy from the ajax_render() func. :)
  $scripts = drupal_add_js();
  if (!empty($scripts['settings'])) {
    $settings = $scripts['settings'];
    array_unshift($commands, ajax_command_settings(call_user_func_array('array_merge_recursive', $settings['data']), TRUE));
  }
}