function simplemeta_get_info in Simple Meta 6.2
Same name and namespace in other branches
- 7 simplemeta.module \simplemeta_get_info()
Get info about meta elements from modules Basically, invokes all implementations of hook_simplemeta_info() Caches info in the {cache} table
Parameters
boolean $reset indicates whether use cache or get info from implementations directly:
Return value
array info
5 calls to simplemeta_get_info()
File
- ./
simplemeta.module, line 426
Code
function simplemeta_get_info($reset = FALSE) {
$cid = 'simplemeta:info';
if (!$reset && ($cache = cache_get($cid, 'cache'))) {
return $cache->data;
}
$info = array();
foreach (module_implements('simplemeta_info') as $module) {
$function = $module . '_simplemeta_info';
$result = $function();
// foreach ($result as &$item) {
// $item['module'] = $module;
// }
$info = array_merge($info, $result);
}
cache_set($cid, $info, 'cache');
return $info;
}