function beautytips_init in BeautyTips 7.2
Same name and namespace in other branches
- 6.2 beautytips.module \beautytips_init()
Implements hook_init().
File
- ./
beautytips.module, line 11 - Provides API for adding beautytips to pages.
Code
function beautytips_init() {
if (variable_get('beautytips_always_add', 0)) {
$selectors = [];
$options = [];
$selectors = variable_get('beautytips_added_selectors_array', []);
if (count($selectors)) {
foreach ($selectors as $selector) {
if (!empty($selector)) {
$options[$selector]['cssSelect'] = $selector;
}
}
}
$options['.beautytips']['cssSelect'] = '.beautytips';
beautytips_add_beautytips($options);
}
}