예제 #1
0
 /**
  * Builds a BuddyPress registration URL to `/register`.
  *
  * @package s2Member\Utilities
  * @since 111009
  *
  * @return str|bool Full URL to `/register`, if BuddyPress is installed; else false.
  */
 public static function bp_register_url()
 {
     if (c_ws_plugin__s2member_utils_conds::bp_is_installed()) {
         return home_url(function_exists('bp_get_signup_slug') ? bp_get_signup_slug() . '/' : BP_REGISTER_SLUG . '/');
     }
     return false;
 }
예제 #2
0
 /**
  * Builds a BuddyPress registration URL to `/register`.
  *
  * @package s2Member\Utilities
  * @since 111009
  *
  * @return str|bool Full URL to `/register`, if BuddyPress is installed; else false.
  */
 public static function bp_register_url()
 {
     if (c_ws_plugin__s2member_utils_conds::bp_is_installed()) {
         return site_url(function_exists("bp_get_signup_slug") ? bp_get_signup_slug() . "/" : BP_REGISTER_SLUG . "/");
     }
     return false;
 }
 public function __construct()
 {
     echo '<div class="ws-menu-page-group" title="One-Time-Offers ( Upon Login )">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-one-time-offers-section">' . "\n";
     echo '<h3>Optional One-Time-Offers ( Upon Login )</h3>' . "\n";
     echo '<p>This is enabled by s2Member Pro. One-Time-Offers allow you to override your default Login Welcome Page, based on the number of times a User/Member has logged in previously. s2Member Pro gives you the ability to write your own configuration file for One-Time-Offers. Please follow the instructions below. It is also possible for advanced site owners to use these <a href="#" onclick="alert(\'Replacement Codes:\\n\\n%%current_user_login%% = The current User\\\'s Username, lowercase.\\n%%current_user_id%% = The current User\\\'s ID.\\n%%current_user_level%% = The current User\\\'s s2Member Level.\\n%%current_user_role%% = The current User\\\'s WordPress® Role.' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '\\n%%current_user_ccaps%% = The current User\\\'s Custom Capabilities.' : '') . '\\n%%current_user_logins%% = Number of times the current User has logged in.\\n\\nFor example, if you\\\'re using BuddyPress, and you want to redirect Members to their BuddyPress Profile page after logging in, you would use: ' . site_url("/members/%%current_user_login%%/profile/") . '\\n\\nOr, using %%current_user_level%%, you could have a separate One-Time-Offer page for each Membership Level that you plan to offer.\'); return false;">Replacement Codes</a> in their One-Time-Offer URLs.</p>' . "\n";
     echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> s2Member integrates with BuddyPress. This configuration affects BuddyPress too.</em></p>' . "\n" : '';
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--s2member-pro-login-welcome-page-otos">' . "\n";
     echo 'One-Time-Offer Configuration File:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<textarea name="ws_plugin__s2member_pro_login_welcome_page_otos" id="ws-plugin--s2member-pro-login-welcome-page-otos" rows="8" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_login_welcome_page_otos"]) . '</textarea><br />' . "\n";
     echo 'This is a line-delimited list of URLs <em>( in a special format, as seen below )</em>.<br /><br />' . "\n";
     echo 'Special format ( explained ):<br />' . "\n";
     echo '<code>[Logins]</code>:<code>[Access Level]</code>:<code>[One-Time-Offer URL]</code><br /><br />' . "\n";
     echo '<em><code>[Logins]</code> ( this triggers your One-Time-Offer page, upon X number of logins )</em><br />' . "\n";
     echo '<em><code>[Access Level]</code> ( optional, this triggers your One-Time-Offer, based on Level# as well )</em><br />' . "\n";
     echo '<em><code>[One-Time-Offer URL]</code> ( where User is redirected, upon login )</em><br /><br />' . "\n";
     echo '<strong>Example Configuration File:</strong><br />' . "\n";
     echo '<code>1:http://example.com/your-first-login/</code> <em>( displayed on 1st login, to all Users/Members )</em><br />' . "\n";
     echo '<code>25:http://example.com/customer-loyalty-reward/</code> <em>( displayed on 25th login, to all Users/Members )</em><br />' . "\n";
     echo '<code>3:1:http://example.com/upgrade-to-level-2/</code> <em>( displayed on 3rd login, to Level #1 Members only )</em><br />' . "\n";
     echo '<code>1:0:http://example.com/upgrade-to-level-1/</code> <em>( displayed on 1st login, to Free Subscribers only )</em>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
 }
 /**
  * Lazy load CSS/JS files?
  *
  * @package s2Member\CSS_JS
  * @since 131028
  *
  * @return boolean TRUE if we should load; else FALSE.
  */
 public static function lazy_load_css_js()
 {
     static $load;
     // Static cache var.
     if (isset($load)) {
         return $load;
     }
     $null = NULL;
     // Needed below in earlier versions of WP.
     if (!$GLOBALS['WS_PLUGIN__']['s2member']['o']['lazy_load_css_js']) {
         $load = TRUE;
     } else {
         if (c_ws_plugin__s2member_systematics::is_s2_systematic_use_page()) {
             $load = TRUE;
         } else {
             if (!empty($_GET[apply_filters('ws_plugin__s2member_check_force_ssl_get_var_name', 's2-ssl', array())])) {
                 $load = TRUE;
             } else {
                 if (c_ws_plugin__s2member_utils_conds::bp_is_installed() && (bp_is_register_page() || bp_is_activation_page() || bp_is_user_profile())) {
                     $load = TRUE;
                 } else {
                     if (is_singular() && ($post = get_post($null)) && (stripos($post->post_content, 's2member') !== FALSE || stripos($post->post_content, '[s2') !== FALSE)) {
                         $load = TRUE;
                     } else {
                         if (preg_match('/\\/wp\\-signup\\.php|\\/wp\\-login\\.php|\\/wp\\-admin\\/(?:user\\/)?profile\\.php|[?&]s2member/', $_SERVER['REQUEST_URI'])) {
                             $load = TRUE;
                         }
                     }
                 }
             }
         }
     }
     if (!isset($load)) {
         $load = FALSE;
     }
     // Make sure it's set; always.
     return $load = apply_filters('ws_plugin__s2member_lazy_load_css_js', $load);
 }
 /**
  * Lazy load CSS/JS files?
  *
  * @package s2Member\CSS_JS
  * @since 131028
  *
  * @return boolean TRUE if we should load; else FALSE.
  */
 public static function lazy_load_css_js()
 {
     static $load;
     // Static cache var.
     if (isset($load)) {
         return $load;
     }
     if (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["lazy_load_css_js"]) {
         $load = TRUE;
     } else {
         if (c_ws_plugin__s2member_systematics::is_s2_systematic_use_page()) {
             $load = TRUE;
         } else {
             if (!empty($_GET[apply_filters("ws_plugin__s2member_check_force_ssl_get_var_name", "s2-ssl", array())])) {
                 $load = TRUE;
             } else {
                 if (c_ws_plugin__s2member_utils_conds::bp_is_installed() && (bp_is_register_page() || bp_is_activation_page() || bp_is_user_profile())) {
                     $load = TRUE;
                 } else {
                     if (is_singular() && ($post = get_post(NULL)) && (stripos($post->post_content, "s2member") !== FALSE || stripos($post->post_content, "[s2") !== FALSE)) {
                         $load = TRUE;
                     } else {
                         if (preg_match("/\\/wp\\-signup\\.php" . "|\\/wp\\-login\\.php" . "|\\/wp\\-admin\\/(?:user\\/)?profile\\.php" . "|[?&]s2member/", $_SERVER["REQUEST_URI"])) {
                             $load = TRUE;
                         }
                     }
                 }
             }
         }
     }
     if (!isset($load)) {
         $load = FALSE;
     }
     // Make sure it's set; always.
     return $load = apply_filters("ws_plugin__s2member_lazy_load_css_js", $load);
 }
예제 #6
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page">' . "\n";
     echo '<div class="ws-menu-page-toolbox">' . "\n";
     c_ws_plugin__s2member_menu_pages_tb::display();
     echo '</div>' . "\n";
     echo '<h2>Multisite Config</h2>' . "\n";
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     if (is_multisite() && is_main_site()) {
         echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
         echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
         echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />' . "\n";
         do_action("ws_plugin__s2member_during_mms_ops_page_before_left_sections", get_defined_vars());
         if (apply_filters("ws_plugin__s2member_during_mms_ops_page_during_left_sections_display_mms_patches", true, get_defined_vars())) {
             do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_before_mms_patches", get_defined_vars());
             echo '<div class="ws-menu-page-group" title="Multisite WordPress Patches" default-state="open">' . "\n";
             echo '<div class="ws-menu-page-section ws-plugin--s2member-mms-patches-section">' . "\n";
             echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/small-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n";
             echo '<h3>Multisite WordPress Patches (required for compatiblity)</h3>' . "\n";
             echo '<p>In order for s2Member to function properly in a Multisite environment, you MUST implement four patches. One goes into your <code>/wp-login.php</code> file, one into <code>/wp-includes/load.php</code>, one into <code>/wp-includes/ms-functions.php</code>, and another into <code>/wp-admin/user-new.php</code>. Please use the automatic patcher below. All you do is check the box &amp; click Save.</p>' . "\n";
             do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_during_mms_patches", get_defined_vars());
             echo '<table class="form-table">' . "\n";
             echo '<tbody>' . "\n";
             echo '<tr>' . "\n";
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--s2member-mms-auto-patch">' . "\n";
             echo 'Patch Automatically? (the easiest way)' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             echo '<td>' . "\n";
             if (defined("DISALLOW_FILE_MODS") && DISALLOW_FILE_MODS) {
                 echo '<select name="ws_plugin__s2member_mms_auto_patch" id="ws-plugin--s2member-mms-auto-patch" disabled="disabled">' . "\n";
                 echo '<option value="0" selected="selected">No (I\'ll patch WordPress myself)</option>' . "\n";
                 echo '</select><br />' . "\n";
                 echo '<em class="ws-menu-page-hilite">This is now locked. Your <code>/wp-config.php</code> file says: <code>DISALLOW_FILE_MODS = true</code></em>.' . "\n";
             } else {
                 echo '<select name="ws_plugin__s2member_mms_auto_patch" id="ws-plugin--s2member-mms-auto-patch">' . "\n";
                 echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_auto_patch"] ? ' selected="selected"' : '') . '>Yes (automatically patch WordPress)</option>' . "\n";
                 echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_auto_patch"] ? ' selected="selected"' : '') . '>No (I\'ll patch WordPress myself)</option>' . "\n";
                 echo '</select><br />' . "\n";
                 echo '<em class="ws-menu-page-hilite">These files MUST be patched, each time you upgrade the WordPress core. If you set this option to <code>Yes (Patch Automatically)</code>, s2Member will patch your installation now, and also in the future, should you upgrade to newer version. That way, you won\'t need to patch manually each time WordPress is upgraded.</em>' . "\n";
             }
             echo '</td>' . "\n";
             echo '</tr>' . "\n";
             echo '</tbody>' . "\n";
             echo '</table>' . "\n";
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             echo '<div id="ws-plugin--s2member-mms-patches-details-wrapper">' . "\n";
             echo '<h3>Rather Do It Yourself? (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-mms-patches-details\').toggle(); return false;" class="ws-dotted-link">manual instructions</a>)</h3>' . "\n";
             echo '<div id="ws-plugin--s2member-mms-patches-details" style="display:none;">' . "\n";
             echo '<p><strong>Patch #1</strong> ( /wp-login.php )</p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/mms-patch-wp-login.x-php")) . '</p>' . "\n";
             echo '<p><strong>Patch #2</strong> ( /wp-includes/load.php )</p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/mms-patch-load.x-php")) . '</p>' . "\n";
             echo '<p><strong>Patch #3</strong> ( /wp-admin/user-new.php )</p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/mms-patch-user-new.x-php")) . '</p>' . "\n";
             echo '<p><strong>Patch #4</strong> ( /wp-includes/ms-functions.php )</p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/mms-patch-ms-functions.x-php")) . '</p>' . "\n";
             echo '<p><em class="ws-menu-page-hilite">Don\'t forget to patch these files again, each time you upgrade the WordPress core.</em></p>' . "\n";
             echo '</div>' . "\n";
             echo '</div>' . "\n";
             echo '</div>' . "\n";
             echo '</div>' . "\n";
             do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_after_mms_patches", get_defined_vars());
         }
         if (apply_filters("ws_plugin__s2member_during_mms_ops_page_during_left_sections_display_mms_registration", true, get_defined_vars())) {
             do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_before_mms_registration", get_defined_vars());
             echo '<div class="ws-menu-page-group" title="Multisite Registration Configuration" default-state="open">' . "\n";
             echo '<div class="ws-menu-page-section ws-plugin--s2member-mms-registration-section">' . "\n";
             echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n";
             echo '<h3>Multisite Registration (Main Site Configuration)</h3>' . "\n";
             echo '<p>s2Member supports Free Subscribers <em>(at Level #0)</em>, and several Primary Roles created by the s2Member plugin (<em> i.e. s2Member Levels 1-4, or up to the number of configured Levels )</em>. If you want your visitors to be capable of registering absolutely free, you will want to "allow" Open Registration. Whenever a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0.</p>' . "\n";
             echo '<p><strong>Running A Multisite Blog Farm?</strong> With Multisite Networking enabled, your Main Site could ALSO offer a Customer access to create a Blog of their own <em>(optional)</em>, where a Customer becomes a "Member" of your Main Site, and also a Blog Owner/Administrator of at least one other Blog on your Network. With s2Member installed <em>(Network wide)</em>, each of your Blog Owners could offer Membership too, using a single copy of the s2Member plugin, which is a great selling point<em>!</em> We refer to this type of installation as a Multisite Blog Farm.</p>' . "\n";
             echo '<p>Multisite Networking makes a new Registration Form available <em>(driven by your theme)</em>; which we refer to as: <code>/wp-signup.php</code>. If, and only if, you\'re planning to offer Blogs, you MUST use <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Multisite Registration Form.\\n* s2Member makes this form available to logged-in Super Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">/wp-signup.php</a>, instead of using the Standard Login/Registration Form. In a Multisite installation, we refer to the Standard Login/Registration Form, as: <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">/wp-login.php?action=register</a>. If you\'re planning to offer Membership Access only, and NOT Blogs, you can simply use the <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">Standard Login/Registration Form</a>, which is easily customized through <code>s2Member -› General Options -› Login/Registration Design</code>.</p>' . "\n";
             echo '<p>In either case, s2Member Pro Forms are possible too. If you\'ve purchased s2Member Pro, you could use Pro Forms instead of these WordPress defaults. That being said, even with s2Member Pro Forms, if you are offering Blogs, you will still need to facilitate the actual creation of each Blog through <code>/wp-signup.php</code>. In other words, Customers can register through s2Member Pro Forms, and even checkout. But when it comes time to setup a new Blog, you will need to redirect your Customer to <code>/wp-signup.php</code>, while they are logged-in. This will allow them to create a new Blog on your Network. That is, if they are allowed to <em>(based on your configuration below)</em>.</p>' . "\n";
             echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form, powered by your theme.<br />(BuddyPress can handle both Membership and Blog creation in its integration)<br />(<a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">' . esc_html(c_ws_plugin__s2member_utils_urls::bp_register_url()) . '</a>)</em></p>' . "\n" : '';
             do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_during_mms_registration", get_defined_vars());
             echo '<div id="ws-plugin--s2member-mms-registration-support-package-details-wrapper">' . "\n";
             echo '<h4 style="margin-bottom:0;">Running a Multisite Blog Farm? (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-mms-registration-support-package-details\').toggle(); return false;" class="ws-dotted-link">click here / please read</a>)</h4>' . "\n";
             echo '<div id="ws-plugin--s2member-mms-registration-support-package-details" style="display:none;">' . "\n";
             echo '<p>The most important thing to do when setting up a Blog Farm with s2Member, is to add this line to your <code>/wp-config.php</code> file: <code><span style="color:#0000BB;">define</span><span style="color:#007700;">(</span><span style="color:#DD0000;">"MULTISITE_FARM"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>. This will add a default layer of security, to all Blogs within your Network, with respect to s2Member. <strong>But, before you go live</strong>, please contact <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member.com</a> for full documentation. There is some additional functionality that can be enabled for security on a Blog Farm installation; and also some menus/documentation/functionality that can be disabled. You will be asked to purchase our <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">Network Support Package</a> when you need assistance in this regard.</p>' . "\n";
             echo '<p>Multisite Blog Farms require a site owner that fully understands the potential security risks associated with Blog Farming. s2Member\'s <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">Network Support Package</a> provides you with the information you need, and priority support for anything about s2Member that you don\'t understand. In addition, our Network Support Package includes a lengthy PDF file that details a list of things affected by <code><span style="color:#0000BB;">define</span><span style="color:#007700;">(</span><span style="color:#DD0000;">"MULTISITE_FARM"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>, best practices, and other supplemental documentation focused on Blog Farms.</p>' . "\n";
             echo '<p><em><strong>Definition of a Multisite Blog Farm:</strong> If your Network is making it possible for "Members" of your Main Site, to create and/or manage Blogs (in any way), s2Member will consider your installation to be a Multisite Blog Farm. That being said, some site owners run a Multisite Network for the purpose of maintaining their own sites. The term Multisite Blog Farm does NOT apply to a Network that hosts multiple Child Blogs, all of which are operated by a single site owner and/or a single company. Again, a Multisite Blog Farm (in the eyes of s2Member), is any Network that is making it possible for "Members" of its Main Site, to create and/or manage Blogs; where one or more of these Child Blogs is being administered by a Customer (e.g. if you offer both Membership and Blog creation, as configured below).</em></p>' . "\n";
             echo '<p><em><strong>When NOT to run a Multisite Blog Farm:</strong> If you run a Multisite Network for the purpose of maintaining your own sites. You should NOT run a Multisite Blog Farm. You can still activate s2Member Network-wide, if you like (optional), but the advanced security considerations offered through s2Member\'s Multisite Blog Farm functionality are NOT needed in this case; because all of the Child Blogs in your Network belong to trusted Administrators (i.e. your Customers are NOT going to run Child Blogs on your Network in this case).</em></p>' . "\n";
             echo '</div>' . "\n";
             echo '</div>' . "\n";
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             echo '<table class="form-table">' . "\n";
             echo '<tbody>' . "\n";
             echo '<tr>' . "\n";
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--s2member-mms-registration-file">' . "\n";
             echo 'What Do You Plan To Offer? (please choose one)' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             echo '<td>' . "\n";
             if (defined("MULTISITE_FARM") && MULTISITE_FARM) {
                 echo '<select name="ws_plugin__s2member_mms_registration_file" id="ws-plugin--s2member-mms-registration-file" disabled="disabled">' . "\n";
                 echo '<option value="wp-signup" selected="selected">Blog Farm (I plan to offer both Membership &amp; Blog creation)</option>' . "\n";
                 echo '</select><br />' . "\n";
                 echo '<em class="ws-menu-page-hilite">This is now locked. Your <code>/wp-config.php</code> file says: <code>MULTISITE_FARM = true</code></em>.' . "\n";
             } else {
                 echo '<select name="ws_plugin__s2member_mms_registration_file" id="ws-plugin--s2member-mms-registration-file">' . "\n";
                 echo '<option value="wp-login"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_file"] === "wp-login" ? ' selected="selected"' : '') . '>Membership Only (I\'m NOT offering Blogs)</option>' . "\n";
                 echo '<option value="wp-signup"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_file"] === "wp-signup" ? ' selected="selected"' : '') . '>Blog Farm (I plan to offer both Membership &amp; Blog creation)</option>' . "\n";
                 echo '</select><br />' . "\n";
                 echo 'Depending on your selection, the options below may change.' . "\n";
             }
             echo '</td>' . "\n";
             echo '</tr>' . "\n";
             echo '</tbody>' . "\n";
             echo '</table>' . "\n";
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             echo '<table class="form-table ws-plugin--s2member-mms-registration-wp-login" style="margin:0;">' . "\n";
             echo '<tbody>' . "\n";
             echo '<tr>' . "\n";
             echo '<th style="padding-top:0;">' . "\n";
             echo '<label for="ws-plugin--s2member-allow-subscribers-in">' . "\n";
             echo 'Your Main Site / Allow Open Registration? (via <code>wp-login.php?action=register</code>)' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             echo '<td>' . "\n";
             echo '<select name="ws_plugin__s2member_allow_subscribers_in" id="ws-plugin--s2member-allow-subscribers-in">' . "\n";
             echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>No (do NOT allow Open Registration)</option>' . "\n";
             echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>Yes (allow Open Registration; Free Subscribers at Level #0)</option>' . "\n";
             echo '</select><br />' . "\n";
             echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">wp-login.php?action=register</a> (on your Main Site). When a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0. The s2Member software reserves Level #0; to be used ONLY for Free Subscribers. All other Membership Levels [1-4] require payment.' . "\n";
             echo '</td>' . "\n";
             echo '</tr>' . "\n";
             echo '</tbody>' . "\n";
             echo '</table>' . "\n";
             echo '<table class="form-table ws-plugin--s2member-mms-registration-wp-signup" style="margin:0;">' . "\n";
             echo '<tbody>' . "\n";
             echo '<tr>' . "\n";
             echo '<th style="padding-top:0;">' . "\n";
             echo '<label for="ws-plugin--s2member-mms-registration-grants">' . "\n";
             echo 'Your Main Site / Allow Open Registration? (via <code>wp-signup.php</code>)' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             echo '<td style="padding-bottom:0;">' . "\n";
             echo '<select name="ws_plugin__s2member_mms_registration_grants" id="ws-plugin--s2member-mms-registration-grants">' . "\n";
             echo '<option value="none"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_grants"] === "none" ? ' selected="selected"' : '') . '>No (do NOT allow Open Registration)</option>' . "\n";
             echo '<option value="user"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_grants"] === "user" ? ' selected="selected"' : '') . '>Yes (allow Open Registration; Free Subscribers at Level #0)</option>' . "\n";
             echo '<option value="all"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_grants"] === "all" ? ' selected="selected"' : '') . '>Yes (allow Open Registration; Free Subscribers, with a free Blog too)</option>' . "\n";
             echo '</select><br />' . "\n";
             echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Multisite Registration Form.\\n* s2Member makes this form available to logged-in Super Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">wp-signup.php</a> (on your Main Site).' . "\n";
             echo '</td>' . "\n";
             echo '</tr>' . "\n";
             echo '</tbody>' . "\n";
             echo '</table>' . "\n";
             echo '<table class="form-table ws-plugin--s2member-mms-registration-wp-signup ws-plugin--s2member-mms-registration-wp-signup-blogs-level0">' . "\n";
             echo '<tbody>' . "\n";
             echo '<tr>' . "\n";
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--s2member-mms-registration-blogs-level0">' . "\n";
             echo 'Level #0 (Free Subscribers):' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             echo '<td style="padding-bottom:0;">' . "\n";
             echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_mms_registration_blogs_level0" id="ws-plugin--s2member-mms-registration-blogs-level0" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level0"]) . '" /><br />' . "\n";
             echo 'How many blogs can a Free Subscriber create?' . "\n";
             echo '</td>' . "\n";
             echo '</tr>' . "\n";
             echo '</tbody>' . "\n";
             echo '</table>' . "\n";
             echo '<div class="ws-menu-page-hr ws-plugin--s2member-mms-registration-wp-signup"></div>' . "\n";
             echo '<table class="form-table ws-plugin--s2member-mms-registration-wp-signup" style="margin:0;">' . "\n";
             echo '<tbody>' . "\n";
             for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
                 echo '<tr>' . "\n";
                 echo '<th style="padding-top:0;">' . "\n";
                 echo '<label for="ws-plugin--s2member-mms-registration-blogs-level' . $n . '">' . "\n";
                 echo 'Membership Level #' . $n . ' / Maximum Blogs Allowed:' . "\n";
                 echo '</label>' . "\n";
                 echo '</th>' . "\n";
                 echo '</tr>' . "\n";
                 echo '<tr>' . "\n";
                 echo '<td>' . "\n";
                 echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_mms_registration_blogs_level' . $n . '" id="ws-plugin--s2member-mms-registration-blogs-level' . $n . '" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level" . $n]) . '" /><br />' . "\n";
                 echo 'How many blogs can a Member ( at Level #' . $n . ' ) create?' . "\n";
                 echo '</td>' . "\n";
                 echo '</tr>' . "\n";
             }
             echo '</tbody>' . "\n";
             echo '</table>' . "\n";
             echo '</div>' . "\n";
             echo '</div>' . "\n";
             do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_after_mms_registration", get_defined_vars());
         }
         do_action("ws_plugin__s2member_during_mms_ops_page_after_left_sections", get_defined_vars());
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p class="submit"><input type="submit" value="Save All Changes" /></p>' . "\n";
         echo '</form>' . "\n";
     } else {
         echo '<p style="margin-top:0;"><span class="ws-menu-page-hilite">Your WordPress installation does not have Multisite Networking enabled.<br />Which is perfectly OK :-) Multisite Networking is 100% completely optional.</span></p>' . "\n";
         echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n";
         if (file_exists($ws_plugin__s2member_temp = dirname(dirname(dirname(__FILE__))) . "/readme-ms.txt")) {
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             if (!function_exists("NC_Markdown")) {
                 include_once dirname(dirname(__FILE__)) . "/externals/markdown/nc-markdown.inc.php";
             }
             $ws_plugin__s2member_temp = file_get_contents($ws_plugin__s2member_temp);
             $ws_plugin__s2member_temp = preg_replace("/(\\=)( )(.+?)( )(\\=)/", "<h3>\$3</h3>", $ws_plugin__s2member_temp);
             $ws_plugin__s2member_temp = NC_Markdown($ws_plugin__s2member_temp);
             echo preg_replace("/(\\<a)( href)/i", "\$1" . ' target="_blank" rel="nofollow external"' . "\$2", $ws_plugin__s2member_temp);
         }
     }
     echo '</td>' . "\n";
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__s2member_menu_pages_rs::display();
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
 }
