Created
February 17, 2010 16:48
-
-
Save fago/306794 to your computer and use it in GitHub Desktop.
reaction rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rule = rules_reaction_rule(); | |
$rule->event('node_insert') | |
->condition(rules_or()->condition(rules_and())) | |
->condition(rules_condition('data_is', array('data:select' => 'node:status', 'value' => TRUE))->negate()) | |
->condition('data_is', array('data:select' => 'node:type', 'op' => 'IN', 'value' => array('page', 'story'))) | |
->condition('data_is', array('data:select' => 'node:type', 'op' => 'IN', 'value' => array('page', 'story'))); | |
$rule->save('test'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment