function context_status in Context 6.2
Same name and namespace in other branches
- 6 context.module \context_status()
Returns status for whether a given context definition is enabled.
2 calls to context_status()
- context_contexts in ./
context.module - Provides an array of all contexts provided by modules and in the database.
- context_enabled_contexts in ./
context.module - Retrieves all enabled contexts from the cache.
1 string reference to 'context_status'
- context_ui_confirm_submit in context_ui/
context_ui.admin.inc - Submit handler for the context_ui_confirm form.
File
- ./
context.module, line 543
Code
function context_status($context) {
$status = variable_get('context_status', array());
$identifier = "{$context->namespace}-{$context->attribute}-{$context->value}";
if (isset($status[$identifier]) && !$status[$identifier]) {
return CONTEXT_STATUS_DISABLED;
}
return CONTEXT_STATUS_ENABLED;
}