function token_render_cache_get in Token 7
Copy of drupal_render_cache_get() that does not care about request method.
1 call to token_render_cache_get()
- theme_token_tree in ./
token.pages.inc - Provide a 'tree' display of nested tokens.
File
- ./
token.module, line 1190 - Enhances the token API in core: adds a browseable UI, missing tokens, etc.
Code
function token_render_cache_get($elements) {
if (!($cid = drupal_render_cid_create($elements))) {
return FALSE;
}
$bin = isset($elements['#cache']['bin']) ? $elements['#cache']['bin'] : 'cache';
if (!empty($cid) && ($cache = cache_get($cid, $bin))) {
// Add additional libraries, JavaScript, CSS and other data attached
// to this element.
if (isset($cache->data['#attached'])) {
drupal_process_attached($cache->data);
}
// Return the rendered output.
return $cache->data['#markup'];
}
return FALSE;
}