function janrain_capture_widget_add_scripts in Janrain Registration 7.3
Same name and namespace in other branches
- 7.4 includes/janrain_capture.widget.inc \janrain_capture_widget_add_scripts()
- 7.2 includes/janrain_capture.widget.inc \janrain_capture_widget_add_scripts()
Adds widget JS scripts to the page.
1 call to janrain_capture_widget_add_scripts()
- janrain_capture_page_build in ./
janrain_capture.module - Implements hook_page_build().
File
- includes/
janrain_capture.widget.inc, line 34 - Widget-related functions
Code
function janrain_capture_widget_add_scripts($scripts = array()) {
// Widget scripts
$scripts['external'][] = 'https://d7v0k4dt27zlp.cloudfront.net/assets/capture_client.js';
$scripts['inline'][] = janrain_capture_widget_js();
// Add all the remaining scripts
foreach ($scripts['file'] as $s) {
drupal_add_js($s, array(
'type' => 'file',
'every_page' => TRUE,
'weight' => 1,
'preprocess' => FALSE,
));
}
foreach ($scripts['external'] as $s) {
drupal_add_js($s, array(
'type' => 'external',
'every_page' => TRUE,
'weight' => 2,
'preprocess' => FALSE,
));
}
foreach ($scripts['inline'] as $s) {
drupal_add_js($s, array(
'type' => 'inline',
'every_page' => TRUE,
'weight' => 3,
'preprocess' => FALSE,
));
}
}