function context_update_6302 in Context 6.3
Update 6302: Update old context exportables. This update script may be re-run at any time to update context 2 objects that have been exported.
File
- ./
context.install, line 261
Code
function context_update_6302() {
$contexts = array();
// Invoke context 2 default hooks so that the contexts can be migrated.
foreach (module_invoke_all('context_default_contexts') as $context) {
$context = (object) $context;
if (!isset($context->api_version)) {
$contexts["{$context->namespace}-{$context->attribute}-{$context->value}"] = $context;
}
}
// Migrate objects.
$ret = array();
context_migrate_api_3($ret, $contexts);
return $ret;
}