function acquia_lift_init in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 acquia_lift.module \acquia_lift_init()
Implements hook_init().
File
- ./
acquia_lift.module, line 348 - acquia_lift.module Provides Acquia Lift-specific personalization functionality.
Code
function acquia_lift_init() {
if (!empty($_SESSION['acquia_lift_element_trigger']) && user_access('manage personalized content')) {
// Element variation editing should enabled upon page load.
drupal_add_js(array(
'acquia_lift' => array(
'toolbarEditMode' => $_SESSION['acquia_lift_element_trigger'],
),
), array(
'type' => 'setting',
));
unset($_SESSION['acquia_lift_element_trigger']);
}
}