function rdf_get_namespaces

Retrieves RDF namespaces.

Invokes hook_rdf_namespaces() and collects RDF namespaces from modules that implement it.

Related topics

4 calls to rdf_get_namespaces()
2 string references to 'rdf_get_namespaces'

File

drupal/core/modules/rdf/rdf.module, line 102
Enables semantically enriched output for Drupal sites in the form of RDFa.

Code

function rdf_get_namespaces() {
  $namespaces = array();

  // In order to resolve duplicate namespaces by using the earliest defined
  // namespace, do not use module_invoke_all().
  foreach (module_implements('rdf_namespaces') as $module) {
    $function = $module . '_rdf_namespaces';
    if (function_exists($function)) {
      $namespaces = NestedArray::mergeDeep($function(), $namespaces);
    }
  }
  return $namespaces;
}