function context_metadata_reaction::execute in Context Metadata 6
Same name and namespace in other branches
- 7 plugins/context_metadata_reaction.inc \context_metadata_reaction::execute()
Outputs a list of active contexts.
File
- plugins/
context_metadata_reaction.inc, line 56 - Output context maxage.
Class
- context_metadata_reaction
- @file Output context maxage.
Code
function execute() {
$contexts = context_active_contexts();
foreach ($contexts as $context) {
if (!empty($context->reactions['context_metadata'])) {
$metadata_array = $context->reactions['context_metadata'];
foreach ($metadata_array as $key => $value) {
if (!empty($value)) {
$static_metadata_array[$key] = t(check_plain($value));
}
}
// Store the array.
context_metadata_static_store($static_metadata_array);
}
}
}