You are here

function context_status in Context 6

Same name and namespace in other branches
  1. 6.2 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.
2 string references to 'context_status'
context_ui_confirm_submit in context_ui/context_ui.admin.inc
Submit handler for the context_ui_confirm form.
context_ui_update_6003 in context_ui/context_ui.install

File

./context.module, line 540

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;
}