You are here

function radioactivity_page_alter in Radioactivity 7

Same name and namespace in other branches
  1. 7.2 radioactivity.module \radioactivity_page_alter()

File

./radioactivity.field.inc, line 209

Code

function radioactivity_page_alter($page) {
  $entities = radioactivity_entities();
  if (count($entities) > 0) {
    $path = base_path() . variable_get('radioactivity_ajax_callback_path', RADIOACTIVITY_AJAX_PATH);
    drupal_add_js(drupal_get_path('module', 'radioactivity') . '/js/radioactivity.js');
    drupal_add_js(array(
      'radioactivity' => array(
        'callback' => $path,
      ),
    ), 'setting');
    drupal_add_js(array(
      'radioactivity' => array(
        'entities' => $entities,
      ),
    ), 'setting');
  }
}