PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 260917
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v260917
260917 260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 120213 All 189 releases
s2member / src / includes / menu-pages / code-samples / current-user-registration-days.x-php

current-user-registration-days.x-php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 260917, at src/includes/menu-pages/code-samples/current-user-registration-days.x-php

41 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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" /]