예제 #7
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page">' . "\n";
     echo '<div class="ws-menu-page-toolbox">' . "\n";
     c_ws_plugin__s2member_menu_pages_tb::display();
     echo '</div>' . "\n";
     echo '<h2>Quick-Start Guide</h2>' . "\n";
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     do_action("ws_plugin__s2member_during_start_page_before_left_sections", get_defined_vars());
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_video_tutorials", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_video_tutorials", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Video Tutorials" style="padding-top:5px;">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-process-section">' . "\n";
         echo '<p><iframe src="//www.youtube.com/embed/videoseries?list=PL8gPolqFnYqtBVz0nVeN2sJgRVednq0jw" width="100%" height="550" frameborder="0" allowfullscreen></iframe></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_video_tutorials", get_defined_vars());
         echo '</div>' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-process-section">' . "\n";
         echo '<p><iframe src="//www.youtube.com/embed/videoseries?list=PLA40AFC154461862E" width="100%" height="550" frameborder="0" allowfullscreen></iframe></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_video_tutorials", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_video_tutorials", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_registration_process", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_registration_process", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="The Registration Process">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-process-section">' . "\n";
         echo '<h3>The Subscription Signup/Registration Process</h3>' . "\n";
         echo '<p>1. Internet Users will go to your Membership Options Page <em>(which you\'ll need to configure on the s2Member General Options panel)</em>. On this Membership Options Page (that you create in WordPress), you\'ll insert the PayPal Subscription Buttons that were generated for you by s2Member.</p>' . "\n";
         echo '<p>2. An Internet User will click on a PayPal Subscription Button from your Membership Options Page. They will be transferred over to PayPal in order to agree to your Membership terms and pricing. You can customize the Checkout Page Style, Pricing, Payment Periods, and more - whenever you generate your PayPal Buttons through s2Member.</p>' . "\n";
         echo '<p>3. Once a User has completed the Subscription Signup Process at PayPal, they\'ll be returned to your site, where they\'ll be activated by s2Member instantly, and given the opportunity to register a Username &amp; Password for their Membership. <em>(Note: they\'ll be allowed to register a Username &amp; Password, even if you\'ve set \'Anyone Can Register\' to `Off` in your General WordPress options; because s2Member identifies the User as having paid for Membership access through PayPal)</em>.</p>' . "\n";
         echo '<p>s2Member will also send the User an email with instructions on how to register their Username &amp; Password, just in case they missed the instructions after checkout. That email will be sent to their PayPal email address. Much of this is handled through the PayPal IPN service behind-the-scene, where PayPal and s2Member communicate with each other.</p>' . "\n";
         echo '<p>4. Once a User has completed checkout and registered a Username &amp; Password, they\'ll be able to log in. The first page they\'ll see after logging in, will be your Login Welcome Page <em>(which you\'ll need to configure on the s2Member General Options panel)</em>. Your Login Welcome Page can contain whatever you like. You\'ll need to design this Page in WordPress.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_registration_process", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_registration_process", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_log_reg_form", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_log_reg_form", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your Login/Registration Form">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-login-reg-form-section">' . "\n";
         echo '<h3>Your Login/Registration Form (already built-in)</h3>' . "\n";
         echo '<p>s2Member uses the existing WordPress Login/Registration system. This is the same Login/Registration Form that you use to access your WP Dashboard. However, with s2Member installed, your Login/Registration Forms can be customized <em>(i.e. re-branded)</em>. <em>See: <code>s2Member -› General Options -› Login/Registration Design</code>.</em> You can make the default Login/Registration Forms match your WordPress theme design; by changing the background color/image, your logo image, add Custom Fields, and more<em>!</em></p>' . "\n";
         echo '<p>Since s2Member uses the default Login/Registration system for WordPress, s2Member is also compatible with themes and other plugins <em>(such as BuddyPress)</em>. If your theme has a login form built-in already, chances are, it\'s perfectly compatible with s2Member. There are also many plugins available that are designed to place login forms into your Sidebar; and many of those are also compatible with s2Member\'s integration. If you have any trouble, please check the <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Forum URI")) . '" target="_blank" rel="external">s2Member Forums</a> for assistance.</p>' . "\n";
         echo is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() || c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<div class="ws-menu-page-hr"></div>' . "\n" : '';
         echo is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() ? '<p><em>The Main Site of a Multisite Blog Farm uses a different Registration Form. See: <code>s2Member -› General Options -› Registration/Profile Fields</code>.</em></p>' . "\n" : '';
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form. See: <code>s2Member -› General Options -› Registration/Profile Fields</code>.</em></p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_log_reg_form", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_log_reg_form", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_login_welcome_page", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_login_welcome_page", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your Login Welcome Page">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-login-welcome-page-section">' . "\n";
         echo '<h3>Your Login Welcome Page (you create this in WordPress)</h3>' . "\n";
         echo '<p>You create this special Page in WordPress. This is a "Page" not a Post. This is the first page Members will see after logging into your site.</p>' . "\n";
         echo '<p>You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Login Welcome Page</code>, and click Publish.</p>' . "\n";
         echo '<p>Once you have all of your <code>s2Member -› General Options</code> configured, and once you have a basic understanding of how s2Member works, go back and customize the title and content for this Page. You\'ll want to be creative with your Login Welcome Page. However, you should configure your <code>s2Member -› General Options</code> first, and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/customizing-your-lwp/" target="_blank" rel="external">Customizing Your Login Welcome Page</a>.</p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_login_welcome_page", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_login_welcome_page", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_membership_options_page", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_membership_options_page", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your Membership Options Page">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-options-page-section">' . "\n";
         echo '<h3>Your Membership Options Page (you create this in WordPress)</h3>' . "\n";
         echo '<p>You create this special Page in WordPress. This is a "Page" not a Post. s2Member comes with a PayPal Button Generator. You will generate PayPal Buttons with s2Member, for each Membership Level that you plan to offer. Those buttons will be inserted into your Membership Options Page. If a User in the general public attempts to access an area of your site that is being protected by s2Member <em>(based on your configuration)</em>, s2Member will redirect the User to your Membership Options Page, where they can signup through PayPal and become a Member.</p>' . "\n";
         echo '<p>You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Membership Options Page</code>, and click Publish.</p>' . "\n";
         echo '<p>Once you have all of your <code>s2Member -› General Options</code> configured, and once you have a basic understanding of how s2Member works, go back and customize the title and content for this Page. You\'ll want to be creative with your Membership Options Page. However, you should configure your <code>s2Member -› General Options</code> first, and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_membership_options_page", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_membership_options_page", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_general_options", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_general_options", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your s2Member -› General Options">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-general-options-section">' . "\n";
         echo '<h3>Your s2Member -› General Options (Basic Configuration)</h3>' . "\n";
         echo '<p>Once you have a Login Welcome Page, and a Membership Options Page. Go to: <code>s2Member -› General Options</code>.</p>' . "\n";
         echo '<p>From your s2Member General Options Panel you can setup the basics of your Membership offering. Including the design of your Login/Registration Form, any Custom Registration/Profile Fields you\'d like to create, Labels for each Membership Level, Open Registration (on/off), a Profile Editing Panel for Members, and more.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_general_options", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_general_options", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_restriction_options", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_restriction_options", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your s2Member -› Restriction Options">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-restriction-options-section">' . "\n";
         echo '<h3>Your s2Member -› Restriction Options (Basic Configuration)</h3>' . "\n";
         echo '<p>Once you have a Login Welcome Page, and a Membership Options Page. Go to: <code>s2Member -› Restriction Options</code>.</p>' . "\n";
         echo '<p>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 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.</p>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p>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. This is where API Scripting with Conditionals comes in. <em>For more information, please check your Dashboard here: <code>s2Member -› API Scripting</code></em>.</p>' . "\n" : '';
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/simple-shortcode-conditionals/" target="_blank" rel="external">Simple Shortcode Conditionals</a>.</p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_restriction_options", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_restriction_options", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_automation_process", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_automation_process", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Cancellations / Expirations / Terminations">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-automation-process-section">' . "\n";
         echo '<h3>Subscription Cancellations / Expirations / Terminations</h3>' . "\n";
         echo '<p>You\'ll be happy to know that s2Member handles cancellations, expirations, failed payments, terminations <em>(e.g. refunds &amp; chargebacks)</em> for you automatically. If you log into your PayPal account and cancel a Member\'s Subscription, or, if the Member logs into their PayPal account and cancels their own Subscription, s2Member will be notified of these important changes and react accordingly through the PayPal IPN service that runs silently behind-the-scene.</p>' . "\n";
         echo '<p>The PayPal IPN service will notify s2Member whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. If you issue a refund to an unhappy Customer through PayPal, s2Member will be notified; and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically <em>(based on your configuration)</em>. The communication from PayPal -› s2Member is seamless.</p>' . "\n";
         echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through PayPal... but, s2Member continues allowing the User  access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT (End Of Term) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member.</em></p>' . "\n";
         echo '<p><em>s2Member will not process an EOT until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system (based on your configuration). s2Member also calculates one extra day (24 hours) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_automation_process", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_automation_process", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_upgrading_downgrading", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_upgrading_downgrading", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Upgrading/Downgrading Accounts">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-upgrading-downgrading-section">' . "\n";
         echo '<h3>Upgrading And/Or Downgrading User Accounts</h3>' . "\n";
         echo '<p>s2Member builds upon existing functionality offered through WordPress Roles and Capabilities. From your WordPress Dashboard, go to: <code>Users</code>. You can use bulk actions to modify Member Access Levels all at once, or click on an individual Member account to modify only their specific Access Level. If you want to temporarily demote a Member so they cannot access Membership privileges, set their Role to Subscriber. When you\'re ready to give them their Membership privileges back, change their Role back to one of the s2Member Levels.</p>' . "\n";
         echo '<p>All financial details, such as pricing, trial periods, subscription lengths, refunds, and other Customer service issues; should be handled by YOU, through your PayPal account, and NOT through WordPress. Feel free to modify your Members\' Subscriptions via PayPal as often as you like. s2Member will be notified through the PayPal IPN service behind-the-scene automatically. For example... If you log into PayPal and cancel a Member\'s paid Subscription, s2Member will be notified by PayPal behind-the-scene, and s2Member will remove their Membership privileges at the correct point in time.</p>' . "\n";
         echo '<p>That being said, if you log into your WordPress Dashboard and delete a Member\'s account, you will still need to log into PayPal and cancel billing for the account you deleted. In other words, s2Member can be notified automatically about actions you take inside PayPal\'s interface, but PayPal CANNOT be notified of actions you take inside your WordPress Dashboard. At least, not in an automated fashion, as that would create a security issue for PayPal. So... automation works seamlessly from PayPal -› to s2Member, but NOT the other way around.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_upgrading_downgrading", get_defined_vars());
         echo '</div>' . "\n";
         echo '<div class="ws-menu-page-hr ws-plugin--s2member-subscription-modification-section-hr"></div>' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-subscription-modification-section">' . "\n";
         echo '<h3>Giving Members The Ability To Modify Their Own Subscription</h3>' . "\n";
         echo '<p>If you\'d like to give your Members <em>(and/or your Free Subscribers)</em> the ability to modify their billing plan, by switching to a more expensive option, or a less expensive option; generate a new PayPal Modification Button, using the s2Member PayPal Button Generator. Configure the updated Level, pricing, terms, etc. Then, make that new Modification Button available to Members who are logged into their existing account with you. For example, you might want to insert a "Level #2" Upgrade Button into your Login Welcome Page, which would up-sell existing Level #1 Members to a more expensive plan that you offer.</p>' . "\n";
         echo '<p><em><strong>*Modification Process*</strong> When you send a Member to PayPal using a Subscription Modification Button, PayPal will ask them to login. Once they\'re logged in, instead of being able to signup for a new Membership, PayPal will provide them with the ability to upgrade and/or downgrade their existing Membership with you, by allowing them to switch to the Membership Plan that was specified in the Subscription Modification Button. PayPal handles this nicely, and you\'ll be happy to know that s2Member has been pre-configured to deal with this scenario as well, so that everything remains automated. Their Membership Access Level will either be promoted, or demoted, based on the actions they took at PayPal during the modification process. Once an existing Member completes their Subscription Modification at PayPal, they\'ll be brought back to their Login Welcome Page, instead of sending them to a registration screen.</em></p>' . "\n";
         echo '<p><em><strong>*Also Works For Free Subscribers*</strong> Although a Free Subscriber does not have an existing PayPal Subscription, s2Member is capable of adapting to this scenario gracefully. Just make sure that your existing Free Subscribers (the ones who wish to upgrade) pay for their Membership through a Modification Button generated by s2Member. That will allow them to continue using their existing account with you. In other words, they can keep their existing Username (and anything already associated with that Username), rather than being forced to re-register after checkout.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_upgrading_downgrading_modifications", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_upgrading_downgrading", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_reg_before_checkout", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_reg_before_checkout", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Registration Before Checkout?">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-reg-before-checkout-section">' . "\n";
         echo '<h3>Registration Before Checkout? (reversing the process)</h3>' . "\n";
         echo '<p>By default, s2Member will send a Customer directly to PayPal, and only after checkout is completed does the Customer have the ability to register a Username/Password for access to your site. This process works very well in most cases, and it has the benefit of increasing conversion rates; because there are fewer obstacles for the Customer on their way to the actual checkout process at PayPal.</p>' . "\n";
         echo '<p>That being said, we believe the <strong>ideal</strong> approach is a <strong>combined Checkout/Registration process</strong>; in just one simple step <em>(available with <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro</a> via PayPal Pro integration — or through Authorize.Net integration)</em>. However, even with PayPal Standard integration there is a way to accomplish Registration Before Checkout, thereby reversing the process — if you prefer it that way. This is accomplished by turning Open Registration <code>(on)</code>, and then making a PayPal Button available to Free Subscribers at Level #0. In other words, you can let Visitors register for free at Level #0 <em>(where they have access to very little perhaps)</em>, and then charge them for access to higher Member Levels [1-4]. For further details, please check your WordPress Dashboard here: <code>s2Member -› General Options -› Open Registration</code>.</p>' . "\n";
         echo '<p><em>s2Member\'s Simple Conditionals can help you further integrate this process, by allowing you to integrate a special PayPal Button on your Login Welcome Page; one that will be seen only by Free Subscribers at Level #0. Please check your WordPress Dashboard under: <code>s2Member -› API Scripting -› Simple Conditionals</code>. We also suggest reading over the documentation on PayPal Modification Buttons. See: <code>s2Member -› PayPal Buttons -› Subscription Modifications</code>.</em></p>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/simple-shortcode-conditionals/" target="_blank" rel="external">Simple Shortcode Conditionals</a>.</p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_reg_before_checkout", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_reg_before_checkout", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_themes", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_themes", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Choosing The Perfect WordPress Theme">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-themes">' . "\n";
         echo '<h3>Choosing The Perfect WordPress Theme</h3>' . "\n";
         echo '<p>We recommend <a href="http://www.s2member.com/r/themeforest/" target="_blank" rel="external">ThemeForest</a>. This is a great place to find the perfect theme for your installation of WordPress — at VERY affordable prices.</p>' . "\n";
         echo '<p>s2Member is compatible with just about any WordPress theme. However, we highly recommend a particular theme that has served our clients very well. See: <a href="http://www.s2member.com/r/themeforest-infocus-theme/" target="_blank" rel="external">inFocus for WordPress</a>. Developed by MySiteMyWay. We use a slightly modified version of inFocus @ <a href="http://www.s2member.com/" target="_blank" rel="external">s2Member.com</a>.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_themes", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_themes", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_pro", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_pro", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Upgrading to s2Member Pro<em>!</em>">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-pro">' . "\n";
         echo '<h3>s2Member Pro — A Recommended Upgrade</h3>' . "\n";
         echo '<p>Among other things, s2Member Pro comes pre-integrated with additional payment gateways. PayPal Pro integration is by far the most popular. It allows your site to accept Visa, MasterCard, Amex, Discover and even Maestro/Solo (from UK shoppers). Customers never leave your site! s2Member Pro Forms also support PayPal Express Checkout; for customers who actually prefer to pay with PayPal.</p>' . "\n";
         echo '<p>With s2Member Pro you\'ll enjoy the financial benefits of on-site credit card processing via s2Member\'s PayPal Pro Forms, PayPal Pro Form Generators, and even Authorize.Net AIM/ARB integrations (also w/ Pro Forms). It is also easy to integrate with Google Wallet, ClickBank and/or ccBill (which is primarily for adult payment processing). s2Member Pro comes with advanced User Import/Export tools, Pro Form Coupon Codes, Pro Login Widgets (plus Profile Summary) and other enhancements; such as support for <strong>UNLIMITED</strong> Membership Levels and custom Thank-You pages.</p>' . "\n";
         echo '<p><strong>Learn more here:</strong> <a href="http://www.s2member.com/pro/" target="_blank" rel="external">s2Member Pro Features</a> (definitely worth the <strong>inexpensive</strong> upgrade).</p>' . "\n";
         echo '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/pro-forms/" target="_blank" rel="external">s2Member Pro Forms</a>.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_pro", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_pro", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_help", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_help", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Getting Help w/ s2Member">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-help">' . "\n";
         echo '<h3>Getting Help w/ s2Member (Troubleshooting)</h3>' . "\n";
         echo '<p>s2Member is pretty easy to setup and install initially. Most of the official documentation is right here in your Dashboard (i.e. there is a lot of inline documentation built into the software). That being said, it CAN take some time to master everything there is to know about s2Member\'s advanced features. If you need assistance with s2Member, please search the <a href="http://www.s2member.com/kb/" target="_blank" rel="external">s2Member Knowledge Base</a>, <a href="http://www.s2member.com/videos/" target="_blank" rel="external">Video Tutorials</a>, <a href="http://www.s2member.com/forums/" target="_blank" rel="external">Forums</a> and <a href="http://www.s2member.com/codex/" target="_blank" rel="external">Codex</a>. If you are planning to do something creative with s2Member, you might want to <a href="http://jobs.wordpress.net" target="_blank" rel="external">hire a freelance developer</a> to assist you.</p>' . "\n";
         echo '<p><strong>See also:</strong> <a href="http://www.s2member.com/kb/common-troubleshooting-tips/" target="_blank" rel="external">s2Member Troubleshooting Guide</a> (please read this first if you\'re having trouble).</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3>Testing Server Compatibility</h3>' . "\n";
         echo '<p>Please download the <a href="http://www.s2member.com/r/server-check-tool/">s2Member Server Scanner</a>. Unzip, upload via FTP; then open in a browser for a full report.</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3>Troubleshooting Payment Gateway Integrations</h3>' . "\n";
         echo '<p>Please use s2Member\'s <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--s2member-logs")) . '">Log Viewer</a>. Log files can be very helpful.</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3>Search s2Member KB Articles, Forums, Codex and more<em>!</em></h3>' . "\n";
         echo '<form method="get" action="http://www.s2member.com/quick-s.php" target="_blank" onsubmit="if(this.q.value === \'enter search terms...\') this.q.value = \'\';">' . "\n";
         echo '<p><input type="text" name="q" value="enter search terms..." style="width:60%;" onfocus="if(this.value === \'enter search terms...\') this.value = \'\';" onblur="if(this.value === \'\') this.value = \'enter search terms...\';" /> <input type="submit" value="Search" style="font-size:120%; font-weight:normal;" /></p>' . "\n";
         echo '</form>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_help", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_help", get_defined_vars());
     }
     do_action("ws_plugin__s2member_during_start_page_after_left_sections", get_defined_vars());
     echo '</td>' . "\n";
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__s2member_menu_pages_rs::display();
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
 }
