PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 120213
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v120213
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 / includes / menu-pages / code-samples / current-user-can-ccaps-2.x-php

current-user-can-ccaps-2.x-php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 120213, at includes/menu-pages/code-samples/current-user-can-ccaps-2.x-php

64 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (current_user_can("access_s2member_level1")){ ?>
2
3 Some premium content for all Level 1 Members.
4
5 <?php if (current_user_can("access_s2member_ccap_ebooks")){ ?>
6 Display links for downloading your eBooks.
7 <?php } else { ?>
8 Insert a PayPal® Modification Button that includes the Custom Capability: ebooks
9 This might read, "Upgrade Your Membership for access to my eBooks!".
10 <? } ?>
11
12 <?php if (current_user_can("access_s2member_ccap_reports")){ ?>
13 Display links for accessing your reports.
14 <?php } else { ?>
15 Insert a PayPal® Modification Button that includes the Custom Capability: reports
16 This might read, "Upgrade Your Membership for access to my reports!".
17 <? } ?>
18
19 <?php if (current_user_can("access_s2member_ccap_tips")){ ?>
20 Display tips.
21 <?php } else { ?>
22 Insert a PayPal® Modification Button that includes the Custom Capability: tips
23 This might read, "Upgrade Your Membership for access to my tips!".
24 <? } ?>
25
26 <?php } else { ?>
27 Some public content.
28 <?php } ?>
29
30 ---- s2member Shortcode Equivalents ----
31
32 [s2If current_user_can(access_s2member_level1)]
33
34 Some premium content for all Level 1 Members.
35
36 [_s2If current_user_can(access_s2member_ccap_ebooks)]
37 Display links for downloading your eBooks.
38 [/_s2If]
39 [_s2If !current_user_can(access_s2member_ccap_ebooks)]
40 Insert a PayPal® Modification Button that includes the Custom Capability: ebooks
41 This might read, "Upgrade Your Membership for access to my eBooks!".
42 [/_s2If]
43
44 [_s2If current_user_can(access_s2member_ccap_reports)]
45 Display links for accessing your reports.
46 [/_s2If]
47 [_s2If !current_user_can(access_s2member_ccap_reports)]
48 Insert a PayPal® Modification Button that includes the Custom Capability: reports
49 This might read, "Upgrade Your Membership for access to my reports!".
50 [/_s2If]
51
52 [_s2If current_user_can(access_s2member_ccap_tips)]
53 Display tips.
54 [/_s2If]
55 [_s2If !current_user_can(access_s2member_ccap_tips)]
56 Insert a PayPal® Modification Button that includes the Custom Capability: tips
57 This might read, "Upgrade Your Membership for access to my tips!".
58 [/_s2If]
59
60 [/s2If]
61
62 [s2If !current_user_can(access_s2member_level1)]
63 Some public content.
64 [/s2If]