| 1 |
<?php echo S2MEMBER_CURRENT_USER_REGISTRATION_DAYS; ?> |
| 2 |
This may output something like: 120 (120 days is approx 4 months) |
| 3 |
|
| 4 |
------------------------------------------------------------------------- |
| 5 |
|
| 6 |
In this example, the longer they've been registered (for free or otherwise), the more they get. |
| 7 |
|
| 8 |
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 30){ ?> |
| 9 |
Drip content to Users who've been registered for at least 30 days. |
| 10 |
<?php } ?> |
| 11 |
|
| 12 |
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 60){ ?> |
| 13 |
Drip content to Users who've been registered for at least 60 days. |
| 14 |
<?php } ?> |
| 15 |
|
| 16 |
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 90){ ?> |
| 17 |
Drip content to Users who've been registered for at least 90 days. |
| 18 |
<?php } ?> |
| 19 |
|
| 20 |
---- s2member Shortcode Equivalent (Requires s2Member Pro) ---- |
| 21 |
|
| 22 |
[s2If php="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 30"] |
| 23 |
Drip content to Users who've been registered for at least 30 days. |
| 24 |
[/s2If] |
| 25 |
|
| 26 |
[s2If php="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 60"] |
| 27 |
Drip content to Users who've been registered for at least 60 days. |
| 28 |
[/s2If] |
| 29 |
|
| 30 |
[s2If php="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 90"] |
| 31 |
Drip content to Users who've been registered for at least 90 days. |
| 32 |
[/s2If] |
| 33 |
|
| 34 |
**NOTE** The use of `[s2If php=""]` requires s2Member Pro. |
| 35 |
**NOTE** Arbitrary PHP code (via [s2If php=""]) will only work if you enable this functionality. |
| 36 |
Please visit `Dashboard → s2Member → Restriction Options → Simple Shortcode Conditionals` |
| 37 |
to set your preferences and enable `[s2If php=""]` when s2Member Pro is installed. |
| 38 |
|
| 39 |
---- Another s2member Shortcode Equivalent ---- |
| 40 |
|
| 41 |
[s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS" /] |