Mega Platform consists of Logical rules which are the heart of the Mega Platform, which are used for defining the rules for Page, Posts, Categories, Widgets, Themes, Language and URL Redirection. A logical rules is defined using 12 categories like User Role, User Profile, Pages, Posts, Geo location etc…, 37 subcategories like Email, Registered Date, Country, Date and Time etc… and with 14 different logical conditions like equals, not equal, greater than etc…

** **

*Many more categories and subcategories are planned in feature release.*

**Logical rules also provide two important developer friendly features:**

Developers can define a method in their code and add this method in logical rules, which will be called by Mega plugin once the rule is satisfied. Hook can be further used to develop customer features like sending email, show important messages in site.**Define custom hook :**

Access the evaluated value of the logical rule using the utility method in the code.**Logical rule status :**

**RulesEngine::is_rule_valid(“Rule Name”);**

See below table of categories, sub categories corresponding values for defining logical rule. We can combine the rule criteria using logical “AND” “OR” logically separate them using “BRACKETS” to define more complex rule.

CATEGORY | SUBCATEGORY | CONDITION | |
---|---|---|---|

Geo Location |
|||

Continent | Is equal to Is not equal to contains any of does not contains any of |
||

Country | Is equal to Is not equal to contains any of does not contains any of |
||

Currency | Is equal to Is not equal to contains any of does not contains any of |
||

City | Is equal to Is not equal to contains any of does not contains any of near by |
||

State or Region | Is equal to Is not equal to contains any of does not contains any of |
||

IP Address | Is equal to Is not equal to begins with contains does not contain ends with contains any of does not contains any of |
||

Postal Code | Is equal to Is not equal to begins with contains does not contain ends with contains any of does not contains any of |
||

Mobile Device |
|||

Mobile | Is equal to Is not equal to |
||

Tablet | Is equal to Is not equal to |
||

Mobile Operating System | Is equal to Is not equal to |
||

Mobile Device Type | Is equal to Is not equal to |
||

Operating System |
|||

Operating System | Is equal to Is not equal to |
||

User Role |
|||

User Role Name | Is equal to Is not equal to contains any of does not contains any of |
||

User Profile |
|||

Is equal to Is not equal to contains does not contain domain is contains any of does not contains any of |
|||

Registered Date | Is equal to Is not equal to greater than less than |
||

User Id | Is equal to Is not equal to contains any of does not contains any of |
||

Unregistered(Not Logged In) | Is equal to Is not equal to |
||

Date and Time |
|||

Date | Is equal to Is not equal to greater than less than |
||

Time | Is equal to Is not equal to greater than less than |
||

Date and Time | Is equal to Is not equal to greater than less than |
||

Day of Week | Is equal to Is not equal to contains any of does not contains any of |
||

Month | Is equal to Is not equal to contains any of does not contains any of |
||

Category |
|||

WordPress | Is equal to Is not equal to contains any of does not contains any of |
||

WooCommerce | Is equal to Is not equal to contains any of does not contains any of |
||

Tags |
|||

Woo Tags | Is equal to Is not equal to contains any of does not contains any of |
||

WP Tags | Is equal to Is not equal to contains any of does not contains any of |
||

Woo Attribute |
|||

Woo Attribute | Is equal to Is not equal to contains any of does not contains any of |
||

Request |
|||

URL | Is equal to Is not equal to contains does not contains pattern match |
||

Parameter | Is equal to Is not equal to contains does not contains pattern match |
||

Form Data | Is equal to Is not equal to |
||

Referral URL | Is equal to Is not equal to contains does not contains |
||

Response |
|||

Status Code | Is equal to Is not equal to |
||

Cookie | Is equal to Is not equal to Is set Is not set |
||

Page |
|||

Page Title | Is equal to Is not equal to contains any of does not contains any of |
||

Post |
|||

Post Title | Is equal to Is not equal to contains any of does not contains any of |
||

Language |
|||

Language Name | Is equal to Is not equal to |
||

Browser |
|||

Browser Name | Is equal to Is not equal to |

**Note: ***The above table is the complete list of categories and subcategories which are used for creating a logical rule, please check individual plugin for the list of categories which can be applicable to them.*