You are here

function context_metadata_reaction::execute in Context Metadata 7

Same name and namespace in other branches
  1. 6 plugins/context_metadata_reaction.inc \context_metadata_reaction::execute()

Output a list of active contexts.

File

plugins/context_metadata_reaction.inc, line 71
context reaction

Class

context_metadata_reaction
@file context reaction

Code

function execute() {
  $contexts = context_active_contexts();
  foreach ($contexts as $context) {
    if (!empty($context->reactions['context_metadata'])) {
      $metadata_array = $context->reactions['context_metadata'];
      $metadata =& drupal_static('metadata_array');
      foreach ($metadata_array as $key => $value) {
        if (!empty($value)) {
          $metadata[$key] = t(check_plain($value));
        }
      }
    }
  }
}