You are here

function simplemeta_get_info in Simple Meta 6.2

Same name and namespace in other branches
  1. 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()
simplemeta_get_form_elements in ./simplemeta.module
simplemeta_get_page_meta in ./simplemeta.module
simplemeta_meta_form_submit_save in ./simplemeta.module
simplemeta_meta_form_validate_save in ./simplemeta.module
simplemeta_meta_list in ./simplemeta.admin.inc

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;
}