You are here

function context_node_condition in Context 6.3

Same name and namespace in other branches
  1. 6.2 context.core.inc \context_node_condition()
  2. 7.3 context.core.inc \context_node_condition()

Centralized node condition call function for the ever increasing number of ways to get at a node view / node form.

5 calls to context_node_condition()
context_ctools_render_alter in ./context.core.inc
Implementation of hook_ctools_render_alter(). Used to detect the presence of a page manager node view or node form.
context_form_alter in ./context.core.inc
Implementation of hook_form_alter().
context_form_alter_node_validate in ./context.core.inc
Node form validation callback.
context_form_comment_form_alter in ./context.core.inc
Implementation of hook_form_alter() for comment_form.
context_nodeapi in ./context.core.inc
Implementation of hook_nodeapi().

File

./context.core.inc, line 164

Code

function context_node_condition(&$node, $op) {
  if ($plugin = context_get_plugin('condition', 'node')) {
    $plugin
      ->execute($node, $op);
  }
  if (module_exists('taxonomy')) {
    if ($plugin = context_get_plugin('condition', 'node_taxonomy')) {
      $plugin
        ->execute($node, $op);
    }
  }
  if (module_exists('book')) {
    if ($plugin = context_get_plugin('condition', 'book')) {
      $plugin
        ->execute($node, $op);
    }
    if ($plugin = context_get_plugin('condition', 'bookroot')) {
      $plugin
        ->execute($node, $op);
    }
  }

  // Allow other plugins to easily be triggered on node-related events.
  drupal_alter('context_node_condition', $node, $op);
}