You are here

function rules_action_context_rules_unset_context in Context Rules 7

Same name and namespace in other branches
  1. 6 context_rules.rules.inc \rules_action_context_rules_unset_context()

Unset a context via rules action

Parameters

$context: String of context name

Return value

boolean TRUE if the context was successfully unset, FALSE otherwise.

File

./context_rules.rules.inc, line 113
Provides rules integrations for the Context module

Code

function rules_action_context_rules_unset_context($context) {
  if ($context = context_load($context)) {
    return context_set('context', $context->name, FALSE) === FALSE ? FALSE : TRUE;
  }
}