function ctools_get_context

cis7 context.inc ctools_get_context($context)
cle7 context.inc ctools_get_context($context)
elmsmedia7 context.inc ctools_get_context($context)
icor7 context.inc ctools_get_context($context)
meedjum_blog7 context.inc ctools_get_context($context)
mooc7 context.inc ctools_get_context($context)

Fetch metadata on a specific context plugin.

Parameters

$context: Name of a context.

Return value

An array with information about the requested panel context.

14 calls to ctools_get_context()
ctools_context_convert_context in sites/all/modules/ulmus/ctools/includes/context.inc
Let the context convert an argument based upon the converter that was given.
ctools_context_create in sites/all/modules/ulmus/ctools/includes/context.inc
Create a new context object.
ctools_context_create_empty in sites/all/modules/ulmus/ctools/includes/context.inc
Create an empty context object.
ctools_context_get_context_from_context in sites/all/modules/ulmus/ctools/includes/context.inc
ctools_context_keyword_substitute in sites/all/modules/ulmus/ctools/includes/context.inc
Perform keyword and context substitutions.

... See full list

1 string reference to 'ctools_get_context'
ctools_context_info in sites/all/modules/ulmus/ctools/includes/context-admin.inc
Provide a list of the ways contexts can be embedded.

File

sites/all/modules/ulmus/ctools/includes/context.inc, line 1029
Contains code related to the ctools system of 'context'.

Code

function ctools_get_context($context) {
  static $gate = array();
  ctools_include('plugins');
  $plugin = ctools_get_plugins('ctools', 'contexts', $context);
  if (empty($gate['context']) && !empty($plugin['superceded by'])) {
    // This gate prevents infinite loops.
    $gate[$context] = TRUE;
    $new_plugin = ctools_get_plugins('ctools', 'contexts', $plugin['superceded by']);
    $gate[$context] = FALSE;

    // If a new plugin was returned, return it. Otherwise fall through and
    // return the original we fetched.
    if ($new_plugin) {
      return $new_plugin;
    }
  }

  return $plugin;
}