예제 #8
0
 /**
  * Allows access to the main Multisite Registration Form.
  *
  * @package s2Member\Option_Forces
  * @since 3.5
  *
  * @attaches-to ``add_filter("pre_site_option_registration");``
  *
  * @param string $users_can_register Expects *( `none`, `all`, `blog`, `user` )*, passed through by the Filter.
  * @return string One of `none|all|user`; depending on several factors.
  */
 public static function check_mms_register_access($users_can_register = FALSE)
 {
     global $wpdb;
     // Global database object reference
     global $current_site, $current_blog;
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_before_check_register_access", get_defined_vars());
     unset($__refs, $__v);
     $by_default = $users_can_register = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_grants"];
     if (c_ws_plugin__s2member_utils_conds::bp_is_installed() && is_multisite() && !c_ws_plugin__s2member_utils_conds::is_multisite_farm()) {
         return apply_filters("ws_plugin__s2member_check_mms_register_access", $users_can_register = c_ws_plugin__s2member_option_forces::check_register_access() ? "user" : "none", get_defined_vars());
     } else {
         if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm()) {
             // Blog Farm?
             return apply_filters("ws_plugin__s2member_check_mms_register_access", $users_can_register = "none", get_defined_vars());
         } else {
             if (!is_network_admin() && $users_can_register !== "all") {
                 if (is_main_site() && current_user_can("create_users") || is_super_admin()) {
                     return apply_filters("ws_plugin__s2member_check_mms_register_access", $users_can_register = "all", get_defined_vars());
                 } else {
                     if (is_user_logged_in() && is_object($user = wp_get_current_user()) && $user->ID && is_object($user = new WP_User($user->ID, $current_site->blog_id)) && $user->ID && $user->has_cap("access_s2member_level1")) {
                         $mms_options = c_ws_plugin__s2member_utilities::mms_options();
                         $blogs_allowed = (int) @$mms_options["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level($user)];
                         $user_blogs = is_array($blogs = get_blogs_of_user($user->ID)) ? count($blogs) - 1 : 0;
                         $user_blogs = $user_blogs >= 0 ? $user_blogs : 0;
                         // NOT less than zero.
                         $blogs_allowed = $blogs_allowed >= 0 ? $blogs_allowed : 0;
                         if ($user_blogs < $blogs_allowed) {
                             return apply_filters("ws_plugin__s2member_check_mms_register_access", $users_can_register = "all", get_defined_vars());
                         }
                     } else {
                         if (!is_user_logged_in() && is_main_site() && ($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok()) && extract($reg_cookies)) {
                             if (preg_match($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $item_number, $m) && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level" . $m[1]])) {
                                 return apply_filters("ws_plugin__s2member_check_mms_register_access", $users_can_register = "all", get_defined_vars());
                             } else {
                                 return apply_filters("ws_plugin__s2member_check_mms_register_access", $users_can_register = "user", get_defined_vars());
                             }
                         }
                     }
                 }
             } else {
                 if (!is_network_admin() && $users_can_register === "all") {
                     if (is_user_logged_in() && !(is_main_site() && current_user_can("create_users")) && !is_super_admin() && is_object($user = wp_get_current_user()) && $user->ID && is_object($user = new WP_User($user->ID, $current_site->blog_id)) && $user->ID) {
                         $mms_options = c_ws_plugin__s2member_utilities::mms_options();
                         $blogs_allowed = (int) @$mms_options["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level($user)];
                         $user_blogs = is_array($blogs = get_blogs_of_user($user->ID)) ? count($blogs) - 1 : 0;
                         $user_blogs = $user_blogs >= 0 ? $user_blogs : 0;
                         // NOT less than zero.
                         $blogs_allowed = $blogs_allowed >= 0 ? $blogs_allowed : 0;
                         if ($user_blogs >= $blogs_allowed) {
                             return apply_filters("ws_plugin__s2member_check_mms_register_access", $users_can_register = "none", get_defined_vars());
                         }
                     }
                 }
             }
         }
     }
     return apply_filters("ws_plugin__s2member_check_mms_register_access", $users_can_register, get_defined_vars());
 }
 /**
  * Determines if the current page is Systematic in any way.
  *
  * @package s2Member\Systematics
  * @since 3.5
  *
  * @return bool True if Systematic, else false.
  *
  * @note The results of this function are cached staticially.
  * 	Do NOT call upon this until the `wp` Hook is fired.
  */
 public static function is_systematic_use_page()
 {
     static $is_systematic;
     /* For optimization. */
     /**/
     if (isset($is_systematic)) {
         return $is_systematic;
         /* Filters will have already been applied here. */
     } else {
         if (c_ws_plugin__s2member_systematics::is_s2_systematic_use_page()) {
             return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars());
         } else {
             if (c_ws_plugin__s2member_systematics::is_wp_systematic_use_page()) {
                 return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars());
             } else {
                 if (c_ws_plugin__s2member_utils_conds::bp_is_installed() && (bp_is_register_page() || bp_is_activation_page())) {
                     return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars());
                 } else {
                     if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"] && is_page($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"])) {
                         return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars());
                     } else {
                         if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] && is_page($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])) {
                             return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars());
                         } else {
                             if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"] && is_page($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"])) {
                                 return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars());
                             } else {
                                 if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri(false, "root-returns-false")) && preg_match("/^" . preg_quote($_lro, "/") . "\$/", $_SERVER["REQUEST_URI"])) {
                                     return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars());
                                 } else {
                                     /* Otherwise, we return false ( it's NOT a Systematic Use Page in any way ). */
                                     return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_page", false, get_defined_vars());
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
예제 #10
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page">' . "\n";
     echo '<div class="ws-menu-page-toolbox">' . "\n";
     c_ws_plugin__s2member_menu_pages_tb::display();
     echo '</div>' . "\n";
     echo '<h2>General Options</h2>' . "\n";
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
     echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />' . "\n";
     do_action("ws_plugin__s2member_during_gen_ops_page_before_left_sections", get_defined_vars());
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_uninstall", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() || is_super_admin(), get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_uninstall", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Plugin Deletion Safeguards"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_uninstall_routines"] ? ' default-state="open"' : '') . '>' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-uninstall-section">' . "\n";
         echo '<h3>Plugin Deletion Safeguards (highly recommended)</h3>' . "\n";
         echo '<p>By default, s2Member will retain all of it\'s Roles, Capabilities, and your Configuration Options when/if you delete s2Member from the Plugins Menu in WordPress. However, if you would like for s2Member to erase itself completely, please choose: <code>No (upon deletion, erase all data/options)</code>.</p>';
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_uninstall", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-run-uninstall-routines">' . "\n";
         echo 'Safeguard s2Member Data/Options?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_run_uninstall_routines" id="ws-plugin--s2member-run-uninstall-routines">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_uninstall_routines"] ? ' selected="selected"' : '') . '>Yes (safeguard all data/options)</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_uninstall_routines"] ? ' selected="selected"' : '') . '>No (upon deletion, erase all data/options)</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'Recommended setting: (<code>Yes, safeguard all data/options</code>)' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_uninstall", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_security", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_security", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Security Encryption Key">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-security-section">' . "\n";
         echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n";
         echo '<h3>Security Encryption Key (optional, for tighter security)</h3>' . "\n";
         echo '<p>Just like WordPress, s2Member is open-source software. Which is wonderful. However, this also makes it possible for anyone to grab a copy of the software, and try to learn their way around its security measures. In order to keep your installation of s2Member unique/secure, you should configure a Security Encryption Key. s2Member will use your Security Encryption Key to protect itself against hackers. It does this by encrypting all sensitive information with your Key. A Security Encryption Key is unique to your installation.</p>' . "\n";
         echo '<p>Once you configure this, you do NOT want to change it; not ever. In fact, it is a VERY good idea to keep this backed up in a safe place, just in case you need to move your site, or re-install s2Member in the future. Some of the sensitive data that s2Member stores, will be encrypted with this Key. If you change it, that data can no longer be read, even by s2Member itself. In other words, don\'t use s2Member for six months, then decide to change your Key. That would break your installation.</p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_security", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-sec-encryption-key">' . "\n";
         echo 'Security Encryption Key (at least 60 chars)' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] ? ' <a href="#" onclick="ws_plugin__s2member_enableSecurityKey(); return false;" title="(not recommended)">edit key</a>' : ' <a href="#" onclick="ws_plugin__s2member_generateSecurityKey(); return false;" title="Insert an auto-generated Key. (recommended)">auto-generate</a>') . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" maxlength="256" autocomplete="off" name="ws_plugin__s2member_sec_encryption_key" id="ws-plugin--s2member-sec-encryption-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) . '"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] ? ' disabled="disabled"' : '') . ' />' . "\n";
         echo !$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] ? '<br />This may contain letters, numbers, spaces; even punctuation. Up to 256 characters.<br /><em>Ex: <code>' . esc_html(strtoupper(c_ws_plugin__s2member_utils_strings::random_str_gen(64))) . '</code></em>' . "\n" : '';
         echo count($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key_history"]) > 1 ? '<br /><a href="#" onclick="ws_plugin__s2member_securityKeyHistory(); return false;">Click here</a> for a history of your last 10 Encryption Keys.<div id="ws-plugin--s2member-sec-encryption-key-history" style="display:none;"><code>' . implode('</code><br /><code>', $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key_history"]) . '</code></div>' . "\n" : '';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3>Additional Details Regarding this Key:</h3>' . "\n";
         echo '<p>Your Security Encryption Key is used throughout s2Member\'s source code for many different things. However, MOST (not all, but most) uses of this Key are related to transactional processing within a particular session; so changing the Key won\'t really impact these scenarios in any significant way. Your Security Encryption Key is simply there to enhance security of data that is being transmitted in these cases.</p>' . "\n";
         echo '<p>That said, there are a few scenarios where use of your Security Encryption Key is more long-term. These include: Specific Post/Page Access Links, Registration Access Links, and it can also have a long-term impact on IPN communication because some data analyzed by s2Member includes a checksum that depends on your Key. If the Key changes, it could cause future IPN data (i.e. data from your payment gateway) to fail validation.</p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_security", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_localhost_info", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() || is_super_admin(), get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_localhost_info", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Localhost WAMP/MAMP Developers">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-localhost-info-section">' . "\n";
         echo '<h3>Localhost WAMP/MAMP Installs (are you a developer?)</h3>' . "\n";
         echo '<p>If you\'re developing your site in a <code>localhost</code> environment, running something like WAMP/MAMP, or <a href="http://www.easyphp.org/" target="_blank" rel="external">EasyPHP</a>, please add this line to your <code>/wp-config.php</code> file: <code><span style="color:#0000BB;">define</span><span style="color:#007700;">(</span><span style="color:#DD0000;">"LOCALHOST"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>.</p>' . "\n";
         echo '<p>This lets s2Member know definitively that your site is in a <code>localhost</code> environment. s2Member will adjust itself accordingly, maximizing functionality during your developement. s2Member can usually auto-detect this, but in cases where your <code>localhost</code> installation runs on something other than <code>127.0.0.1/localhost</code>, you need to tell s2Member definitively, by adding that line to your <code>/wp-config.php</code> file. For instance, s2Member needs to know when your server IP is the same as all User IPs.</p>' . "\n";
         echo '<p><em>Once your site goes live, please remove the line. If you\'re already on a live server connected to the web, please ignore this section.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_localhost_info", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_localhost_info", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_lazy_load", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() || is_super_admin(), get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_lazy_load", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="CSS/JS Lazy Loading">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-lazy-load-section">' . "\n";
         echo '<h3>CSS/JS Lazy Loading (Client-Side Libraries)</h3>' . "\n";
         echo '<p>By default, s2Member will load it\'s CSS/JS libraries on every page of your site. However, you may wish to enable lazy-loading here (e.g. only load when absolutely necessary).</p>' . "\n";
         echo '<p><em><strong>Tip:</strong> Do you need s2Member\'s CSS/JS on every page? If not, you can turn lazy-loading on. If you need s2Member\'s CSS/JS on a given Post/Page, you can insert an HTML comment into the Post/Page content like this: <code>&lt;!--s2member--&gt;</code>. If a Post/Page contains the word <code>s2member</code> or an <code>[s2*</code> Shortcode, this will automatically trigger s2Member\'s lazy-load routine (no matter what you configure here). Thus, it\'s an easy way to force s2Member to load it\'s CSS/JS on specific Posts/Pages where you deem this necessary. There is also a WordPress filter available: <code>add_filter("ws_plugin__s2member_lazy_load_css_js", "__return_true");</code> for developers; this could be incorporated into more dynamic scenarios.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_lazy_load", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-lazy-load-css-js">' . "\n";
         echo 'Lazy-Load s2Member\'s CSS/JS Libraries?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_lazy_load_css_js" id="ws-plugin--s2member-lazy-load-css-js">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["lazy_load_css_js"] ? ' selected="selected"' : '') . '>No (always load the CSS/JS libraries; e.g. on every page of the site)</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["lazy_load_css_js"] ? ' selected="selected"' : '') . '>Yes (lazy-load CSS/JS libraries; e.g. load only when absolutely necessary)</option>' . "\n";
         echo '</select>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_lazy_load", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_s_badge_wp_footer_code", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_s_badge_wp_footer_code", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="s2Member Security Badge">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-s-badge-wp-footer-code-section">' . "\n";
         echo '<h3>Security Badge &amp; Footer Configuration (optional)</h3>' . "\n";
         echo '<div class="ws-menu-page-right">' . c_ws_plugin__s2member_utilities::s_badge_gen("1", TRUE, TRUE) . '</div>' . "\n";
         echo '<p>An s2Member Security Badge <em>(optional)</em>, can be used to express your site\'s concern for security; demonstrating to all Users/Members that your site <em>(and the s2Member software)</em>, takes security seriously. However, in order to qualify your site, you MUST generate a Security Encryption Key <em>(previous section)</em>, and then click "Save All Changes". Only then, will s2Member officially verify your installation <em>(verification occurs automatically)</em>.</p>' . "\n";
         echo '<p>Once you\'ve <a href="http://www.s2member.com/kb/security-badges/" target="_blank" rel="external">properly configured all security aspects of s2Member</a>, your s2Member Security Badge will be verified. To see the "verified" version of your Security Badge, you might need to refresh your browser after saving all changes <em>(i.e. after you create a Security Encryption Key)</em>. Also, s2Member will NOT "verify" your site if you turn off Unique IP Restrictions, Brute Force Login Protection, or if your <code>/wp-config.php</code> file lacks <a href="http://codex.wordpress.org/Editing_wp-config.php#Security_Keys" target="_blank" rel="external">Security Keys</a> <em>(each at least 60 chars in length)</em>. In addition, it\'s NOT possible for s2Member to verify your Security Badge, if your site is in a <code>localhost</code> environment; i.e. not connected to the web.</p>' . "\n";
         echo '<p><strong>How does s2Member know when my site is secure?</strong><br />If enabled below, an API call for "Security Badge Status", will allow web service connections to determine your status. Clicking <a href="' . esc_attr(site_url("/?s2member_s_badge_status=1")) . '" target="_blank" rel="external">this link</a> will report <code>1</code> <em>(secure)</em>, <code>0</code> <em>(at risk)</em>, or <code>-</code> <em>(API disabled)</em>. Once all security considerations are satisfied, s2Member will report <code>1</code> <em>(secure)</em> for your installation. *Note, this simple API will NOT, and should not, report any other information. It will ONLY report the current status of your Security Badge, as determined by your installation of s2Member. When/if you install the s2Member Security Badge, s2Member will make a connection to your site "once per day", to test your status.</p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_s_badge_wp_footer_code", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-s-badge-status-enabled">' . "\n";
         echo 'Enable Security Badge Status API?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_s_badge_status_enabled" id="ws-plugin--s2member-s-badge-status-enabled">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["s_badge_status_enabled"] ? ' selected="selected"' : '') . '>No (default, Badge Status API is disabled)</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["s_badge_status_enabled"] ? ' selected="selected"' : '') . '>Yes (enable Badge Status API for verification)</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'This must be enabled if you want s2Member to verify your Security Badge.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-wp-footer-code">' . "\n";
         echo 'Customize WordPress Footer:<br />' . "\n";
         echo '<small>[ <a href="#" onclick="this.$code = jQuery(\'textarea#ws-plugin--s2member-wp-footer-code\'); this.$code.val(jQuery.trim(unescape(\'' . rawurlencode('[s2Member-Security-Badge v="1" /]') . '\')+\'\\n\'+this.$code.val())); return false;">Click HERE to insert your Security Badge</a> ],<br />or use Shortcode <code>[s2Member-Security-Badge v="1" /]</code> in a Post/Page/Widget.<br />The <code>v="1"</code> attribute is a Security Badge style/variation. Try variations <code>1|2|3</code>.</small>' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<textarea name="ws_plugin__s2member_wp_footer_code" id="ws-plugin--s2member-wp-footer-code" rows="8" wrap="off" spellcheck="false" class="monospace">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["wp_footer_code"]) . '</textarea><br />' . "\n";
         echo 'Any valid XHTML / JavaScript' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' (or even PHP)') . ' code will work just fine here.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_s_badge_wp_footer_code", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_email_config", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_email_config", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Email Configuration">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-email-section">' . "\n";
         echo '<h3 style="margin:0;">Email From: ' . esc_html('"Name" <address>') . '</h3>' . "\n";
         echo '<p style="margin:0;">This is the name/address that will appear in outgoing email notifications sent by the s2Member plugin.</p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_email_from_name_config", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-reg-email-from-name">' . "\n";
         echo 'Email From Name:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_reg_email_from_name" id="ws-plugin--s2member-reg-email-from-name" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . '" /><br />' . "\n";
         echo 'We recommend that you use the name of your site here.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-reg-email-from-email">' . "\n";
         echo 'Email From Address:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_reg_email_from_email" id="ws-plugin--s2member-reg-email-from-email" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"]) . '" /><br />' . "\n";
         echo 'Example: support@your-domain.com. <em class="ws-menu-page-hilite">Please read <a href="#" onclick="alert(\'Running WordPress with an SMTP mail plugin?\\n\\nPlease be advised. If you run an SMTP mail plugin with WordPress, be sure to configure s2Member with a valid `From:` address (i.e. one matching your SMTP configuration perhaps). Most free SMTP servers, such as Gmail and Yahoo, require that your `From:` header match the email address associated with your account. Please check with your SMTP service provider before attempting to configure plugins like s2Member to use a different `From:` address when sending email messages.\'); return false;">this IMPORTANT note</a></em>.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-reg-email-support-link">' . "\n";
         echo 'Email Support/Contact Link:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_reg_email_support_link" id="ws-plugin--s2member-reg-email-support-link" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_support_link"]) . '" /><br />' . "\n";
         echo 'Ex: <code>mailto:support@your-domain.com</code> (<em>mailto link</em>).<br />' . "\n";
         echo 'Or: <code>' . esc_html(site_url("/contact-us/")) . '</code>.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3 style="margin:0;">New User Email Configuration</h3>' . "\n";
         echo '<input type="hidden" id="ws-plugin--s2member-pluggables-wp-new-user-notification" value="' . esc_attr(empty($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["pluggables"]["wp_new_user_notification"]) ? '0' : '1') . '" />' . "\n";
         echo empty($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["pluggables"]["wp_new_user_notification"]) ? '<p class="ws-menu-page-error" style="margin:0;"><em><strong>Conflict warning:</strong> You have another theme or plugin installed that is preventing s2Member from controlling this aspect of your installation. When the pluggable function <code><a href="http://codex.wordpress.org/Function_Reference/wp_new_user_notification" target="_blank" rel="external">wp_new_user_notification()</a></code> is handled by another plugin, it\'s not possible for s2Member to allow customization of New User Emails. This is NOT a major issue. In fact, in some cases, it might be desirable. That being said, if you DO want to use s2Member\'s customization of New User Emails, you will need to deactivate one plugin at a time until this conflict warning goes away.</em></p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_new_user_emails", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_new_user_emails_enabled" id="ws-plugin--s2member-new-user-emails-enabled">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_emails_enabled"] ? ' selected="selected"' : '') . '>No (default, use WordPress defaults)</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_emails_enabled"] ? ' selected="selected"' : '') . '>Yes (customize New User Emails with s2Member)</option>' . "\n";
         echo '</select>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div id="ws-plugin--s2member-new-user-emails">' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3 style="margin:0;">New User Email Message (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-new-user-email-details\').toggle(); return false;" class="ws-dotted-link">click to customize</a>)</h3>' . "\n";
         echo '<p style="margin:0;">This email is sent to all new Users/Members. It should always contain their Username/Password. In addition to this email, s2Member will also send new paying Customers a Signup Confirmation Email, which you can customize from your Dashboard, under: <code>s2Member -› PayPal Options</code>. You may wish to customize these emails further, by providing details that are specifically geared to your site.</p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_new_user_email", get_defined_vars());
         echo '<div id="ws-plugin--s2member-new-user-email-details" style="display:none;">' . "\n";
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> please note that BuddyPress does NOT send this email to Users that register through the BuddyPress registration system. This is because BuddyPress sends each User an activation link; eliminating the need for this email all together. However, you CAN still customize s2Member\'s separate email to paying Members. See: <code>s2Member -› PayPal Options -› Signup Confirmation Email</code>.</em></p>' . "\n" : '';
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-new-user-email-subject">' . "\n";
         echo 'New User Email Subject:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_new_user_email_subject" id="ws-plugin--s2member-new-user-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_subject"]) . '" /><br />' . "\n";
         echo 'Subject Line used in the email sent to new Users/Members.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-new-user-email-message">' . "\n";
         echo 'New User Email Message:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<textarea name="ws_plugin__s2member_new_user_email_message" id="ws-plugin--s2member-new-user-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_message"]) . '</textarea><br />' . "\n";
         echo 'Message Body used in the email sent to new Users/Members.<br /><br />' . "\n";
         echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
         echo '<ul>' . "\n";
         echo '<li><code>%%role%%</code> = The Role ID <code>(subscriber, s2member_level[0-9]+, administrator, editor, author, contributor)</code>.</li>' . "\n";
         echo '<li><code>%%label%%</code> = The Role ID Label <code>(Subscriber, s2Member Level 1, s2Member Level 2; or your own custom Labels — if configured)</code>.</li>' . "\n";
         echo '<li><code>%%level%%</code> = The Level number <code>(0, 1, 2, 3, 4)</code>. (<em>deprecated, no longer recommended; use <code>%%role%%</code></em>)</li>' . "\n";
         echo '<li><code>%%ccaps%%</code> = Custom Capabilities. Ex: <code>music,videos,free_gift</code> (<em>in comma-delimited format</em>).</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name (First &amp; Last) of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n";
         echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The User\'s IP Address, detected via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID generated during registration.</li>' . "\n";
         echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>Custom Registration/Profile Fields are also supported in this email:</strong>' . "\n";
         echo '<ul>' . "\n";
         echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
         echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
         echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
         echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -› General Options -› Registration/Profile Fields</em>.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul>' . "\n";
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<div class="ws-menu-page-hr"></div>' . "\n" . '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$user</code> variable is the most important one. It\'s an instance of the <a href="http://codex.wordpress.org/Class_Reference/WP_User" target="_blank" rel="external"><code>WP_User</code></a> class (e.g. <code>$user->ID</code>, <code>$user->has_cap()</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>' . "\n" : '';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3 style="margin:0;">Administrative: New User Notification (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-new-user-admin-email-details\').toggle(); return false;" class="ws-dotted-link">click to customize</a>)</h3>' . "\n";
         echo '<p style="margin:0;">This email notification is sent to you, each time a new User/Member registers.</p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_new_user_admin_email", get_defined_vars());
         echo '<div id="ws-plugin--s2member-new-user-admin-email-details" style="display:none;">' . "\n";
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-new-user-admin-email-recipients">' . "\n";
         echo 'New User Notification Recipients:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_new_user_admin_email_recipients" id="ws-plugin--s2member-new-user-admin-email-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"Name" &lt;user@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-new-user-admin-email-subject">' . "\n";
         echo 'New User Notification Subject:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_new_user_admin_email_subject" id="ws-plugin--s2member-new-user-admin-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_subject"]) . '" /><br />' . "\n";
         echo 'Subject Line used in the email notification sent to Administrator.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-new-user-admin-email-message">' . "\n";
         echo 'New User Notification Message:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<textarea name="ws_plugin__s2member_new_user_admin_email_message" id="ws-plugin--s2member-new-user-admin-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_message"]) . '</textarea><br />' . "\n";
         echo 'Message Body used in the email notification sent to Administrator.<br /><br />' . "\n";
         echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
         echo '<ul>' . "\n";
         echo '<li><code>%%role%%</code> = The Role ID <code>(subscriber, s2member_level[0-9]+, administrator, editor, author, contributor)</code>.</li>' . "\n";
         echo '<li><code>%%label%%</code> = The Role ID Label <code>(Subscriber, s2Member Level 1, s2Member Level 2; or your own custom Labels — if configured)</code>.</li>' . "\n";
         echo '<li><code>%%level%%</code> = The Level number <code>(0, 1, 2, 3, 4)</code>. (<em>deprecated, no longer recommended; use <code>%%role%%</code></em>)</li>' . "\n";
         echo '<li><code>%%ccaps%%</code> = Custom Capabilities. Ex: <code>music,videos,free_gift</code> (<em>in comma-delimited format</em>).</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name (First &amp; Last) of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n";
         echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The User\'s IP Address, detected via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID generated during registration.</li>' . "\n";
         echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>Custom Registration/Profile Fields are also supported in this email:</strong>' . "\n";
         echo '<ul>' . "\n";
         echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
         echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
         echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
         echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -› General Options -› Registration/Profile Fields</em>.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul>' . "\n";
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<div class="ws-menu-page-hr"></div>' . "\n" . '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$user</code> variable is the most important one. It\'s an instance of the <a href="http://codex.wordpress.org/Class_Reference/WP_User" target="_blank" rel="external"><code>WP_User</code></a> class (e.g. <code>$user->ID</code>, <code>$user->has_cap()</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>' . "\n" : '';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_email_config", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_open_registration", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_open_registration", get_defined_vars());
         if (is_multisite() && is_main_site()) {
             echo '<div class="ws-menu-page-group" title="Open Registration">' . "\n";
             echo '<div class="ws-menu-page-section ws-plugin--s2member-open-registration-section">' . "\n";
             echo '<h3>Open Registration / Free Subscribers (optional)</h3>' . "\n";
             echo '<p>On the Main Site of a Multisite Network, the settings for Open Registration are consolidated into the <code>s2Member -› Multisite (Config)</code> panel.</p>' . "\n";
             do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_open_registration", get_defined_vars());
             echo '</div>' . "\n";
             echo '</div>' . "\n";
         } else {
             echo '<div class="ws-menu-page-group" title="Open Registration">' . "\n";
             echo '<div class="ws-menu-page-section ws-plugin--s2member-open-registration-section">' . "\n";
             echo '<h3>Open Registration / Free Subscribers (optional)</h3>' . "\n";
             echo '<p>s2Member supports Free Subscribers (at Level #0), along with four Primary Levels [1-4] of paid Membership. If you want your visitors to be capable of registering absolutely free, you will want to "allow" Open Registration. Whenever a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0.</p>' . "\n";
             do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_open_registration", get_defined_vars());
             echo '<table class="form-table">' . "\n";
             echo '<tbody>' . "\n";
             echo '<tr>' . "\n";
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--s2member-allow-subscribers-in">' . "\n";
             echo 'Allow Open Registration? (Free Subscribers)' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             echo '<td>' . "\n";
             echo '<select name="ws_plugin__s2member_allow_subscribers_in" id="ws-plugin--s2member-allow-subscribers-in">' . "\n";
             echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>No (do NOT allow Open Registration)</option>' . "\n";
             echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>Yes (allow Open Registration; Free Subscribers at Level #0)</option>' . "\n";
             echo '</select><br />' . "\n";
             echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">/wp-login.php?action=register</a>. When a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0. The s2Member software reserves Level #0; to be used ONLY for Free Subscribers. All other Membership Levels [1-4] require payment.' . "\n";
             echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<br /><br /><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">here</a>.<br />s2Member integrates with BuddyPress, and the above setting will control Open Regisration for BuddyPress too.</em>' . "\n" : '';
             echo '</td>' . "\n";
             echo '</tr>' . "\n";
             echo '</tbody>' . "\n";
             echo '</table>' . "\n";
             echo '</div>' . "\n";
             echo '</div>' . "\n";
         }
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_open_registration", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_membership_levels", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_membership_levels", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Membership Levels/Labels">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-levels-section">' . "\n";
         echo '<h3>Membership Levels (required, please customize these)</h3>' . "\n";
         echo '<p>The default Membership Levels are labeled generically; feel free to modify them as needed. s2Member supports Free Subscribers <em>(at Level #0)</em>, along with several Primary Roles for paid Membership <em>(i.e. Levels 1-4)</em>, created by the s2Member plugin.' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? ' s2Member also supports unlimited Custom Capability Packages <em>(see <code>s2Member -› API Scripting -› Custom Capabilities</code>)</em>' : '') . '. That being said, you don\'t have to use all of the Membership Levels if you don\'t want to. To use only 1 or 2 of these Levels, just design your Membership Options Page, so it only includes Payment Buttons for the Levels being used.</p>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>TIP:</strong> <strong>Unlimited Membership Levels</strong> are only possible with <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro</a>. However, Custom Capabilities are possible in all versions of s2Member, including the free version. Custom Capabilities are a great way to extend s2Member in creative ways. If you\'re an advanced site owner, a theme designer, or a web developer integrating s2Member for a client, please check your Dashboard, under: <code>s2Member -› API Scripting -› Custom Capabilities</code>. We also recommend <a href="http://www.s2member.com/videos/A2C07377CF60025E/" target="_blank" rel="external">this video tutorial</a>.</em></p>' . "\n" : '';
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><strong>See also:</strong> These KB articles: <a href="http://www.s2member.com/kb/roles-caps/" target="_blank" rel="external">s2Member Roles/Capabilities</a> and <a href="http://www.s2member.com/kb/simple-shortcode-conditionals/" target="_blank" rel="external">Simple Shortcode Conditionals</a>.</p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_membership_levels", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
             echo '<tr>' . "\n";
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--s2member-level' . $n . '-label">' . "\n";
             echo $n === 0 ? 'Level #' . $n . ' <em>(Free Subscribers)</em>:' . "\n" : 'Level #' . $n . ' Members:' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             echo '<td>' . "\n";
             echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_label" id="ws-plugin--s2member-level' . $n . '-label" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . '" /><br />' . "\n";
             echo 'This is the Label for Level #' . $n . ($n === 0 ? ' (Free Subscribers)' : ' Members') . '.<br />' . "\n";
             echo '</td>' . "\n";
             echo '</tr>' . "\n";
         }
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<table class="form-table" style="margin-top:0;">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th style="padding-top:0;">' . "\n";
         echo '<label for="ws-plugin--s2member-apply-label-translations">' . "\n";
         echo 'Force WordPress to use your Labels?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="radio" name="ws_plugin__s2member_apply_label_translations" id="ws-plugin--s2member-apply-label-translations-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["apply_label_translations"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-apply-label-translations-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_apply_label_translations" id="ws-plugin--s2member-apply-label-translations-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["apply_label_translations"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-apply-label-translations-1">Yes, force WordPress to use my Labels.</label><br />' . "\n";
         echo 'This affects your administrative Dashboard only <em>(i.e. your list of Users)</em>.<br />s2Member can force WordPress to use your Labels instead of referencing Roles by `s2Member Level #`. If this is your first installation of s2Member, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with s2Member\'s functionality. In fact, many site owners choose to leave this off, because they find it less confusing when Roles are referred to by their s2Member Level #.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<input type="button" value="Reset Roles/Capabilities" class="ws-menu-page-right ws-plugin--s2member-reset-roles-button" style="min-width:175px;" />' . "\n";
         echo '<p>The button to the right, is a nifty tool, which allows you to reset s2Member\'s internal Roles and Capabilities that integrate with WordPress. If you, or a developer working with you, has made attempts to alter the default <em>internal</em> Role/Capability sets that come with s2Member, and you need to reset them back to the way s2Member expects them to be, please use this tool. <em>Attn Developers: it is also possible lock-in your modified Roles/Capabilities with an s2Member Filter. Please see <a href="http://www.s2member.com/kb/roles-caps/#modifying-roles-caps" target="_blank" rel="external">this KB article for details</a>.</em></p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_membership_levels", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_login_registration", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_login_registration", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Login/Registration Design">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-login-registration-section">' . "\n";
         echo '<h3>Login/Registration Page Customization (optional)</h3>' . "\n";
         echo '<p>These settings customize your Standard Login/Registration Pages:<br />(<a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__s2member_utils_urls::wp_register_url()) . '</a>)</p>' . "\n";
         echo is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() ? '<p><em>The Main Site of a Multisite Blog Farm uses this Form instead, powered by your theme.<br />(<a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Multisite Registration Form.\\n* s2Member makes this form available to logged-in Super Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__s2member_utils_urls::wp_signup_url()) . '</a>)</em></p>' . "\n" : '';
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form, powered by your theme.<br />(<a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">' . esc_html(c_ws_plugin__s2member_utils_urls::bp_register_url()) . '</a>)</em></p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_login_registration", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<h3 style="margin:0;">Enable This Functionality?</h3>' . "\n";
         echo '<select name="ws_plugin__s2member_login_reg_design_enabled" id="ws-plugin--s2member-login-reg-design-enabled">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_design_enabled"] ? ' selected="selected"' : '') . '>No (default, use WordPress defaults)</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_design_enabled"] ? ' selected="selected"' : '') . '>Yes (customize Login/Registration with s2Member)</option>' . "\n";
         echo '</select>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div id="ws-plugin--s2member-login-reg-design"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_design_enabled"] ? ' style="display:none;"' : '') . '>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<h3 style="margin:0;">Overall Font/Size Configuration</h3>' . "\n";
         echo '<p style="margin:0;">These settings are all focused on your Login/Registration Fonts.</p>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-font-size">' . "\n";
         echo 'Overall Font Size:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_font_size" id="ws-plugin--s2member-login-reg-font-size" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_size"]) . '" /><br />' . "\n";
         echo 'Set this to a numeric value, calculated in pixels.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-font-family">' . "\n";
         echo 'Overall Font Family:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_font_family" id="ws-plugin--s2member-login-reg-font-family" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_family"]) . '" /><br />' . "\n";
         echo 'Set this to a web-safe font family.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-font-field-size">' . "\n";
         echo 'Form Field Font Size:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_font_field_size" id="ws-plugin--s2member-login-reg-font-field-size" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_field_size"]) . '" /><br />' . "\n";
         echo 'Set this to a numeric value, calculated in pixels.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<table class="form-table" style="margin-top:0;">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<h3 style="margin:0;">Background Configuration</h3>' . "\n";
         echo '<p style="margin:0;">These settings are all focused on your Login/Registration Background.</p>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-background-color">' . "\n";
         echo 'Background Color:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_color" id="ws-plugin--s2member-login-reg-background-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_color"]) . '" /><br />' . "\n";
         echo 'Set this to a 6-digit hex color code.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-background-image">' . "\n";
         echo 'Background Image:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_image" id="ws-plugin--s2member-login-reg-background-image" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image"]) . '" /><br />' . "\n";
         echo '<input type="button" id="ws-plugin--s2member-login-reg-background-image-media-btn" value="Open Media Library" class="ws-menu-page-media-btn" rel="ws-plugin--s2member-login-reg-background-image" />' . "\n";
         echo 'Set this to the URL of your Background Image. (this is optional)<br />';
         echo 'If supplied, your Background Image will be tiled.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-background-image-repeat">' . "\n";
         echo 'Background Image Tile:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_login_reg_background_image_repeat" id="ws-plugin--s2member-login-reg-background-image-repeat">' . "\n";
         echo '<option value="repeat"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image_repeat"] === "repeat" ? ' selected="selected"' : '') . '>Seamless Tile ( background-repeat: repeat; )</option>' . "\n";
         echo '<option value="repeat-x"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image_repeat"] === "repeat-x" ? ' selected="selected"' : '') . '>Tile Horizontally ( background-repeat: repeat-x; )</option>' . "\n";
         echo '<option value="repeat-y"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image_repeat"] === "repeat-y" ? ' selected="selected"' : '') . '>Tile Vertically ( background-repeat: repeat-y; )</option>' . "\n";
         echo '<option value="no-repeat"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image_repeat"] === "no-repeat" ? ' selected="selected"' : '') . '>No Tiles ( background-repeat: no-repeat; )</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'This controls the way your Background Image is styled with CSS. [ <a href="http://www.w3schools.com/css/pr_background-repeat.asp" target="_blank" rel="external">learn more</a> ]' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-background-text-color">' . "\n";
         echo 'Color of Text on top of your Background:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_text_color" id="ws-plugin--s2member-login-reg-background-text-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_color"]) . '" /><br />' . "\n";
         echo 'Set this to a 6-digit hex color code.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-background-text-shadow-color">' . "\n";
         echo 'Shadow Color for Text on top of your Background:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_text_shadow_color" id="ws-plugin--s2member-login-reg-background-text-shadow-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_shadow_color"]) . '" /><br />' . "\n";
         echo 'Set this to a 6-digit hex color code.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-background-box-shadow-color">' . "\n";
         echo 'Shadow Color for Boxes on top of your Background:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_box_shadow_color" id="ws-plugin--s2member-login-reg-background-box-shadow-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_box_shadow_color"]) . '" /><br />' . "\n";
         echo 'Set this to a 6-digit hex color code.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<table class="form-table" style="margin-top:0;">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<h3 style="margin:0;">Logo Image Configuration</h3>' . "\n";
         echo '<p style="margin:0;">These settings are all focused on your Login/Registration Logo.</p>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-logo-src">' . "\n";
         echo 'Logo Image Location:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_src" id="ws-plugin--s2member-login-reg-logo-src" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src"]) . '" /><br />' . "\n";
         echo '<input type="button" id="ws-plugin--s2member-login-reg-logo-src-media-btn" value="Open Media Library" class="ws-menu-page-media-btn" rel="ws-plugin--s2member-login-reg-logo-src" />' . "\n";
         echo 'Set this to the URL of your Logo Image.<br />' . "\n";
         echo 'Suggested size is around 500 x 100.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-logo-src-width">' . "\n";
         echo 'Logo Image Width:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_src_width" id="ws-plugin--s2member-login-reg-logo-src-width" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_width"]) . '" /><br />' . "\n";
         echo 'The pixel Width of your Logo Image. <em>* This ALSO affects the overall width of your Login/Registration forms. If you want wider form fields, use a wider Logo.</em>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-logo-src-height">' . "\n";
         echo 'Logo Image Height:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_src_height" id="ws-plugin--s2member-login-reg-logo-src-height" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_height"]) . '" /><br />' . "\n";
         echo 'The pixel Height of your Logo Image.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-logo-url">' . "\n";
         echo 'Logo Image Click URL:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_url" id="ws-plugin--s2member-login-reg-logo-url" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_url"]) . '" /><br />' . "\n";
         echo 'Set this to the Click URL for your Logo Image.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-logo-title">' . "\n";
         echo 'Logo Image Title Attribute:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_title" id="ws-plugin--s2member-login-reg-logo-title" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_title"]) . '" /><br />' . "\n";
         echo 'Used as the <code>title=""</code> attribute for your Logo Image.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<table class="form-table" style="margin-top:0;">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-footer-backtoblog">' . "\n";
         echo 'Display [Back to Home Page] Link At Bottom?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_login_reg_footer_backtoblog" id="ws-plugin--s2member-login-reg-footer-backtoblog">' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_footer_backtoblog"] ? ' selected="selected"' : '') . '>Yes, display link at bottom pointing visitors back to the home page</option>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_footer_backtoblog"] ? ' selected="selected"' : '') . '>No, hide this link (I\'ll create my own custom footer w/ the details I prefer)</option>' . "\n";
         echo '</select>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<h3 style="margin:0;">Footer Design (i.e. Bottom)</h3>' . "\n";
         echo '<p style="margin:0;">This field accepts raw HTML' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? ' (and/or PHP)' : '') . ' code.</p>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-reg-footer-design">' . "\n";
         echo 'Login/Registration Footer Design (optional):' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<textarea name="ws_plugin__s2member_login_reg_footer_design" id="ws-plugin--s2member-login-reg-footer-design" rows="3" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_footer_design"]) . '</textarea><br />' . "\n";
         echo 'This optional HTML' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? ' (and/or PHP)' : '') . ' code will appear at the very bottom of your Login/Registration Forms.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_login_registration", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_custom_reg_fields", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_custom_reg_fields", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Registration/Profile Fields &amp; Options">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-custom-reg-fields-section">' . "\n";
         echo '<h3>Custom Registration/Profile Fields (optional, for further customization)</h3>' . "\n";
         echo '<p>Some fields are already built-in by default. The defaults are: <code>*Username*, *Email*, *First Name*, *Last Name*</code>.</p>' . "\n";
         echo '<p>Custom Fields will appear in your Standard Registration Form, and in User/Member Profiles:<br />(<a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__s2member_utils_urls::wp_register_url()) . '</a>)</p>' . "\n";
         echo is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() ? '<p><em>The Main Site of a Multisite Blog Farm uses this Form. s2Member supports Custom Fields here too.<br />(<a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Multisite Registration Form.\\n* s2Member makes this form available to logged-in Super Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__s2member_utils_urls::wp_signup_url()) . '</a>)</em></p>' . "\n" : '';
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">here</a>.<br />s2Member can integrate your Custom Fields with BuddyPress too, please see options below.</em></p>' . "\n" : '';
         echo '<p><strong>Regarding registration...</strong> Custom Fields do NOT appear during repeat registration and/or checkout attempts (e.g. they do NOT appear for any user that is currently logged into the site). Please make sure that you test registration and/or checkout forms while NOT logged in (e.g. please test as a first-time customer). Existing users/members/customers may update Custom Fields by editing their Profile.</p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_custom_reg_fields", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label>' . "\n";
         echo 'Custom Registration/Profile Fields:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="hidden" name="ws_plugin__s2member_custom_reg_fields" id="ws-plugin--s2member-custom-reg-fields" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"]) . '" />' . "\n";
         echo '<div id="ws-plugin--s2member-custom-reg-field-configuration"></div>' . "\n";
         // This is filled by JavaScript routines.
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-custom-reg-names">' . "\n";
         echo 'Collect First/Last Names during Registration?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_custom_reg_names" id="ws-plugin--s2member-custom-reg-names">' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>Yes (always collect First/Last Names during registration)</option>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] ? ' selected="selected"' : '') . '>No (do NOT collect First/Last Names during registration)</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'Recommended setting (<code>Yes</code>). It\'s usually a good idea to leave this on.' . "\n";
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<br /><em>* Has NO affect on BuddyPress registration form (BuddyPress always collects a full <code>Name</code> field).</em>' . "\n" : '';
         echo c_ws_plugin__s2member_utils_conds::pro_is_installed() ? '<br /><em>* s2Member Pro (Checkout) Forms always require a First/Last Name for billing.</em>' . "\n" : '';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-custom-reg-display-name">' . "\n";
         echo 'Set "Display Name" during Registration?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_custom_reg_display_name" id="ws-plugin--s2member-custom-reg-display-name">' . "\n";
         echo '<option value="full"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "full" ? ' selected="selected"' : '') . '>Yes (set Display Name to User\'s Full Name)</option>' . "\n";
         echo '<option value="first"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "first" ? ' selected="selected"' : '') . '>Yes (set Display Name to User\'s First Name)</option>' . "\n";
         echo '<option value="last"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "last" ? ' selected="selected"' : '') . '>Yes (set Display Name to User\'s Last Name)</option>' . "\n";
         echo '<option value="login"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "login" ? ' selected="selected"' : '') . '>Yes (set Display Name to User\'s Username)</option>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] ? ' selected="selected"' : '') . '>No (leave Display Name at default WordPress value)</option>' . "\n";
         echo '</select>' . "\n";
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<br /><em>* Has NO affect on BuddyPress registration form (BuddyPress always uses its full <code>Name</code> field).</em>' . "\n" : '';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-custom-reg-password">' . "\n";
         echo 'Allow Custom Passwords during Registration?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_custom_reg_password" id="ws-plugin--s2member-custom-reg-password"' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() && !c_ws_plugin__s2member_utils_conds::pro_is_installed() ? ' disabled="disabled"' : '') . '>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>No (send auto-generated passwords via email; after registration)</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>Yes (allow members to create their own password during registration)</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'Auto-generated Passwords are recommended for best security; because, this also serves as a form of email confirmation.' . "\n";
         echo is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() ? '<br /><em>* For security purposes, Custom Passwords are NOT possible on the Main Site of a Blog Farm. <a href="#" onclick="alert(\'For security purposes, Custom Passwords are NOT possible on the Main Site of a Blog Farm. A User MUST wait for the activation/confirmation email; where a randomly generated Password will be assigned. Please note, this limitation only affects your Main Site, via `/wp-signup.php`. In other words, your Customers (i.e. other Blog Owners) will still have the ability to allow Custom Passwords with s2Member. YOU are affected by this limitation, NOT them.\\n\\n* NOTE: s2Member (Pro) removes this limitation.\\nIf you install the s2Member Pro Module, you WILL be able to allow Custom Passwords through s2Member Pro Forms; even on a Multisite Blog Farm.\'); return false;" tabindex="-1">[?]</a></em>' . "\n" : '';
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<br /><em>* Does NOT affect BuddyPress registration form (always <code>yes</code> with BuddyPress registration).</em>' . "\n" : '';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-custom-reg-force-personal-emails">' . "\n";
         echo 'Force Personal Emails during Registration?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_custom_reg_force_personal_emails" id="ws-plugin--s2member-custom-reg-force-personal-emails" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]) . '" /><br />' . "\n";
         echo 'To force personal email addresses, provide a comma-delimited list of email users to reject. <a href="#" onclick="alert(\'s2Member will reject [user]@ (based on your configuration here). A JavaScript alert message will be issued, asking the User to, `please use a personal email address`.\'); return false;" tabindex="-1">[?]</a><br />' . "\n";
         echo 'Ex: <code>info,help,admin,webmaster,hostmaster,sales,support,spam</code><br />' . "\n";
         echo 'See: <a href="http://kb.mailchimp.com/article/what-role-addresses-does-mailchimp-specifically-block-from-bulk-importing/" target="_blank" rel="external">this article</a> for a more complete list.' . "\n";
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<br /><em>* Affects BuddyPress registration form too.</em>' . "\n" : '';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-custom-reg-fields-4bp">' . "\n";
         echo 'Integrate Custom Registration/Profile Fields with BuddyPress?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<div class="ws-menu-page-scrollbox" style="height:65px;">' . "\n";
         echo '<input type="hidden" name="ws_plugin__s2member_custom_reg_fields_4bp[]" value="update-signal"' . (!c_ws_plugin__s2member_utils_conds::bp_is_installed() ? ' disabled="disabled"' : '') . ' />' . "\n";
         foreach (array("profile-view" => "Yes, integrate with BuddyPress Public Profiles.", "registration" => "Yes, integrate with BuddyPress Registration Form.", "profile" => "Yes, integrate with BuddyPress Profile Editing Panel.") as $ws_plugin__s2member_temp_s_value => $ws_plugin__s2member_temp_s_label) {
             echo '<input type="checkbox" name="ws_plugin__s2member_custom_reg_fields_4bp[]" id="ws-plugin--s2member-custom-reg-fields-4bp-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '" value="' . esc_attr($ws_plugin__s2member_temp_s_value) . '"' . (in_array($ws_plugin__s2member_temp_s_value, $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields_4bp"]) ? ' checked="checked"' : '') . (!c_ws_plugin__s2member_utils_conds::bp_is_installed() ? ' disabled="disabled"' : '') . ' /> <label for="ws-plugin--s2member-custom-reg-fields-4bp-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '">' . $ws_plugin__s2member_temp_s_label . '</label><br />' . "\n";
         }
         echo '</div>' . "\n";
         echo !c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<em>* BuddyPress is NOT installed; which is perfectly OK. BuddyPress is NOT a requirement.</em>' . "\n" : '<em>* The options above, make it possible to integrate Custom Registration/Profile Fields (i.e. those configured with s2Member) into BuddyPress as well. However, if you configure Profile Fields with BuddyPress, those will NOT be integrated with s2Member. Therefore, if you need Custom Registration/Profile Fields to work with both s2Member and with BuddyPress, please configure them with s2Member.</em>';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_custom_reg_fields", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_login_welcome_page", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_login_welcome_page", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Login Welcome Page">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-login-welcome-page-section">' . "\n";
         echo '<h3>Login Welcome Page (required, please customize this)</h3>' . "\n";
         echo '<p>Please create and/or choose an existing Page to use as the first page Members will see after logging in.</p>' . "\n";
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> s2Member integrates with BuddyPress. Your Login Welcome Page affects BuddyPress too.</em></p>' . "\n" : '';
         echo '<p><em><strong>*Tips*</strong> This special Page will be protected from public access (automatically) by s2Member. Also, please remember this option CANNOT be set to your Front Page (e.g. your Home Page), or to your Posts Page (e.g. your main Blog page). Please create a separate Page in WordPress &amp; designate it here as your Login Welcome Page.</em></p>' . "\n";
         echo '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/customizing-your-lwp/" target="_blank" rel="external">Customizing Your Login Welcome Page</a>.</p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_login_welcome_page", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-welcome-page">' . "\n";
         echo 'Login Welcome Page:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_login_welcome_page" id="ws-plugin--s2member-login-welcome-page">' . "\n";
         echo '<option value="">&mdash; Select &mdash;</option>' . "\n";
         foreach ($ws_plugin__s2member_temp_a = array_merge((array) get_pages()) as $ws_plugin__s2member_temp_o) {
             echo '<option value="' . esc_attr($ws_plugin__s2member_temp_o->ID) . '"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"] && $ws_plugin__s2member_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"] ? ' selected="selected"' : '') . '>' . esc_html($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
         }
         echo '</select><br />' . "\n";
         echo 'Please choose a Page to be used as the first page Members will see after logging in. This Page can contain anything you like. We recommend the following title: <code>Welcome To Our Members Area</code>.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-redirection-override">' . "\n";
         echo 'Or, a Special Redirection URL?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_redirection_override" id="ws-plugin--s2member-login-redirection-override" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"]) . '" /><br />' . "\n";
         echo 'Or, you may configure a Special Redirection URL, if you prefer. You\'ll need to type in the full URL, starting with: <code>http://</code>. <em>A few <a href="#" onclick="alert(\'Replacement Codes:\\n\\n%%current_user_login%% = The current User\\\'s Username, lowercase (deprecated, please use %%current_user_nicename%%).\\n\\n%%current_user_nicename%% = The current User\\\'s Nicename in lowercase format (i.e. a cleaner version of the username for URLs; recommended for best compatibility).\\n\\n%%current_user_id%% = The current User\\\'s ID.\\n\\n%%current_user_level%% = The current User\\\'s s2Member Level.\\n\\n%%current_user_role%% = The current User\\\'s WordPress Role.' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '\\n\\n%%current_user_ccaps%% = The current User\\\'s Custom Capabilities.' : '') . '\\n\\n%%current_user_logins%% = Number of times the current User has logged in.\\n\\nFor example, if you\\\'re using BuddyPress, and you want to redirect Members to their BuddyPress Profile page after logging in, you would setup a Special Redirection URL, like this: ' . site_url("/members/%%current_user_nicename%%/profile/") . '\\n\\nOr ... using %%current_user_level%%, you could have a separate Login Welcome Page for each Membership Level that you plan to offer. BuddyPress not required.\'); return false;">Replacement Codes</a> are also supported here.</em>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<table class="form-table" style="margin-top:0;">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-login-redirection-always-http">' . "\n";
         echo 'Always Redirect non-Administrative Users (after login) using HTTP?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_login_redirection_always_http" id="ws-plugin--s2member-login-redirection-always-http">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_always_http"] ? ' selected="selected"' : '') . '>No, do NOT modify (use WordPress default behavior; e.g. detect URL scheme automatically)</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_always_http"] ? ' selected="selected"' : '') . '>Yes, always redirect non-administrative users to non-SSL version (e.g. always use http://)</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'Recommended setting: <code>Yes</code>. This is compatible w/ <a href="http://codex.wordpress.org/Administration_Over_SSL" target="_blank" rel="external"><code>FORCE_SSL_LOGIN</code></a> and/or <a href="http://codex.wordpress.org/Administration_Over_SSL" target="_blank" rel="external"><code>FORCE_SSL_ADMIN</code></a>.' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_login_welcome_page", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_membership_options_page", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_membership_options_page", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Membership Options Page">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-options-page-section">' . "\n";
         echo '<h3>Membership Options Page (required, please customize this)</h3>' . "\n";
         echo '<p>Please create and/or choose an existing Page that showcases your Membership subscription options. This special Page is where you will insert the Payment Button(s) generated for you by s2Member. This Page serves as your lead-in signup page <em>(i.e. you\'ll give visitors one or more registration options here, and they\'ll be redirected to your Payment Gateway, to pay for the option they choose)</em>.</p>' . "\n";
         echo '<p>Your Membership Options Page should detail all of the features that come with Membership to your site, and provide a Payment Button for each Level of access you plan to offer. This is also the Page that anyone could be redirected to <em>(by s2Member)</em>, should they attempt to access an area of your site, which may require access to something they\'re NOT currenty allowed to view.' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? ' For more on this advanced topic, please check your Dashboard here: <code>s2Member -› API Scripting -› Membership Options Page / Variables</code>.' : '') . '</p>' . "\n";
         echo '<p><em><strong>*Tip*</strong> If you allow Open Registration (i.e. Free Subscribers), you might want to place a link on your Membership Options Page, which points directly to your free Registration Form, instead of routing a Customer through your Payment Gateway first. It\'s a matter of preference though. For further details, please check the section above: <code>s2Member -› General Options -› Open Registration</code>.</em></p>' . "\n";
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> Even with BuddyPress, s2Member still needs a Membership Options Page. This is where your Payment Button(s) will go, giving people the ability to pay you. And again, this is also the Page that anyone could be redirected to <em>(by s2Member)</em>, should they attempt to access an area of your site, which may require access to something they are currenty NOT allowed to view.' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? ' For more on this advanced topic, please check your Dashboard here: <code>s2Member -› API Scripting -› Membership Options Page / Variables</code>.' : '') . '</em></p>' . "\n" : '';
         echo '<p><em><strong>*Tip*</strong> s2Member will NEVER allow this Page to be protected from public access.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_membership_options_page", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-membership-options-page">' . "\n";
         echo 'Membership Options Page:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_membership_options_page" id="ws-plugin--s2member-membership-options-page">' . "\n";
         echo '<option value="">&mdash; Select &mdash;</option>' . "\n";
         foreach ($ws_plugin__s2member_temp_a = array_merge((array) get_pages()) as $ws_plugin__s2member_temp_o) {
             echo '<option value="' . esc_attr($ws_plugin__s2member_temp_o->ID) . '"' . ($ws_plugin__s2member_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] ? ' selected="selected"' : '') . '>' . esc_html($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
         }
         echo '</select><br />' . "\n";
         echo 'Please choose a Page that provides Users a way to signup for Membership. This Page should also contain your Payment Button(s). We recommend the following title: <code>Membership Signup</code>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-membership-options-page-vars-enable">' . "\n";
         echo 'Enable MOP Vars (i.e. Membership Options Page Variables)?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_membership_options_page_vars_enable" id="ws-plugin--s2member-membership-options-page-vars-enable">' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page_vars_enable"] ? ' selected="selected"' : '') . '>Yes (enable MOP Vars in all redirections; recommended behavior)</option>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page_vars_enable"] ? ' selected="selected"' : '') . '>No (don\'t include the additional details provided by MOP Vars)</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'See: <code>Dashboard ⥱ s2Member ⥱ API / Scripting ⥱ Membership Options Page / Variables</code><br />' . "\n";
         echo 'Recommended setting: (<code>Yes, enable MOP Vars</code>)' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_membership_options_page", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_profile_modifications", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_profile_modifications", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Member Profile Modifications">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-profile-modifications-section">' . "\n";
         echo '<h3>Giving Members The Ability To Modify Their Profile</h3>' . "\n";
         echo '<p>s2Member can be configured to redirect Members away from the <a href="' . esc_attr(admin_url("/profile.php")) . '" target="_blank" rel="external">default Profile Editing Panel</a> that is built into WordPress. When/if a Member attempts to access the default Profile Editing Panel, they\'ll instead, be redirected to the Login Welcome Page that you\'ve configured through s2Member. <strong>Why would I redirect?</strong> Unless you\'ve made some drastic modifications to your WordPress installation, the default Profile Editing Panel that ships with WordPress, is NOT really suited for public access, even by a Member.</p>' . "\n";
         echo '<p>So instead of using this default Profile Editing Panel; s2Member creates an added layer of functionality, on top of WordPress. It does this by providing you <em>(as the site owner)</em>, with a special Shortcode: <code>[s2Member-Profile /]</code> that you can place into your Login Welcome Page, or any Post/Page for that matter <em>(even into a Text Widget)</em>. This Shortcode produces an Inline Profile Editing Form that supports all aspects of s2Member, including Password changes; and any Custom Registration/Profile Fields that you\'ve configured with s2Member.</p>' . "\n";
         echo '<p>Alternatively, s2Member also gives you the ability to send your Members to a <a href="' . esc_attr(site_url("/?s2member_profile=1")) . '" target="_blank" rel="external">special Stand-Alone version</a>. This Stand-Alone version has been designed <em>(with a bare-bones format)</em>, intentionally. This makes it possible for you to <a href="#" onclick="if(!window.open(\'' . site_url("/?s2member_profile=1") . '\', \'_popup\', \'width=600,height=400,left=100,screenX=100,top=100,screenY=100,location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1\')) alert(\'Please disable popup blockers and try again!\'); return false;" rel="external">open it up in a popup window</a>, or embed it into your Login Welcome Page using an IFRAME. Code samples are provided below.</p>' . "\n";
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress already provides Users/Members with a Profile Editing Panel, powered by your theme. If you\'ve configured Custom Registration/Profile Fields with s2Member, you can also enable s2Member\'s Profile Field integration with BuddyPress (recommended). For further details, see: <code>s2Member -› General Options -› Registration/Profile Fields</code>.</em></p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_profile_modifications", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-force-admin-lockouts">' . "\n";
         echo 'Redirect Members away from the Default Profile Panel?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_force_admin_lockouts" id="ws-plugin--s2member-force-admin-lockouts">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"] ? ' selected="selected"' : '') . '>No (I want to use the WordPress default methodologies)</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"] ? ' selected="selected"' : '') . '>Yes (redirect to Login Welcome Page; locking all /wp-admin/ areas)</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'Recommended setting (<code>Yes</code>). <em><strong>*Note*</strong> When this is set to (<code>Yes</code>), s2Member will take an initiative to further safeguard ALL <code>/wp-admin/</code> areas of your installation; not just the Default Profile Panel.</em>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Shortcode (copy/paste)</strong>, for an Inline Profile Modification Form:<br />' . "\n";
         echo '<p><input type="text" autocomplete="off" value="' . format_to_edit('[s2Member-Profile /]') . '" class="monospace" onclick="this.select ();" /></p>' . "\n";
         echo '<p style="margin-top:20px;"><strong>Stand-Alone (copy/paste)</strong>, for popup window:</p>' . "\n";
         echo '<p><input type="text" autocomplete="off" value="' . format_to_edit(preg_replace("/\\<\\?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \\?\\>/", c_ws_plugin__s2member_utils_strings::esc_refs(site_url("/?s2member_profile=1")), file_get_contents(dirname(__FILE__) . "/code-samples/current-user-profile-modification-page-url-2-ops.x-php"))) . '" class="monospace" onclick="this.select ();" /></p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_profile_modifications", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_url_shortening", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_url_shortening", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="URL Shortening Service Preference">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-url-shortening-section">' . "\n";
         echo '<h3>URL Shortening Service API (Preference)</h3>' . "\n";
         echo '<p>In a few special cases, long URLs generated by s2Member, containing encrypted authentication details, will be shortened; using one of the URL Shortening APIs <em>(listed below)</em>. A shortened URL prevents issues with VERY long links becoming corrupted by a Customer\'s email application. For instance, the Signup Confirmation Email that s2Member sends out to a new paying Customer, may contain a link which is shortened to prevent corruption by email applications. By default, s2Member uses the tinyURL API, which has proven itself to be the most reliable. However, in cases where an API service call fails, s2Member will automatically use one or more of its other APIs as a backup. The option below, allows you to configure which URL Shortening API s2Member should try first <em>(i.e. the one you prefer)</em>.</p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_url_shortening", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-default-url-shortener">' . "\n";
         echo 'URL Shortening Service API (Preference):' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_default_url_shortener" id="ws-plugin--s2member-default-url-shortener">' . "\n";
         echo '<option value="tiny_url"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["default_url_shortener"] === "tiny_url" ? ' selected="selected"' : '') . '>tinyurl.com (free tinyURL API service)</option>' . "\n";
         echo '<option value="goo_gl"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["default_url_shortener"] === "goo_gl" ? ' selected="selected"' : '') . '>goo.gl (free Google URL Shortening API service)</option>' . "\n";
         echo '</select>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-default-custom-str-url-shortener">' . "\n";
         echo 'Custom URL Shortening Service API (Optional/Advanced):' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_default_custom_str_url_shortener" id="ws-plugin--s2member-default-custom-str-url-shortener" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["default_custom_str_url_shortener"]) . '" /><br />' . "\n";
         echo 'Your own custom URL <code>(i.e. GET request)</code>, with <code>%%s2_long_url%%</code> Replacement Code. [ <a href="#" onclick="alert(\'s2Member makes it possible for advanced site owners to use a custom URL shortening service they prefer, over the ones currently pre-integrated with s2Member. In order for this to work, your URL shortening service MUST support basic GET requests through its API (sometimes referred to as a REST or NVP API). In addition, your URL shortening service MUST be capable of returning a simple URL in the response that s2Member receives, as a result of s2Member processing the GET request you formulate. See example below.\\n\\nBitly example GET request with format=txt:\\nhttp://api.bitly.com/v3/shorten?login=demo&apiKey=2d71bf07&format=txt&longUrl=%%s2_long_url%%\\n(s2Member expects a shortened URL in the response from Bitly)\\n\\n* If you configure s2Member to use your own custom URL shortening service, s2Member will try your configuration first, and if anything fails, it will fall back on its own pre-integrated backups. When configuring your URL for the GET request, s2Member makes two Replacement Codes available:\\n\\n%%s2_long_url%% = The full URL that needs to be shortened (raw URL-encoded).\\n%%s2_long_url_md5%% = An MD5 hash of the full URL (might be useful in some APIs).\\n\\n* If you have any trouble getting your URL shortening service integrated with s2Member in this way, you might take a look at this WordPress Filter ( `ws_plugin__s2member_url_shorten` ), which s2Member makes available for advanced circumstances. Search s2Member\\\'s source code for `ws_plugin__s2member_url_shorten`.\'); return false;" tabindex="-1">click for details</a> ]<br />' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_url_shortening", get_defined_vars());
     }
     do_action("ws_plugin__s2member_during_gen_ops_page_after_left_sections", get_defined_vars());
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     echo '<p class="submit"><input type="submit" value="Save All Changes" /></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__s2member_menu_pages_rs::display();
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
 }
 /**
  * Handles internal translations via `gettext` Filter.
  *
  * Important note. Because this routine also uses translation functionality by WordPress,
  * anything translated by this routine MUST be different, otherwise it will result in a recursive loop,
  * because the ``__()`` family of functions would be called upon recursively by this routine.
  *
  * If you're translating s2Member into a different language, your MO file for s2Member will automagically deal with
  * everything you see below. No worries. Just build your translation file for s2Member, and you're all set.
  *
  * @package s2Member\Translations
  * @since 3.5
  *
  * @attaches-to ``add_filter("gettext");``
  *
  * @param string $translated Expects already-translated string passed in by Filter.
  * @param string $original Expects original text string passed in by Filter.
  * @param string $domain Expects translation domain passed in by Filter.
  *
  * @return string Translated string, possibly modified by this routine.
  */
 public static function translation_mangler($translated = '', $original = '', $domain = '')
 {
     global $current_site, $current_blog;
     // In support of Multisite Networking.
     static $s = array();
     // This static array optimizes all of these routines.
     if (isset($s["is_wp_login"]) && $s["is_wp_login"] || !isset($s["is_wp_login"]) && ($s["is_wp_login"] = strpos($_SERVER["REQUEST_URI"], "/wp-login.php") !== FALSE && empty($_REQUEST["action"]) && empty($_REQUEST["checkemail"]) ? TRUE : FALSE)) {
         if ($original === "Username") {
             $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x("Username:"******"s2member-front", "s2member"), get_defined_vars());
         } else {
             if ($original === "Password") {
                 $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x("My Password:"******"s2member-front", "s2member"), get_defined_vars());
             }
         }
     } else {
         if (isset($s["is_wp_login_register"]) && $s["is_wp_login_register"] || !isset($s["is_wp_login_register"]) && ($s["is_wp_login_register"] = strpos($_SERVER["REQUEST_URI"], "/wp-login.php") !== FALSE && !empty($_REQUEST["action"]) && $_REQUEST["action"] === "register" ? TRUE : FALSE)) {
             if ($original === "Username") {
                 $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x("Username *", "s2member-front", "s2member"), get_defined_vars());
             } else {
                 if ($original === "Password") {
                     $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x("Password *", "s2member-front", "s2member"), get_defined_vars());
                 } else {
                     if ($original === "E-mail") {
                         $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x("Email Address *", "s2member-front", "s2member"), get_defined_vars());
                     }
                 }
             }
         } else {
             if (isset($s["is_wp_login_checkemail"]) && $s["is_wp_login_checkemail"] || !isset($s["is_wp_login_checkemail"]) && ($s["is_wp_login_checkemail"] = strpos($_SERVER["REQUEST_URI"], "/wp-login.php") !== FALSE && empty($_REQUEST["action"]) && !empty($_REQUEST["checkemail"]) && $_REQUEST["checkemail"] === "registered" ? TRUE : FALSE)) {
                 if ($original === "Registration complete. Please check your e-mail." && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"]) {
                     $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x("Registration complete. Please log in.", "s2member-front", "s2member"), get_defined_vars());
                 }
             } else {
                 if (isset($s["is_user_new"]) && $s["is_user_new"] || !isset($s["is_user_new"]) && ($s["is_user_new"] = strpos($_SERVER["REQUEST_URI"], "/wp-admin/user-new.php") !== FALSE ? TRUE : FALSE)) {
                     if ($original === "Hi,\n\nYou have been invited to join '%s' at\n%s as a %s.\nPlease click the following link to confirm the invite:\n%s\n" && !empty($_REQUEST["role"]) && preg_match("/^(subscriber|s2member_level[0-9]+)\$/", $_REQUEST["role"])) {
                         $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x("You have been invited to join `%1\$s` at\n%2\$s as a Member.\nPlease click the following link to confirm the invite:\n%4\$s\n", "s2member-front", "s2member"), get_defined_vars());
                     }
                 } else {
                     if (isset($s["is_wp_activate"]) && $s["is_wp_activate"] || !isset($s["is_wp_activate"]) && ($s["is_wp_activate"] = strpos($_SERVER["REQUEST_URI"], "/wp-activate.php") !== FALSE ? TRUE : FALSE)) {
                         if ($original === 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>') {
                             $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x('Your account is now active. <a href="%1$s">Visit site</a> or <a href="%2$s">Log in</a>.', "s2member-front", "s2member"), get_defined_vars());
                         }
                     } else {
                         if (isset($s["is_wp_signup"]) && $s["is_wp_signup"] || !isset($s["is_wp_signup"]) && ($s["is_wp_signup"] = strpos($_SERVER["REQUEST_URI"], "/wp-signup.php") !== FALSE ? TRUE : FALSE)) {
                             if ($original === "If you&#8217;re not going to use a great site domain, leave it for a new user. Now have at it!") {
                                 $translated = apply_filters("ws_plugin__s2member_translation_mangler", "", get_defined_vars());
                             } else {
                                 if ($original === "Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!") {
                                     if (is_user_logged_in() && !(is_main_site() && current_user_can("create_users")) && !is_super_admin() && is_object($user = wp_get_current_user()) && $user->ID && is_object($user = new WP_User($user->ID, $current_site->blog_id)) && $user->ID) {
                                         $mms_options = c_ws_plugin__s2member_utilities::mms_options();
                                         $blogs_allowed = (int) @$mms_options["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level($user)];
                                         $user_blogs = is_array($blogs = get_blogs_of_user($user->ID)) ? count($blogs) - 1 : 0;
                                         $user_blogs = $user_blogs >= 0 ? $user_blogs : 0;
                                         // NOT less than zero.
                                         $blogs_allowed = $blogs_allowed >= 0 ? $blogs_allowed : 0;
                                         $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x('By filling out the form below, you can <strong>add a site to your account</strong>.', "s2member-front", "s2member") . ($blogs_allowed > 1 ? '<br />' . sprintf(_nx('You may create <strong>%s</strong> site.', 'You may create up to <strong>%s</strong> sites.', $blogs_allowed, "s2member-front", "s2member"), $blogs_allowed) : ''), get_defined_vars());
                                     }
                                 }
                             }
                         } else {
                             if (isset($s["is_bp_blog_creation"]) && $s["is_bp_blog_creation"] || !isset($s["is_bp_blog_creation"]) && ($s["is_bp_blog_creation"] = c_ws_plugin__s2member_utils_conds::bp_is_installed() && bp_is_create_blog() ? TRUE : FALSE)) {
                                 if ($original === "If you&#8217;re not going to use a great domain, leave it for a new user. Now have at it!") {
                                     $translated = apply_filters("ws_plugin__s2member_translation_mangler", "", get_defined_vars());
                                 } else {
                                     if ($original === "By filling out the form below, you can <strong>add a site to your account</strong>. There is no limit to the number of sites that you can have, so create to your heart's content, but blog responsibly!") {
                                         if (is_user_logged_in() && !(is_main_site() && current_user_can("create_users")) && !is_super_admin() && is_object($user = wp_get_current_user()) && $user->ID && is_object($user = new WP_User($user->ID, $current_site->blog_id)) && $user->ID) {
                                             $mms_options = c_ws_plugin__s2member_utilities::mms_options();
                                             $blogs_allowed = (int) @$mms_options["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level($user)];
                                             $user_blogs = is_array($blogs = get_blogs_of_user($user->ID)) ? count($blogs) - 1 : 0;
                                             $user_blogs = $user_blogs >= 0 ? $user_blogs : 0;
                                             // NOT less than zero.
                                             $blogs_allowed = $blogs_allowed >= 0 ? $blogs_allowed : 0;
                                             $translated = apply_filters("ws_plugin__s2member_translation_mangler", _x('By filling out the form below, you can <strong>add a site to your account</strong>.', "s2member-front", "s2member") . ($blogs_allowed > 1 ? '<br />' . sprintf(_nx('You may create up to <strong>%s</strong> site.', 'You may create up to <strong>%s</strong> sites.', $blogs_allowed, "s2member-front", "s2member"), $blogs_allowed) : ''), get_defined_vars());
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return $translated;
     // No Filters.
 }
 /**
  * Configures all new Users.
  *
  * The Hook `user_register` is also fired by calling:
  * ``c_ws_plugin__s2member_registrations::ms_create_existing_user()`` and/or ``wpmu_create_user()``.
  *
  * This function also receives hand-offs from s2Member's handlers for these two Hooks:
  * `wpmu_activate_user` and `wpmu_activate_blog`.
  *
  * @package s2Member\Registrations
  * @since 3.5
  *
  * @attaches-to ``add_action("user_register");``
  *
  * @param int|str $user_id A numeric WordPress User ID.
  * @param str $password Optional in most cases. A User's plain text Password. If unspecified, attempts are made to collect the plain text Password from other sources.
  * @param array $meta Optional in most cases. Defaults to false. An array of meta data for a User/Member.
  * @return null No return value. Returns `null` in possible every scenario.
  *
  * @todo Impossible to delete cookies when fired inside: `/wp-activate.php`?
  */
 public static function configure_user_registration($user_id = FALSE, $password = FALSE, $meta = FALSE)
 {
     global $wpdb;
     global $pagenow;
     // We need this to detect the current administration page.
     global $current_site, $current_blog;
     // Adds support for Multisite Networking.
     static $email_config, $processed;
     // Static vars prevent duplicate processing.
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_before_configure_user_registration", get_defined_vars());
     unset($__refs, $__v);
     // With Multisite Networking, we need this to run on `user_register` ahead of `wpmu_activate_[user|blog]`.
     if (!isset($email_config) && ($email_config = true)) {
         // Anytime this routine is fired; we configure email.
         c_ws_plugin__s2member_email_configs::email_config();
     }
     // Configures `From:` email header.
     $_p = isset($_POST) ? $_POST : null;
     $rvs = isset($GLOBALS["ws_plugin__s2member_registration_vars"]) ? $GLOBALS["ws_plugin__s2member_registration_vars"] : null;
     if (!$processed) {
         if (is_array($_p) || is_array($meta) || is_array($rvs)) {
             if (!(is_multisite() && is_blog_admin() && $pagenow === "user-new.php" && isset($_p["noconfirmation"]) && is_super_admin() && !is_array($meta))) {
                 if (!(preg_match("/\\/wp-activate\\.php/", $_SERVER["REQUEST_URI"]) && !is_array($meta))) {
                     if (!(c_ws_plugin__s2member_utils_conds::bp_is_installed() && bp_is_activation_page() && !is_array($meta))) {
                         if (!(c_ws_plugin__s2member_utils_conds::pro_is_installed() && c_ws_plugin__s2member_pro_remote_ops::is_remote_op("create_user") && !is_array($rvs))) {
                             if ($user_id && is_object($user = new WP_User($user_id)) && !empty($user->ID) && ($user_id = $user->ID) && ($processed = true)) {
                                 settype($_p, "array") . settype($meta, "array") . settype($rvs, "array");
                                 $_p = c_ws_plugin__s2member_utils_strings::trim_deep(stripslashes_deep($_p));
                                 $meta = c_ws_plugin__s2member_utils_strings::trim_deep(stripslashes_deep($meta));
                                 $rvs = c_ws_plugin__s2member_utils_strings::trim_deep($rvs);
                                 foreach ($_p as $_key => $_value) {
                                     // Scan ``$_p`` vars; adding `custom_reg_field` keys.
                                     if (preg_match("/^ws_plugin__s2member_user_new_/", $_key)) {
                                         // Look for keys.
                                         if ($_key = str_replace("_user_new_", "_custom_reg_field_", $_key)) {
                                             $_p[$_key] = $_value;
                                         }
                                     }
                                 }
                                 // Add each of these key conversions.
                                 unset($_key, $_value);
                                 if (!is_admin() && (isset($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_custom"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_ccaps"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_notes"]))) {
                                     exit(_x("s2Member security violation. You attempted to POST administrative variables that will NOT be trusted in a NON-administrative zone!", "s2member-front", "s2member"));
                                 }
                                 $_pmr = array_merge($_p, $meta, $rvs);
                                 // Merge all of these arrays together now, in this specific order.
                                 unset($_p, $meta, $rvs);
                                 // These variables can all be unset now; we have them all in the ``$_pmr`` array.
                                 $custom_reg_display_name = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"];
                                 // Can be configured by the site owner.
                                 if (!is_admin() && (!c_ws_plugin__s2member_utils_conds::pro_is_installed() || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op("create_user")) && ($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok()) && extract($reg_cookies)) {
                                     /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
                                     			This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
                                     			If processed through `/wp-activate.php`, it could've originated inside the admin — via `/user-new.php`. */
                                     $processed = "yes";
                                     // Mark this as yes.
                                     $current_role = c_ws_plugin__s2member_user_access::user_access_role($user);
                                     @(list($level, $ccaps, $eotper) = preg_split("/\\:/", $item_number, 3));
                                     $role = "s2member_level" . $level;
                                     // Membership Level.
                                     $email = $user->user_email;
                                     $login = $user->user_login;
                                     $ip = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_registration_ip"];
                                     $ip = !$ip ? $_SERVER["REMOTE_ADDR"] : $ip;
                                     // Else use environment variable.
                                     $cv = preg_split("/\\|/", $custom);
                                     if (!($auto_eot_time = "") && $eotper) {
                                         // If a specific EOT Period is included.
                                         $auto_eot_time = c_ws_plugin__s2member_utils_time::auto_eot_time("", "", "", $eotper);
                                     }
                                     $notes = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_notes"];
                                     $opt_in = !$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] ? true : false;
                                     $opt_in = !$opt_in && !empty($_pmr["ws_plugin__s2member_custom_reg_field_opt_in"]) ? true : $opt_in;
                                     if (!($fname = $user->first_name)) {
                                         if (!empty($_pmr["ws_plugin__s2member_custom_reg_field_first_name"])) {
                                             $fname = (string) $_pmr["ws_plugin__s2member_custom_reg_field_first_name"];
                                         }
                                     }
                                     if (!$fname) {
                                         // Also try BuddyPress.
                                         if (!empty($_pmr["field_1"])) {
                                             // BuddyPress?
                                             $fname = trim(preg_replace("/ (.*)\$/", "", (string) $_pmr["field_1"]));
                                         }
                                     }
                                     if (!($lname = $user->last_name)) {
                                         if (!empty($_pmr["ws_plugin__s2member_custom_reg_field_last_name"])) {
                                             $lname = (string) $_pmr["ws_plugin__s2member_custom_reg_field_last_name"];
                                         }
                                     }
                                     if (!$lname) {
                                         // Also try BuddyPress.
                                         if (!empty($_pmr["field_1"]) && preg_match("/^(.+?) (.+)\$/", (string) $_pmr["field_1"])) {
                                             $lname = trim(preg_replace("/^(.+?) (.+)\$/", "\$2", (string) $_pmr["field_1"]));
                                         }
                                     }
                                     if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname && $login) {
                                         $fname = trim($login);
                                         $lname = "";
                                     }
                                     // Username and empty Last Name.
                                     $name = trim($fname . " " . $lname);
                                     // Both names.
                                     if (!($pass = $password)) {
                                         // Try s2Member's generator.
                                         if (!empty($GLOBALS["ws_plugin__s2member_generate_password_return"])) {
                                             $pass = (string) $GLOBALS["ws_plugin__s2member_generate_password_return"];
                                         }
                                     }
                                     if (!$pass) {
                                         // Also try BuddyPress Password.
                                         if (!empty($_pmr["signup_password"])) {
                                             // BuddyPress?
                                             $pass = (string) $_pmr["signup_password"];
                                         }
                                     }
                                     if ($pass) {
                                         !headers_sent() ? delete_user_setting("default_password_nag", $user_id) : null;
                                         update_user_option($user_id, "default_password_nag", false, true);
                                     }
                                     update_user_option($user_id, "s2member_registration_ip", $ip);
                                     update_user_option($user_id, "s2member_auto_eot_time", $auto_eot_time);
                                     update_user_option($user_id, "s2member_subscr_gateway", $subscr_gateway);
                                     update_user_option($user_id, "s2member_subscr_id", $subscr_id);
                                     update_user_option($user_id, "s2member_custom", $custom);
                                     update_user_option($user_id, "s2member_notes", $notes);
                                     if (!$user->first_name && $fname) {
                                         update_user_meta($user_id, "first_name", $fname);
                                     }
                                     if (!$user->last_name && $lname) {
                                         update_user_meta($user_id, "last_name", $lname);
                                     }
                                     if (!$user->display_name || $user->display_name === $user->user_login) {
                                         if ($custom_reg_display_name === "full" && $name) {
                                             wp_update_user(array("ID" => $user_id, "display_name" => $name));
                                         } else {
                                             if ($custom_reg_display_name === "first" && $fname) {
                                                 wp_update_user(array("ID" => $user_id, "display_name" => $fname));
                                             } else {
                                                 if ($custom_reg_display_name === "last" && $lname) {
                                                     wp_update_user(array("ID" => $user_id, "display_name" => $lname));
                                                 } else {
                                                     if ($custom_reg_display_name === "login" && $login) {
                                                         wp_update_user(array("ID" => $user_id, "display_name" => $login));
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                     if (is_multisite()) {
                                         if (!is_main_site() && strtotime($user->user_registered) >= strtotime("-10 seconds")) {
                                             remove_user_from_blog($user_id, $current_site->blog_id);
                                         }
                                         // No Main Site Role.
                                         if (!get_user_meta($user_id, "s2member_originating_blog", true)) {
                                             // Recorded yet?
                                             update_user_meta($user_id, "s2member_originating_blog", $current_blog->blog_id);
                                         }
                                     }
                                     if ($current_role !== $role) {
                                         // Only if NOT the current Role.
                                         $user->set_role($role);
                                     }
                                     // s2Member.
                                     if ($ccaps && preg_match("/^-all/", str_replace("+", "", $ccaps))) {
                                         foreach ($user->allcaps as $cap => $cap_enabled) {
                                             if (preg_match("/^access_s2member_ccap_/", $cap)) {
                                                 $user->remove_cap($ccap = $cap);
                                             }
                                         }
                                     }
                                     if ($ccaps && preg_replace("/^-all[\r\n\t\\s;,]*/", "", str_replace("+", "", $ccaps))) {
                                         foreach (preg_split("/[\r\n\t\\s;,]+/", preg_replace("/^-all[\r\n\t\\s;,]*/", "", str_replace("+", "", $ccaps))) as $ccap) {
                                             if (strlen($ccap = trim(strtolower(preg_replace("/[^a-z_0-9]/i", "", $ccap))))) {
                                                 $user->add_cap("access_s2member_ccap_" . $ccap);
                                             }
                                         }
                                     }
                                     if (!($fields = array()) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"]) {
                                         foreach (json_decode($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field) {
                                             $field_var = preg_replace("/[^a-z0-9]/i", "_", strtolower($field["id"]));
                                             $field_id_class = preg_replace("/_/", "-", $field_var);
                                             if (isset($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var])) {
                                                 $fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
                                             }
                                         }
                                     }
                                     unset($field, $field_var, $field_id_class);
                                     // Housekeeping.
                                     if (!empty($fields)) {
                                         // Only if NOT empty.
                                         update_user_option($user_id, "s2member_custom_fields", $fields);
                                     }
                                     if ($level > 0) {
                                         $pr_times = get_user_option("s2member_paid_registration_times", $user_id);
                                         $pr_times["level"] = empty($pr_times["level"]) ? time() : $pr_times["level"];
                                         $pr_times["level" . $level] = empty($pr_times["level" . $level]) ? time() : $pr_times["level" . $level];
                                         update_user_option($user_id, "s2member_paid_registration_times", $pr_times);
                                         // Update now.
                                     }
                                     if (($transient = "s2m_" . md5("s2member_transient_ipn_signup_vars_" . $subscr_id)) && is_array($ipn_signup_vars = get_transient($transient))) {
                                         update_user_option($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars);
                                         // For future reference.
                                         delete_transient($transient);
                                         // This can be deleted now.
                                     }
                                     if (($transient = "s2m_" . md5("s2member_transient_ipn_subscr_payment_" . $subscr_id)) && is_array($subscr_payment = get_transient($transient)) && !empty($subscr_payment["subscr_gateway"])) {
                                         $proxy = array("s2member_paypal_proxy" => stripslashes((string) $subscr_payment["subscr_gateway"]), "s2member_paypal_proxy_verification" => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen());
                                         c_ws_plugin__s2member_utils_urls::remote(site_url("/?s2member_paypal_notify=1"), array_merge(stripslashes_deep($subscr_payment), $proxy), array("timeout" => 20));
                                         delete_transient($transient);
                                         // This can be deleted now.
                                     }
                                     if (($transient = "s2m_" . md5("s2member_transient_ipn_subscr_eot_" . $subscr_id)) && is_array($subscr_eot = get_transient($transient)) && !empty($subscr_eot["subscr_gateway"])) {
                                         $proxy = array("s2member_paypal_proxy" => stripslashes((string) $subscr_eot["subscr_gateway"]), "s2member_paypal_proxy_verification" => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen());
                                         c_ws_plugin__s2member_utils_urls::remote(site_url("/?s2member_paypal_notify=1"), array_merge(stripslashes_deep($subscr_eot), $proxy), array("timeout" => 20));
                                         delete_transient($transient);
                                         // This can be deleted now.
                                     }
                                     if (!headers_sent()) {
                                         // Only if headers are NOT yet sent. Here we establish both Signup and Payment Tracking Cookies.
                                         @setcookie("s2member_tracking", $s2member_tracking = c_ws_plugin__s2member_utils_encryption::encrypt($subscr_id), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie("s2member_tracking", $s2member_tracking, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_tracking"] = $s2member_tracking);
                                     }
                                     foreach (array_keys(get_defined_vars()) as $__v) {
                                         $__refs[$__v] =& ${$__v};
                                     }
                                     do_action("ws_plugin__s2member_during_configure_user_registration_front_side_paid", get_defined_vars());
                                     do_action("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars());
                                     unset($__refs, $__v);
                                 } else {
                                     if (!is_admin() && (!c_ws_plugin__s2member_utils_conds::pro_is_installed() || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op("create_user"))) {
                                         /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
                                         			This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
                                         			If processed through `/wp-activate.php`, it could've originated inside the admin, via `/user-new.php`. */
                                         $processed = "yes";
                                         // Mark this as yes.
                                         $current_role = c_ws_plugin__s2member_user_access::user_access_role($user);
                                         $role = "";
                                         // Initialize ``$role`` to an empty string here, before processing.
                                         $role = !$role && ($level = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"]) > 0 ? "s2member_level" . $level : $role;
                                         $role = !$role && ($level = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"]) === "0" ? "subscriber" : $role;
                                         $role = !$role && $current_role ? $current_role : $role;
                                         // Use existing Role?
                                         $role = !$role ? get_option("default_role") : $role;
                                         // Otherwise default.
                                         $level = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"];
                                         $level = !$level && preg_match("/^(administrator|editor|author|contributor)\$/i", $role) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] : $level;
                                         $level = !$level && preg_match("/^s2member_level[1-9][0-9]*\$/i", $role) ? preg_replace("/^s2member_level/", "", $role) : $level;
                                         $level = !$level && preg_match("/^subscriber\$/i", $role) ? "0" : $level;
                                         $level = !$level ? "0" : $level;
                                         $ccaps = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_ccaps"];
                                         $email = $user->user_email;
                                         $login = $user->user_login;
                                         $ip = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_registration_ip"];
                                         $ip = !$ip ? $_SERVER["REMOTE_ADDR"] : $ip;
                                         // Else use environment variable.
                                         $custom = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_custom"];
                                         $subscr_id = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"];
                                         $subscr_gateway = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"];
                                         $cv = preg_split("/\\|/", (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_custom"]);
                                         $auto_eot_time = ($eot = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) ? strtotime($eot) : "";
                                         $notes = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_notes"];
                                         $opt_in = !$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] ? true : false;
                                         $opt_in = !$opt_in && !empty($_pmr["ws_plugin__s2member_custom_reg_field_opt_in"]) ? true : $opt_in;
                                         if (!($fname = $user->first_name)) {
                                             if (!empty($_pmr["ws_plugin__s2member_custom_reg_field_first_name"])) {
                                                 $fname = (string) $_pmr["ws_plugin__s2member_custom_reg_field_first_name"];
                                             }
                                         }
                                         if (!$fname) {
                                             // Also try BuddyPress.
                                             if (!empty($_pmr["field_1"])) {
                                                 // BuddyPress?
                                                 $fname = trim(preg_replace("/ (.*)\$/", "", (string) $_pmr["field_1"]));
                                             }
                                         }
                                         if (!($lname = $user->last_name)) {
                                             if (!empty($_pmr["ws_plugin__s2member_custom_reg_field_last_name"])) {
                                                 $lname = (string) $_pmr["ws_plugin__s2member_custom_reg_field_last_name"];
                                             }
                                         }
                                         if (!$lname) {
                                             // Also try BuddyPress.
                                             if (!empty($_pmr["field_1"]) && preg_match("/^(.+?) (.+)\$/", (string) $_pmr["field_1"])) {
                                                 $lname = trim(preg_replace("/^(.+?) (.+)\$/", "\$2", (string) $_pmr["field_1"]));
                                             }
                                         }
                                         if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname && $login) {
                                             $fname = trim($login);
                                             $lname = "";
                                         }
                                         // Username and empty Last Name.
                                         $name = trim($fname . " " . $lname);
                                         // Both names.
                                         if (!($pass = $password)) {
                                             // Try s2Member's generator.
                                             if (!empty($GLOBALS["ws_plugin__s2member_generate_password_return"])) {
                                                 $pass = (string) $GLOBALS["ws_plugin__s2member_generate_password_return"];
                                             }
                                         }
                                         if (!$pass) {
                                             // Also try BuddyPress Password.
                                             if (!empty($_pmr["signup_password"])) {
                                                 // BuddyPress?
                                                 $pass = (string) $_pmr["signup_password"];
                                             }
                                         }
                                         if ($pass) {
                                             !headers_sent() ? delete_user_setting("default_password_nag", $user_id) : null;
                                             update_user_option($user_id, "default_password_nag", false, true);
                                         }
                                         update_user_option($user_id, "s2member_registration_ip", $ip);
                                         update_user_option($user_id, "s2member_auto_eot_time", $auto_eot_time);
                                         update_user_option($user_id, "s2member_subscr_gateway", $subscr_gateway);
                                         update_user_option($user_id, "s2member_subscr_id", $subscr_id);
                                         update_user_option($user_id, "s2member_custom", $custom);
                                         update_user_option($user_id, "s2member_notes", $notes);
                                         if (!$user->first_name && $fname) {
                                             update_user_meta($user_id, "first_name", $fname);
                                         }
                                         if (!$user->last_name && $lname) {
                                             update_user_meta($user_id, "last_name", $lname);
                                         }
                                         if (!$user->display_name || $user->display_name === $user->user_login) {
                                             if ($custom_reg_display_name === "full" && $name) {
                                                 wp_update_user(array("ID" => $user_id, "display_name" => $name));
                                             } else {
                                                 if ($custom_reg_display_name === "first" && $fname) {
                                                     wp_update_user(array("ID" => $user_id, "display_name" => $fname));
                                                 } else {
                                                     if ($custom_reg_display_name === "last" && $lname) {
                                                         wp_update_user(array("ID" => $user_id, "display_name" => $lname));
                                                     } else {
                                                         if ($custom_reg_display_name === "login" && $login) {
                                                             wp_update_user(array("ID" => $user_id, "display_name" => $login));
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                         if (is_multisite()) {
                                             if (!is_main_site() && strtotime($user->user_registered) >= strtotime("-10 seconds")) {
                                                 remove_user_from_blog($user_id, $current_site->blog_id);
                                             }
                                             if (!get_user_meta($user_id, "s2member_originating_blog", true)) {
                                                 update_user_meta($user_id, "s2member_originating_blog", $current_blog->blog_id);
                                             }
                                         }
                                         if ($current_role !== $role) {
                                             // Only if NOT the current Role.
                                             $user->set_role($role);
                                         }
                                         // s2Member.
                                         if ($ccaps && preg_match("/^-all/", str_replace("+", "", $ccaps))) {
                                             foreach ($user->allcaps as $cap => $cap_enabled) {
                                                 if (preg_match("/^access_s2member_ccap_/", $cap)) {
                                                     $user->remove_cap($ccap = $cap);
                                                 }
                                             }
                                         }
                                         if ($ccaps && preg_replace("/^-all[\r\n\t\\s;,]*/", "", str_replace("+", "", $ccaps))) {
                                             foreach (preg_split("/[\r\n\t\\s;,]+/", preg_replace("/^-all[\r\n\t\\s;,]*/", "", str_replace("+", "", $ccaps))) as $ccap) {
                                                 if (strlen($ccap = trim(strtolower(preg_replace("/[^a-z_0-9]/i", "", $ccap))))) {
                                                     $user->add_cap("access_s2member_ccap_" . $ccap);
                                                 }
                                             }
                                         }
                                         if (!($fields = array()) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"]) {
                                             foreach (json_decode($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field) {
                                                 $field_var = preg_replace("/[^a-z0-9]/i", "_", strtolower($field["id"]));
                                                 $field_id_class = preg_replace("/_/", "-", $field_var);
                                                 if (isset($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var])) {
                                                     $fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
                                                 }
                                             }
                                         }
                                         unset($field, $field_var, $field_id_class);
                                         // Housekeeping.
                                         if (!empty($fields)) {
                                             // Only if NOT empty.
                                             update_user_option($user_id, "s2member_custom_fields", $fields);
                                         }
                                         if ($level > 0) {
                                             $pr_times = get_user_option("s2member_paid_registration_times", $user_id);
                                             $pr_times["level"] = empty($pr_times["level"]) ? time() : $pr_times["level"];
                                             $pr_times["level" . $level] = empty($pr_times["level" . $level]) ? time() : $pr_times["level" . $level];
                                             update_user_option($user_id, "s2member_paid_registration_times", $pr_times);
                                             // Update now.
                                         }
                                         foreach (array_keys(get_defined_vars()) as $__v) {
                                             $__refs[$__v] =& ${$__v};
                                         }
                                         do_action("ws_plugin__s2member_during_configure_user_registration_front_side_free", get_defined_vars());
                                         do_action("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars());
                                         unset($__refs, $__v);
                                     } else {
                                         if (is_blog_admin() && $pagenow === "user-new.php" || c_ws_plugin__s2member_utils_conds::pro_is_installed() && c_ws_plugin__s2member_pro_remote_ops::is_remote_op("create_user")) {
                                             // Can only be processed through `/user-new.php` in the Admin panel, or through Remote Op: `create_user`.
                                             $processed = "yes";
                                             // Mark this as yes, to indicate that a routine was processed.
                                             $current_role = c_ws_plugin__s2member_user_access::user_access_role($user);
                                             $role = "";
                                             // Initialize $role to an empty string here, before processing.
                                             $role = !$role && ($level = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"]) > 0 ? "s2member_level" . $level : $role;
                                             $role = !$role && ($level = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"]) === "0" ? "subscriber" : $role;
                                             $role = !$role && $current_role ? $current_role : $role;
                                             // Use existing Role?
                                             $role = !$role ? get_option("default_role") : $role;
                                             // Otherwise default.
                                             $level = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"];
                                             $level = !$level && preg_match("/^(administrator|editor|author|contributor)\$/i", $role) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] : $level;
                                             $level = !$level && preg_match("/^s2member_level[1-9][0-9]*\$/i", $role) ? preg_replace("/^s2member_level/", "", $role) : $level;
                                             $level = !$level && preg_match("/^subscriber\$/i", $role) ? "0" : $level;
                                             $level = !$level ? "0" : $level;
                                             $ccaps = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_ccaps"];
                                             $email = $user->user_email;
                                             $login = $user->user_login;
                                             $ip = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_registration_ip"];
                                             $custom = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_custom"];
                                             $subscr_id = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"];
                                             $subscr_gateway = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"];
                                             $cv = preg_split("/\\|/", (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_custom"]);
                                             $auto_eot_time = ($eot = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) ? strtotime($eot) : "";
                                             $notes = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_notes"];
                                             $opt_in = !empty($_pmr["ws_plugin__s2member_custom_reg_field_opt_in"]) ? true : false;
                                             if (!($fname = $user->first_name)) {
                                                 // `Users -› Add New`.
                                                 if (!empty($_pmr["ws_plugin__s2member_custom_reg_field_first_name"])) {
                                                     $fname = (string) $_pmr["ws_plugin__s2member_custom_reg_field_first_name"];
                                                 }
                                             }
                                             if (!($lname = $user->last_name)) {
                                                 // `Users -› Add New`.
                                                 if (!empty($_pmr["ws_plugin__s2member_custom_reg_field_last_name"])) {
                                                     $lname = (string) $_pmr["ws_plugin__s2member_custom_reg_field_last_name"];
                                                 }
                                             }
                                             if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname && $login) {
                                                 $fname = trim($login);
                                                 $lname = "";
                                             }
                                             // Username and empty Last Name.
                                             $name = trim($fname . " " . $lname);
                                             // Both names.
                                             if (!($pass = $password)) {
                                                 // Try s2Member's generator.
                                                 if (!empty($GLOBALS["ws_plugin__s2member_generate_password_return"])) {
                                                     $pass = (string) $GLOBALS["ws_plugin__s2member_generate_password_return"];
                                                 }
                                             }
                                             if (!$pass) {
                                                 // Also try the `Users -› Add New` form.
                                                 if (!empty($_pmr["pass1"])) {
                                                     // Field in `/user-new.php`.
                                                     $pass = (string) $_pmr["pass1"];
                                                 }
                                             }
                                             if ($pass) {
                                                 !headers_sent() ? delete_user_setting("default_password_nag", $user_id) : null;
                                                 update_user_option($user_id, "default_password_nag", false, true);
                                             }
                                             update_user_option($user_id, "s2member_registration_ip", $ip);
                                             update_user_option($user_id, "s2member_auto_eot_time", $auto_eot_time);
                                             update_user_option($user_id, "s2member_subscr_gateway", $subscr_gateway);
                                             update_user_option($user_id, "s2member_subscr_id", $subscr_id);
                                             update_user_option($user_id, "s2member_custom", $custom);
                                             update_user_option($user_id, "s2member_notes", $notes);
                                             if (!$user->first_name && $fname) {
                                                 update_user_meta($user_id, "first_name", $fname);
                                             }
                                             if (!$user->last_name && $lname) {
                                                 update_user_meta($user_id, "last_name", $lname);
                                             }
                                             if (!$user->display_name || $user->display_name === $user->user_login) {
                                                 if ($custom_reg_display_name === "full" && $name) {
                                                     wp_update_user(array("ID" => $user_id, "display_name" => $name));
                                                 } else {
                                                     if ($custom_reg_display_name === "first" && $fname) {
                                                         wp_update_user(array("ID" => $user_id, "display_name" => $fname));
                                                     } else {
                                                         if ($custom_reg_display_name === "last" && $lname) {
                                                             wp_update_user(array("ID" => $user_id, "display_name" => $lname));
                                                         } else {
                                                             if ($custom_reg_display_name === "login" && $login) {
                                                                 wp_update_user(array("ID" => $user_id, "display_name" => $login));
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                             if (is_multisite()) {
                                                 if (!is_main_site() && strtotime($user->user_registered) >= strtotime("-10 seconds")) {
                                                     remove_user_from_blog($user_id, $current_site->blog_id);
                                                 }
                                                 // No Main Site Role.
                                                 if (!get_user_meta($user_id, "s2member_originating_blog", true)) {
                                                     // Recorded yet?
                                                     update_user_meta($user_id, "s2member_originating_blog", $current_blog->blog_id);
                                                 }
                                             }
                                             if ($current_role !== $role) {
                                                 // Only if NOT the current Role.
                                                 $user->set_role($role);
                                             }
                                             // s2Member.
                                             if ($ccaps && preg_match("/^-all/", str_replace("+", "", $ccaps))) {
                                                 foreach ($user->allcaps as $cap => $cap_enabled) {
                                                     if (preg_match("/^access_s2member_ccap_/", $cap)) {
                                                         $user->remove_cap($ccap = $cap);
                                                     }
                                                 }
                                             }
                                             if ($ccaps && preg_replace("/^-all[\r\n\t\\s;,]*/", "", str_replace("+", "", $ccaps))) {
                                                 foreach (preg_split("/[\r\n\t\\s;,]+/", preg_replace("/^-all[\r\n\t\\s;,]*/", "", str_replace("+", "", $ccaps))) as $ccap) {
                                                     if (strlen($ccap = trim(strtolower(preg_replace("/[^a-z_0-9]/i", "", $ccap))))) {
                                                         $user->add_cap("access_s2member_ccap_" . $ccap);
                                                     }
                                                 }
                                             }
                                             if (!($fields = array()) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"]) {
                                                 foreach (json_decode($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field) {
                                                     $field_var = preg_replace("/[^a-z0-9]/i", "_", strtolower($field["id"]));
                                                     $field_id_class = preg_replace("/_/", "-", $field_var);
                                                     if (isset($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var])) {
                                                         $fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
                                                     }
                                                 }
                                             }
                                             unset($field, $field_var, $field_id_class);
                                             // Housekeeping.
                                             if (!empty($fields)) {
                                                 // Only if NOT empty.
                                                 update_user_option($user_id, "s2member_custom_fields", $fields);
                                             }
                                             if ($level > 0) {
                                                 $pr_times = get_user_option("s2member_paid_registration_times", $user_id);
                                                 $pr_times["level"] = empty($pr_times["level"]) ? time() : $pr_times["level"];
                                                 $pr_times["level" . $level] = empty($pr_times["level" . $level]) ? time() : $pr_times["level" . $level];
                                                 update_user_option($user_id, "s2member_paid_registration_times", $pr_times);
                                                 // Update now.
                                             }
                                             foreach (array_keys(get_defined_vars()) as $__v) {
                                                 $__refs[$__v] =& ${$__v};
                                             }
                                             do_action("ws_plugin__s2member_during_configure_user_registration_admin_side", get_defined_vars());
                                             unset($__refs, $__v);
                                         }
                                     }
                                 }
                                 if ($processed === "yes") {
                                     if ($urls = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_urls"]) {
                                         foreach (preg_split("/[\r\n\t]+/", $urls) as $url) {
                                             // Notify each of the URLs.
                                             if ($url = preg_replace("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)) {
                                                 if ($url = preg_replace("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($role)), $url)) {
                                                     if ($url = preg_replace("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($level)), $url)) {
                                                         if ($url = preg_replace("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($ccaps)), $url)) {
                                                             if ($url = preg_replace("/%%auto_eot_time%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($auto_eot_time)), $url)) {
                                                                 if ($url = preg_replace("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($fname)), $url)) {
                                                                     if ($url = preg_replace("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($lname)), $url)) {
                                                                         if ($url = preg_replace("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($name)), $url)) {
                                                                             if ($url = preg_replace("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($email)), $url)) {
                                                                                 if ($url = preg_replace("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($login)), $url)) {
                                                                                     if ($url = preg_replace("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($pass)), $url)) {
                                                                                         if ($url = preg_replace("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($ip)), $url)) {
                                                                                             if ($url = preg_replace("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($user_id)), $url)) {
                                                                                                 foreach ($fields as $var => $val) {
                                                                                                     // Custom Fields.
                                                                                                     if (!($url = preg_replace("/%%" . preg_quote($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode(maybe_serialize($val))), $url))) {
                                                                                                         break;
                                                                                                     }
                                                                                                 }
                                                                                                 if ($url = trim(preg_replace("/%%(.+?)%%/i", "", $url))) {
                                                                                                     c_ws_plugin__s2member_utils_urls::remote($url);
                                                                                                 }
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                     unset($urls, $url, $var, $val);
                                     // Housekeeping.
                                     if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"]) {
                                         $email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status();
                                         c_ws_plugin__s2member_email_configs::email_config_release();
                                         $msg = $sbj = "(s2Member / API Notification Email) - Registration";
                                         $msg .= "\n\n";
                                         // Spacing in the message body.
                                         $msg .= "role: %%role%%\n";
                                         $msg .= "level: %%level%%\n";
                                         $msg .= "ccaps: %%ccaps%%\n";
                                         $msg .= "auto_eot_time: %%auto_eot_time%%\n";
                                         $msg .= "user_first_name: %%user_first_name%%\n";
                                         $msg .= "user_last_name: %%user_last_name%%\n";
                                         $msg .= "user_full_name: %%user_full_name%%\n";
                                         $msg .= "user_email: %%user_email%%\n";
                                         $msg .= "user_login: %%user_login%%\n";
                                         $msg .= "user_pass: %%user_pass%%\n";
                                         $msg .= "user_ip: %%user_ip%%\n";
                                         $msg .= "user_id: %%user_id%%\n";
                                         foreach ($fields as $var => $val) {
                                             $msg .= $var . ": %%" . $var . "%%\n";
                                         }
                                         $msg .= "cv0: %%cv0%%\n";
                                         $msg .= "cv1: %%cv1%%\n";
                                         $msg .= "cv2: %%cv2%%\n";
                                         $msg .= "cv3: %%cv3%%\n";
                                         $msg .= "cv4: %%cv4%%\n";
                                         $msg .= "cv5: %%cv5%%\n";
                                         $msg .= "cv6: %%cv6%%\n";
                                         $msg .= "cv7: %%cv7%%\n";
                                         $msg .= "cv8: %%cv8%%\n";
                                         $msg .= "cv9: %%cv9%%";
                                         if ($msg = preg_replace("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $msg)) {
                                             if ($msg = preg_replace("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($role), $msg)) {
                                                 if ($msg = preg_replace("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($level), $msg)) {
                                                     if ($msg = preg_replace("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($ccaps), $msg)) {
                                                         if ($msg = preg_replace("/%%auto_eot_time%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($auto_eot_time), $msg)) {
                                                             if ($msg = preg_replace("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($fname), $msg)) {
                                                                 if ($msg = preg_replace("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($lname), $msg)) {
                                                                     if ($msg = preg_replace("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($name), $msg)) {
                                                                         if ($msg = preg_replace("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($email), $msg)) {
                                                                             if ($msg = preg_replace("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($login), $msg)) {
                                                                                 if ($msg = preg_replace("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($pass), $msg)) {
                                                                                     if ($msg = preg_replace("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($ip), $msg)) {
                                                                                         if ($msg = preg_replace("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($user_id), $msg)) {
                                                                                             foreach ($fields as $var => $val) {
                                                                                                 // Custom Fields.
                                                                                                 if (!($msg = preg_replace("/%%" . preg_quote($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(maybe_serialize($val)), $msg))) {
                                                                                                     break;
                                                                                                 }
                                                                                             }
                                                                                             if ($sbj && ($msg = trim(preg_replace("/%%(.+?)%%/i", "", $msg)))) {
                                                                                                 // Still have a ``$sbj`` and a ``$msg``?
                                                                                                 foreach (c_ws_plugin__s2member_utils_strings::parse_emails($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"]) as $recipient) {
                                                                                                     wp_mail($recipient, apply_filters("ws_plugin__s2member_registration_notification_email_sbj", $sbj, get_defined_vars()), apply_filters("ws_plugin__s2member_registration_notification_email_msg", $msg, get_defined_vars()), "Content-Type: text/plain; charset=UTF-8");
                                                                                                 }
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                         if ($email_configs_were_on) {
                                             // Back on?
                                             c_ws_plugin__s2member_email_configs::email_config();
                                         }
                                         unset($sbj, $msg, $var, $val, $recipient, $email_configs_were_on);
                                         // Housekeeping.
                                     }
                                     if ($url = $GLOBALS["ws_plugin__s2member_registration_return_url"]) {
                                         if ($url = preg_replace("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)) {
                                             if ($url = preg_replace("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($role)), $url)) {
                                                 if ($url = preg_replace("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($level)), $url)) {
                                                     if ($url = preg_replace("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($ccaps)), $url)) {
                                                         if ($url = preg_replace("/%%auto_eot_time%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($auto_eot_time)), $url)) {
                                                             if ($url = preg_replace("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($fname)), $url)) {
                                                                 if ($url = preg_replace("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($lname)), $url)) {
                                                                     if ($url = preg_replace("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($name)), $url)) {
                                                                         if ($url = preg_replace("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($email)), $url)) {
                                                                             if ($url = preg_replace("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($login)), $url)) {
                                                                                 if ($url = preg_replace("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($pass)), $url)) {
                                                                                     if ($url = preg_replace("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($ip)), $url)) {
                                                                                         if ($url = preg_replace("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode($user_id)), $url)) {
                                                                                             foreach ($fields as $var => $val) {
                                                                                                 // Custom Fields.
                                                                                                 if (!($url = preg_replace("/%%" . preg_quote($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(urlencode(maybe_serialize($val))), $url))) {
                                                                                                     break;
                                                                                                 }
                                                                                             }
                                                                                             if ($url = trim($url)) {
                                                                                                 // Preserve remaining Replacements; because the parent routine may perform replacements too.
                                                                                                 $GLOBALS["ws_plugin__s2member_registration_return_url"] = $url;
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                     unset($url, $var, $val);
                                     // Housekeeping.
                                     c_ws_plugin__s2member_list_servers::process_list_servers($role, $level, $login, $pass, $email, $fname, $lname, $ip, $opt_in, true, $user_id);
                                     /*
                                     Suppress errors here in case this routine is fired in unexpected locations; or with odd output buffering techniques.
                                     	@todo It may also be impossible to delete cookies when fired inside: `/wp-activate.php`.
                                     */
                                     if (!headers_sent()) {
                                         @setcookie("s2member_subscr_gateway", "", time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie("s2member_subscr_gateway", "", time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                                         @setcookie("s2member_subscr_id", "", time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie("s2member_subscr_id", "", time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                                         @setcookie("s2member_custom", "", time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie("s2member_custom", "", time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                                         @setcookie("s2member_item_number", "", time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie("s2member_item_number", "", time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                                     }
                                     /* If debugging/logging is enabled; we need to append ``$reg_vars`` to the log file.
                                     			Logging now supports Multisite Networking as well. */
                                     $reg_vars = get_defined_vars();
                                     // All defined vars.
                                     // No need to include these in the logs. Unset before log entry.
                                     unset($reg_vars["wpdb"], $reg_vars["current_site"], $reg_vars["current_blog"]);
                                     $logt = c_ws_plugin__s2member_utilities::time_details();
                                     $logv = c_ws_plugin__s2member_utilities::ver_details();
                                     $logm = c_ws_plugin__s2member_utilities::mem_details();
                                     $log4 = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "\nUser-Agent: " . $_SERVER["HTTP_USER_AGENT"];
                                     $log4 = is_multisite() && !is_main_site() ? ($_log4 = $current_blog->domain . $current_blog->path) . "\n" . $log4 : $log4;
                                     $log2 = is_multisite() && !is_main_site() ? "reg-handler-4-" . trim(preg_replace("/[^a-z0-9]/i", "-", $_log4), "-") . ".log" : "reg-handler.log";
                                     if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) {
                                         if (is_dir($logs_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) {
                                             if (is_writable($logs_dir) && c_ws_plugin__s2member_utils_logs::archive_oversize_log_files()) {
                                                 file_put_contents($logs_dir . "/" . $log2, "LOG ENTRY: " . $logt . "\n" . $logv . "\n" . $logm . "\n" . $log4 . "\n" . c_ws_plugin__s2member_utils_logs::conceal_private_info(var_export($reg_vars, true)) . "\n\n", FILE_APPEND);
                                             }
                                         }
                                     }
                                     unset($logt, $logv, $logm, $log4, $_log4, $log2, $logs_dir, $reg_vars);
                                     // Housekeeping.
                                     foreach (array_keys(get_defined_vars()) as $__v) {
                                         $__refs[$__v] =& ${$__v};
                                     }
                                     do_action("ws_plugin__s2member_during_configure_user_registration", get_defined_vars());
                                     unset($__refs, $__v);
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_after_configure_user_registration", get_defined_vars());
     unset($__refs, $__v);
     return;
 }
예제 #13
0
 /**
  * Configures all new Users.
  *
  * The Hook `user_register` is also fired by calling:
  * ``c_ws_plugin__s2member_registrations::ms_create_existing_user()`` and/or ``wpmu_create_user()``.
  *
  * This function also receives hand-offs from s2Member's handlers for these two Hooks:
  * `wpmu_activate_user` and `wpmu_activate_blog`.
  *
  * @package s2Member\Registrations
  * @since 3.5
  *
  * @attaches-to ``add_action('user_register');``
  *
  * @param int|string $user_id A numeric WordPress User ID.
  * @param string     $password Optional in most cases. A User's plain text Password. If unspecified, attempts are made to collect the plain text Password from other sources.
  * @param array      $meta Optional in most cases. Defaults to false. An array of meta data for a User/Member.
  *
  * @TODO Impossible to delete cookies when fired inside: `/wp-activate.php`?
  */
 public static function configure_user_registration($user_id = '', $password = '', $meta = array())
 {
     global $wpdb;
     // Global database object reference.
     global $pagenow;
     // We need this to detect the current administration page.
     global $current_site, $current_blog;
     // Adds support for Multisite Networking.
     static $email_config, $processed;
     // Static vars prevent duplicate processing.
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__s2member_before_configure_user_registration', get_defined_vars());
     unset($__refs, $__v);
     // Housekeeping.
     // With Multisite Networking, we need this to run on `user_register` ahead of `wpmu_activate_[user|blog]`.
     if (!isset($email_config) && ($email_config = TRUE)) {
         // Anytime this routine is fired; we configure email.
         c_ws_plugin__s2member_email_configs::email_config();
     }
     // Configures `From:` email header.
     $_p = isset($_POST) ? $_POST : NULL;
     // Grab global ``$_POST`` array here, if it's possible to do so.
     $rvs = isset($GLOBALS['ws_plugin__s2member_registration_vars']) ? $GLOBALS['ws_plugin__s2member_registration_vars'] : NULL;
     if (!$processed) {
         if (is_array($_p) || is_array($meta) || is_array($rvs)) {
             if (!(is_multisite() && is_blog_admin() && $pagenow === 'user-new.php' && isset($_p['noconfirmation']) && is_super_admin() && !is_array($meta))) {
                 if (!(preg_match('/\\/wp-activate\\.php/', $_SERVER['REQUEST_URI']) && !is_array($meta))) {
                     if (!(c_ws_plugin__s2member_utils_conds::bp_is_installed() && bp_is_activation_page() && !is_array($meta))) {
                         if (!(c_ws_plugin__s2member_utils_conds::pro_is_installed() && c_ws_plugin__s2member_pro_remote_ops::is_remote_op('create_user') && !is_array($rvs))) {
                             if ($user_id && is_object($user = new WP_User($user_id)) && !empty($user->ID) && ($user_id = $user->ID) && ($processed = TRUE)) {
                                 settype($_p, 'array') . settype($meta, 'array') . settype($rvs, 'array');
                                 // Force arrays here.
                                 $_p = c_ws_plugin__s2member_utils_strings::trim_deep(stripslashes_deep($_p));
                                 $meta = c_ws_plugin__s2member_utils_strings::trim_deep(stripslashes_deep($meta));
                                 $rvs = c_ws_plugin__s2member_utils_strings::trim_deep($rvs);
                                 foreach ($_p as $_key => $_value) {
                                     // Scan ``$_p`` vars; adding `custom_reg_field` keys.
                                     if (preg_match('/^ws_plugin__s2member_user_new_/', $_key)) {
                                         // Look for keys.
                                         if ($_key = str_replace('_user_new_', '_custom_reg_field_', $_key)) {
                                             $_p[$_key] = $_value;
                                         }
                                     }
                                 }
                                 // Add each of these key conversions.
                                 unset($_key, $_value);
                                 if (!is_admin() && (isset($_p['ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway']) || isset($_p['ws_plugin__s2member_custom_reg_field_s2member_subscr_id']) || isset($_p['ws_plugin__s2member_custom_reg_field_s2member_subscr_baid']) || isset($_p['ws_plugin__s2member_custom_reg_field_s2member_subscr_cid']) || isset($_p['ws_plugin__s2member_custom_reg_field_s2member_custom']) || isset($_p['ws_plugin__s2member_custom_reg_field_s2member_ccaps']) || isset($_p['ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time']) || isset($_p['ws_plugin__s2member_custom_reg_field_s2member_notes']))) {
                                     exit(_x('s2Member security violation. You attempted to POST administrative variables that will NOT be trusted in a NON-administrative zone!', 's2member-front', 's2member'));
                                 }
                                 $_pmr = array_merge($_p, $meta, $rvs);
                                 // Merge all of these arrays together now, in this specific order.
                                 unset($_p, $meta, $rvs);
                                 // These variables can all be unset now; we have them all in the ``$_pmr`` array.
                                 $custom_reg_display_name = $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_display_name'];
                                 // Can be configured by the site owner.
                                 if (!is_admin() && (!c_ws_plugin__s2member_utils_conds::pro_is_installed() || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op('create_user')) && ($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok()) && extract($reg_cookies)) {
                                     /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
                                     			This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
                                     			If processed through `/wp-activate.php`, it could've originated inside the admin—via `/user-new.php`. */
                                     /**
                                      * @var $subscr_gateway string Reference for IDEs.
                                      * @var $subscr_id string Reference for IDEs.
                                      * @var $custom string Reference for IDEs.
                                      * @var $item_number string Reference for IDEs.
                                      */
                                     $processed = 'yes';
                                     // Mark this as yes.
                                     $current_role = c_ws_plugin__s2member_user_access::user_access_role($user);
                                     @(list($level, $ccaps, $eotper) = preg_split('/\\:/', $item_number, 3));
                                     $role = 's2member_level' . $level;
                                     // Membership Level.
                                     $email = $user->user_email;
                                     $login = $user->user_login;
                                     $ip = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_registration_ip'];
                                     $ip = !$ip ? $_SERVER['REMOTE_ADDR'] : $ip;
                                     // Else use environment variable.
                                     $subscr_baid = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_baid'];
                                     $subscr_cid = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_cid'];
                                     $cv = preg_split('/\\|/', $custom);
                                     if (!($auto_eot_time = '') && $eotper) {
                                         // If a specific EOT Period is included.
                                         $auto_eot_time = c_ws_plugin__s2member_utils_time::auto_eot_time('', '', '', $eotper);
                                     }
                                     $notes = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_notes'];
                                     $opt_in = !$GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_opt_in'] ? TRUE : FALSE;
                                     $opt_in = !$opt_in && !empty($_pmr['ws_plugin__s2member_custom_reg_field_opt_in']) ? TRUE : $opt_in;
                                     if (!($fname = $user->first_name)) {
                                         if (!empty($_pmr['ws_plugin__s2member_custom_reg_field_first_name'])) {
                                             $fname = (string) $_pmr['ws_plugin__s2member_custom_reg_field_first_name'];
                                         }
                                     }
                                     if (!$fname) {
                                         // Also try BuddyPress.
                                         if (!empty($_pmr['field_1'])) {
                                             // BuddyPress?
                                             $fname = trim(preg_replace('/ (.*)$/', '', (string) $_pmr['field_1']));
                                         }
                                     }
                                     if (!($lname = $user->last_name)) {
                                         if (!empty($_pmr['ws_plugin__s2member_custom_reg_field_last_name'])) {
                                             $lname = (string) $_pmr['ws_plugin__s2member_custom_reg_field_last_name'];
                                         }
                                     }
                                     if (!$lname) {
                                         // Also try BuddyPress.
                                         if (!empty($_pmr['field_1']) && preg_match('/^(.+?) (.+)$/', (string) $_pmr['field_1'])) {
                                             $lname = trim(preg_replace('/^(.+?) (.+)$/', '$2', (string) $_pmr['field_1']));
                                         }
                                     }
                                     if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_names'] && !$fname && $login) {
                                         $fname = trim($login);
                                         $lname = '';
                                         // Username and empty Last Name.
                                     }
                                     $name = trim($fname . ' ' . $lname);
                                     // Both names.
                                     if (!($pass = $password)) {
                                         // Try s2Member's generator.
                                         if (!empty($GLOBALS['ws_plugin__s2member_plain_text_pass'])) {
                                             $pass = (string) $GLOBALS['ws_plugin__s2member_plain_text_pass'];
                                         }
                                     }
                                     if (!$pass) {
                                         // Also try BuddyPress Password.
                                         if (!empty($_pmr['signup_password'])) {
                                             // BuddyPress?
                                             $pass = (string) $_pmr['signup_password'];
                                         }
                                     }
                                     if ($pass) {
                                         !headers_sent() ? delete_user_setting('default_password_nag', $user_id) : NULL;
                                         update_user_option($user_id, 'default_password_nag', FALSE, TRUE);
                                     }
                                     update_user_option($user_id, 's2member_registration_ip', $ip);
                                     update_user_option($user_id, 's2member_auto_eot_time', $auto_eot_time);
                                     update_user_option($user_id, 's2member_subscr_gateway', $subscr_gateway);
                                     update_user_option($user_id, 's2member_subscr_id', $subscr_id);
                                     update_user_option($user_id, 's2member_subscr_baid', $subscr_baid);
                                     update_user_option($user_id, 's2member_subscr_cid', $subscr_cid);
                                     update_user_option($user_id, 's2member_custom', $custom);
                                     update_user_option($user_id, 's2member_notes', $notes);
                                     if (!$user->first_name && $fname) {
                                         update_user_meta($user_id, 'first_name', $fname);
                                     }
                                     if (!$user->last_name && $lname) {
                                         update_user_meta($user_id, 'last_name', $lname);
                                     }
                                     if (!$user->display_name || $user->display_name === $user->user_login) {
                                         if ($custom_reg_display_name === 'full' && $name) {
                                             wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $name)));
                                         } else {
                                             if ($custom_reg_display_name === 'first' && $fname) {
                                                 wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $fname)));
                                             } else {
                                                 if ($custom_reg_display_name === 'last' && $lname) {
                                                     wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $lname)));
                                                 } else {
                                                     if ($custom_reg_display_name === 'login' && $login) {
                                                         wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $login)));
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                     if (is_multisite()) {
                                         if (!is_main_site() && strtotime($user->user_registered) >= strtotime('-10 seconds')) {
                                             remove_user_from_blog($user_id, $current_site->blog_id);
                                         }
                                         // No Main Site Role.
                                         if (!get_user_meta($user_id, 's2member_originating_blog', TRUE)) {
                                             // Recorded yet?
                                             update_user_meta($user_id, 's2member_originating_blog', $current_blog->blog_id);
                                         }
                                     }
                                     if ($current_role !== $role) {
                                         // Only if NOT the current Role.
                                         $user->set_role($role);
                                     }
                                     // s2Member.
                                     if ($ccaps && preg_match('/^-all/', str_replace('+', '', $ccaps))) {
                                         foreach ($user->allcaps as $cap => $cap_enabled) {
                                             if (preg_match('/^access_s2member_ccap_/', $cap)) {
                                                 $user->remove_cap($ccap = $cap);
                                             }
                                         }
                                     }
                                     if ($ccaps && preg_replace('/^-all[' . "\r\n\t" . '\\s;,]*/', '', str_replace('+', '', $ccaps))) {
                                         foreach (preg_split('/[' . "\r\n\t" . '\\s;,]+/', preg_replace('/^-all[' . "\r\n\t" . '\\s;,]*/', '', str_replace('+', '', $ccaps))) as $ccap) {
                                             if (strlen($ccap = trim(strtolower(preg_replace('/[^a-z_0-9]/i', '', $ccap))))) {
                                                 $user->add_cap('access_s2member_ccap_' . $ccap);
                                             }
                                         }
                                     }
                                     if (!($fields = array()) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_fields']) {
                                         foreach (json_decode($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_fields'], TRUE) as $field) {
                                             $field_var = preg_replace('/[^a-z0-9]/i', '_', strtolower($field['id']));
                                             $field_id_class = preg_replace('/_/', '-', $field_var);
                                             if (isset($_pmr['ws_plugin__s2member_custom_reg_field_' . $field_var])) {
                                                 $fields[$field_var] = $_pmr['ws_plugin__s2member_custom_reg_field_' . $field_var];
                                             }
                                         }
                                     }
                                     unset($field, $field_var, $field_id_class);
                                     // Housekeeping.
                                     if (!empty($fields)) {
                                         // Only if NOT empty.
                                         update_user_option($user_id, 's2member_custom_fields', $fields);
                                     }
                                     if ($level > 0) {
                                         $pr_times = get_user_option('s2member_paid_registration_times', $user_id);
                                         $pr_times['level'] = empty($pr_times['level']) ? time() : $pr_times['level'];
                                         $pr_times['level' . $level] = empty($pr_times['level' . $level]) ? time() : $pr_times['level' . $level];
                                         update_user_option($user_id, 's2member_paid_registration_times', $pr_times);
                                         // Update now.
                                     }
                                     if (!is_multisite() && c_ws_plugin__s2member_utils_conds::bp_is_installed() && bp_is_register_page()) {
                                         update_user_option($user_id, 's2member_bp_activation_role', $role);
                                         update_user_option($user_id, 's2member_bp_activation_ccaps', c_ws_plugin__s2member_user_access::user_access_ccaps($user));
                                     }
                                     if (($transient = 's2m_' . md5('s2member_transient_ipn_signup_vars_' . $subscr_id)) && is_array($ipn_signup_vars = get_transient($transient))) {
                                         update_user_option($user_id, 's2member_ipn_signup_vars', $ipn_signup_vars);
                                         // For future reference.
                                         delete_transient($transient);
                                         // This can be deleted now.
                                     }
                                     if (($transient = 's2m_' . md5('s2member_transient_ipn_subscr_payment_' . $subscr_id)) && is_array($subscr_payment = get_transient($transient)) && !empty($subscr_payment['subscr_gateway'])) {
                                         $proxy = array('s2member_paypal_proxy' => stripslashes((string) $subscr_payment['subscr_gateway']), 's2member_paypal_proxy_verification' => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen());
                                         c_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), array_merge(stripslashes_deep($subscr_payment), $proxy), array('timeout' => 20));
                                         delete_transient($transient);
                                         // This can be deleted now.
                                     }
                                     if (($transient = 's2m_' . md5('s2member_transient_ipn_subscr_eot_' . $subscr_id)) && is_array($subscr_eot = get_transient($transient)) && !empty($subscr_eot['subscr_gateway'])) {
                                         $proxy = array('s2member_paypal_proxy' => stripslashes((string) $subscr_eot['subscr_gateway']), 's2member_paypal_proxy_verification' => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen());
                                         c_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), array_merge(stripslashes_deep($subscr_eot), $proxy), array('timeout' => 20));
                                         delete_transient($transient);
                                         // This can be deleted now.
                                     }
                                     if (!headers_sent()) {
                                         // Only if headers are NOT yet sent. Here we establish both Signup and Payment Tracking Cookies.
                                         @setcookie('s2member_tracking', $s2member_tracking = c_ws_plugin__s2member_utils_encryption::encrypt($subscr_id), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie('s2member_tracking', $s2member_tracking, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE['s2member_tracking'] = $s2member_tracking);
                                     }
                                     foreach (array_keys(get_defined_vars()) as $__v) {
                                         $__refs[$__v] =& ${$__v};
                                     }
                                     do_action('ws_plugin__s2member_during_configure_user_registration_front_side_paid', get_defined_vars());
                                     do_action('ws_plugin__s2member_during_configure_user_registration_front_side', get_defined_vars());
                                     unset($__refs, $__v);
                                 } else {
                                     if (!is_admin() && (!c_ws_plugin__s2member_utils_conds::pro_is_installed() || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op('create_user'))) {
                                         /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
                                         			This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
                                         			If processed through `/wp-activate.php`, it could've originated inside the admin, via `/user-new.php`. */
                                         $processed = 'yes';
                                         // Mark this as yes.
                                         $current_role = c_ws_plugin__s2member_user_access::user_access_role($user);
                                         $role = '';
                                         // Initialize ``$role`` to an empty string here, before processing.
                                         $role = !$role && ($level = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_level']) > 0 ? 's2member_level' . $level : $role;
                                         $role = !$role && ($level = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_level']) === '0' ? 'subscriber' : $role;
                                         $role = !$role && $current_role ? $current_role : $role;
                                         // Use existing Role?
                                         $role = !$role ? get_option('default_role') : $role;
                                         // Otherwise default.
                                         $level = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_level'];
                                         $level = !$level && preg_match('/^(administrator|editor|author|contributor)$/i', $role) ? $GLOBALS['WS_PLUGIN__']['s2member']['c']['levels'] : $level;
                                         $level = !$level && preg_match('/^s2member_level[1-9][0-9]*$/i', $role) ? preg_replace('/^s2member_level/', '', $role) : $level;
                                         $level = !$level && preg_match('/^subscriber$/i', $role) ? '0' : $level;
                                         $level = !$level ? '0' : $level;
                                         $ccaps = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_ccaps'];
                                         $email = $user->user_email;
                                         $login = $user->user_login;
                                         $ip = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_registration_ip'];
                                         $ip = !$ip ? $_SERVER['REMOTE_ADDR'] : $ip;
                                         // Else use environment variable.
                                         $custom = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_custom'];
                                         $subscr_id = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_id'];
                                         $subscr_baid = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_baid'];
                                         $subscr_cid = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_cid'];
                                         $subscr_gateway = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway'];
                                         $cv = preg_split('/\\|/', (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_custom']);
                                         $auto_eot_time = ($eot = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time']) ? strtotime($eot) : '';
                                         $notes = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_notes'];
                                         $opt_in = !$GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_opt_in'] ? TRUE : FALSE;
                                         $opt_in = !$opt_in && !empty($_pmr['ws_plugin__s2member_custom_reg_field_opt_in']) ? TRUE : $opt_in;
                                         if (!($fname = $user->first_name)) {
                                             if (!empty($_pmr['ws_plugin__s2member_custom_reg_field_first_name'])) {
                                                 $fname = (string) $_pmr['ws_plugin__s2member_custom_reg_field_first_name'];
                                             }
                                         }
                                         if (!$fname) {
                                             // Also try BuddyPress.
                                             if (!empty($_pmr['field_1'])) {
                                                 // BuddyPress?
                                                 $fname = trim(preg_replace('/ (.*)$/', '', (string) $_pmr['field_1']));
                                             }
                                         }
                                         if (!($lname = $user->last_name)) {
                                             if (!empty($_pmr['ws_plugin__s2member_custom_reg_field_last_name'])) {
                                                 $lname = (string) $_pmr['ws_plugin__s2member_custom_reg_field_last_name'];
                                             }
                                         }
                                         if (!$lname) {
                                             // Also try BuddyPress.
                                             if (!empty($_pmr['field_1']) && preg_match('/^(.+?) (.+)$/', (string) $_pmr['field_1'])) {
                                                 $lname = trim(preg_replace('/^(.+?) (.+)$/', '$2', (string) $_pmr['field_1']));
                                             }
                                         }
                                         if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_names'] && !$fname && $login) {
                                             $fname = trim($login);
                                             $lname = '';
                                             // Username and empty Last Name.
                                         }
                                         $name = trim($fname . ' ' . $lname);
                                         // Both names.
                                         if (!($pass = $password)) {
                                             // Try s2Member's generator.
                                             if (!empty($GLOBALS['ws_plugin__s2member_plain_text_pass'])) {
                                                 $pass = (string) $GLOBALS['ws_plugin__s2member_plain_text_pass'];
                                             }
                                         }
                                         if (!$pass) {
                                             // Also try BuddyPress Password.
                                             if (!empty($_pmr['signup_password'])) {
                                                 // BuddyPress?
                                                 $pass = (string) $_pmr['signup_password'];
                                             }
                                         }
                                         if ($pass) {
                                             !headers_sent() ? delete_user_setting('default_password_nag', $user_id) : NULL;
                                             update_user_option($user_id, 'default_password_nag', FALSE, TRUE);
                                         }
                                         update_user_option($user_id, 's2member_registration_ip', $ip);
                                         update_user_option($user_id, 's2member_auto_eot_time', $auto_eot_time);
                                         update_user_option($user_id, 's2member_subscr_gateway', $subscr_gateway);
                                         update_user_option($user_id, 's2member_subscr_id', $subscr_id);
                                         update_user_option($user_id, 's2member_subscr_baid', $subscr_baid);
                                         update_user_option($user_id, 's2member_subscr_cid', $subscr_cid);
                                         update_user_option($user_id, 's2member_custom', $custom);
                                         update_user_option($user_id, 's2member_notes', $notes);
                                         if (!$user->first_name && $fname) {
                                             update_user_meta($user_id, 'first_name', $fname);
                                         }
                                         if (!$user->last_name && $lname) {
                                             update_user_meta($user_id, 'last_name', $lname);
                                         }
                                         if (!$user->display_name || $user->display_name === $user->user_login) {
                                             if ($custom_reg_display_name === 'full' && $name) {
                                                 wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $name)));
                                             } else {
                                                 if ($custom_reg_display_name === 'first' && $fname) {
                                                     wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $fname)));
                                                 } else {
                                                     if ($custom_reg_display_name === 'last' && $lname) {
                                                         wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $lname)));
                                                     } else {
                                                         if ($custom_reg_display_name === 'login' && $login) {
                                                             wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $login)));
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                         if (is_multisite()) {
                                             if (!is_main_site() && strtotime($user->user_registered) >= strtotime('-10 seconds')) {
                                                 remove_user_from_blog($user_id, $current_site->blog_id);
                                             }
                                             // No Main Site Role.
                                             if (!get_user_meta($user_id, 's2member_originating_blog', TRUE)) {
                                                 // Recorded yet?
                                                 update_user_meta($user_id, 's2member_originating_blog', $current_blog->blog_id);
                                             }
                                         }
                                         if ($current_role !== $role) {
                                             // Only if NOT the current Role.
                                             $user->set_role($role);
                                         }
                                         // s2Member.
                                         if ($ccaps && preg_match('/^-all/', str_replace('+', '', $ccaps))) {
                                             foreach ($user->allcaps as $cap => $cap_enabled) {
                                                 if (preg_match('/^access_s2member_ccap_/', $cap)) {
                                                     $user->remove_cap($ccap = $cap);
                                                 }
                                             }
                                         }
                                         if ($ccaps && preg_replace('/^-all[' . "\r\n\t" . '\\s;,]*/', '', str_replace('+', '', $ccaps))) {
                                             foreach (preg_split('/[' . "\r\n\t" . '\\s;,]+/', preg_replace('/^-all[' . "\r\n\t" . '\\s;,]*/', '', str_replace('+', '', $ccaps))) as $ccap) {
                                                 if (strlen($ccap = trim(strtolower(preg_replace('/[^a-z_0-9]/i', '', $ccap))))) {
                                                     $user->add_cap('access_s2member_ccap_' . $ccap);
                                                 }
                                             }
                                         }
                                         if (!($fields = array()) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_fields']) {
                                             foreach (json_decode($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_fields'], TRUE) as $field) {
                                                 $field_var = preg_replace('/[^a-z0-9]/i', '_', strtolower($field['id']));
                                                 $field_id_class = preg_replace('/_/', '-', $field_var);
                                                 if (isset($_pmr['ws_plugin__s2member_custom_reg_field_' . $field_var])) {
                                                     $fields[$field_var] = $_pmr['ws_plugin__s2member_custom_reg_field_' . $field_var];
                                                 }
                                             }
                                         }
                                         unset($field, $field_var, $field_id_class);
                                         // Housekeeping.
                                         if (!empty($fields)) {
                                             // Only if NOT empty.
                                             update_user_option($user_id, 's2member_custom_fields', $fields);
                                         }
                                         if ($level > 0) {
                                             $pr_times = get_user_option('s2member_paid_registration_times', $user_id);
                                             $pr_times['level'] = empty($pr_times['level']) ? time() : $pr_times['level'];
                                             $pr_times['level' . $level] = empty($pr_times['level' . $level]) ? time() : $pr_times['level' . $level];
                                             update_user_option($user_id, 's2member_paid_registration_times', $pr_times);
                                             // Update now.
                                         }
                                         if (!is_multisite() && c_ws_plugin__s2member_utils_conds::bp_is_installed() && bp_is_register_page()) {
                                             update_user_option($user_id, 's2member_bp_activation_role', $role);
                                             update_user_option($user_id, 's2member_bp_activation_ccaps', c_ws_plugin__s2member_user_access::user_access_ccaps($user));
                                         }
                                         foreach (array_keys(get_defined_vars()) as $__v) {
                                             $__refs[$__v] =& ${$__v};
                                         }
                                         do_action('ws_plugin__s2member_during_configure_user_registration_front_side_free', get_defined_vars());
                                         do_action('ws_plugin__s2member_during_configure_user_registration_front_side', get_defined_vars());
                                         unset($__refs, $__v);
                                     } else {
                                         if (is_blog_admin() && $pagenow === 'user-new.php' || c_ws_plugin__s2member_utils_conds::pro_is_installed() && c_ws_plugin__s2member_pro_remote_ops::is_remote_op('create_user')) {
                                             // Can only be processed through `/user-new.php` in the Admin panel, or through Remote Op: `create_user`.
                                             $processed = 'yes';
                                             // Mark this as yes, to indicate that a routine was processed.
                                             $current_role = c_ws_plugin__s2member_user_access::user_access_role($user);
                                             $role = '';
                                             // Initialize $role to an empty string here, before processing.
                                             $role = !$role && ($level = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_level']) > 0 ? 's2member_level' . $level : $role;
                                             $role = !$role && ($level = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_level']) === '0' ? 'subscriber' : $role;
                                             $role = !$role && $current_role ? $current_role : $role;
                                             // Use existing Role?
                                             $role = !$role ? get_option('default_role') : $role;
                                             // Otherwise default.
                                             $level = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_level'];
                                             $level = !$level && preg_match('/^(administrator|editor|author|contributor)$/i', $role) ? $GLOBALS['WS_PLUGIN__']['s2member']['c']['levels'] : $level;
                                             $level = !$level && preg_match('/^s2member_level[1-9][0-9]*$/i', $role) ? preg_replace('/^s2member_level/', '', $role) : $level;
                                             $level = !$level && preg_match('/^subscriber$/i', $role) ? '0' : $level;
                                             $level = !$level ? '0' : $level;
                                             $ccaps = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_ccaps'];
                                             $email = $user->user_email;
                                             $login = $user->user_login;
                                             $ip = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_registration_ip'];
                                             $custom = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_custom'];
                                             $subscr_id = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_id'];
                                             $subscr_baid = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_baid'];
                                             $subscr_cid = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_cid'];
                                             $subscr_gateway = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway'];
                                             $cv = preg_split('/\\|/', (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_custom']);
                                             $auto_eot_time = ($eot = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time']) ? strtotime($eot) : '';
                                             $notes = (string) @$_pmr['ws_plugin__s2member_custom_reg_field_s2member_notes'];
                                             $opt_in = !empty($_pmr['ws_plugin__s2member_custom_reg_field_opt_in']) ? TRUE : FALSE;
                                             if (!($fname = $user->first_name)) {
                                                 // `Users → Add New`.
                                                 if (!empty($_pmr['ws_plugin__s2member_custom_reg_field_first_name'])) {
                                                     $fname = (string) $_pmr['ws_plugin__s2member_custom_reg_field_first_name'];
                                                 }
                                             }
                                             if (!($lname = $user->last_name)) {
                                                 // `Users → Add New`.
                                                 if (!empty($_pmr['ws_plugin__s2member_custom_reg_field_last_name'])) {
                                                     $lname = (string) $_pmr['ws_plugin__s2member_custom_reg_field_last_name'];
                                                 }
                                             }
                                             if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_names'] && !$fname && $login) {
                                                 $fname = trim($login);
                                                 $lname = '';
                                                 // Username and empty Last Name.
                                             }
                                             $name = trim($fname . ' ' . $lname);
                                             // Both names.
                                             if (!($pass = $password)) {
                                                 // Try s2Member's generator.
                                                 if (!empty($GLOBALS['ws_plugin__s2member_plain_text_pass'])) {
                                                     $pass = (string) $GLOBALS['ws_plugin__s2member_plain_text_pass'];
                                                 }
                                             }
                                             if (!$pass) {
                                                 // Also try the `Users → Add New` form.
                                                 if (!empty($_pmr['pass1'])) {
                                                     // Field in `/user-new.php`.
                                                     $pass = (string) $_pmr['pass1'];
                                                 }
                                             }
                                             if ($pass) {
                                                 !headers_sent() ? delete_user_setting('default_password_nag', $user_id) : NULL;
                                                 update_user_option($user_id, 'default_password_nag', FALSE, TRUE);
                                             }
                                             update_user_option($user_id, 's2member_registration_ip', $ip);
                                             update_user_option($user_id, 's2member_auto_eot_time', $auto_eot_time);
                                             update_user_option($user_id, 's2member_subscr_gateway', $subscr_gateway);
                                             update_user_option($user_id, 's2member_subscr_id', $subscr_id);
                                             update_user_option($user_id, 's2member_subscr_baid', $subscr_baid);
                                             update_user_option($user_id, 's2member_subscr_cid', $subscr_cid);
                                             update_user_option($user_id, 's2member_custom', $custom);
                                             update_user_option($user_id, 's2member_notes', $notes);
                                             if (!$user->first_name && $fname) {
                                                 update_user_meta($user_id, 'first_name', $fname);
                                             }
                                             if (!$user->last_name && $lname) {
                                                 update_user_meta($user_id, 'last_name', $lname);
                                             }
                                             if (!$user->display_name || $user->display_name === $user->user_login) {
                                                 if ($custom_reg_display_name === 'full' && $name) {
                                                     wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $name)));
                                                 } else {
                                                     if ($custom_reg_display_name === 'first' && $fname) {
                                                         wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $fname)));
                                                     } else {
                                                         if ($custom_reg_display_name === 'last' && $lname) {
                                                             wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $lname)));
                                                         } else {
                                                             if ($custom_reg_display_name === 'login' && $login) {
                                                                 wp_update_user(wp_slash(array('ID' => $user_id, 'display_name' => $login)));
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                             if (is_multisite()) {
                                                 if (!is_main_site() && strtotime($user->user_registered) >= strtotime('-10 seconds')) {
                                                     remove_user_from_blog($user_id, $current_site->blog_id);
                                                 }
                                                 // No Main Site Role.
                                                 if (!get_user_meta($user_id, 's2member_originating_blog', TRUE)) {
                                                     // Recorded yet?
                                                     update_user_meta($user_id, 's2member_originating_blog', $current_blog->blog_id);
                                                 }
                                             }
                                             if ($current_role !== $role) {
                                                 // Only if NOT the current Role.
                                                 $user->set_role($role);
                                             }
                                             // s2Member.
                                             if ($ccaps && preg_match('/^-all/', str_replace('+', '', $ccaps))) {
                                                 foreach ($user->allcaps as $cap => $cap_enabled) {
                                                     if (preg_match('/^access_s2member_ccap_/', $cap)) {
                                                         $user->remove_cap($ccap = $cap);
                                                     }
                                                 }
                                             }
                                             if ($ccaps && preg_replace('/^-all[' . "\r\n\t" . '\\s;,]*/', '', str_replace('+', '', $ccaps))) {
                                                 foreach (preg_split('/[' . "\r\n\t" . '\\s;,]+/', preg_replace('/^-all[' . "\r\n\t" . '\\s;,]*/', '', str_replace('+', '', $ccaps))) as $ccap) {
                                                     if (strlen($ccap = trim(strtolower(preg_replace('/[^a-z_0-9]/i', '', $ccap))))) {
                                                         $user->add_cap('access_s2member_ccap_' . $ccap);
                                                     }
                                                 }
                                             }
                                             if (!($fields = array()) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_fields']) {
                                                 foreach (json_decode($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_fields'], TRUE) as $field) {
                                                     $field_var = preg_replace('/[^a-z0-9]/i', '_', strtolower($field['id']));
                                                     $field_id_class = preg_replace('/_/', '-', $field_var);
                                                     if (isset($_pmr['ws_plugin__s2member_custom_reg_field_' . $field_var])) {
                                                         $fields[$field_var] = $_pmr['ws_plugin__s2member_custom_reg_field_' . $field_var];
                                                     }
                                                 }
                                             }
                                             unset($field, $field_var, $field_id_class);
                                             // Housekeeping.
                                             if (!empty($fields)) {
                                                 // Only if NOT empty.
                                                 update_user_option($user_id, 's2member_custom_fields', $fields);
                                             }
                                             if ($level > 0) {
                                                 $pr_times = get_user_option('s2member_paid_registration_times', $user_id);
                                                 $pr_times['level'] = empty($pr_times['level']) ? time() : $pr_times['level'];
                                                 $pr_times['level' . $level] = empty($pr_times['level' . $level]) ? time() : $pr_times['level' . $level];
                                                 update_user_option($user_id, 's2member_paid_registration_times', $pr_times);
                                                 // Update now.
                                             }
                                             foreach (array_keys(get_defined_vars()) as $__v) {
                                                 $__refs[$__v] =& ${$__v};
                                             }
                                             do_action('ws_plugin__s2member_during_configure_user_registration_admin_side', get_defined_vars());
                                             unset($__refs, $__v);
                                         }
                                     }
                                 }
                                 if ($processed === 'yes') {
                                     /**
                                      * If processed, all of these will have been defined by now.
                                      *
                                      * @var $role string Reference for IDEs.
                                      * @var $level string Reference for IDEs.
                                      * @var $ccaps string Reference for IDEs.
                                      * @var $auto_eot_time string|integer Reference for IDEs.
                                      * @var $fname string Reference for IDEs.
                                      * @var $lname string Reference for IDEs.
                                      * @var $name string Reference for IDEs.
                                      * @var $email string Reference for IDEs.
                                      * @var $login string Reference for IDEs.
                                      * @var $pass string Reference for IDEs.
                                      * @var $ip string Reference for IDEs.
                                      * @var $opt_in boolean Reference for IDEs.
                                      * @var $fields array Reference for IDEs.
                                      */
                                     if ($urls = $GLOBALS['WS_PLUGIN__']['s2member']['o']['registration_notification_urls']) {
                                         foreach (preg_split('/[' . "\r\n\t" . ']+/', $urls) as $url) {
                                             // Notify each of the URLs.
                                             if ($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) {
                                                 if ($url = preg_replace('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($role)), $url)) {
                                                     if ($url = preg_replace('/%%level%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($level)), $url)) {
                                                         if ($url = preg_replace('/%%ccaps%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($ccaps)), $url)) {
                                                             if ($url = preg_replace('/%%auto_eot_time%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($auto_eot_time)), $url)) {
                                                                 if ($url = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($fname)), $url)) {
                                                                     if ($url = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($lname)), $url)) {
                                                                         if ($url = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($name)), $url)) {
                                                                             if ($url = preg_replace('/%%user_email%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($email)), $url)) {
                                                                                 if ($url = preg_replace('/%%user_login%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($login)), $url)) {
                                                                                     if ($url = preg_replace('/%%user_pass%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($pass)), $url)) {
                                                                                         if ($url = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($ip)), $url)) {
                                                                                             if ($url = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user_id)), $url)) {
                                                                                                 foreach ($fields as $var => $val) {
                                                                                                     // Custom Fields.
                                                                                                     if (!($url = preg_replace('/%%' . preg_quote($var, '/') . '%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode(maybe_serialize($val))), $url))) {
                                                                                                         break;
                                                                                                     }
                                                                                                 }
                                                                                                 if ($url = trim(preg_replace('/%%(.+?)%%/i', '', $url))) {
                                                                                                     c_ws_plugin__s2member_utils_urls::remote($url);
                                                                                                 }
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                     unset($urls, $url, $var, $val);
                                     // Housekeeping.
                                     if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['registration_notification_recipients']) {
                                         $email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status();
                                         c_ws_plugin__s2member_email_configs::email_config_release();
                                         $msg = $sbj = '(s2Member / API Notification Email) - Registration';
                                         $msg .= "\n\n";
                                         // Spacing in the message body.
                                         $msg .= 'role: %%role%%' . "\n";
                                         $msg .= 'level: %%level%%' . "\n";
                                         $msg .= 'ccaps: %%ccaps%%' . "\n";
                                         $msg .= 'auto_eot_time: %%auto_eot_time%%' . "\n";
                                         $msg .= 'user_first_name: %%user_first_name%%' . "\n";
                                         $msg .= 'user_last_name: %%user_last_name%%' . "\n";
                                         $msg .= 'user_full_name: %%user_full_name%%' . "\n";
                                         $msg .= 'user_email: %%user_email%%' . "\n";
                                         $msg .= 'user_login: %%user_login%%' . "\n";
                                         $msg .= 'user_pass: %%user_pass%%' . "\n";
                                         $msg .= 'user_ip: %%user_ip%%' . "\n";
                                         $msg .= 'user_id: %%user_id%%' . "\n";
                                         foreach ($fields as $var => $val) {
                                             $msg .= $var . ': %%' . $var . '%%' . "\n";
                                         }
                                         $msg .= 'cv0: %%cv0%%' . "\n";
                                         $msg .= 'cv1: %%cv1%%' . "\n";
                                         $msg .= 'cv2: %%cv2%%' . "\n";
                                         $msg .= 'cv3: %%cv3%%' . "\n";
                                         $msg .= 'cv4: %%cv4%%' . "\n";
                                         $msg .= 'cv5: %%cv5%%' . "\n";
                                         $msg .= 'cv6: %%cv6%%' . "\n";
                                         $msg .= 'cv7: %%cv7%%' . "\n";
                                         $msg .= 'cv8: %%cv8%%' . "\n";
                                         $msg .= 'cv9: %%cv9%%';
                                         if ($msg = preg_replace('/%%cv([0-9]+)%%/ei', 'trim(@$cv[$1])', $msg)) {
                                             if ($msg = preg_replace('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($role), $msg)) {
                                                 if ($msg = preg_replace('/%%level%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($level), $msg)) {
                                                     if ($msg = preg_replace('/%%ccaps%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($ccaps), $msg)) {
                                                         if ($msg = preg_replace('/%%auto_eot_time%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($auto_eot_time), $msg)) {
                                                             if ($msg = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($fname), $msg)) {
                                                                 if ($msg = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($lname), $msg)) {
                                                                     if ($msg = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($name), $msg)) {
                                                                         if ($msg = preg_replace('/%%user_email%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($email), $msg)) {
                                                                             if ($msg = preg_replace('/%%user_login%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($login), $msg)) {
                                                                                 if ($msg = preg_replace('/%%user_pass%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($pass), $msg)) {
                                                                                     if ($msg = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($ip), $msg)) {
                                                                                         if ($msg = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($user_id), $msg)) {
                                                                                             foreach ($fields as $var => $val) {
                                                                                                 // Custom Fields.
                                                                                                 if (!($msg = preg_replace('/%%' . preg_quote($var, '/') . '%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(maybe_serialize($val)), $msg))) {
                                                                                                     break;
                                                                                                 }
                                                                                             }
                                                                                             if ($sbj && ($msg = trim(preg_replace('/%%(.+?)%%/i', '', $msg)))) {
                                                                                                 // Still have a ``$sbj`` and a ``$msg``?
                                                                                                 foreach (c_ws_plugin__s2member_utils_strings::parse_emails($GLOBALS['WS_PLUGIN__']['s2member']['o']['registration_notification_recipients']) as $recipient) {
                                                                                                     wp_mail($recipient, apply_filters('ws_plugin__s2member_registration_notification_email_sbj', $sbj, get_defined_vars()), apply_filters('ws_plugin__s2member_registration_notification_email_msg', $msg, get_defined_vars()), 'Content-Type: text/plain; charset=UTF-8');
                                                                                                 }
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                         if ($email_configs_were_on) {
                                             // Back on?
                                             c_ws_plugin__s2member_email_configs::email_config();
                                         }
                                         unset($sbj, $msg, $var, $val, $recipient, $email_configs_were_on);
                                         // Housekeeping.
                                     }
                                     if (!empty($GLOBALS['ws_plugin__s2member_registration_return_url']) && ($url = $GLOBALS['ws_plugin__s2member_registration_return_url'])) {
                                         if ($url = preg_replace('/%%cv([0-9]+)%%/ei', 'urlencode(trim(@$cv[$1]))', $url)) {
                                             if ($url = preg_replace('/%%role%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($role)), $url)) {
                                                 if ($url = preg_replace('/%%level%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($level)), $url)) {
                                                     if ($url = preg_replace('/%%ccaps%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($ccaps)), $url)) {
                                                         if ($url = preg_replace('/%%auto_eot_time%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($auto_eot_time)), $url)) {
                                                             if ($url = preg_replace('/%%user_first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($fname)), $url)) {
                                                                 if ($url = preg_replace('/%%user_last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($lname)), $url)) {
                                                                     if ($url = preg_replace('/%%user_full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($name)), $url)) {
                                                                         if ($url = preg_replace('/%%user_email%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($email)), $url)) {
                                                                             if ($url = preg_replace('/%%user_login%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($login)), $url)) {
                                                                                 if ($url = preg_replace('/%%user_pass%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($pass)), $url)) {
                                                                                     if ($url = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($ip)), $url)) {
                                                                                         if ($url = preg_replace('/%%user_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode($user_id)), $url)) {
                                                                                             foreach ($fields as $var => $val) {
                                                                                                 // Custom Fields.
                                                                                                 if (!($url = preg_replace('/%%' . preg_quote($var, '/') . '%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(urlencode(maybe_serialize($val))), $url))) {
                                                                                                     break;
                                                                                                 }
                                                                                             }
                                                                                             if ($url = trim($url)) {
                                                                                                 // Preserve remaining Replacements; because the parent routine may perform replacements too.
                                                                                                 $GLOBALS['ws_plugin__s2member_registration_return_url'] = $url;
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                     unset($url, $var, $val);
                                     // Housekeeping.
                                     c_ws_plugin__s2member_list_servers::process_list_servers($role, $level, $login, $pass, $email, $fname, $lname, $ip, $opt_in, TRUE, $user_id);
                                     /*
                                     Suppress errors here in case this routine is fired in unexpected locations; or with odd output buffering techniques.
                                     	@TODO It may also be impossible to delete cookies when fired inside: `/wp-activate.php`.
                                     */
                                     if (!headers_sent()) {
                                         @setcookie('s2member_subscr_gateway', '', time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie('s2member_subscr_gateway', '', time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                                         @setcookie('s2member_subscr_id', '', time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie('s2member_subscr_id', '', time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                                         @setcookie('s2member_custom', '', time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie('s2member_custom', '', time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                                         @setcookie('s2member_item_number', '', time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie('s2member_item_number', '', time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                                     }
                                     /* If debugging/logging is enabled; we need to append ``$reg_vars`` to the log file.
                                     			Logging now supports Multisite Networking as well. */
                                     $reg_vars = get_defined_vars();
                                     // All defined vars.
                                     $reg_vars['_COOKIE'] = $_COOKIE;
                                     // Record cookies also.
                                     // No need to include these in the logs. Unset before log entry.
                                     unset($reg_vars['wpdb'], $reg_vars['current_site'], $reg_vars['current_blog']);
                                     c_ws_plugin__s2member_utils_logs::log_entry('reg-handler', $reg_vars);
                                     foreach (array_keys(get_defined_vars()) as $__v) {
                                         $__refs[$__v] =& ${$__v};
                                     }
                                     do_action('ws_plugin__s2member_during_configure_user_registration', get_defined_vars());
                                     unset($__refs, $__v);
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__s2member_after_configure_user_registration', get_defined_vars());
     unset($__refs, $__v);
     // Housekeeping.
 }
예제 #14
0
 /**
  * Determines if a specific Post/Page ID, or URI, is Systematic in any way.
  *
  * @package s2Member\Systematics
  * @since 3.5
  *
  * @param int|string $singular_id Optional. A numeric Post/Page ID in WordPress.
  * @param string     $uri Optional. A request URI to test against.
  *
  * @return bool True if Systematic, else false.
  *
  * @todo Test URIs against formulated links for Systematic Pages like the Membership Options Page?
  *   Don't think this is required though; as it's already handled in other areas, correct?
  */
 public static function is_systematic_use_specific_page($singular_id = '', $uri = '')
 {
     global $bp;
     // If BuddyPress is installed, we'll need this global reference.
     $ci = $GLOBALS['WS_PLUGIN__']['s2member']['o']['ruris_case_sensitive'] ? '' : 'i';
     $singular_id = $singular_id && is_numeric($singular_id) ? (int) $singular_id : FALSE;
     // Force types.
     $uri = $uri && is_string($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri($uri)) ? $uri : FALSE;
     if (c_ws_plugin__s2member_systematics_sp::is_s2_systematic_use_specific_page($singular_id, $uri)) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
     }
     if (c_ws_plugin__s2member_systematics_sp::is_wp_systematic_use_specific_page($singular_id, $uri)) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
     }
     if ($uri && c_ws_plugin__s2member_utils_conds::bp_is_installed() && preg_match('/\\/(?:' . preg_quote(trim(function_exists('bp_get_signup_slug') ? bp_get_signup_slug() : BP_REGISTER_SLUG, '/'), '/') . '|' . preg_quote(trim(function_exists('bp_get_activate_slug') ? bp_get_activate_slug() : BP_ACTIVATION_SLUG, '/'), '/') . ')(?:\\/|\\?|$)/' . $ci, $uri)) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
     }
     if ($singular_id && c_ws_plugin__s2member_utils_conds::bp_is_installed() && (!empty($bp->pages->register->id) && $singular_id === (int) $bp->pages->register->id || !empty($bp->pages->activate->id) && $singular_id === (int) $bp->pages->activate->id)) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
     }
     if ($singular_id && $GLOBALS['WS_PLUGIN__']['s2member']['o']['login_welcome_page'] && $singular_id === (int) $GLOBALS['WS_PLUGIN__']['s2member']['o']['login_welcome_page']) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
     }
     if ($singular_id && $GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page'] && $singular_id === (int) $GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page']) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
     }
     if ($singular_id && $GLOBALS['WS_PLUGIN__']['s2member']['o']['file_download_limit_exceeded_page'] && $singular_id === (int) $GLOBALS['WS_PLUGIN__']['s2member']['o']['file_download_limit_exceeded_page']) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
     }
     if ($uri && $GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri(NULL, 'root-returns-false')) && preg_match('/^' . preg_quote($_lro, '/') . '$/' . $ci, $uri)) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', TRUE, get_defined_vars());
     }
     return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_specific_page', FALSE, get_defined_vars());
 }
예제 #15
0
 /**
  * Determines if the current page is Systematic in any way.
  *
  * @package s2Member\Systematics
  * @since 3.5
  *
  * @return bool True if Systematic, else false.
  *
  * @note The results of this function are cached staticially.
  *   Do NOT call upon this until the `wp` Hook is fired.
  */
 public static function is_systematic_use_page()
 {
     static $is_systematic;
     // For optimization.
     if (isset($is_systematic)) {
         // Already cached statically? Saves time.
         return $is_systematic;
     }
     // Filters will have already been applied here.
     $ci = $GLOBALS['WS_PLUGIN__']['s2member']['o']['ruris_case_sensitive'] ? '' : 'i';
     if (c_ws_plugin__s2member_systematics::is_s2_systematic_use_page()) {
         // An s2Member Systematic Use Page?
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', TRUE, get_defined_vars());
     }
     if (c_ws_plugin__s2member_systematics::is_wp_systematic_use_page()) {
         //* A WordPress Systematic Use Page?
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', TRUE, get_defined_vars());
     }
     if (c_ws_plugin__s2member_utils_conds::bp_is_installed() && (bp_is_register_page() || bp_is_activation_page())) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', TRUE, get_defined_vars());
     }
     if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_welcome_page'] && is_page($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_welcome_page'])) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', TRUE, get_defined_vars());
     }
     if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page'] && is_page($GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page'])) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', TRUE, get_defined_vars());
     }
     if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['file_download_limit_exceeded_page'] && is_page($GLOBALS['WS_PLUGIN__']['s2member']['o']['file_download_limit_exceeded_page'])) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', TRUE, get_defined_vars());
     }
     if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri(NULL, 'root-returns-false')) && preg_match('/^' . preg_quote($_lro, '/') . '$/' . $ci, $_SERVER['REQUEST_URI'])) {
         return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', TRUE, get_defined_vars());
     }
     return $is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', FALSE, get_defined_vars());
 }
 /**
  * Determines if a specific Post/Page ID, or URI, is Systematic in any way.
  *
  * @package s2Member\Systematics
  * @since 3.5
  *
  * @param int|string $singular_id Optional. A numeric Post/Page ID in WordPress.
  * @param string $uri Optional. A request URI to test against.
  * @return bool True if Systematic, else false.
  *
  * @todo Test URIs against formulated links for Systematic Pages like the Membership Options Page?
  * 	Don't think this is required though; as it's already handled in other areas, correct?
  */
 public static function is_systematic_use_specific_page($singular_id = FALSE, $uri = FALSE)
 {
     global $bp;
     // If BuddyPress is installed, we'll need this global reference.
     $singular_id = $singular_id && is_numeric($singular_id) ? (int) $singular_id : false;
     // Force types.
     $uri = $uri && is_string($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri($uri)) ? $uri : false;
     if (c_ws_plugin__s2member_systematics_sp::is_s2_systematic_use_specific_page($singular_id, $uri)) {
         return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
     } else {
         if (c_ws_plugin__s2member_systematics_sp::is_wp_systematic_use_specific_page($singular_id, $uri)) {
             return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
         } else {
             if ($uri && c_ws_plugin__s2member_utils_conds::bp_is_installed() && preg_match("/\\/(?:" . preg_quote(trim(function_exists("bp_get_signup_slug") ? bp_get_signup_slug() : BP_REGISTER_SLUG, "/"), "/") . "|" . preg_quote(trim(function_exists("bp_get_activate_slug") ? bp_get_activate_slug() : BP_ACTIVATION_SLUG, "/"), "/") . ")(?:\\/|\\?|\$)/", $uri)) {
                 return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
             } else {
                 if ($singular_id && c_ws_plugin__s2member_utils_conds::bp_is_installed() && (!empty($bp->pages->register->id) && $singular_id === (int) $bp->pages->register->id || !empty($bp->pages->activate->id) && $singular_id === (int) $bp->pages->activate->id)) {
                     return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
                 } else {
                     if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"] && $singular_id === (int) $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]) {
                         return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
                     } else {
                         if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] && $singular_id === (int) $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]) {
                             return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
                         } else {
                             if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"] && $singular_id === (int) $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]) {
                                 return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
                             } else {
                                 if ($uri && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri(false, "root-returns-false")) && preg_match("/^" . preg_quote($_lro, "/") . "\$/", $uri)) {
                                     return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars());
                                 } else {
                                     // Otherwise, we return false (i.e. it's NOT a Systematic Use Page in any way).
                                     return $is_systematic = apply_filters("ws_plugin__s2member_is_systematic_use_specific_page", false, get_defined_vars());
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
예제 #17
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page">' . "\n";
     echo '<div class="ws-menu-page-toolbox">' . "\n";
     c_ws_plugin__s2member_menu_pages_tb::display();
     echo '</div>' . "\n";
     echo '<h2>Getting Started w/ s2Member®</h2>' . "\n";
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     do_action("ws_plugin__s2member_during_start_page_before_left_sections", get_defined_vars());
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_registration_process", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_registration_process", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="The Registration Process" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-process-section">' . "\n";
         echo '<p>1. Users will go to your Membership Options Page (which you may configure; see: <em><strong>Dashboard → s2Member → General Options → Membership Options Page</strong></em>). On this Membership Options Page (that you create in WordPress) you\'ll insert the PayPal Subscription Buttons that were generated for you by s2Member.</p>' . "\n";
         echo '<p>2. A User will click on a PayPal Subscription Button from your Membership Options Page. They will be transferred over to PayPal in order to agree to your Membership terms and pricing. You can customize the Checkout Page Style, Pricing, Payment Periods, and more, whenever you generate your PayPal Buttons through s2Member.</p>' . "\n";
         echo '<p>3. Once a User has completed the Subscription Signup Process at PayPal, they\'ll be returned to your site, where they\'ll be activated by s2Member instantly, and given the opportunity to register a Username &amp; Password for their Membership. <em>(Note: they\'ll be allowed to register a Username &amp; Password even if you\'ve set \'Anyone Can Register\' to `Off` in your General WordPress options, because s2Member identifies the User as having paid for Membership access through PayPal)</em>.</p>' . "\n";
         echo '<p>s2Member will also send the User an email with instructions on how to register their Username &amp; Password, just in case they missed anything after checkout. That email will be sent to their PayPal email address. Much of this is handled through the PayPal IPN service behind-the-scenes, where PayPal and s2Member communicate with each other.</p>' . "\n";
         echo '<p>4. Once a User has completed checkout and registered a Username &amp; Password, they\'ll be able to log in. The first page they\'ll see after logging in will be your Login Welcome Page <em>(which you\'ll need to configure in the s2Member General Options panel)</em>. Your Login Welcome Page can contain whatever you like. You can design this Page in WordPress.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_registration_process", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_registration_process", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_log_reg_form", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_log_reg_form", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your Login/Registration Form" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-login-reg-form-section">' . "\n";
         echo '<p>s2Member uses the existing WordPress Login/Registration system. This is the same Login/Registration Form that you use to access your WP Dashboard. However, with s2Member installed, your Login/Registration Forms can be customized <em>(i.e., re-branded)</em>. <em>See: <strong>s2Member → General Options → Login/Registration Design</strong>.</em> You can make the default Login/Registration Forms match your WordPress theme design by changing the background color/image, your logo image, add Custom Fields, and more<em>!</em></p>' . "\n";
         echo '<p>Since s2Member uses the default Login/Registration system for WordPress, s2Member is also compatible with themes and other plugins <em>(such as BuddyPress)</em>. If your theme has a login form built-in already, chances are, it\'s perfectly compatible with s2Member. There are also many plugins available that are designed to place login forms into your Sidebar. Many of those are also compatible with s2Member\'s integration. If you have any trouble, please check the <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Forum URI")) . '" target="_blank" rel="external">s2Member Forums</a> for assistance.</p>' . "\n";
         echo is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() || c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<div class="ws-menu-page-hr"></div>' . "\n" : '';
         echo is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() ? '<p><em>The Main Site of a Multisite Blog Farm uses a different Registration Form. See: <strong>s2Member → General Options → Registration/Profile Fields</strong>.</em></p>' . "\n" : '';
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form. See: <strong>s2Member → General Options → Registration/Profile Fields</strong>.</em></p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_log_reg_form", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_log_reg_form", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_login_welcome_page", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_login_welcome_page", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your Login Welcome Page" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-login-welcome-page-section">' . "\n";
         echo '<p>You create this special Page in WordPress. This is a "Page" not a Post. This is the first page Members will see after logging into your site.</p>' . "\n";
         echo '<p>You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Login Welcome Page</code> and click Publish.</p>' . "\n";
         echo '<p>Once you have all of your <strong>s2Member → General Options</strong> configured, and once you have a basic understanding of how s2Member works, go back and customize the title and content for this Page. You\'ll want to be creative with your Login Welcome Page. However, you should configure your <strong>s2Member → General Options</strong> first and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><strong>See also:</strong> This KB article: <a href="http://s2member.com/r/customizing-login-welcome-page/" target="_blank" rel="external">Customizing Your Login Welcome Page</a>.</p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_login_welcome_page", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_login_welcome_page", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_membership_options_page", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_membership_options_page", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your Membership Options Page" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-options-page-section">' . "\n";
         echo '<p>You create this special Page in WordPress. This is a "Page" not a Post. s2Member comes with a PayPal Button Generator. You will generate PayPal Buttons with s2Member, for each Membership Level that you plan to offer. Those buttons will be inserted into your Membership Options Page. If a User in the general public attempts to access an area of your site that is being protected by s2Member <em>(based on your configuration)</em>, s2Member will redirect the User to your Membership Options Page, where they can signup through PayPal and become a Member.</p>' . "\n";
         echo '<p>You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Membership Options Page</code> and click Publish.</p>' . "\n";
         echo '<p>Once you have all of your <strong>s2Member → General Options</strong> configured, and once you have a basic understanding of how s2Member works, go back and customize the title and content for this Page. You\'ll want to be creative with your Membership Options Page. However, you should configure your <strong>s2Member → General Options</strong> first and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_membership_options_page", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_membership_options_page", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_general_options", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_general_options", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your s2Member → General Options" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-general-options-section">' . "\n";
         echo '<p>Once you have a Login Welcome Page and a Membership Options Page. Go to: <strong>s2Member → General Options</strong></p>' . "\n";
         echo '<p>From the s2Member General Options Panel you can setup your Membership offering. Including the design of your Login/Registration Form, any Custom Registration/Profile Fields you\'d like to create, Labels for each Membership Level, Open Registration (on/off), a Profile Editing Panel for Members, and more.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_general_options", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_general_options", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_restriction_options", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_restriction_options", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Your s2Member → Restriction Options" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-restriction-options-section">' . "\n";
         echo '<p>Once you have a Login Welcome Page and a Membership Options Page. Go to: <strong>s2Member → Restriction Options</strong></p>' . "\n";
         echo '<p>From the 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 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.</p>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p>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. This is where API Scripting with Conditionals comes in. <em>For more information, please check your Dashboard here: <strong>s2Member → API Scripting</strong></em>.</p>' . "\n" : '';
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><strong>See also:</strong> This KB article: <a href="http://s2member.com/r/simple-shortcode-conditionals/" target="_blank" rel="external">Simple Shortcode Conditionals</a>.</p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_restriction_options", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_restriction_options", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_automation_process", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_automation_process", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Cancellations / Expirations / Terminations" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-automation-process-section">' . "\n";
         echo '<p>You\'ll be happy to know that s2Member handles cancellations, expirations, failed payments, terminations <em>(e.g., refunds &amp; chargebacks)</em> for you automatically. If you log into your PayPal account and cancel a Member\'s Subscription, or, if the Member logs into their PayPal account and cancels their own Subscription, s2Member will be notified of these important changes and react accordingly through the PayPal IPN service that runs silently behind-the-scene.</p>' . "\n";
         echo '<p>The PayPal IPN service will notify s2Member whenever a Member\'s payments have been failing and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. If you issue a refund to an unhappy Customer through PayPal, s2Member will be notified and the account for that Customer will either be demoted to a Free Subscriber or deleted automatically <em>(based on your configuration)</em>. The communication from PayPal → s2Member is seamless.</p>' . "\n";
         echo '<p><em><strong>Some Hairy Details:</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through PayPal... but, s2Member continues allowing the User  access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT (End Of Term) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs; which would later result in a delayed Auto-EOT by s2Member.</em></p>' . "\n";
         echo '<p><em>s2Member will not process an EOT until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system (based on your configuration). s2Member also calculates one extra day (24 hours) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_automation_process", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_automation_process", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_upgrading_downgrading", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_upgrading_downgrading", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Upgrading/Downgrading Accounts" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-upgrading-downgrading-section">' . "\n";
         echo '<p>s2Member builds upon existing functionality offered through WordPress Roles and Capabilities. From your WordPress Dashboard, go to: <code>Users</code>. You can use bulk actions to modify Member Access Levels all at once, or click on an individual Member account to modify only their specific Access Level. If you want to temporarily demote a Member so they cannot access Membership privileges, set their Role to Subscriber. When you\'re ready to give them their Membership privileges back, change their Role back to one of the s2Member Levels.</p>' . "\n";
         echo '<p>All financial details, such as pricing, trial periods, subscription lengths, refunds, and other Customer service issues, should be handled by you—through your PayPal account; not through WordPress. Feel free to modify your Members\' Subscriptions via PayPal as often as you like. s2Member will be notified through the PayPal IPN service behind-the-scenes automatically. For example, if you log into PayPal and cancel a Member\'s paid Subscription, s2Member will be notified by PayPal behind-the-scenes, and s2Member will remove their Membership privileges at the correct point in time.</p>' . "\n";
         echo '<p>That being said, if you log into your WordPress Dashboard and delete a Member\'s account, you will still need to log into PayPal and cancel billing for the account you deleted. In other words, s2Member can be notified automatically about actions you take inside PayPal\'s interface, but PayPal cannot be notified of actions you take inside your WordPress Dashboard. At least, not in an automated fashion, as that would create a security issue for PayPal. Thus, automation works seamlessly from PayPal » s2Member, but not the other way around.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_upgrading_downgrading", get_defined_vars());
         echo '</div>' . "\n";
         echo '<div class="ws-menu-page-hr ws-plugin--s2member-subscription-modification-section-hr"></div>' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-subscription-modification-section">' . "\n";
         echo '<h3>Giving Members the Ability to Modify their Own Subscription</h3>' . "\n";
         echo '<p>If you\'d like to give your Members <em>(and/or your Free Subscribers)</em> the ability to modify their billing plan, by switching to a more expensive option, or a less expensive option; generate a new PayPal Modification Button, using the s2Member PayPal Button Generator. Configure the updated Level, pricing, terms, etc. Then, make that new Modification Button available to Members who are logged into their existing account with you. For example, you might want to insert a "Level #2" Upgrade Button into your Login Welcome Page, which would up-sell existing Level #1 Members to a more expensive plan that you offer.</p>' . "\n";
         echo '<p><em><strong>Modification Process:</strong> When you send a Member to PayPal using a Subscription Modification Button, PayPal will ask them to login. Once they\'re logged in, instead of being able to signup for a new Membership, PayPal will provide them with the ability to upgrade and/or downgrade their existing Membership with you, by allowing them to switch to the Membership Plan that was specified in the Subscription Modification Button. PayPal handles this nicely, and you\'ll be happy to know that s2Member has been pre-configured to deal with this scenario as well, so that everything remains automated. Their Membership Access Level will either be promoted, or demoted, based on the actions they took at PayPal during the modification process. Once an existing Member completes their Subscription Modification at PayPal, they\'ll be brought back to their Login Welcome Page, instead of sending them to a registration screen.</em></p>' . "\n";
         echo '<p><em><strong>Also Works For Free Subscribers:</strong> Although a Free Subscriber does not have an existing PayPal Subscription, s2Member is capable of adapting to this scenario gracefully. Just make sure that your existing Free Subscribers (the ones who wish to upgrade) pay for their Membership through a Modification Button generated by s2Member. That will allow them to continue using their existing account with you. In other words, they can keep their existing Username (and anything already associated with that Username), rather than being forced to re-register after checkout.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_upgrading_downgrading_modifications", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_upgrading_downgrading", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_reg_before_checkout", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_reg_before_checkout", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Registration Before Checkout?" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-reg-before-checkout-section">' . "\n";
         echo '<p>By default, s2Member will send a Customer directly to PayPal, and only after checkout is completed does the Customer have the ability to register a Username/Password for access to your site. This process works very well in most cases, and it has the benefit of increasing conversion rates, because there are fewer obstacles for the Customer on their way to the actual checkout process at PayPal.</p>' . "\n";
         echo '<p>That being said, we believe the <em>ideal</em> approach is a <em>combined</em> Checkout/Registration process; in just one simple step <em>(available with <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Add-on / Prices")) . '" target="_blank" rel="external">s2Member Pro</a> using Stripe™ (most popular), PayPal Pro integration, or through Authorize.Net)</em>. However, even with PayPal Standard Buttons, there is a way to accomplish Registration Before Checkout, thereby reversing the process—if you prefer it that way.</p>' . "\n";
         echo '<p>With PayPal Standard Buttons, Registration before Checkout is accomplished by turning Open Registration <code>(on)</code>, and then making a PayPal Button available to Free Subscribers at Level #0. In other words, you can let Visitors register for free at Level #0 <em>(where they have access to very little perhaps)</em>, and then charge them for access to higher Member Levels [1-4]. For further details, please check your WordPress Dashboard here: <strong>s2Member → General Options → Open Registration</strong>.</p>' . "\n";
         echo '<p><em>s2Member\'s Simple Conditionals can help with you too. For instance, you could integrate a special PayPal Button on your Login Welcome Page that will only be seen by Free Subscribers at Level #0. Please check your WordPress Dashboard under: <strong>s2Member → Restriction Options → Simple Shortcode Conditionals</strong>. We also suggest reading over the documentation on PayPal Modification Buttons. See: <strong>s2Member → PayPal Buttons → Subscr. Modification Buttons</strong>.</em></p>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><strong>See also:</strong> This KB article: <a href="http://s2member.com/r/simple-shortcode-conditionals/" target="_blank" rel="external">Simple Shortcode Conditionals</a>.</p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_reg_before_checkout", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_reg_before_checkout", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_themes", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_themes", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Choosing The Perfect WordPress Theme" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-themes">' . "\n";
         echo '<p>We recommend <a href="http://s2member.com/r/themeforest/" target="_blank" rel="external">ThemeForest</a>. This is a great place to find the perfect theme for your installation of WordPress—at very affordable prices.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_themes", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_themes", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_pro", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_pro", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Upgrading to s2Member Pro<em>!</em>" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-pro">' . "\n";
         echo '<p>Among many other features/enhancements, <a href="http://s2member.com/" target="_blank" rel="external">s2Member Pro</a> comes pre-integrated with additional payment gateways that work with s2Member Pro-Forms (a powerful s2Member Pro feature). For instance, Stripe (most popular; also supports Bitcoin), PayPal Payments Pro, and Authorize.Net. Each of these payment gateways allow you to accept most major credit cards on-site; i.e., customers never leave your site! s2Member Pro-Forms also support PayPal Express Checkout (if you integrate with PayPal Pro); for customers who actually prefer to pay with PayPal.</p>' . "\n";
         echo '<p><strong>Learn more here:</strong> <a href="http://s2member.com/features/" target="_blank" rel="external">s2Member Pro Features</a></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_pro", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_pro", get_defined_vars());
     }
     do_action("ws_plugin__s2member_during_start_page_after_left_sections", get_defined_vars());
     echo '</td>' . "\n";
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__s2member_menu_pages_rs::display();
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
 }
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page">' . "\n";
     /**/
     echo '<div id="icon-plugins" class="icon32"><br /></div>' . "\n";
     echo '<h2>s2Member® / Quick-Start Guide</h2>' . "\n";
     /**/
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     /**/
     do_action("ws_plugin__s2member_during_start_page_before_left_sections", get_defined_vars());
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_video_tutorials", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_video_tutorials", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Video Tutorials" style="padding-top:5px;">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-process-section">' . "\n";
         echo '<p><embed type="application/x-shockwave-flash" src="//www.youtube.com/p/A40AFC154461862E?version=3&hd=1&fs=1&rel=0" width="100%" height="550" allowscriptaccess="always" allowfullscreen="true"></embed></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_video_tutorials", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_video_tutorials", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_registration_process", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_registration_process", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="The Registration Process">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-process-section">' . "\n";
         echo '<h3>The Subscription Signup/Registration Process</h3>' . "\n";
         echo '<p>1. Internet Users will go to your Membership Options Page <em>( which you\'ll need to configure on the s2Member General Options panel )</em>. On this Membership Options Page, that YOU will create in WordPress®, you\'ll insert the PayPal® Subscription Buttons that were generated for you by s2Member.</p>' . "\n";
         echo '<p>2. An Internet User will click on a PayPal® Subscription Button from your Membership Options Page. They will be transferred over to PayPal® in order to agree to your Membership terms and pricing. You can customize the Checkout Page Style, Pricing, Payment Periods, and more - whenever you generate your PayPal® Buttons through s2Member.</p>' . "\n";
         echo '<p>3. Once a User has completed the Subscription Signup Process at PayPal®, they\'ll be returned to your site, where they\'ll be activated by s2Member instantly, and given the opportunity to register a Username &amp; Password for their Membership. <em>( Note: they\'ll be allowed to register a Username &amp; Password, even if you\'ve set \'Anyone Can Register\' to `Off` in your General WordPress® options; because s2Member identifies the User as having paid for Membership access through PayPal® )</em>.</p>' . "\n";
         echo '<p>s2Member will also send the User an email with instructions on how to register their Username &amp; Password, just in case they missed the instructions after checkout. That email will be sent to their PayPal® email address. Much of this is handled through the PayPal® IPN service behind-the-scene, where PayPal® and s2Member communicate with each other.</p>' . "\n";
         echo '<p>4. Once a User has completed checkout and registered a Username &amp; Password, they\'ll be able to log in. The first page they\'ll see after logging in, will be your Login Welcome Page <em>( which you\'ll need to configure on the s2Member General Options panel )</em>. Your Login Welcome Page can contain whatever you like. You\'ll need to design this Page in WordPress®, and be creative!</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_registration_process", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_registration_process", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_log_reg_form", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_log_reg_form", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Your Login/Registration Form">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-login-reg-form-section">' . "\n";
         echo '<h3>Your Login/Registration Form ( already built-in )</h3>' . "\n";
         echo '<p>s2Member uses the existing WordPress® Login/Registration system. This is the same Login/Registration Form that you use to access your WP® Dashboard. However, with s2Member installed, your Login/Registration Forms can be customized <em>( i.e. re-branded )</em>. <em>See: <code>s2Member -> General Options -> Login/Registration Design</code>.</em> You can make the default Login/Registration Forms match your WordPress® theme design; by changing the background color/image, your logo image, add Custom Fields, and more<em>!</em></p>' . "\n";
         echo '<p>Since s2Member uses the default Login/Registration system for WordPress®, s2Member is also compatible with themes, and other plugins <em>( such as BuddyPress )</em>. If your theme has a login form built-in already, chances are, it\'s perfectly compatible with s2Member. There are also many plugins available that are designed to place login forms into your Sidebar; and many of those are also compatible with s2Member\'s integration. If you have any trouble, please check the <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Forum URI")) . '" target="_blank" rel="external">s2Member Forums</a> for assistance.</p>' . "\n";
         echo is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() || c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<div class="ws-menu-page-hr"></div>' . "\n" : '';
         echo is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() ? '<p><em>The Main Site of a Multisite Blog Farm uses a different Registration Form. See: <code>s2Member -> General Options -> Registration/Profile Fields</code>.</em></p>' . "\n" : '';
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form. See: <code>s2Member -> General Options -> Registration/Profile Fields</code>.</em></p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_log_reg_form", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_log_reg_form", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_login_welcome_page", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_login_welcome_page", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Your Login Welcome Page">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-login-welcome-page-section">' . "\n";
         echo '<h3>Your Login Welcome Page ( you create this in WordPress® )</h3>' . "\n";
         echo '<p>YOU, will create this special Page in WordPress®. This is a "Page", not a Post. This is the first page Members will see after logging into your site.</p>' . "\n";
         echo '<p>You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Login Welcome Page</code>, and click Publish.</p>' . "\n";
         echo '<p>Once you have all of your <code>s2Member -> General Options</code> configured, and once you have a basic understanding of how s2Member works, go back and customize the title and content for this Page. You\'ll want to be creative with your Login Welcome Page. However, you should configure your <code>s2Member -> General Options</code> first, and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_login_welcome_page", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_login_welcome_page", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_membership_options_page", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_membership_options_page", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Your Membership Options Page">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-options-page-section">' . "\n";
         echo '<h3>Your Membership Options Page ( you create this in WordPress® )</h3>' . "\n";
         echo '<p>YOU, will create this special Page in WordPress®. This is a "Page", not a Post. s2Member comes with a PayPal® Button Generator. You will generate PayPal® Buttons with s2Member, for each Membership Level that you plan to offer. Those buttons will be inserted into your Membership Options Page. If a User in the general public, attempts to access an area of your site that is being protected by s2Member <em>( based on your configuration )</em>, s2Member will redirect the User to your Membership Options Page, where they can signup through PayPal® and become a Member.</p>' . "\n";
         echo '<p>You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Membership Options Page</code>, and click Publish.</p>' . "\n";
         echo '<p>Once you have all of your <code>s2Member -> General Options</code> configured, and once you have a basic understanding of how s2Member works, go back and customize the title and content for this Page. You\'ll want to be creative with your Membership Options Page. However, you should configure your <code>s2Member -> General Options</code> first, and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_membership_options_page", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_membership_options_page", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_general_options", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_general_options", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Your s2Member -> General Options">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-general-options-section">' . "\n";
         echo '<h3>Your s2Member -> General Options ( basic configuration )</h3>' . "\n";
         echo '<p>Once you have a Login Welcome Page, and a Membership Options Page. Go to: <code>s2Member -> General Options</code>.</p>' . "\n";
         echo '<p>From your s2Member General Options Panel, you can setup the basics of your Membership offering. Including the design of your Login/Registration Form, any Custom Registration/Profile Fields you\'d like to create, Labels for each Membership Level, Open Registration (on/off), a Profile Editing Panel for Members, and more.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_general_options", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_general_options", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_restriction_options", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_restriction_options", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Your s2Member -> Restriction Options">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-restriction-options-section">' . "\n";
         echo '<h3>Your s2Member -> Restriction Options ( basic configuration )</h3>' . "\n";
         echo '<p>Once you have a Login Welcome Page, and a Membership Options Page. Go to: <code>s2Member -> Restriction Options</code>.</p>' . "\n";
         echo '<p>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 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.</p>' . "\n";
         echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p>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. This is where API Scripting with Conditionals comes in. <em>For more information, please check your Dashboard here: <code>s2Member -> API Scripting</code></em>.</p>' . "\n" : '';
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_restriction_options", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_restriction_options", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_automation_process", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_automation_process", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Cancellations / Expirations / Terminations">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-automation-process-section">' . "\n";
         echo '<h3>Subscription Cancellations / Expirations / Terminations</h3>' . "\n";
         echo '<p>You\'ll be happy to know that s2Member handles cancellations, expirations, failed payments, terminations <em>( e.g. refunds &amp; chargebacks )</em> for you automatically. If you log into your PayPal® account and cancel a Member\'s Subscription, or, if the Member logs into their PayPal® account and cancels their own Subscription, s2Member will be notified of these important changes and react accordingly through the PayPal® IPN service that runs silently behind-the-scene.</p>' . "\n";
         echo '<p>The PayPal® IPN service will notify s2Member whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. If you issue a refund to an unhappy Customer through PayPal®, s2Member will be notified, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically <em>( based on your configuration )</em>. The communication from PayPal® -> s2Member is seamless.</p>' . "\n";
         echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through PayPal®... but, s2Member continues allowing the User  access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT ( End Of Term ) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member.</em></p>' . "\n";
         echo '<p><em>s2Member will not process an EOT until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). s2Member also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_automation_process", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_automation_process", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_upgrading_downgrading", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_upgrading_downgrading", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Upgrading/Downgrading Accounts">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-upgrading-downgrading-section">' . "\n";
         echo '<h3>Upgrading And/Or Downgrading User Accounts</h3>' . "\n";
         echo '<p>s2Member builds upon existing functionality offered through WordPress® Roles and Capabilities. From your WordPress® Dashboard, go to: <code>Users</code>. You can use bulk actions to modify Member Access Levels all at once, or click on an individual Member account to modify only their specific Access Level. If you want to temporarily demote a Member so they cannot access Membership privileges, set their Role to Subscriber. When you\'re ready to give them their Membership privileges back, change their Role back to one of the s2Member Levels.</p>' . "\n";
         echo '<p>All financial details, such as pricing, trial periods, subscription lengths, refunds, and other Customer service issues; should be handled by YOU, through your PayPal® account, and NOT through WordPress®. Feel free to modify your Members\' Subscriptions via PayPal® as often as you like. s2Member will be notified through the PayPal® IPN service behind-the-scene automatically. For example... If you log into PayPal® and cancel a Member\'s paid Subscription, s2Member will be notified by PayPal® behind-the-scene, and s2Member will remove their Membership privileges at the correct point in time.</p>' . "\n";
         echo '<p>That being said, if you log into your WordPress® Dashboard and delete a Member\'s account, you will still need to log into PayPal® and cancel billing for the account you deleted. In other words, s2Member can be notified automatically about actions you take inside PayPal\'s interface, but PayPal® CANNOT be notified of actions you take inside your WordPress® Dashboard. At least, not in an automated fashion, as that would create a security issue for PayPal®. So... automation works seamlessly from PayPal® -> to s2Member, but NOT the other way around.</p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_upgrading_downgrading", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr ws-plugin--s2member-subscription-modification-section-hr"></div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-subscription-modification-section">' . "\n";
         echo '<h3>Giving Members The Ability To Modify Their Own Subscription</h3>' . "\n";
         echo '<p>If you\'d like to give your Members <em>( and/or your Free Subscribers )</em> the ability to modify their billing plan, by switching to a more expensive option, or a less expensive option; generate a new PayPal® Modification Button, using the s2Member PayPal® Button Generator. Configure the updated Level, pricing, terms, etc. Then, make that new Modification Button available to Members who are logged into their existing account with you. For example, you might want to insert a "Level #2" Upgrade Button into your Login Welcome Page, which would up-sell existing Level #1 Members to a more expensive plan that you offer.</p>' . "\n";
         echo '<p><em><strong>*Modification Process*</strong> When you send a Member to PayPal® using a Subscription Modification Button, PayPal® will ask them to login. Once they\'re logged in, instead of being able to signup for a new Membership, PayPal® will provide them with the ability to upgrade and/or downgrade their existing Membership with you, by allowing them to switch to the Membership Plan that was specified in the Subscription Modification Button. PayPal® handles this nicely, and you\'ll be happy to know that s2Member has been pre-configured to deal with this scenario as well, so that everything remains automated. Their Membership Access Level will either be promoted, or demoted, based on the actions they took at PayPal® during the modification process. Once an existing Member completes their Subscription Modification at PayPal®, they\'ll be brought back to their Login Welcome Page, instead of sending them to a registration screen.</em></p>' . "\n";
         echo '<p><em><strong>*Also Works For Free Subscribers*</strong> Although a Free Subscriber does not have an existing PayPal® Subscription, s2Member is capable of adapting to this scenario gracefully. Just make sure that your existing Free Subscribers ( the ones who wish to upgrade ) pay for their Membership through a Modification Button generated by s2Member. That will allow them to continue using their existing account with you. In other words, they can keep their existing Username ( and anything already associated with that Username ), rather than being forced to re-register after checkout.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_upgrading_downgrading_modifications", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_upgrading_downgrading", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_start_page_during_left_sections_display_reg_before_checkout", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_before_reg_before_checkout", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Registration Before Checkout?">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-reg-before-checkout-section">' . "\n";
         echo '<h3>Registration Before Checkout? ( reversing the process )</h3>' . "\n";
         echo '<p>By default, s2Member will send a Customer directly to PayPal®, and only after checkout is completed does the Customer have the ability to register a Username/Password for access to your site. This process works very well in most cases, and it has the benefit of increasing conversion rates; because there are fewer obstacles for the Customer on their way to the actual checkout process at PayPal®.</p>' . "\n";
         echo '<p>That being said, we believe the <strong>ideal</strong> approach is a <strong>combined Checkout/Registration process</strong>; in just one simple step <em>( available with <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro</a> via PayPal® Pro integration )</em>.</p>' . "\n";
         echo '<p>However, even with PayPal® Standard integration, there is a way to accomplish Registration Before Checkout, thereby reversing the process — if you prefer it that way. This is accomplished by turning Open Registration <code>(on)</code>, and then making a PayPal® Button available to Free Subscribers at Level #0. In other words, you can let Visitors register for free at Level #0 <em>( where they have access to very little perhaps )</em>, and then charge them for access to higher Member Levels [1-4]. For further details, please check your WordPress® Dashboard here: <code>s2Member -> General Options -> Open Registration</code>.</p>' . "\n";
         echo '<p><em>s2Member\'s Simple Conditionals can help you further integrate this process, by allowing you to integrate a special PayPal® Button on your Login Welcome Page; one that will be seen only by Free Subscribers at Level #0. Please check your WordPress® Dashboard under: <code>s2Member -> API Scripting -> Simple Conditionals</code>. We also suggest reading over the documentation on PayPal® Modification Buttons. See: <code>s2Member -> PayPal® Buttons -> Subscription Modifications</code>.</em></p>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_reg_before_checkout", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_reg_before_checkout", get_defined_vars());
     }
     /**/
     do_action("ws_plugin__s2member_during_start_page_after_left_sections", get_defined_vars());
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__s2member_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
 }