View source
<?php
function token_var_token_list($type = 'all') {
global $conf;
if ($type == 'global' || $type == 'all') {
$info = array();
foreach ($conf as $key => $var) {
if (!is_array($var)) {
if (is_string($var) && empty($var)) {
continue;
}
$info['global']['variable-' . $key] = substr($var, 0, 10);
}
}
return $info;
}
}
function token_var_token_values($type, $object = NULL, $options = array()) {
dpm('test');
if ($type == 'global') {
global $conf;
foreach ($conf as $key => $var) {
if (!is_array($var)) {
if (is_string($var) && empty($var)) {
continue;
}
$info['variable-' . $key] = variable_get($key, '');
}
}
}
return $info;
}