You are here

function simplemeta_get_info in Simple Meta 7

Same name and namespace in other branches
  1. 6.2 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

bool $reset: indicates whether use cache or get info from implementations directly

Return value

array info

4 calls to simplemeta_get_info()
simplemeta_get_form_elements in ./simplemeta.module
Get all implemented form elements for SimpleMeta form.
simplemeta_get_page_meta in ./simplemeta.module
Get page's meta data.
simplemeta_meta_form_submit_save in ./simplemeta.module
SimpleMeta form submit callback on save.
simplemeta_meta_form_validate_save in ./simplemeta.module
SimpleMeta form validation callback on save.

File

./simplemeta.module, line 605
SimpleMeta module.

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();
    $info = array_merge($info, $result);
  }
  cache_set($cid, $info, 'cache');
  return $info;
}