General Rules
- The following symbols are reserved for internal brick control and should not be used within the value of a “name=” parameter: .^!:(){}[]
- Since a field can appear in a form multiple times, the ‘Name” attribute is used to reference the particular field and is the value tied to the field when stored in a usercustom_field.
- Because of the use for internal brick control, do not use names within CSS styling. Rely on class and id.
- Bricks that require a form must be within a brick included form. They will not work within a form defined directly.
- HTML rules prohibit forms within forms. Thus brick forms cannot be nested, nor can a brick form be in a regular form or a regular form in a brick form.
- If you discover that your html editor of choice is rearranging or discarding your bricks, surround them with “<!–bricks–” and “–bricks–>”. They will be treated as comments and not rearranged in your editor, but WP Bricks will strip them so that the bricks will not be hidden as comments on your web page!
back to the top of page
back to the top of page
back to the top of page
back to the top of page
if_brick help
Show everything after this brick only if the condition of the 'if' is met.
If_bricks can be nested and all bricks, including include bricks are processed or not processed between a matching if_brick and endif_brick based on the truth of the condition.Attribute | Values | Default |
---|
logic | Does this if_brick 'or' with the previous 'if' brick or do an 'and'.
and | The test must be true for all following content to be displayed and used. | or | The test of the previous if_brick OR this if_brick must be true. Can only be used if the immediate preceeding brick is an if_brick. If the preceeding if_brick was 'and' AND it changed the display of content from true to false, then if the result is true for this or any immediately following if 'or' bricks, then the display is enabled. An if 'or' brick does not use an 'endif' brick to terminate the logic.
Example: [if_brick ...][if_brick ...][if_brick logic='or' ...][if_brick logic='or' ...] content [endif_brick][endif_brick] If the first if_brick is false, the content does not show. the tests in the next three if_bricks are not made. Otherwise, if all three of the following if_bricks fail, the content does not show. if any of the three is true, then the content does show. |
| 'and' |
value | The value to be tested:
post | field | <fieldname> | Defines a field belonging to the WP posts table, eg. value='post.field.post_type' |
| meta | <fieldname> | Defines a non-custom field belonging to the WP postmeta table, eg. value='post.meta._price' |
| custom | <fieldname> | Defines a custom field belonging to the WP postmeta table, eg. value='post.custom.publisher' |
|
| user | field | <fieldname> | Defines a field belonging to the WP users table, eg. value='user.field.user_email' |
| meta | <fieldname> | Defines a non-custom field belonging to the WP usermeta table, eg. value='user.meta.last_name' |
| custom | <fieldname> | Defines a custom field belonging to the WP usermeta table, eg. value='user.custom.allowance' |
|
| id | <fieldId> | Reference to a field on the current web page. The truth of this if_brick is rechecked each time the value of the specified field changes. (if_bricks using 'id' values must be the last bricks in a set of 'or' bricks.) |
| $GLOBALS | <name> | Reference to the value of global variable 'name'. If the variable is missing, treat as empty string (''). |
| $_GET | <name> | Reference to the value of the http get variable 'name'. If the variable is missing, treat as empty string (''). |
| $_POST | <name> | Reference to the value of the http post variable 'name'. If the variable is missing, treat as empty string (''). |
| $_SERVER | <name> | Reference to the value of the server variable 'name'. If the variable is missing, treat as empty string (''). |
| action | post.add | A post is being added, eg value='action.post.add'. Valid compare values are 'yes' and 'no'. | post.update | A post is being updated, eg value='action.post.update'. Valid compare values are 'yes' and 'no'. | search | A search has been requested, eg value='action.search'. Valid compare values are 'yes' and 'no'. | user.add | A user is being added, eg value='action.user.add'. Valid compare values are 'yes' and 'no'. | user.login | A user is being logged in, eg value='action.user.login' Valid compare values are 'yes' and 'no'. | user.update | A user is being updated, eg value='action.user.update'. Valid compare values are 'yes' and 'no'. |
| list | <listname> | count | the number of items in the list, eg to get the numbe of entries in the 'titles' list, use value='list.titles.count'. |
|
|
| no default |
is | equal | if the field or the result of the action is equal to the value or error | greaterthan | if the field or the result of the action is greater than the value or error | greaterthan|equal | if the field or the result of the action greater than or is equal to the value or error | lessthan | if the field or the result of the action is less than the value or error | lessthan|equal | if the field or the result of the action is less than or equal to the value or error | unequal | if the field or the result of the action is not equal to the value or error |
| no default |
compare_value | The value the field is being compared to. Either compare_value or error must be present, but not both. | no default |
error | existing_user_login | An attempt was made to add a user that already existed. | invalid_email | An attempt was made to login a user with an invalid or non=matching email address. | (more) | Other errors will be added as they are needed. |
| no default |
help | 'yes' or 'no' | 'no' |
endif_brick help
Specifies the end of the information content controlled by the previous matching if_brick.Attribute | Values | Default |
---|
-- | There are no attributes for the endif_brick | -- |
back to the top of page
back to the top of page
back to the top of page
back to the top of page
back to the top of page