' . "\n"; echo '
'."\n"; echo '| ' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_before_left_sections", get_defined_vars ());
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_easy_way", true, get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_easy_way", get_defined_vars ());
echo ' ' . "\n";
echo ' ' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_easy_way", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_simple_way", true, get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_simple_way", get_defined_vars ());
if (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ())
{
echo '' . "\n";
echo ' ' . "\n";
echo 'The Extremely Easy Way (no scripting required)' . "\n"; echo 'From your s2Member Restriction Options panel, you may restrict access to certain Posts, Pages, Tags, Categories, and/or URIs based on a Member\'s Level. The s2Member Restriction Options panel makes it easy for you. All you do is type in the basics of what you want to restrict access to, and those sections of your site will be off limits to non-Members. That being said, there are times when you might need to have greater control over which portions of your site can be viewed by non-Members, or Members at different Levels; with different Capabilities. This is where API Scripting with Conditionals comes in. ' . "\n"; do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_api_easy_way", get_defined_vars ()); echo '' . "\n";
echo ' ' . "\n";
}
else // Otherwise, we can display the standardized version of this information.
{
echo '' . "\n";
echo ' ' . "\n";
echo 'Simple Conditionals (via WordPress Shortcodes)' . "\n"; echo 'In an effort to give you even more control over access restrictions, s2Member makes Simple Conditionals available to you from within WordPress, using Shortcodes that are fully compatible with both the Visual Editor, and also the HTML Tab in WordPress. In this section, we\'ll demonstrate several functions that are possible using Shortcodes: There are two different Shortcodes being demonstrated here: Example #1: Full access for anyone that is logged in. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-is-user-logged-in-farm.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #2: The same as example #1, but this uses NOTE: the use of ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-is-user-logged-in-else-farm.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #3: Full access for any Member with a Level >= 1; also using NOTE: the use of ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-current-user-can-full-access-farm.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #4: Specific content for each different Member Level. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-current-user-is-specific-content-farm.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #5: The same as example #4, but this uses NOTE: the use of ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-current-user-is-specific-content-else-farm.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #6: Simple Conditionals w/ integrated use of [s2Get /]. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-supplements-1-farm.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #7: Using multiple Conditionals together; also nesting other Shortcodes. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-supplements-2-farm.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #8: Using multiple Conditionals together; also nesting Conditionals. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-supplements-3-farm.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Membership Levels provide incremental access: ' . "\n"; echo '* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3. * WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 (a Free Subscriber). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched. ' . "\n"; echo '' . "\n"; echo 's2Member supports many Conditional Tags in WordPress. Including: Passing arguments into a Simple Conditional: ' . "\n"; echo '1. True/false → ex: *Tip: do NOT use spaces inside Conditionals. Implementing AND/OR Conditional expressions: ' . "\n"; echo '*Tip: do NOT mix AND/OR expressions. If you need to have both types of logic, use nesting... ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-nesting-farm.x-php")) . ' ' . "\n"; echo 'Another example, if you use NOTE: the use of ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-nesting-else-farm.x-php")) . ' ' . "\n"; echo '' . "\n";
echo ' ' . "\n";
}
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_simple_way", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_advanced_way", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_advanced_way", get_defined_vars ());
echo '' . "\n";
echo ' ' . "\n";
echo 'Simple Conditionals (via WordPress Shortcodes)' . "\n"; echo 'In an effort to give you even more control over access restrictions, s2Member makes Simple Conditionals available to you from within WordPress, using Shortcodes that are fully compatible with both the Visual Editor, and also the HTML Tab in WordPress. In this section, we\'ll demonstrate several functions that are possible using Shortcodes: There are two different Shortcodes being demonstrated here: Please see this KB article to learn more: s2Member Simple Shortcode Conditionals ' . "\n"; do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_api_simple_way", get_defined_vars ()); echo '' . "\n"; echo 'TIP: In addition to this documentation, you may also want to have a look at the s2Member Codex. Example #1: Full access for anyone that is logged in. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-is-user-logged-in.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #2: The same as example #1, but this uses NOTE: the use of ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-is-user-logged-in-else.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #3: Full access for any Member with a Level >= 1; also using NOTE: the use of ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-current-user-can-full-access.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #4: Specific content for each different Member Level. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-current-user-is-specific-content.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #5: The same as example #4, but this uses NOTE: the use of ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-current-user-is-specific-content-else.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #6: Simple Conditionals w/ integrated use of [s2Get /]. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-supplements-1.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #7: Using multiple Conditionals together; also nesting other Shortcodes. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-supplements-2.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #8: Using multiple Conditionals together; also nesting Conditionals. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-supplements-3.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Membership Levels provide incremental access: ' . "\n"; echo '* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3. * WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 (a Free Subscriber). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched. ' . "\n"; echo '' . "\n"; echo 's2Member supports ALL Conditional Tags in WordPress. Including, but not limited to: Passing arguments into a Simple Conditional: ' . "\n"; echo '1. True/false → ex: *Tip: do NOT use spaces inside Conditionals. Implementing AND/OR Conditional expressions: ' . "\n"; echo '*Tip: do NOT mix AND/OR expressions. If you need to have both types of logic, use nesting... ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-nesting.x-php")) . ' ' . "\n"; echo 'Another example, if you use NOTE: the use of ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/sc-s2-conditional-nesting-else.x-php")) . ' ' . "\n"; echo '' . "\n";
echo ' ' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_advanced_way", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_queries", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_queries", get_defined_vars ());
echo '' . "\n";
echo ' ' . "\n";
echo 'The Advanced Way (some PHP scripting required)' . "\n"; echo 'In an effort to give you even more control over access restrictions, s2Member makes some PHP functions, and also some PHP Constants, available to you from within WordPress. In this section, we\'ll demonstrate several functions: See also this related KB article: s2Member Simple Shortcode Conditionals ' . "\n"; do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_api_advanced_way", get_defined_vars ()); echo '' . "\n"; echo 'TIP: In addition to this documentation, you may also want to have a look at the s2Member Codex. Example #1: Full access for anyone that is logged in. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/is-user-logged-in.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #2: Full access for any Member with a Level >= 1. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-can-full-access.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #3: Specific content for each different Member Level. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-is-specific-content.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #4: Using s2Member API Conditionals, supplementing WordPress core functions. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/s2-conditional-supplements-1.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #5: Using s2Member API Conditionals, supplementing WordPress core functions. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/s2-conditional-supplements-2.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #6: Using multiple Conditionals together, and even nesting Conditionals. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/s2-conditional-supplements-3.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #7: Using s2Member API Constants, instead of conditional functions. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-can-constants-1.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #8: Using s2Member API Constants, instead of conditional functions. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-can-constants-2.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Membership Levels provide incremental access: ' . "\n"; echo '* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3. * WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 (a Free Subscriber). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched. ' . "\n"; echo '' . "\n";
echo ' ' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_queries", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_custom_capabilities", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_custom_capabilities", get_defined_vars ());
echo '' . "\n";
echo ' ' . "\n";
echo 'Advanced Query Conditionals (some PHP scripting required)' . "\n"; echo 's2Member provides several built-in API Functions that are tailored to meet the needs of developers integrating s2Member into their themes. Such as: In addition, there are two special functions that can be applied by theme authors before making custom queries: TIP: In addition to this documentation, you may also want to have a look at the s2Member Codex. Example #1: Pre-filtering custom queries in WordPress. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/custom-queries.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #2: OR, instead of pre-filtering; check Access Restrictions in The Loop. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/custom-queries-loop.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #3: Checking Tag Restrictions. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/specific-tag-restrictions.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #4: Checking Category Restrictions. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/specific-category-restrictions.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #5: Checking Page Restrictions. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/specific-page-restrictions.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Example #6: Checking Post Restrictions, including Custom Post Types. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/specific-post-restrictions.x-php")) . ' ' . "\n"; echo '' . "\n";
echo ' ' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_custom_capabilities", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_custom_capability_files", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_custom_capability_files", get_defined_vars ());
echo '' . "\n";
echo ' ' . "\n";
echo 'Packaging Together Custom Capabilities w/ Membership' . "\n"; echo '' . "\n"; echo 'Using one of s2Member\'s Payment Button and/or Form Generators, you can add Custom Capabilities in comma-delimited format. s2Member builds upon existing functionality offered by WordPress Roles/Capabilities. s2Member supports Free Subscribers (at Level #0), and several Primary Roles created by the s2Member plugin (i.e., s2Member Levels 1-4, or up to the number of configured Levels). Each s2Member Level (aka: s2Member Role) provides the Capability Now, if you\'d like to package together some variations of each Membership Level that you\'re selling, you can! All you do is add Custom Capabilities whenever you create your Payment Button and/or Form Shortcode (there is a field in the Button & Form Generators where you can enter Custom Capabilities). You can sell Membership Packages that come with Custom Capabilities, and even with custom prices. ' . "\n"; echo 'Custom Capabilities are an extension to a feature that already exists in WordPress. The Custom Capabilities are always prepended with The important thing to realize, is that Custom Capabilities, are just that. They\'re custom. s2Member only deals with the default Capabilities that it uses. If you start using Custom Capabilities, you MUST use Simple or Advanced Conditionals (i.e., See also: This KB article: s2Member Roles/Capabilities (Including bbPress Support). '."\n"; echo 'See also: This VIDEO tutorial: Using Custom Capabilities with s2Member (by Lead Developer Jason Caldwell). '."\n"; echo '' . "\n"; echo 'New: In the latest versions of s2Member, you can automatically require certain Custom Capabilities on a per Post/Page basis. So now, s2Member (if you prefer) CAN handle Custom Capabilities for you automatically! Whenever you edit a Post/Page (i.e., there is a Meta Box for s2Member in your Post/Page editing station)... you can tell s2Member to require certain Custom Capabilities that you type in, using comma-delimited format. In other words, you will need to type in some of the trigger words that you used whenever you created your Payment Buttons/Forms. This way paying Members will have the Custom Capabilities to view different kinds of content that you offer. ' . "\n"; echo 'New: By default, a Checkout Button or Form generated by s2Member is designed to (Add) Custom Capabilities to any that may or may not already exist for a particular User/Member. However, starting with s2Member v110815+, you can tell s2Member to (Remove All) Custom Capabilities, and then (Add) only the new ones that you specify. This is accomplished on a per Form/Button basis by preceding your comma-delimited list of Custom Capabilities with `-all`. For further details on this topic, click the [?] icon next to the Custom Capabilities field in any Button/Form Generator supplied by s2Member. ' . "\n"; echo 'New: Independent Custom Capabilities. You can now sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site (i.e., you could even sell Independent Custom Capabilities to Users at Membership Level #0, normally referred to as Free Subscribers, if you like). So this is quite flexible. For further details, please check your Dashboard, under: s2Member → PayPal Buttons → Capability (Buy Now) Buttons. ' . "\n"; do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_custom_capabilities", get_defined_vars ()); echo '' . "\n"; echo 'TIP: In addition to this documentation, you may also want to have a look at the s2Member Codex. Custom Capabilities: (music,videos): ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-can-ccaps-1.x-php")) . ' ' . "\n"; echo 'Custom Capabilities: (ebooks,reports,tips): ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-can-ccaps-2.x-php")) . ' ' . "\n"; echo '' . "\n";
echo ' ' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_custom_capability_files", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_advanced_dripping", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_advanced_dripping", get_defined_vars ());
echo '' . "\n";
echo ' ' . "\n";
echo 'Restricting Files, Based On Custom Capabilities' . "\n"; echo 'If you\'re NOT familiar with Custom Capabilities yet, please read the section above, titled: You can create Custom Capability Sub-directories under: TIP: In addition to this documentation, you may also want to have a look at the s2Member Codex. Custom Capabilities: (music,videos) ' . "\n"; echo 'Sub-Directory: Protected File: Now, here are some link examples, using Custom Capability Sub-directories: ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/ccap-file-downloads.x-php")) . ' ' . "\n"; echo 'These links will ONLY work for Members who are logged-in, with the proper Capabilities. ' . "\n"; echo '' . "\n"; echo 'Membership Levels: (this also works fine) ' . "\n"; echo 'Sub-Directory: Protected File: Now, here are some link examples, using Member Level Sub-directories: ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/level-file-downloads.x-php")) . ' ' . "\n"; echo 'These links will ONLY work for Members who are logged-in, with an adequate Membership Level. ' . "\n"; echo '' . "\n";
echo ' ' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_advanced_dripping", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_constants", true, get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_constants", get_defined_vars ());
if (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ())
{
echo '' . "\n";
echo ' ' . "\n";
echo 'Dripping Content (some PHP scripting may be required)' . "\n"; echo 'Content Dripping is the gradual, pre-scheduled release of premium website content to paying Members. This has become increasingly popular, because it allows older Members; those who have paid you more, due to recurring charges; to acquire access to more content progressively; based on their original paid registration time. It also gives you (as the site owner), the ability to launch multiple membership site portals, operating on autopilot, without any direct day-to-day involvement in a content release process. The TIP: In addition to this documentation, you may also want to have a look at the s2Member Codex. A very simple way to drip content; via the NOTE: the use of ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/s2drip-example1.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'To drip content using ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-paid-registration-days-dripping.x-php")) . ' ' . "\n"; echo 'There are more examples on this page, under the sub-section "s2Member PHP/API Constants". You\'ll see that s2Member provides you with access to several PHP/API Constants, which will assist you in dripping content. Some of the most relevant API Constants include: Very Advanced Content Dripping (some PHP required)' . "\n"; echo 'If you plan on dripping content in VERY advanced ways, you can tap into s2Member\'s recorded history of all Paid Registration Times. (i.e., Here is the function documentation for PHP/WordPress developers: ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/s2member-paid-registration-time.x-php")) . ' ' . "\n"; echo 'Here are some actual examples that should give you some ideas: ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/s2member-paid-registration-time-examples.x-php")) . ' ' . "\n"; echo '' . "\n";
echo ' ' . "\n";
}
else // Otherwise, we can display the standardized version of this information.
{
echo '' . "\n";
echo ' ' . "\n";
echo 'Using s2Get w/ s2Member API Constants' . "\n"; echo 'A Constant, is an identifier (a name) for a simple value. Below is a comprehensive list that includes all of the defined Constants available to you. We recommend using some of these Constants in the creation of your Login Welcome Page; which is described in the s2Member General Options Panel. These are NOT required, but you can get pretty creative with your Login Welcome Page if you know how to use the For example, you might use S2MEMBER_VERSION S2MEMBER_CURRENT_USER_LOGIN_COUNTER S2MEMBER_CURRENT_USER_IS_LOGGED_IN See: S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER See: S2MEMBER_CURRENT_USER_ACCESS_LEVEL Membership Levels provide incremental access: ' . "\n"; echo '* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3. * WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 (a Free Subscriber). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched. ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_ACCESS_LABEL S2MEMBER_CURRENT_USER_SUBSCR_ID S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY S2MEMBER_CURRENT_USER_CUSTOM S2MEMBER_CURRENT_USER_REGISTRATION_TIME S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS S2MEMBER_CURRENT_USER_REGISTRATION_DAYS S2MEMBER_CURRENT_USER_DISPLAY_NAME S2MEMBER_CURRENT_USER_FIRST_NAME S2MEMBER_CURRENT_USER_LAST_NAME S2MEMBER_CURRENT_USER_LOGIN S2MEMBER_CURRENT_USER_EMAIL S2MEMBER_CURRENT_USER_IP S2MEMBER_CURRENT_USER_REGISTRATION_IP S2MEMBER_CURRENT_USER_ID S2MEMBER_CURRENT_USER_FIELDS S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID S2MEMBER_LOGIN_WELCOME_PAGE_URL S2MEMBER_LOGIN_WELCOME_PAGE_ID S2MEMBER_LOGIN_PAGE_URL S2MEMBER_LOGOUT_PAGE_URL S2MEMBER_LEVELn_LABEL S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS S2MEMBER_REG_EMAIL_FROM_NAME S2MEMBER_REG_EMAIL_FROM_EMAIL S2MEMBER_PAYPAL_NOTIFY_URL S2MEMBER_PAYPAL_RETURN_URL S2MEMBER_PAYPAL_BUSINESS S2MEMBER_PAYPAL_ENDPOINT S2MEMBER_PAYPAL_API_ENDPOINT S2MEMBER_PAYPAL_API_USERNAME S2MEMBER_PAYPAL_API_PASSWORD S2MEMBER_PAYPAL_API_SIGNATURE S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0 ... This auto-fills the S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0 ... This auto-fills the S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1 ... This auto-fills the S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1 ... This auto-fills the These four Constants above are special. They\'re used by the PayPal Button Generator for s2Member. This is how s2Member identifies an existing Member (and/or a Free Subscriber), who is already logged in when they click a PayPal Modification Button that was generated for you by s2Member. Instead of forcing a Member (and/or a Free Subscriber) to re-register for a new account, s2Member can identify their existing account, and update it, according to the modified terms in your Button Code. Specifically, these three Button Code parameters: ' . "\n";
echo ' ' . "\n";
}
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_constants", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_js_globals", true, get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_js_globals", get_defined_vars ());
echo '' . "\n";
echo ' ' . "\n";
echo 'You Have Access To PHP Constants (some PHP scripting required)' . "\n"; echo 'A Constant, is an identifier (i.e., a name) for a simple value in PHP scripting. Below is a comprehensive list that includes all of the PHP defined Constants available to you. All of these Constants are also available through JavaScript as Global Variables. Example code has been provided in the documentation below. If you\'re a web developer, we suggest using some of these Constants in the creation of your Login Welcome Page; which is described in the s2Member General Options Panel. These are NOT required, but you can get pretty creative with the Login Welcome Page, if you know a little PHP. ' . "\n"; echo 'If you don\'t know any PHP, you can use the Before you read any further, you should install this handy plugin: ezPHP. TIP: In addition to this documentation, you may also want to have a look at the s2Member Codex. S2MEMBER_VERSION ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/version.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_LOGIN_COUNTER ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-login-counter.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_IS_LOGGED_IN ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-is-logged-in.x-php")) . ' ' . "\n"; echo 'See: S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-is-logged-in-as-member.x-php")) . ' ' . "\n"; echo 'See: S2MEMBER_CURRENT_USER_ACCESS_LEVEL ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-access-level.x-php")) . ' ' . "\n"; echo 'Membership Levels provide incremental access: ' . "\n"; echo '* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3. * WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 (a Free Subscriber). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched. ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_ACCESS_LABEL ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-access-label.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_SUBSCR_ID ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-subscr-id.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-subscr-or-wp-id.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-subscr-gateway.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_CUSTOM ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-custom.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_REGISTRATION_TIME ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-registration-time.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_REGISTRATION_DAYS ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-registration-days.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-paid-registration-time.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-paid-registration-days.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_DISPLAY_NAME ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-display-name.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_FIRST_NAME ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-first-name.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_LAST_NAME ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-last-name.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_LOGIN ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-login.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_EMAIL ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-email.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_IP ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-ip.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_REGISTRATION_IP ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-registration-ip.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_ID ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-id.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_FIELDS ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-fields.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-downloads-allowed.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-downloads-allowed-is-unlimited.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-downloads-currently.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-downloads-allowed-days.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL Code Sample #1 (standard link): ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-1.x-php")) . ' ' . "\n"; echo 'Code Sample #2 (open the link in a popup window): ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-2.x-php")) . ' ' . "\n"; echo 'Code Sample #3 (embed the form into a Post/Page using an IFRAME tag): ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-3.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/file-download-limit-exceeded-page-url.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/membership-options-page-url.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_LOGIN_WELCOME_PAGE_URL S2MEMBER_LOGIN_WELCOME_PAGE_ID ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/login-welcome-page-url.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_LOGIN_PAGE_URL ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/login-page-url.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_LOGOUT_PAGE_URL ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/logout-page-url.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_LEVELn_LABEL ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/leveln-label.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/leveln-file-downloads-allowed.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/leveln-file-downloads-allowed-days.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/file-download-inline-extensions.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_REG_EMAIL_FROM_NAME ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/reg-email-from-name.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_REG_EMAIL_FROM_EMAIL ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/reg-email-from-email.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_PAYPAL_NOTIFY_URL ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/paypal-notify-url.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_PAYPAL_RETURN_URL ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/paypal-return-url.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_PAYPAL_ENDPOINT ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/paypal-endpoint.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_PAYPAL_API_ENDPOINT ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/paypal-api-endpoint.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_PAYPAL_BUSINESS ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/paypal-business.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_PAYPAL_API_USERNAME ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/paypal-api-username.x-php")) . ' ' . "\n"; echo '* For security purposes, this is NOT included in the JS/API (JavaSript API). ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_PAYPAL_API_PASSWORD ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/paypal-api-password.x-php")) . ' ' . "\n"; echo '* For security purposes, this is NOT included in the JS/API (JavaSript API). ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_PAYPAL_API_SIGNATURE ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/paypal-api-signature.x-php")) . ' ' . "\n"; echo '* For security purposes, this is NOT included in the JS/API (JavaSript API). ' . "\n"; echo '' . "\n"; echo 'S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/paypal-pdt-identity-token.x-php")) . ' ' . "\n"; echo '* For security purposes, this is NOT included in the JS/API (JavaSript API). ' . "\n"; echo '' . "\n"; do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_list_of_api_constants", get_defined_vars ()); echo 'S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0 ... This auto-fills the S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0 ... This auto-fills the S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1 ... This auto-fills the S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1 ... This auto-fills the These four Constants are special. They are used by the PayPal Button Generator for s2Member. This is how s2Member identifies an existing Member (and/or a Free Subscriber), who is already logged in when they click a PayPal Modification Button that was generated for you by s2Member. Instead of forcing a Member (and/or a Free Subscriber) to re-register for a new account, s2Member can identify their existing account, and update it, according to the modified terms in your Button Code. Specifically, these three Button Code parameters: ' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/current-user-value-for-pp-on0-os0-on1-os1.x-php")) . ' ' . "\n"; echo '' . "\n";
echo ' ' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_js_globals", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_mop_vars", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_mop_vars", get_defined_vars ());
echo '' . "\n";
echo ' ' . "\n";
echo 'You Also Have Access To JS Globals (some JavaScript knowledge required)' . "\n"; echo 'Unless noted otherwise, all of the PHP Constants, are also available through JavaScript, as Global Variables (with the exact same names/types as their PHP counterparts). s2Member automatically loads it\'s compressed JavaScript API into your theme for WordPress. s2Member is very intelligent about the way it loads (and maintains) it\'s JavaScript API. You can rely on the JavaScript Globals, the same way you rely on PHP Constants. The only exceptions are related to security. Variables that include private server-side details, like Identity Tokens and other API service credentials, will be excluded automatically. ' . "\n"; do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_api_js_globals", get_defined_vars ()); echo '' . "\n";
echo ' ' . "\n";
echo '' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_mop_vars", get_defined_vars ());
}
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_hooks", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
{
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_hooks", get_defined_vars ());
echo '' . "\n";
echo ' ' . "\n";
echo '' . "\n";
echo 'Membership Options Page Variables (some scripting required)' . "\n"; echo 'At the core of s2Member, is it\'s ability to protect content (i.e., Posts, Pages, Tags, Categories, URI word fragments, etc). Whenever a public User, or even an existing Member attempts to access an area of your site that is unavailable to them; either because they are not logged-in, not a paying Member at all; or maybe they are logged-in, but they don\'t have access to content you\'ve protected at a higher Membership Level; s2Member will always redirect these unauthenticated requests to your Membership Options Page. ' . "\n"; echo 'So your Membership Options Page is a key element of your site. It serves as the focal point of your s2Member installation. Understanding this, you can see it becomes important for s2Member to provide information about what the User/Member was attempting to access (before they were redirected to the Membership Options Page). This is where s2Member\'s MOP Vars come in (i.e., Membership Options Page Variables). Whenever s2Member redirects a User/Member to your Membership Options Page, it will include these important MOP Variables in the query string of the URL. These Variables can be used to provide more informative messages; or even to provide a different set of Membership Options (e.g., Payment Buttons), based on what a User/Member was attempting to access. ' . "\n"; do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_api_mop_vars", get_defined_vars ()); echo '' . "\n"; echo 'TIP: If you\'re running s2Member Pro, there is a NEW simplified way to deal with MOP Vars using the PHP Code Sample: This may give you some other ideas [click here]. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/api-mop-vars-e.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 's2Member MOP Vars (Explained) ... ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/api-mop-vars.x-php")) . ' ' . "\n"; echo '' . "\n"; echo 'Backward compatibility (the old way): The structure of s2Member\'s MOP Vars changed again in Apr, 2014. However, s2Member still provides the same MOP Vars that it used in previous versions, for backward compatibility. These old MOP Variables were more difficult to use; they are now deprecated (i.e., they WILL eventually be removed). Going foward, please go by the new documentation above. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/api-mop-vars-o.x-php")) . ' ' . "\n"; echo 'Backward compatibility (the really old way): The structure of s2Member\'s MOP Vars changed a bit in Nov, 2011. However, s2Member still provides the same MOP Vars that it used in previous versions, for backward compatibility. These old MOP Variables were more difficult to use; they are now deprecated (i.e., they WILL eventually be removed). Going foward, please go by the new documentation above. ' . "\n"; echo '' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/api-mop-vars-ro.x-php")) . ' ' . "\n"; echo '' . "\n";
echo ' ' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_hooks", get_defined_vars ());
}
do_action("ws_plugin__s2member_during_scripting_page_after_left_sections", get_defined_vars ());
echo '' . "\n";
echo ' ' . "\n";
echo 'WP Hooks For Theme/Plugin Developers (scripting required)' . "\n"; echo 'In addition to its API Constants, s2Member also makes several Hooks/Filters available throughout its framework. This makes it possible to build onto (or even modify) s2Member in lots of different ways. If you need to add custom processing routines, modify the behavior of existing processing routines, or tinker with things otherwise; you should use API Hooks/Filters. API Hooks & Filters, give you the ability to "hook into", and/or "filter" processing routines, with files/functions of your own; instead of editing the s2Member plugin files directly. If you don\'t use a Hook/Filter, and instead, you edit the plugin files for s2Member, you\'ll have to merge all of your changes every time a new version of s2Member is released. If you create custom processing routines, you could place those routines into a PHP file here: Attn Developers: There are simply too many Hooks/Filters spread throughout s2Member\'s framework (over 1000 total). Rather than documenting each Hook/Filter, it is easier to browse through the files inside: TIP: In addition to this documentation, you may also want to have a look at the s2Member Codex. | ' . "\n";
echo '' . "\n"; c_ws_plugin__s2member_menu_pages_rs::display (); echo ' | ' . "\n"; echo '