You are here

function context_active_contexts in Context 6.3

Same name and namespace in other branches
  1. 6 context.module \context_active_contexts()
  2. 6.2 context.module \context_active_contexts()
  3. 7.3 context.module \context_active_contexts()

Loads any active contexts with associated reactions. This should be run at a late stage of the page load to ensure that relevant contexts have been set.

6 calls to context_active_contexts()
context_condition_context::execute in plugins/context_condition_context.inc
Execute.
context_links in ./context.core.inc
Generates an array of links (suitable for use with theme_links) to the node forms of types associated with current active contexts.
context_reaction::get_contexts in plugins/context_reaction.inc
Retrieve active contexts that have values for this reaction.
context_reaction_block::block_list in plugins/context_reaction_block.inc
An alternative version of block_list() that provides any context enabled blocks.
context_reaction_debug::execute in plugins/context_reaction_debug.inc
Output a list of active contexts.

... See full list

File

./context.module, line 374

Code

function context_active_contexts() {
  $contexts = context_get('context');
  return !empty($contexts) && is_array($contexts) ? $contexts : array();
}