| 1 |
# Shortcodes and placeholders |
| 2 |
|
| 3 |
## Shortcodes for the confirmation and error pages |
| 4 |
|
| 5 |
### `[doi_confirmation_status]` |
| 6 |
|
| 7 |
Shows what happened to the link the visitor just clicked. Each text can be replaced through an attribute: |
| 8 |
|
| 9 |
| Attribute | When it applies | Default text | |
| 10 |
|---|---|---| |
| 11 |
| `confirmed` | The link confirms the address | Thank you! Your email address has been confirmed. | |
| 12 |
| `already_confirmed` | The link was used before | Your opt-in has already been confirmed. | |
| 13 |
| `expired` | The period has passed | This confirmation link has expired. Please submit the form again. | |
| 14 |
| `not_found` | Unknown or altered link | This confirmation link is invalid. | |
| 15 |
| `none` | Page opened without a link | empty, nothing is shown | |
| 16 |
|
| 17 |
Example: `[doi_confirmation_status confirmed="Welcome aboard!"]` |
| 18 |
|
| 19 |
Without the shortcode on the page, an expired, already used or invalid link still gets a short notice in front of the page content. |
| 20 |
|
| 21 |
 |
| 22 |
|
| 23 |
### `[doi_field name="…" default="…"]` |
| 24 |
|
| 25 |
Prints a value from the confirmed form, for example `[doi_field name="your-name" default="Hello"]`. The value appears only in the request that confirmed the sign-up. Otherwise, or if the field is empty, the value of `default` is shown. |
| 26 |
|
| 27 |
### `[doi_if status="…"]…[/doi_if]` |
| 28 |
|
| 29 |
Shows the enclosed content only when the outcome of the link matches `status`. Separate several values with commas: `confirmed`, `already_confirmed`, `expired`, `not_found`, `none`. |
| 30 |
|
| 31 |
Example: `[doi_if status="expired"]The link has expired. You can sign up again at any time.[/doi_if]` |
| 32 |
|
| 33 |
 |
| 34 |
|
| 35 |
### `[doi_error_message default="…"]` |
| 36 |
|
| 37 |
For the **Error redirect page**. Explains, based on the `doi_error` parameter in the address, why a sign-up was refused. Without the parameter nothing is shown. For an unknown code the value of `default` appears. |
| 38 |
|
| 39 |
| Code | Message | |
| 40 |
|---|---| |
| 41 |
| `rate_limit_ip` | Too many sign-ups from your connection in a short time. | |
| 42 |
| `rate_limit_email` | This address was signed up several times in a short time. | |
| 43 |
| `recipient_invalid` | This email address cannot receive mail. | |
| 44 |
| `no_recipient` | No valid email address was entered. | |
| 45 |
| `unique_email_duplicate` | This email address is already signed up. | |
| 46 |
| `consent_not_given` | Please agree to the consent text to sign up. | |
| 47 |
| `save_failed` | The sign-up could not be saved. | |
| 48 |
| `submission_cancelled` | The sign-up could not be completed. | |
| 49 |
|
| 50 |
The messages can be changed with the filter `f12_doi_error_messages`. The texts in the table are shortened. |
| 51 |
|
| 52 |
## Placeholders in the confirmation email |
| 53 |
|
| 54 |
Placeholders are written in square brackets in the message body and replaced when the mail is sent. Under **Show placeholders** on the **Email** tab the plugin lists the standard placeholders. |
| 55 |
|
| 56 |
### System placeholders |
| 57 |
|
| 58 |
| Placeholder | Content | |
| 59 |
|---|---| |
| 60 |
| `[doubleoptinlink]` | personal confirmation link, required in every mail | |
| 61 |
| `[doubleoptoutlink]` | unsubscribe link; the unsubscribe page is provided by the Opt-Out add-on | |
| 62 |
| `[doubleoptin_form_date]` | date of the sign-up in the site's date format | |
| 63 |
| `[doubleoptin_form_time]` | time in the site's time format | |
| 64 |
| `[doubleoptin_form_url]` | address of the page the form was submitted on | |
| 65 |
| `[doubleoptin_form_subject]` | subject of the form | |
| 66 |
| `[doubleoptin_form_email]` | the site's administrator address | |
| 67 |
| `[doubleoptin_privacy_url]` | address of the privacy policy (**Settings → Privacy Policy Page**, otherwise the WordPress privacy page) | |
| 68 |
|
| 69 |
### Form fields |
| 70 |
|
| 71 |
These placeholders are filled from the form's fields. The plugin recognizes fields by common names such as `your-email` or `first-name`. Assign differently named fields on the **Mapping** tab. Without a match the placeholder stays empty. |
| 72 |
|
| 73 |
`[doi_email]`, `[doi_name]`, `[doi_first_name]`, `[doi_last_name]`, `[doi_phone]`, `[doi_company]`, `[doi_subject]`, `[doi_message]`, `[doi_address]`, `[doi_city]`, `[doi_zip]`, `[doi_country]` |
| 74 |
|