function flag_lists_preprocess_flag in Flag Lists 7
Same name and namespace in other branches
- 6 flag_lists.module \flag_lists_preprocess_flag()
- 7.3 flag_lists.module \flag_lists_preprocess_flag()
Preprocess link title and text for the flag.tpl.php
This seems to be the only place to do this
File
- ./
flag_lists.module, line 1678 - The Flag Lists module.
Code
function flag_lists_preprocess_flag(&$variables) {
if (module_exists('token') && !empty($variables['flag']->module) && $variables['flag']->module == 'flag_lists') {
if (!empty($variables['link_text'])) {
$variables['link_text'] = token_replace($variables['link_text'], array(
'flag_lists' => $variables['flag'],
));
}
if (!empty($variables['link_title'])) {
$variables['link_title'] = token_replace($variables['link_title'], array(
'flag_lists' => $variables['flag'],
));
}
if (!empty($variables['message_text'])) {
$variables['message_text'] = token_replace($variables['message_text'], array(
'flag_lists' => $variables['flag'],
));
}
}
}