function _magnific_popup_add_api_js in Magnific Popup 7
Internal utility function to add one-time JS settings from extension modules.
1 call to _magnific_popup_add_api_js()
- magnific_popup_page_alter in ./
magnific_popup.module - Implements hook_page_alter().
File
- ./
magnific_popup.module, line 91 - magnific_popup/magnific_popup.module
Code
function _magnific_popup_add_api_js() {
$added =& drupal_static(__FUNCTION__, FALSE);
// Don't add JS more than once.
if ($added) {
return;
}
$settings = array(
'magnific_popup_api' => array(
'iframe_patterns' => module_invoke_all('magnific_popup_iframe_patterns'),
),
);
$options = array(
'type' => 'setting',
);
drupal_add_js($settings, $options);
}