# s2member/110913/includes/menu-pages/code-samples/current-user-can-ccaps-2.php

s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls &amp; Member Access Subscriptions, version 110913. 64 lines.

- Page: https://pluginprobe.com/plugins/s2member/110913/code/includes/menu-pages/code-samples/current-user-can-ccaps-2.php
- Raw: https://pluginprobe.com/plugins/s2member/110913/raw/includes/menu-pages/code-samples/current-user-can-ccaps-2.php
- Modified: 2011-09-14T05:54:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/s2member/110913/code/includes/menu-pages/code-samples/current-user-can-ccaps-2.php#L10-L20`.

```php
<?php if (current_user_can("access_s2member_level1")){ ?>

	Some premium content for all Level 1 Members.

	<?php if (current_user_can("access_s2member_ccap_ebooks")){ ?>
		Display links for downloading your eBooks.
	<?php } else { ?>
		Insert a PayPal® Modification Button that includes the Custom Capability: ebooks
		This might read, "Upgrade Your Membership for access to my eBooks!".
	<? } ?>
	
	<?php if (current_user_can("access_s2member_ccap_reports")){ ?>
		Display links for accessing your reports.
	<?php } else { ?>
		Insert a PayPal® Modification Button that includes the Custom Capability: reports
		This might read, "Upgrade Your Membership for access to my reports!".
	<? } ?>

	<?php if (current_user_can("access_s2member_ccap_tips")){ ?>
		Display tips.
	<?php } else { ?>
		Insert a PayPal® Modification Button that includes the Custom Capability: tips
		This might read, "Upgrade Your Membership for access to my tips!".
	<? } ?>

<?php } else { ?>
	Some public content.
<?php } ?>

---- s2member Shortcode Equivalents ----

[s2If current_user_can(access_s2member_level1)]

	Some premium content for all Level 1 Members.

	[_s2If current_user_can(access_s2member_ccap_ebooks)]
		Display links for downloading your eBooks.
	[/_s2If]
	[_s2If !current_user_can(access_s2member_ccap_ebooks)]
		Insert a PayPal® Modification Button that includes the Custom Capability: ebooks
		This might read, "Upgrade Your Membership for access to my eBooks!".
	[/_s2If]

	[_s2If current_user_can(access_s2member_ccap_reports)]
		Display links for accessing your reports.
	[/_s2If]
	[_s2If !current_user_can(access_s2member_ccap_reports)]
		Insert a PayPal® Modification Button that includes the Custom Capability: reports
		This might read, "Upgrade Your Membership for access to my reports!".
	[/_s2If]

	[_s2If current_user_can(access_s2member_ccap_tips)]
		Display tips.
	[/_s2If]
	[_s2If !current_user_can(access_s2member_ccap_tips)]
		Insert a PayPal® Modification Button that includes the Custom Capability: tips
		This might read, "Upgrade Your Membership for access to my tips!".
	[/_s2If]

[/s2If]

[s2If !current_user_can(access_s2member_level1)]
	Some public content.
[/s2If]
```
