1. Home
  2. Docs
  3. Rules User Guide
  4. Introduction
  5. Individual Rules

Individual Rules

Every rule has the same anatomy: After some event occurs, if certain conditions are present, then perform some actions.

Event -> Conditions -> Actions

@Event

In WordPress, any existing hook is a potential event which a rule can be attached to. However, only events which have been properly described to rules are available for rule assignment. The plugin comes with descriptions for many core WordPress events. Additional events for 3rd party plugins or other custom code can be described manually or via a rules extension.

The first step to creating any rule is picking a proper event for rule assignment. The event determines “when” the rule will be evaluated.

@Conditions

The conditions on a rule are a logical set of checks that determine whether the actions on the rule should be taken or not.

@Actions

The actions on a rule are the “what happens” part of the rule. Any number of actions can be assigned to a rule, and will be performed according to whether the conditions on the rule pass or not.

Was this article helpful to you? Yes No

How can we help?