/**
  * optimizeMember's PayPal Auto-Return/PDT handler ( inner processing routine ).
  *
  * @package optimizeMember\PayPal
  * @since 110720
  *
  * @param array $vars Required. An array of defined variables passed by {@link optimizeMember\PayPal\c_ws_plugin__optimizemember_paypal_return_in::paypal_return()}.
  * @return array|bool The original ``$paypal`` array passed in ( extracted ) from ``$vars``, or false when conditions do NOT apply.
  */
 public static function cp($vars = array())
 {
     extract($vars);
     /* Extract all vars passed in from: ``c_ws_plugin__optimizemember_paypal_notify_in::paypal_notify()``. */
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_during_paypal_return_before_explicit_ty_email", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     $paypal["optimizemember_log"][] = "Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_during_paypal_return_during_explicit_ty_email", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     if ($custom_success_redirection) {
         /* Using a custom success redirection URL? */
         $paypal["optimizemember_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ". However, the Customer MUST wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
     } else {
         /* Else we use the default redirection URL for this scenario, which is the Home Page. */
         $paypal["optimizemember_log"][] = "Redirecting Customer to the Home Page. Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
     }
     /**/
     echo c_ws_plugin__optimizemember_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] || c_ws_plugin__optimizemember_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), $custom_success_redirection ? _x("Check Your Email ( Then Click Here )", "s2member-front", "s2member") : esc_html("Back To Home Page", "s2member"), $custom_success_redirection ? $custom_success_redirection : home_url("/"));
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_during_paypal_return_after_explicit_ty_email", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     return apply_filters("c_ws_plugin__optimizemember_paypal_return_in_proxy_ty_email", $paypal, get_defined_vars());
 }
Ejemplo n.º 2
0
 /**
  * Handles the Shortcode for: `[opmGet /]`.
  *
  * @package optimizeMember\opmGet
  * @since 3.5
  *
  * @attaches-to ``add_shortcode("opmGet");``
  *
  * @param array $attr An array of Attributes.
  * @param str $content Content inside the Shortcode.
  * @param str $shortcode The actual Shortcode name itself.
  * @return mixed Value of the requested data, or null on failure.
  *
  * @todo Prevent this routine from potentially returning objects/arrays?
  */
 public static function sc_get_details($attr = FALSE, $content = FALSE, $shortcode = FALSE)
 {
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_before_sc_get_details", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     $attr = c_ws_plugin__optimizemember_utils_strings::trim_qts_deep((array) $attr);
     /* Force array; trim quote entities. */
     /**/
     $attr = shortcode_atts(array("constant" => "", "user_field" => "", "user_option" => "", "user_id" => ""), $attr);
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_before_sc_get_details_after_shortcode_atts", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     if ($attr["constant"] && defined($attr["constant"])) {
         if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() || preg_match("/^OPTIMIZEMEMBER_/i", $attr["constant"])) {
             $get = constant($attr["constant"]);
         }
     } else {
         if ($attr["user_field"] && (is_user_logged_in() || $attr["user_id"])) {
             $get = c_ws_plugin__optimizemember_utils_users::get_user_field($attr["user_field"], (int) $attr["user_id"]);
         } else {
             if ($attr["user_option"] && (is_user_logged_in() || $attr["user_id"])) {
                 $get = get_user_option($attr["user_option"], (int) $attr["user_id"]);
             }
         }
     }
     /**/
     return apply_filters("ws_plugin__optimizemember_sc_get_details", isset($get) ? $get : null, get_defined_vars());
 }
Ejemplo n.º 3
0
 /**
  * Handles Registration Links.
  *
  * @package optimizeMember\Registrations
  * @since 3.5
  *
  * @attaches-to ``add_action("init");``
  *
  * @return null Or exits script execution after redirection.
  */
 public static function register()
 {
     do_action("ws_plugin__optimizemember_before_register", get_defined_vars());
     /**/
     if (!empty($_GET["optimizemember_register"])) {
         eval('while (@ob_end_clean ());');
         /* First we end/clean any output buffers that may exist already. */
         /**/
         $msg_503 = _x('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
         /**/
         if (is_array($register = preg_split("/\\:\\.\\:\\|\\:\\.\\:/", c_ws_plugin__optimizemember_utils_encryption::decrypt(trim(stripslashes((string) $_GET["optimizemember_register"])))))) {
             if (count($register) === 6 && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time") {
                 if (is_numeric($register[5]) && $register[5] <= strtotime("now") && $register[5] >= strtotime("-" . apply_filters("ws_plugin__optimizemember_register_link_exp_time", "2 days", get_defined_vars()))) {
                     $_COOKIE["optimizemember_subscr_gateway"] = c_ws_plugin__optimizemember_utils_encryption::encrypt($register[1]);
                     $_COOKIE["optimizemember_subscr_id"] = c_ws_plugin__optimizemember_utils_encryption::encrypt($register[2]);
                     $_COOKIE["optimizemember_custom"] = c_ws_plugin__optimizemember_utils_encryption::encrypt($register[3]);
                     $_COOKIE["optimizemember_item_number"] = c_ws_plugin__optimizemember_utils_encryption::encrypt($register[4]);
                     /**/
                     if (($reg_cookies = c_ws_plugin__optimizemember_register_access::reg_cookies_ok()) && extract($reg_cookies)) {
                         status_header(200);
                         /* Send a 200 OK status header. */
                         header("Content-Type: text/html; charset=utf-8");
                         /* Content-Type with UTF-8. */
                         /**/
                         setcookie("optimizemember_subscr_gateway", $_COOKIE["optimizemember_subscr_gateway"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_subscr_gateway", $_COOKIE["optimizemember_subscr_gateway"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                         setcookie("optimizemember_subscr_id", $_COOKIE["optimizemember_subscr_id"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_subscr_id", $_COOKIE["optimizemember_subscr_id"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                         setcookie("optimizemember_custom", $_COOKIE["optimizemember_custom"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_custom", $_COOKIE["optimizemember_custom"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                         setcookie("optimizemember_item_number", $_COOKIE["optimizemember_item_number"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_item_number", $_COOKIE["optimizemember_item_number"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
                         /**/
                         do_action("ws_plugin__optimizemember_during_register", get_defined_vars());
                         /**/
                         if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site() && ($location = c_ws_plugin__optimizemember_utils_urls::wp_signup_url())) {
                             echo '<script type="text/javascript">' . "\n";
                             echo "window.location = '" . c_ws_plugin__optimizemember_utils_strings::esc_js_sq($location) . "';";
                             echo '</script>' . "\n";
                         } else {
                             if ($location = c_ws_plugin__optimizemember_utils_urls::wp_register_url()) {
                                 echo '<script type="text/javascript">' . "\n";
                                 echo "window.location = '" . c_ws_plugin__optimizemember_utils_strings::esc_js_sq($location) . "';";
                                 echo '</script>' . "\n";
                             }
                         }
                         exit;
                         /* Clean exit. The browser will now be redirected to ``$location``. */
                     } else {
                         status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503);
                     }
                 } else {
                     status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503);
                 }
             } else {
                 status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503);
             }
         } else {
             status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503);
         }
     }
     /**/
     do_action("ws_plugin__optimizemember_after_register", get_defined_vars());
 }
Ejemplo n.º 4
0
 /**
  * Builds a BuddyPress registration URL to `/register`.
  *
  * @package optimizeMember\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__optimizemember_utils_conds::bp_is_installed()) {
         return site_url(function_exists("bp_get_signup_slug") ? bp_get_signup_slug() . "/" : BP_REGISTER_SLUG . "/");
     }
     /**/
     return false;
 }
Ejemplo n.º 5
0
 /**
  * Applies custom Return Template Headers.
  *
  * @package optimizeMember\Return_Templates
  * @since 110720
  *
  * @attaches-to ``add_filter("ws_plugin__optimizemember_return_template_header");``
  *
  * @param str $default_header The default header *( i.e. HTML code )*, passed through by the Filter.
  * @param array $vars An array of defined variables, passed through by the Filter.
  * @return str A custom Return Template Header, if configured, else the ``$default_header``.
  */
 public static function return_template_header($default_header = FALSE, $vars = FALSE)
 {
     if (!empty($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_" . $vars["template"] . "_return_template_header"])) {
         $code = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_" . $vars["template"] . "_return_template_header"];
         $code = !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code;
         return $custom_header = $code;
     }
     /**/
     return $default_header;
 }
Ejemplo n.º 6
0
 public function __construct()
 {
     if (is_object($user = wp_get_current_user()) && ($user_id = $user->ID)) {
         echo '<form id="ws-updates-form" action="http://websharks-inc.us1.list-manage1.com/subscribe/post?u=8f347da54d66b5298d13237d9&amp;id=19e9d213bc" method="post" target="_blank">' . "\n";
         /**/
         if (!is_ssl() && !c_ws_plugin__optimizemember_utils_conds::is_localhost()) {
             echo '<div class="ws-menu-page-r-group-header">' . "\n";
             echo '<ins class="open">-</ins>Latest News<em>!</em>' . "\n";
             echo '</div>' . "\n";
             /**/
             echo '<div class="ws-menu-page-r-group" style="display:block;">' . "\n";
             echo '<script type="text/javascript" src="http://feeds.feedburner.com/s2member-updates?format=sigpro&amp;nItems=3&amp;openLinks=new&amp;displayTitle=false&amp;displayFeedIcon=false&amp;displayExcerpts=false&amp;displayAuthor=false&amp;displayDate=false&amp;displayEnclosures=false&amp;displayLinkToFeed=false"></script>' . "\n";
             echo '</div>' . "\n";
         }
         /**/
         echo '<div class="ws-menu-page-r-group-header">' . "\n";
         echo '<ins>+</ins>Email Updates<em>!</em>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-r-group">' . "\n";
         /**/
         echo '<div id="ws-updates-div-fname">' . "\n";
         echo '<label for="ws-updates-fname">First Name: *</label><br />' . "\n";
         echo '<input type="text" aria-required="true" autocomplete="off" name="FNAME" id="ws-updates-fname" value="' . esc_attr($user->first_name) . '" />' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div id="ws-updates-div-lname">' . "\n";
         echo '<label for="ws-updates-lname">Last Name: *</label><br />' . "\n";
         echo '<input type="text" aria-required="true" autocomplete="off" name="LNAME" id="ws-updates-lname" value="' . esc_attr($user->last_name) . '" />' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div id="ws-updates-div-email">' . "\n";
         echo '<label for="ws-updates-email">Email Address: *</label><br />' . "\n";
         echo '<input type="text" aria-required="true" autocomplete="off" name="EMAIL" id="ws-updates-email" value="' . format_to_edit($user->user_email) . '" />' . "\n";
         echo '</div>' . "\n";
         /**/
         if (!is_ssl() && !c_ws_plugin__optimizemember_utils_conds::is_localhost()) {
             echo '<div id="ws-updates-div-subs">' . "\n";
             echo '<script type="text/javascript" src="http://websharks-inc.us1.list-manage.com/subscriber-count?b=31&u=8c67d547-edf6-41c5-807d-2d2d0e6cffd1&id=19e9d213bc"></script>' . "\n";
             echo '</div>' . "\n";
         }
         /**/
         echo '<div id="ws-updates-div-priv">' . "\n";
         echo '( <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Privacy URI")) . '" target="_blank">we DO respect your privacy</a> )' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div id="ws-updates-div-submit">' . "\n";
         echo '<input type="submit" value="Subscribe" name="subscribe" />' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         echo '</form>' . "\n";
     }
 }
 public function __construct()
 {
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Unlimited Membership Levels ( via <code>/wp-config.php</code> )</strong><br />' . "\n";
         echo 'With optimizeMember Pro installed, you may configure an unlimited number of Membership Levels. You can set the number of Membership Levels by adding this line to the top of your <a href="http://codex.wordpress.org/Editing_wp-config.php" target="_blank" rel="external">/wp-config.php</a> file: <code><span style="color:#000000"><span style="color:#0000BB">define</span><span style="color:#007700">(</span><span style="color:#DD0000">"MEMBERSHIP_LEVELS"</span><span style="color:#007700">,&nbsp;</span><span style="color:#0000BB">4</span><span style="color:#007700">);</span></span></code>. This line should be inserted at the top of your <code>/wp-config.php</code> file, right after the <code>&lt;?php</code> tag. Feel free to change the default value of <code>4</code> to whatever you need. The minimum allowed value is <code>' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["min_levels"]) . '</code>. The recommended maximum is <code>' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["max_levels"]) . '</code> <em>( when/if needed )</em>.</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr" style="margin-bottom:0;"></div>' . "\n";
     }
 }
 public function __construct()
 {
     if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site()) {
         echo '<p><strong>OPTIMIZEMEMBER_PRO_VERSION</strong><br />This will always be a (string) with the current optimizeMember Pro version. Available since optimizeMember Pro v1.0. Dated versions began with optimizeMember Pro v110604.</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
     } else {
         echo '<p><strong>OPTIMIZEMEMBER_PRO_VERSION</strong><br />This will always be a (string) with the current optimizeMember Pro version. Available since optimizeMember Pro v1.0. Dated versions began with optimizeMember Pro v110604.</p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/pro-version.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
     }
 }
Ejemplo n.º 9
0
 public function __construct()
 {
     echo '<h3>PayPal Pro Integration ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-paypal-pro-details\').toggle(); return false;" class="ws-dotted-link">please read</a> )</h3>' . "\n";
     /**/
     echo '<div id="ws-plugin--optimizemember-paypal-pro-details" style="display:none;">' . "\n";
     echo '<p><em><strong>*PayPal Pro Integration*</strong> The optimizeMember Pro Module makes it possible for optimizeMember to use PayPal Pro Forms ( instead of standard PayPal Buttons ). PayPal Pro Forms integrate seamlessly with WordPress Shortcodes. This allows you to keep Customers on your site at all times, and it consolidates the Checkout / Registration steps into a single form that you can dress up just the way you like. If you would like to take advantage of PayPal Pro integration, please supply your PayPal API Username, Password, and Signature. You will need a <a href="http://www.optimizepress.com/paypal" target="_blank" rel="external">PayPal Business Account, w/Pro Service</a>. PayPal Pro accounts require a formal application, along with a small monthly fee. Once you have a PayPal Pro account, you\'ll need access to your <a href="http://www.optimizepress.com/paypal-profile-api-access" target="_blank" rel="external">PayPal API Credentials</a>. Log into your PayPal Pro account, and navigate to <code>Profile -> API Access (or Request API Credentials)</code>. You\'ll choose <code>( Request API Signature )</code>.</em></p>' . "\n";
     echo '<p><em><strong>*Recurring Billing*</strong> If you plan to use any of the ( `Subscription` ) options in the optimizeMember Form Generator for PayPal Pro, you will ALSO need <a href="http://www.optimizepress.com/paypal-pro-recurring-payments-faqs" target="_blank" rel="external">Recurring Billing</a> enabled for your PayPal Pro account. PayPal\'s Recurring Billing service for Pro accounts is <strong>required</strong> for all types of ( `Subscriptions` ), whether you intend for them to be recurring or not. However, it is NOT required for ( `Buy Now` ) functionality. The drop-down menus in the optimizeMember Form Generator, have been marked ( `Subscription` ) and ( `Buy Now` ) just for this reason. See: <code>optimizeMember -> PayPal Pro Forms</code>. This way you can see which options will require the use of PayPal\'s Recurring Billing service. PayPal will charge you a small monthly fee for their Recurring Billing service; which is an add-on for PayPal Pro accounts.</em></p>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*Secure Server*</strong> In order to comply with PayPal and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your PayPal Pro Forms on an SSL enabled site. Please check with your hosting provider to ask about obtaining an SSL certificate for your domain. Please note... when you create PayPal Pro Forms with optimizeMember; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with ( <code>https://</code> ). &mdash; You can skip the SSL certificate during Sandbox testing. SSL is not required until you officially go live. Once you\'re live, you can add the Custom Field <code>optimizemember_force_ssl = yes</code> to any Post/Page.</em></p>' . "\n" : '<p><em><strong>*Secure Server*</strong> In order to comply with PayPal and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your PayPal Pro Forms on an SSL enabled page. When you create PayPal Pro Forms with optimizeMember; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with ( <code>https://</code> ). You can add the Custom Field <code>optimizemember_force_ssl = yes</code> to any Post/Page that contains a Pro Form Shortcode. This tells optimizeMember to force those special Posts/Pages to be viewed over SSL at all times; no matter what.</em></p>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*SSL Compatibility*</strong> All themes available at <a href="http://www.optimizepress.com/" target="_blank" rel="external">optimizePress.com</a> include full support for SSL, as does WordPress itself. However, there are many themes/plugins that do NOT support SSL enabled Posts/Pages like they should. For this reason, you should be very careful when choosing a WordPress theme to use with optimizeMember Pro. Otherwise, your visitors could see the famous "Secure/Insecure" warnings in Internet Explorer browsers. With optimizeMember installed, you can add the Custom Field <code>optimizemember_force_ssl = yes</code> to any Post/Page. optimizeMember will buffer output on those special Posts/Pages, converting everything over to <code>https://</code> for you automatically, and forcing those specific Posts/Pages to be viewed over a secure SSL connection; so long as your server supports the https protocol.</em></p>' . "\n" : '';
     echo '<p><em><strong>*PayPal Pro is NOT Absolutely Required*</strong> optimizeMember is very flexible. It is now possible to integrate Pro Forms without a PayPal Pro account, whereby the enhanced Form Shortcodes that optimizeMember provides can be integrated ONLY with PayPal Express Checkout. In other words, if you get declined for PayPal Pro service, you can still use optimizeMember Pro Forms. Ask PayPal to activate Express Checkout for you. ( it\'s free ). Once Express Checkout is enabled, you will have access to your <a href="http://www.optimizepress.com/paypal-profile-api-access" target="_blank" rel="external">PayPal API Credentials</a>. Log into your PayPal account, and navigate to <code>Profile -> API Access (or Request API Credentials)</code>. You\'ll choose <code>( Request API Signature )</code>. Now ... here is the tricky part; whenever you generate a Pro Form Shortcode with optimizeMember, be sure to change  <code>accept="paypal,visa,mastercard,amex,discover,maestro,solo"</code> to just <code>accept="paypal"</code>; thereby excluding the on-site credit card processing functionality; which is available only with PayPal Pro.</em></p>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-hr" style="margin-bottom:0;"></div>' . "\n";
 }
Ejemplo n.º 10
0
 /**
  * Generates footer code, when/if configured.
  *
  * @package optimizeMember\WP_Footer
  * @since 110524RC
  *
  * @return null
  */
 public static function wp_footer_code()
 {
     do_action("ws_plugin__optimizemember_before_wp_footer_code", get_defined_vars());
     /**/
     if ($code = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["wp_footer_code"]) {
         if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site()) {
             echo do_shortcode($code) . "\n";
             /* No PHP here. */
         } else {
             echo do_shortcode(c_ws_plugin__optimizemember_utilities::evl($code));
         }
     }
     /**/
     do_action("ws_plugin__optimizemember_after_wp_footer_code", get_defined_vars());
     /**/
     return;
     /* Return for uniformity. */
 }
Ejemplo n.º 11
0
 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--optimizemember-pro-one-time-offers-section">' . "\n";
     echo '<h3>Optional One-Time-Offers ( Upon Login )</h3>' . "\n";
     echo '<p>This is enabled by optimizeMember 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. optimizeMember 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 optimizeMember Level.\\n%%current_user_role%% = The current User\\\'s WordPress Role.' . (!is_multisite() || !c_ws_plugin__optimizemember_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__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> optimizeMember 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--optimizemember-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__optimizemember_pro_login_welcome_page_otos" id="ws-plugin--optimizemember-pro-login-welcome-page-otos" rows="8" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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";
 }
 public function __construct()
 {
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-group" title="Pro Login Widget via PHP">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-login-widget-section">' . "\n";
         echo '<h3>Pro Login Widget via PHP Tag ( some scripting required )</h3>' . "\n";
         echo '<p>With optimizeMember Pro installed, you have access to the optimizeMember Pro Login Widget. This is made available in your Dashboard under: <code>Appearance -> Widgets</code>. Very simple to use; just drag &amp; drop ( that\'s it ). For developers though, sometimes it is necessary to include the Pro Login Widget in non-widgetized sections of a WordPress theme; or even into another plugin that you run in concert with optimizeMember. You can use this PHP tag to build the Pro Login Widget dynamically: <code>' . c_ws_plugin__optimizemember_utils_strings::highlight_php('<?php echo optimizemember_pro_login_widget(); ?>') . '</code></p>' . "\n";
         echo '<p>The Pro Login Widget can also be configured with an <em>optional</em> array of configuration parameters.</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         //echo '<p><strong>TIP:</strong> In addition to this documentation, you may also want to have a look at the <a href="http://www.optimizepress.com/codex/" target="_blank" rel="external">optimizeMember Codex</a>.<br />' . "\n";
         //echo '<strong>See Also:</strong> <a href="http://www.optimizepress.com/codex/stable/s2member/api_constants/package-summary/" target="_blank" rel="external">optimizeMember Codex -> API Constants</a>, and <a href="http://www.optimizepress.com/codex/stable/s2member/api_functions/package-summary/" target="_blank" rel="external">optimizeMember Codex -> API Functions</a>.</p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
 }
Ejemplo n.º 13
0
 /**
  * Handles Return templates w/ response message.
  *
  * @package optimizeMember\Return_Templates
  * @since 110720
  *
  * @param str $template Optional A Subscr. Gateway code should be used as the template name, or `default` is a multipurpose template. Defaults to `default`. Used in template selection.
  * @param str $response Optional. Response message to fill template with, using the Replacement Code `%%response%%` inside the template file. Defaults to: `Thank you. Please click the link below.`.
  * @param str $continue_html Optional. The HTML value of the continuation link presented within the template using Replacement Code `%%continue%%`. Defaults to: `Continue`.
  * @param str $continue_link Optional. The HREF value for the continuation link presented within the template using Replacement Code `%%continue%%`. Defaults to: ``home_url ("/")``.
  * @return str The full HTML code of the template. All Replacement Codes inside the template file will have already been filled by this routine.
  */
 public static function return_template($template = FALSE, $response = FALSE, $continue_html = FALSE, $continue_link = FALSE)
 {
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_before_return_template", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     $template = $template ? $template : "default";
     $continue_link = $continue_link ? $continue_link : home_url("/");
     $continue_html = $continue_html ? $continue_html : _x("Continue", "s2member-front", "s2member");
     $response = $response ? $response : _x("Thank you. Please click the link below.", "s2member-front", "s2member");
     /**/
     $custom_template = file_exists(TEMPLATEPATH . "/" . $template . "-return.php") ? TEMPLATEPATH . "/" . $template . "-return.php" : false;
     $custom_template = file_exists(TEMPLATEPATH . "/" . $template . "-return.html") ? TEMPLATEPATH . "/" . $template . "-return.html" : $custom_template;
     /**/
     $custom_template = file_exists(WP_CONTENT_DIR . "/" . $template . "-return.php") ? WP_CONTENT_DIR . "/" . $template . "-return.php" : $custom_template;
     $custom_template = file_exists(WP_CONTENT_DIR . "/" . $template . "-return.html") ? WP_CONTENT_DIR . "/" . $template . "-return.html" : $custom_template;
     /**/
     $custom_template = !$custom_template && file_exists(TEMPLATEPATH . "/default-return.php") ? TEMPLATEPATH . "/default-return.php" : $custom_template;
     $custom_template = !$custom_template && file_exists(TEMPLATEPATH . "/default-return.html") ? TEMPLATEPATH . "/default-return.html" : $custom_template;
     /**/
     $custom_template = !$custom_template && file_exists(WP_CONTENT_DIR . "/default-return.php") ? WP_CONTENT_DIR . "/default-return.php" : $custom_template;
     $custom_template = !$custom_template && file_exists(WP_CONTENT_DIR . "/default-return.html") ? WP_CONTENT_DIR . "/default-return.html" : $custom_template;
     /**/
     $specific_template = $custom_template ? $custom_template : (file_exists($_default_specific_template = dirname(dirname(__FILE__)) . "/templates/returns/" . $template . "-return.php") ? $_default_specific_template : false);
     /**/
     $code = trim(file_get_contents($specific_template ? $specific_template : ($_default_template = dirname(dirname(__FILE__)) . "/templates/returns/default-return.php")));
     $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
     /**/
     $doctype_html_head = c_ws_plugin__optimizemember_utils_html::doctype_html_head(get_bloginfo("name"), "ws_plugin__optimizemember_during_return_template_head_" . ($specific_template ? basename($specific_template) : "default-return.php"));
     $code = preg_replace("/%%doctype_html_head%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(apply_filters("ws_plugin__optimizemember_return_template_doctype_html_head", $doctype_html_head, get_defined_vars())), $code);
     /**/
     $code = preg_replace("/%%header%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(apply_filters("ws_plugin__optimizemember_return_template_header", sprintf(_x('[ %s ] <strong><em>says&hellip;</em></strong>', "s2member-front", "s2member"), esc_html($_SERVER["HTTP_HOST"])), get_defined_vars())), $code);
     /**/
     $code = preg_replace("/%%response%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(apply_filters("ws_plugin__optimizemember_return_template_response", $response, get_defined_vars())), $code);
     $code = preg_replace("/%%continue%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(apply_filters("ws_plugin__optimizemember_return_template_continue", '<a href="' . esc_attr($continue_link) . '">' . $continue_html . '</a>', get_defined_vars())), $code);
     $code = preg_replace("/%%support%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(apply_filters("ws_plugin__optimizemember_return_template_support", sprintf(_x('If you need assistance, please <a href="%s" target="_blank">contact support</a>.', "s2member-front", "s2member"), esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["reg_email_support_link"])), get_defined_vars())), $code);
     $code = preg_replace("/%%tracking%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(apply_filters("ws_plugin__optimizemember_return_template_tracking", c_ws_plugin__optimizemember_tracking_codes::generate_all_tracking_codes(), get_defined_vars())), $code);
     /**/
     return apply_filters("ws_plugin__optimizemember_return_template", $code, get_defined_vars());
 }
 public function __construct()
 {
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-group" title="Pro API For Remote Operations">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-remote-operations-section">' . "\n";
         echo '<h3>Pro API For Remote Operations ( PHP scripting required )</h3>' . "\n";
         echo '<p>With optimizeMember Pro installed, you have access to the optimizeMember Pro API For Remote Operations. This is made available for developers that wish to create User/Member accounts dynamically through custom scripts of their own. optimizeMember\'s Remote Operations API requires a secret API Key in order to POST authenticated requests to your installation of optimizeMember.</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h4>Remote Operations API: <strong>Your secret API Key</strong></h4>' . "\n";
         echo '<input type="text" autocomplete="off" value="' . format_to_edit(c_ws_plugin__optimizemember_pro_remote_ops::remote_ops_key_gen()) . '" style="width:99%;" />' . "\n";
         /**/
         echo '<p><em><strong class="ws-menu-page-hilite">Experimental:</strong> The Remote Operations API is currently in an experimental state. The Operations that are currently possible include: <code>create_user</code>, <code>modify_user</code>, <code>delete_user</code>. In a future release of optimizeMember Pro, we will add further documentation and some additional Remote Operations to this API. Thanks for your patience.</em></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h4>Remote Operation: <code>create_user</code> (or update existing Users/Members)</h4>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(str_replace("www.example.com", $_SERVER["HTTP_HOST"], str_replace("http://www.example.com/", site_url("/"), str_replace("[API Key]", c_ws_plugin__optimizemember_pro_remote_ops::remote_ops_key_gen(), file_get_contents(dirname(__FILE__) . "/code-samples/remote-op-create-user.x-php"))))) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h4>Remote Operation: <code>modify_user</code> (updates existing Users/Members)</h4>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(str_replace("www.example.com", $_SERVER["HTTP_HOST"], str_replace("http://www.example.com/", site_url("/"), str_replace("[API Key]", c_ws_plugin__optimizemember_pro_remote_ops::remote_ops_key_gen(), file_get_contents(dirname(__FILE__) . "/code-samples/remote-op-modify-user.x-php"))))) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h4>Remote Operation: <code>delete_user</code> (deletes existing Users/Members)</h4>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(str_replace("www.example.com", $_SERVER["HTTP_HOST"], str_replace("http://www.example.com/", site_url("/"), str_replace("[API Key]", c_ws_plugin__optimizemember_pro_remote_ops::remote_ops_key_gen(), file_get_contents(dirname(__FILE__) . "/code-samples/remote-op-delete-user.x-php"))))) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         //echo '<p><strong>TIP:</strong> In addition to this documentation, you may also want to have a look at the <a href="http://www.optimizepress.com/codex/" target="_blank" rel="external">optimizeMember Codex</a>.<br />' . "\n";
         //echo '<strong>See Also:</strong> <a href="http://www.optimizepress.com/codex/stable/s2member/api_constants/package-summary/" target="_blank" rel="external">optimizeMember Codex -> API Constants</a>, and <a href="http://www.optimizepress.com/codex/stable/s2member/api_functions/package-summary/" target="_blank" rel="external">optimizeMember Codex -> API Functions</a>.</p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
 }
 public function __construct()
 {
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<h3>Auto-Return Page Template ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-paypal-return-page-template\').toggle(); return false;" class="ws-dotted-link">optional customizations</a> )</h3>' . "\n";
     echo '<div id="ws-plugin--optimizemember-pro-paypal-return-page-template" style="display:none;">' . "\n";
     echo '<p>With optimizeMember Pro installed, you have the ability to customize your <a href="' . esc_attr(site_url("/?optimizemember_paypal_return=1&optimizemember_paypal_proxy=paypal&optimizemember_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">Auto-Return Page Template</a>. If you are using PayPal Standard integration <em>( i.e. PayPal Buttons )</em>, each of your Customers are returned back to your site immediately after they complete checkout at PayPal. Your Auto-Return Page displays a message and instructions for the Customer. optimizeMember may change the message and instructions dynamically, based on what the Customer is actually doing <em>( i.e. based on the type of transaction that is taking place )</em>. So, although we do NOT recommend that you attempt to change the message and instructions presented dynamically by optimizeMember, you CAN certainly control the Header, and/or the overall appearance of optimizeMember\'s Auto-Return Page Template.</p>' . "\n";
     echo '<p>The quickest/easiest way, is to simply add some HTML code in the box below. For instance, you might include an &lt;img&gt; tag with your logo. The box below, allows you to customize the Header section <em>( i.e. the top )</em> of optimizeMember\'s default Auto-Return Page Template. Everything else, including the textual response and other important details that each Customer needs to know about, are already handled dynamically by optimizeMember <em>( based on the type of transaction that is taking place )</em>. All you need to do is customize the Header with your logo and anything else you feel is important. Although this Header customization is completely optional, we recommend an <a href="http://www.w3schools.com/tags/tag_img.asp" target="_blank" rel="external">&lt;img&gt; tag</a>, with a logo that is around 300px wide. After you "Save All Changes" below, you may <a href="' . esc_attr(site_url("/?optimizemember_paypal_return=1&optimizemember_paypal_proxy=paypal&optimizemember_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">click this link to see what your Header looks like</a>.</p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-paypal-return-template-header">' . "\n";
     echo 'Auto-Return Page Template Header:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<textarea name="ws_plugin__optimizemember_pro_paypal_return_template_header" id="ws-plugin--optimizemember-pro-paypal-return-template-header" rows="5" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_paypal_return_template_header"]) . '</textarea><br />' . "\n";
     echo 'Any valid XHTML / JavaScript' . (is_multisite() && c_ws_plugin__optimizemember_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 class="ws-menu-page-hr"></div>' . "\n";
     /**/
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<p>It is also possible to build your own Auto-Return Page Template, if you prefer. If you feel the need to create your own Auto-Return Page Template, please make a copy of optimizeMember\'s default template: <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir"] . "/includes/templates/returns/default-template.php")) . '</code>. Place your copy of this default template, inside your active WordPress theme directory, and name the file: <code>/paypal-return.php</code>. optimizeMember will automatically find your Auto-Return Page Template in this location, and optimizeMember will use your template, instead of the default. Further details are provided inside optimizeMember\'s default template file. Once your custom template file is in place, you may <a href="' . esc_attr(site_url("/?optimizemember_paypal_return=1&optimizemember_paypal_proxy=paypal&optimizemember_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">click this link to see what it looks like</a>.</p>' . "\n";
     }
     /**/
     echo '<p>It is also possible to bypass optimizeMember\'s Auto-Return system all together, if you prefer. For further details, please read more about the <code>success=""</code> Shortcode Attribute for PayPal Buttons generated by optimizeMember. You will find details on this inside your Dashboard, under: <code>optimizeMember -> PayPal Buttons -> Shortcode Attributes ( Explained )</code>. Please note: you will still need to configure your PayPal account for Auto-Return/PDT <em>( as instructed above )</em>. Then, you may use the <code>success=""</code> Attribute in your Shortcode, when/if you need it. In other words, if you use the <code>success=""</code> Attribute in your Shortcode, the initial redirection back to optimizeMember\'s default Auto-Return/PDT handler MUST still occur. However, instead of optimizeMember displaying an Auto-Return Template to the Customer, optimizeMember will silently redirect the Customer to the URL that you specified in the <code>success="http://..."</code> Attribute of your Shortcode, allowing you to take complete control over what happens next.</p>' . "\n";
     echo '</div>' . "\n";
 }
 /**
  * optimizeMember's PayPal Auto-Return/PDT handler ( inner processing routine ).
  *
  * @package optimizeMember\PayPal
  * @since 110720
  *
  * @param array $vars Required. An array of defined variables passed by {@link optimizeMember\PayPal\c_ws_plugin__optimizemember_paypal_return_in::paypal_return()}.
  * @return array|bool The original ``$paypal`` array passed in ( extracted ) from ``$vars``, or false when conditions do NOT apply.
  */
 public static function cp($vars = array())
 {
     extract($vars);
     /* Extract all vars passed in from: ``c_ws_plugin__optimizemember_paypal_notify_in::paypal_notify()``. */
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_during_paypal_return_before_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     $paypal["optimizemember_log"][] = "No Return-Data. Customer must wait for Email Confirmation.";
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_during_paypal_return_during_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     if ($custom_success_redirection) {
         /* Using a custom success redirection URL? */
         $paypal["optimizemember_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ". However, the Customer MUST wait for Email Confirmation.";
     } else {
         /* Else we use the default redirection URL for this scenario, which is the Home Page. */
         $paypal["optimizemember_log"][] = "Redirecting Customer to the Home Page. Customer must wait for Email Confirmation.";
     }
     /**/
     $paypal["optimizemember_log"][] = "Note. This can sometimes happen when/if you are offering a free Trial Period. There are times when a Payment Gateway will NOT supply optimizeMember with any data immediately after checkout. When/if this happens, optimizeMember must process the transaction via IPN only ( i.e. behind-the-scene ), and the Customer must wait for Email Confirmation in these cases.";
     $paypal["optimizemember_log"][] = var_export($_REQUEST, true);
     /* Recording _POST + _GET vars for analysis and debugging. */
     /**/
     echo c_ws_plugin__optimizemember_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] || c_ws_plugin__optimizemember_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), $custom_success_redirection ? _x("Check Your Email ( Then Click Here )", "s2member-front", "s2member") : _x("Back To Home Page", "s2member-front", "s2member"), $custom_success_redirection ? $custom_success_redirection : home_url("/"));
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_during_paypal_return_after_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     return apply_filters("c_ws_plugin__optimizemember_paypal_return_in_no_tx_data", $paypal, get_defined_vars());
 }
Ejemplo n.º 17
0
 public function __construct()
 {
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*NOT True w/ PayPal Pro*</strong> With PayPal Pro integration you absolutely MUST set an IPN URL inside your PayPal account. PayPal Pro integration does NOT allow the IPN location to be overridden on a per-transaction basis. If you\'re using a single PayPal Pro account for multiple cross-domain installations, and you need to receive IPN notifications for each of your domains; you\'ll want to create a central IPN processing script that scans variables in each IPN response, forking itself out to each of your individual domains. In rare cases when this is necessary, you\'ll find two variables in all IPN responses for optimizeMember. The originating domain name ( i.e. <code>' . esc_html($_SERVER["HTTP_HOST"]) . '</code> ) will always be included somewhere within, either: <code>custom</code> and/or <code>rp_invoice_id</code>; depending on the type of transaction. These variables can be used to test incoming IPNs, and fork to the proper installation. For your convenience, an example script has been provided inside: <code>/s2m-pro-extras/paypal-central-ipn.php</code>. You can download all Extras here: <a href="http://www.optimizepress.com/r/s2m-pro-extras-zip/">s2m-pro-extras.zip</a>.</em></p>' . "\n" : '<p><em><strong>*NOT True w/ PayPal Pro*</strong> With PayPal Pro integration you absolutely MUST set an IPN URL inside your PayPal account. PayPal Pro integration does NOT allow the IPN location to be overridden on a per-transaction basis. If you\'re using a single PayPal Pro account for multiple cross-site installations, and you need to receive IPN notifications for each of your sites; you\'ll want to create a central IPN processing script that scans variables in each IPN response, forking itself out to each of your individual domains. In rare cases when this is necessary, you\'ll find two variables in all IPN responses for optimizeMember. The originating domain name ( i.e. <code>' . esc_html($_SERVER["HTTP_HOST"]) . '</code> ) will always be included somewhere within, either: <code>custom</code> and/or <code>rp_invoice_id</code>; depending on the type of transaction. These variables can be used to test incoming IPNs, and fork to the proper installation. For your convenience, an example script has been provided inside: <code>/s2m-pro-extras/paypal-central-ipn.php</code>. You can download all Extras here: <a href="http://www.optimizepress.com/r/s2m-pro-extras-zip/">s2m-pro-extras.zip</a>. Please contact Support if you have multiple cross-site installations and you need assistance setting this up.</em></p>' . "\n";
 }
Ejemplo n.º 18
0
 public function __construct()
 {
     if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site()) {
     } else {
     }
 }
Ejemplo n.º 19
0
 /**
  * Displays login footer design.
  *
  * @package optimizeMember\Login_Customizations
  * @since 3.5
  *
  * @attaches-to ``add_action("login_footer");``
  *
  * @return void
  */
 public static function login_footer_design()
 {
     do_action("ws_plugin__optimizemember_before_login_footer_design", get_defined_vars());
     /**/
     if ($code = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_footer_design"]) {
         /**/
         if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site()) {
             echo $code . "\n";
             /* No PHP here. */
         } else {
             eval("?>" . $code);
         }
     }
     /**/
     do_action("ws_plugin__optimizemember_after_login_footer_design", get_defined_vars());
     /**/
     return;
     /* Return for uniformity. */
 }
Ejemplo n.º 20
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /**/
     echo '<div class="op-bsw-header">';
     echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
     echo '</div>';
     echo '<div class="op-bsw-main-content">';
     echo '<h2>OptimizeMember API / Tracking</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__optimizemember_options_form" id="ws-plugin--optimizemember-options-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_options_save" id="ws-plugin--optimizemember-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-options-save")) . '" />' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_configured" id="ws-plugin--optimizemember-configured" value="1" />' . "\n";
     /**/
     do_action("ws_plugin__optimizemember_during_trk_ops_page_before_left_sections", get_defined_vars());
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_signup_tracking", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_signup_tracking", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Signup Tracking Codes">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-signup-tracking-section">' . "\n";
         echo '<h3>Signup Tracking Codes ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, a list server, tracking codes from advertising networks, or the like; you\'ll want to read this section. The HTML' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or PHP') . ' code that you enter below, will be loaded up in a web browser, after a "new", "paying" Member, completes Signup through your Payment Gateway. This is marked `Signup`, because Signup Tracking Codes will be displayed each time a "new", "paying" Member, signs up. Depending on your fee structure, this may include a first Initial Payment that establishes their Subscription, or it may not.</p>' . "\n";
         echo '<p>Signup Tracking Codes will only be displayed once for each Member. Signup Tracking Codes are displayed right after a "new", "paying" Member, signs up successfully through your Payment Gateway, regardless of whether any money has actually been transacted initially. In other words, Signup Tracking Codes are displayed anytime a "new", "paying" Member, signs up, even if you provided them with a 100% Free Trial Period <em>( e.g. no money is being transacted intially )</em>.</p>' . "\n";
         echo '<p>optimizeMember will display your Signup Tracking Codes in one of four possible locations... <strong>1.</strong> If possible, on the Thank-You Return Page, after returning from your Payment Gateway. <strong>2.</strong> Otherwise, if possible, on the Registration Form, after returning from your Payment Gateway. <em>Note. If you offer a 100% free Trial Period, Tracking Codes will be displayed in location #2 when using PayPal Standard Button integration.</em> <strong>3.</strong> Otherwise, if possible, on the Login Form after Registration is completed. <strong>4.</strong> Otherwise, in the footer of your WordPress theme, as soon as possible <em>( immediately with optimizeMember Pro Form integration )</em>; or after the Customer\'s very first login.</p>' . "\n";
         echo '<p>Signup Tracking Codes are displayed for all types of Membership Level Access. Including Recurring Subscriptions <em>( with or without a Free Trial Period )</em>, Non-Recurring Subscriptions <em>( with or without a Free Trial Period )</em>, Lifetime Subscriptions, and even Fixed-Term Subscriptions. All of these are supported by optimizeMember\'s Button/Form Generators.</p>' . "\n";
         echo '<p>Signup Tracking Codes will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all. Signup Tracking Codes will NOT be processed when an "existing" User/Member pays for a new Subscription <em>( see: Modification Tracking Codes for that scenario )</em>.' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' And, Signup Tracking Codes will NOT be processed on Buy Now transactions for Independent Custom Capabilities <em>( see: Capability Tracking Codes for that scenario )</em>.') . '</p>' . "\n";
         echo '<p><em><strong>AD BLOCKERS:</strong> If a web browser has ad blockers enabled (i.e. the web browser has an ad blocking extension or add-on), Tracking Codes from popular online advertising companies (including many affiliate networks) may NOT be shown. Ad blockers can prevent your Tracking Codes from being loaded in a customer\'s browser. If you\'d like to avoid this problem, consider integrating with optimizeMember\'s API Notifications instead of with Tracking Codes. API Notifications occur silently behind-the-scene (more reliably), whereas Tracking Codes are loaded in a customer\'s browser. For more information, please see: <code>optimizeMember -> API / Notifications</code>.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_during_signup_tracking", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-signup-tracking-codes">' . "\n";
         echo 'Integrate Signup Tracking Codes:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_signup_tracking_codes" id="ws-plugin--optimizemember-signup-tracking-codes" rows="8" wrap="off" spellcheck="false" style="font-family:Consolas, monospace;">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["signup_tracking_codes"]) . '</textarea><br />' . "\n";
         echo 'Any valid XHTML / JavaScript' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' ( or even PHP )') . ' code will work just fine here. Just try not to put anything here that would actually be visible to the Customer. Things like 1x1 pixel images that load up silently and/or JavaScript tracking routines will be fine. Google Analytics code works just fine, AdSense performance tracking, as well as Yahoo tracking and other affiliate network codes are all OK here.<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>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase. Payment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial Period, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. If a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. This value is <code>always > 0</code>, no matter what. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. The %%regular%% rate is always > 0. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the Subscription is for.</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D ( this means 1 Day )\\n%%initial_term%% = 1 W ( this means 1 Week )\\n%%initial_term%% = 1 M ( this means 1 Month )\\n%%initial_term%% = 1 Y ( this means 1 Year )\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D ( this means 1 Day )\\n%%regular_term%% = 1 W ( this means 1 Week )\\n%%regular_term%% = 1 M ( this means 1 Month )\\n%%regular_term%% = 1 Y ( this means 1 Year )\\n%%regular_term%% = 1 L ( this means 1 Lifetime )\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period ( or duration ) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</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 '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em><strong>*Tip*</strong> With <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember Pro Forms</a>, it\'s possible to integrate Affiliate Coupon Codes. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code that you\'ve configured with optimizeMember Pro. Please check your Dashboard here: <code>optimizeMember -> Pro Coupon Codes -> Affiliate Coupon Codes</code>. This is a VERY powerful feature.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_signup_tracking", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_modification_tracking", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_modification_tracking", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Modification Tracking Codes">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-modification-tracking-section">' . "\n";
         echo '<h3>Modification Tracking Codes ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, a list server, tracking codes from advertising networks, or the like; you\'ll want to read this section. The HTML' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or PHP') . ' code that you enter below, will be loaded up in a web browser, each time a Subscription Modification occurs. This is marked `Modification`, because Modification Tracking Codes are displayed each time an "existing" User/Member <em>( even if they are/were a Free Subscriber )</em> signs up for a paid Subscription <em>( i.e. a Modification takes place against an existing account within WordPress )</em>, or an "existing" Member modifies their paid Subscription terms <em>( again, a Modification takes places against an existing account within WordPress )</em>. Depending on your fee structure, this may include a first Initial Payment that establishes their Subscription, or it may not.</p>' . "\n";
         echo '<p>Modification Tracking Codes are displayed right after a Member signs up and/or modifies billing terms successfully through your Payment Gateway, regardless of whether any money has actually been transacted initially. In other words, Modification Tracking Codes are displayed, even if you provided them with a 100% Free Trial Period <em>( e.g. no money is being transacted intially )</em>.</p>' . "\n";
         echo '<p>optimizeMember will display your Modification Tracking Codes in one of three possible locations... <strong>1.</strong> If possible, on the Thank-You Return Page, after returning from your Payment Gateway. <strong>2.</strong> Otherwise, if possible, on the Login Form after returning from your Payment Gateway <em>( i.e. when the Customer is asked to log back in )</em>. <strong>3.</strong> Otherwise, in the footer of your WordPress theme, as soon as possible <em>( immediately with optimizeMember Pro Form integration )</em>; or after the Customer\'s next login.</p>' . "\n";
         echo '<p>Modification Tracking Codes are displayed for all types of Membership Level Access. Including Recurring Subscriptions <em>( with or without a Free Trial Period )</em>, Non-Recurring Subscriptions <em>( with or without a Free Trial Period )</em>, Lifetime Subscriptions, and even Fixed-Term Subscriptions. All of these are supported by optimizeMember\'s Button/Form Generators.</p>' . "\n";
         echo '<p>Modification Tracking Codes will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all. Modification Tracking Codes will NOT be processed when a "new" User/Member signs up <em>( see: Signup Tracking Codes for that scenario )</em>.' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' And, Modification Tracking Codes will NOT be processed on Buy Now transactions for Independent Custom Capabilities <em>( see: Capability Tracking Codes for that scenario )</em>.') . '</p>' . "\n";
         echo '<p><em><strong>AD BLOCKERS:</strong> If a web browser has ad blockers enabled (i.e. the web browser has an ad blocking extension or add-on), Tracking Codes from popular online advertising companies (including many affiliate networks) may NOT be shown. Ad blockers can prevent your Tracking Codes from being loaded in a customer\'s browser. If you\'d like to avoid this problem, consider integrating with optimizeMember\'s API Notifications instead of with Tracking Codes. API Notifications occur silently behind-the-scene (more reliably), whereas Tracking Codes are loaded in a customer\'s browser. For more information, please see: <code>optimizeMember -> API / Notifications</code>.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_during_modification_tracking", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-modification-tracking-codes">' . "\n";
         echo 'Integrate Modification Tracking Codes:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_modification_tracking_codes" id="ws-plugin--optimizemember-modification-tracking-codes" rows="8" wrap="off" spellcheck="false" style="font-family:Consolas, monospace;">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["modification_tracking_codes"]) . '</textarea><br />' . "\n";
         echo 'Any valid XHTML / JavaScript' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' ( or even PHP )') . ' code will work just fine here. Just try not to put anything here that would actually be visible to the Customer. Things like 1x1 pixel images that load up silently and/or JavaScript tracking routines will be fine. Google Analytics code works just fine, AdSense performance tracking, as well as Yahoo tracking and other affiliate network codes are all OK here.<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>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase. Payment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial Period, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. If a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. This value is <code>always > 0</code>, no matter what. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. The %%regular%% rate is always > 0. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the Subscription is for.</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D ( this means 1 Day )\\n%%initial_term%% = 1 W ( this means 1 Week )\\n%%initial_term%% = 1 M ( this means 1 Month )\\n%%initial_term%% = 1 Y ( this means 1 Year )\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D ( this means 1 Day )\\n%%regular_term%% = 1 W ( this means 1 Week )\\n%%regular_term%% = 1 M ( this means 1 Month )\\n%%regular_term%% = 1 Y ( this means 1 Year )\\n%%regular_term%% = 1 L ( this means 1 Lifetime )\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period ( or duration ) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</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> optimizeMember -> 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 '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em><strong>*Tip*</strong> With <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember Pro Forms</a>, it\'s possible to integrate Affiliate Coupon Codes. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code that you\'ve configured with optimizeMember Pro. Please check your Dashboard here: <code>optimizeMember -> Pro Coupon Codes -> Affiliate Coupon Codes</code>. This is a VERY powerful feature.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_modification_tracking", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_ccap_tracking", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_ccap_tracking", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Capability Tracking Codes">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-ccap-tracking-section">' . "\n";
         echo '<h3>Capability Tracking Codes ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, a list server, tracking codes from advertising networks, or the like; you\'ll want to read this section. The HTML' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or PHP') . ' code that you enter below, will be loaded up in a web browser, each time Independent Custom Capabilities are purchased. This is marked `Capability`, because Capability Tracking Codes are displayed each time an "existing" User/Member <em>( even if they are/were a Free Subscriber )</em> pays you for Independent Custom Capabilities through a Buy Now transaction. This is the only circumstance in which your Capability Tracking Codes will be displayed.</p>' . "\n";
         echo '<p>optimizeMember will display your Capability Tracking Codes in one of three possible locations... <strong>1.</strong> If possible, on the Thank-You Return Page, after returning from your Payment Gateway. <strong>2.</strong> Otherwise, if possible, on the Login Form after returning from your Payment Gateway <em>( i.e. when the Customer is asked to log back in )</em>. <strong>3.</strong> Otherwise, in the footer of your WordPress theme, as soon as possible <em>( immediately with optimizeMember Pro Form integration )</em>; or after the Customer\'s next login.</p>' . "\n";
         echo '<p><em><strong>AD BLOCKERS:</strong> If a web browser has ad blockers enabled (i.e. the web browser has an ad blocking extension or add-on), Tracking Codes from popular online advertising companies (including many affiliate networks) may NOT be shown. Ad blockers can prevent your Tracking Codes from being loaded in a customer\'s browser. If you\'d like to avoid this problem, consider integrating with optimizeMember\'s API Notifications instead of with Tracking Codes. API Notifications occur silently behind-the-scene (more reliably), whereas Tracking Codes are loaded in a customer\'s browser. For more information, please see: <code>optimizeMember -> API / Notifications</code>.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_during_ccap_tracking", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-ccap-tracking-codes">' . "\n";
         echo 'Integrate Capability Tracking Codes:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_ccap_tracking_codes" id="ws-plugin--optimizemember-ccap-tracking-codes" rows="8" wrap="off" spellcheck="false" style="font-family:Consolas, monospace;">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccap_tracking_codes"]) . '</textarea><br />' . "\n";
         echo 'Any valid XHTML / JavaScript' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' ( or even PHP )') . ' code will work just fine here. Just try not to put anything here that would actually be visible to the Customer. Things like 1x1 pixel images that load up silently and/or JavaScript tracking routines will be fine. Google Analytics code works just fine, AdSense performance tracking, as well as Yahoo tracking and other affiliate network codes are all OK here.<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>%%txn_id%%</code> = The Payment Transaction ID, which is always unique for each payment received.</li>' . "\n";
         echo '<li><code>%%amount%%</code> = The Amount of the payment. Most affiliate programs calculate commissions from this.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>*level:custom_capabilities:fixed term</em></code> ) that the payment is for. [ <a href="#" onclick="alert(\'With Independent Custom Capabilities, the `level` portion of this string will be an asterisk ( `*` ), since the Membership Level is irrelevant, and remains `as it was`.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</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> optimizeMember -> 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 '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em><strong>*Tip*</strong> With <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember Pro Forms</a>, it\'s possible to integrate Affiliate Coupon Codes. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code that you\'ve configured with optimizeMember Pro. Please check your Dashboard here: <code>optimizeMember -> Pro Coupon Codes -> Affiliate Coupon Codes</code>. This is a VERY powerful feature.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_ccap_tracking", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_sp_tracking", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_sp_tracking", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Specific Post/Page Tracking Codes">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-sp-tracking-section">' . "\n";
         echo '<h3>Tracking Codes For Specific Post/Page Access ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, a list server, tracking codes from advertising networks, or the like; you\'ll want to read this section. The HTML' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or PHP') . ' code that you enter below, will be loaded up in a web browser, after a Customer completes a successful transaction through your Payment Gateway; specifically for Post/Page Access. These Codes are NOT injected for any type of Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' or Independent Custom Capabilities') . '. These are only for Specific Post/Page transactions. The Tracking Codes that you enter below, will be displayed in one of two possible locations... <strong>1.</strong> If possible, on the Thank-You Return Page, after returning from your Payment Gateway. <strong>2.</strong> Otherwise, in the footer of your WordPress theme, as soon as possible <em>( immediately with optimizeMember Pro Form integration )</em>.</p>' . "\n";
         echo '<p><em><strong>AD BLOCKERS:</strong> If a web browser has ad blockers enabled (i.e. the web browser has an ad blocking extension or add-on), Tracking Codes from popular online advertising companies (including many affiliate networks) may NOT be shown. Ad blockers can prevent your Tracking Codes from being loaded in a customer\'s browser. If you\'d like to avoid this problem, consider integrating with optimizeMember\'s API Notifications instead of with Tracking Codes. API Notifications occur silently behind-the-scene (more reliably), whereas Tracking Codes are loaded in a customer\'s browser. For more information, please see: <code>optimizeMember -> API / Notifications</code>.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_during_sp_tracking", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-sp-tracking-codes">' . "\n";
         echo 'Specific Post/Page Tracking Codes:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_sp_tracking_codes" id="ws-plugin--optimizemember-sp-tracking-codes" rows="8" wrap="off" spellcheck="false" style="font-family:Consolas, monospace;">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sp_tracking_codes"]) . '</textarea><br />' . "\n";
         echo 'Any valid XHTML / JavaScript' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' ( or even PHP )') . ' code will work just fine here. Just try not to put anything here that would actually be visible to the Customer. Things like 1x1 pixel images that load up silently and/or JavaScript tracking routines will be fine. Google Analytics code works just fine, AdSense performance tracking, as well as Yahoo tracking and other affiliate network codes are all OK here.<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>%%txn_id%%</code> = The Paid Transaction ID. Payment Gateways assign a unique identifier for every purchase.</li>' . "\n";
         echo '<li><code>%%amount%%</code> = The full Amount that you charged for Specific Post/Page Access. This value will <code>always be > 0</code>.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</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 '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em><strong>*Tip*</strong> With <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember Pro Forms</a>, it\'s possible to integrate Affiliate Coupon Codes. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code that you\'ve configured with optimizeMember Pro. Please check your Dashboard here: <code>optimizeMember -> Pro Coupon Codes -> Affiliate Coupon Codes</code>. This is a VERY powerful feature.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_sp_tracking", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_integrations_header", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_integrations_header", get_defined_vars());
         /**/
         echo '<div style="border-bottom:1px solid #DFDFDF; margin:-20px 0 9px 0; padding:0;">&nbsp;</div>' . "\n";
         // echo '<div id="icon-tools" class="icon32" style="margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0;"><br /></div>' . "\n";
         echo '<h2 style="margin-top:30px;">API / Tracking Integrations</h2>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_integrations_header", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_idev", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_idev", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Integrating iDevAffiliate">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-idev-section">' . "\n";
         echo '<h3>Integrating iDevAffiliate ( affiliate program management )</h3>' . "\n";
         echo '<a href="http://www.optimizepress.com/idev-affiliate" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/idev-logo.gif" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
         echo '<p>Adding affiliate tracking software to your site is one of the most effective ways to achieve more sales, more traffic, and more search engine ranking. <a href="http://www.optimizepress.com/idev-affiliate" target="_blank" rel="external">iDevAffiliate</a> ( an affiliate management portal ), installs in just minutes, and can be integrated seamlessly with optimizeMember. We recommend <a href="http://www.optimizepress.com/idev-affiliate" target="_blank" rel="external">iDevAffiliate Standard</a> ( $99 ) because of its proven track record, and its ability to integrate with optimizeMember using a variety of techniques. The most popular being a Hidden Image Tag.</p>' . "\n";
         echo '<p>If you choose to <a href="http://www.optimizepress.com/idev-affiliate" target="_blank" rel="external">install iDevAffiliate</a>, you will need to configure your <code>iDevAffiliate -> Shopping Cart Integration</code>. Please choose <code>Generic Tracking Pixel</code>. Then, grab your Hidden Image Tag, and pop the code provided by iDevAffiliate into one of the fields for Tracking Codes <em>( at the top of this page )</em>. You MUST also add Replacement Codes to your Hidden Image Tag. To save you some trouble, we\'ve provided some examples below, one for each of optimizeMember\'s Tracking Code integrations.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_during_idev", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Signup Tracking Code, for iDevAffiliate integration:</strong></p>' . "\n";
         echo '<p>idev_saleamt=<strong>%%initial%%</strong><br />idev_ordernum=<strong>%%subscr_id%%</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/idev-signup-tracking-code.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Modification Tracking Code, for iDevAffiliate integration:</strong></p>' . "\n";
         echo '<p>idev_saleamt=<strong>%%initial%%</strong><br />idev_ordernum=<strong>%%subscr_id%%</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/idev-modification-tracking-code.x-php")) . '</p>' . "\n";
         /**/
         if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             echo '<p><strong>Capability Tracking Code, for iDevAffiliate integration:</strong></p>' . "\n";
             echo '<p>idev_saleamt=<strong>%%amount%%</strong><br />idev_ordernum=<strong>%%txn_id%%</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/idev-ccap-tracking-code.x-php")) . '</p>' . "\n";
         }
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Specific Post/Page Tracking Code, for iDevAffiliate integration:</strong></p>' . "\n";
         echo '<p>idev_saleamt=<strong>%%amount%%</strong><br />idev_ordernum=<strong>%%txn_id%%</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/idev-sp-tracking-code.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p>Your <code>profile</code> ID will be assigned by iDevAffiliate. Be sure to replace <code>profile=123</code> with your own profile ID.</p>' . "\n";
         echo '<p><em><strong>*Tip*</strong> iDevAffiliate also provides an alternative method, using a 3rd-party call. The alternative 3rd-party call, could be used with <code>optimizeMember -> API Notifications.</code> A 3rd-party call, is essentially an HTTP connection that runs silently behind-the-scene, as opposed to being loaded in a browser. It\'s a bit more powerful (and reliable), but also more advanced.</em></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em><strong>*Tip*</strong> With <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember Pro Forms</a>, it\'s possible to integrate Affiliate Coupon Codes with iDevAffiliate. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code that you\'ve configured with optimizeMember Pro. Please check your Dashboard here: <code>optimizeMember -> Pro Coupon Codes -> Affiliate Coupon Codes</code>. This is a VERY powerful feature.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_idev", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_shareasale", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_shareasale", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Integrating ShareASale">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-shareasale-section">' . "\n";
         echo '<h3>Integrating ShareASale ( affiliate program management )</h3>' . "\n";
         echo '<a href="http://www.optimizepress.com/shareasale" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/sas-logo.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
         echo '<p>Established in 2000, <a href="http://www.optimizepress.com/shareasale" target="_blank" rel="external">ShareASale</a> provides award winning technology and service; which will enable you to connect with a network of established affiliates, as well as recruit new ones. Joining ShareASale, maximizes your ability to reach the greatest number of affiliates, with the least amount of work. At ShareASale, you\'ll have access to an existing affiliate-base. You place your site on the market, and let their existing affiliates promote your products/services.</p>' . "\n";
         echo '<p>If you <a href="http://www.optimizepress.com/shareasale" target="_blank" rel="external">become a Merchant at ShareASale</a>, you will need to configure your <code>ShareASale -> Sale Tracking</code>. Grab your Hidden Image Tag, and pop the code provided by ShareASale into one of the fields for Tracking Codes <em>( at the top of this page )</em>. You MUST also add Replacement Codes to your Hidden Image Tag. To save you some trouble, we\'ve provided some examples below, one for each of optimizeMember\'s Tracking Code integrations.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_during_shareasale", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Signup Tracking Code, for ShareASale integration:</strong></p>' . "\n";
         echo '<p>amount=<strong>%%initial%%</strong><br />tracking=<strong>%%subscr_id%%</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sas-signup-tracking-code.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Modification Tracking Code, for ShareASale integration:</strong></p>' . "\n";
         echo '<p>amount=<strong>%%initial%%</strong><br />tracking=<strong>%%subscr_id%%</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sas-modification-tracking-code.x-php")) . '</p>' . "\n";
         /**/
         if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             echo '<p><strong>Capability Tracking Code, for ShareASale integration:</strong></p>' . "\n";
             echo '<p>amount=<strong>%%amount%%</strong><br />tracking=<strong>%%txn_id%%</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sas-ccap-tracking-code.x-php")) . '</p>' . "\n";
         }
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Specific Post/Page Tracking Code, for ShareASale integration:</strong></p>' . "\n";
         echo '<p>amount=<strong>%%amount%%</strong><br />tracking=<strong>%%txn_id%%</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sas-sp-tracking-code.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p>Your <code>merchantID</code> will be assigned by ShareASale. Be sure to replace <code>merchantID=123</code> with the one they assign you.</p>' . "\n";
         echo '<p><em><strong>*Tip*</strong> ShareASale also provides an alternative method, using a 3rd-party call. The alternative 3rd-party call, could be used with <code>optimizeMember -> API Notifications.</code> A 3rd-party call, is essentially an HTTP connection that runs silently behind-the-scene, as opposed to being loaded in a browser. It\'s a bit more powerful (and reliable), but also more advanced.</em></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em><strong>*Tip*</strong> With <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember Pro Forms</a>, it\'s possible to integrate Affiliate Coupon Codes with ShareASale. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code that you\'ve configured with optimizeMember Pro. Please check your Dashboard here: <code>optimizeMember -> Pro Coupon Codes -> Affiliate Coupon Codes</code>. This is a VERY powerful feature.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_shareasale", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_other_methods", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_other_methods", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Other Tracking Methods Available">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-other-methods-section">' . "\n";
         echo '<h3>Other Tracking Methods Are Available ( there\'s always a way )</h3>' . "\n";
         echo '<p>Check the optimizeMember API Notifications panel. You\'ll find additional layers of automation available through the use of the `Signup`, `Registration`, `Payment`, `Modification`, `EOT/Deletion`, `Refund/Reversal`, and `Specific Post/Page` Notifications that are available to you through the optimizeMember API. The optimizeMember API Notifications make it possible to integrate with 3rd party applications; like list servers, affiliate programs, and other back-office routines; in more advanced ways. Since optimizeMember API Notifications operate silently on the back-end, they tend to be more reliable and also more versatile. That being said, nothing replaces the simplicity of Tracking Codes. The more advanced API Notifications are NOT always the best tool for the job. For instance, API Notifications will NOT work with Google Analytics, or 1 pixel &lt;img&gt; tags. They operate silently behind-the-scene, using HTTP connections, as opposed to being loaded in a browser.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_during_other_methods", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em><strong>*Tip*</strong> With <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember Pro Forms</a>, it\'s possible to integrate Affiliate Coupon Codes with iDevAffiliate. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code that you\'ve configured with optimizeMember Pro. Please check your Dashboard here: <code>optimizeMember -> Pro Coupon Codes -> Affiliate Coupon Codes</code>. This is a VERY powerful feature.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_other_methods", get_defined_vars());
     }
     /**/
     do_action("ws_plugin__optimizemember_during_trk_ops_page_after_left_sections", get_defined_vars());
     /**/
     // echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<p class="submit"><input type="submit" class="op-pb-button green" value="Save All Changes" /></p>' . "\n";
     /**/
     echo '</form>' . "\n";
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
Ejemplo n.º 21
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /**/
     echo '<div class="op-bsw-header">';
     echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
     echo '</div>';
     echo '<div class="op-bsw-main-content">';
     echo '<h2>OptimizeMember Pro ( Import/Export Tools )</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() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site()) {
         echo '<div class="ws-menu-page-group" title="User/Member CSV Importation"' . ($_POST["ws_plugin__optimizemember_pro_import_users"] ? ' default-state="open"' : '') . '>' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-user-importation-section">' . "\n";
         echo '<h3>User/Member Importation ( upload file / or direct input )</h3>' . "\n";
         echo '<p>Import files can be uploaded in CSV format, or you can copy/paste data into the form field provided. In either case, you MUST follow the examples given below. Please double-check your data before clicking the Import button. Make sure that all data fields are properly encapsulated by double-quotes, and separated by commas. You\'ll also need to make sure that all of your data fields are in the proper order, based on the examples given below. After importing Users/Members, you can inspect your work by going to: <code>WordPress -> Users</code>.</p>' . "\n";
         echo '<p><em><strong>*No Email Notification*</strong> This import routine works silently. Users/Members will NOT be contacted by optimizeMember; that is, unless you have another plugin installed that conflicts with optimizeMember\'s ability to perform the Import properly. You should always test one or two accounts before importing a large number of Users all at once. If you want Users/Members to be contacted, you can add them manually, by going to <code>WordPress -> Users -> Add New</code>, and selecting one of the optimizeMember Roles from the drop-down menu.</em></p>' . "\n";
         echo version_compare(PHP_VERSION, "5.3", "<") ? '<p><em><strong>*PHP v5.3+ recommended*</strong> In order for optimizeMember to properly import CSV files containing escape sequences, PHP v5.3 or higher is required. While optimizeMember may be able to parse import files in most cases, PHP v5.3 provides the best stability.</em></p>' . "\n" : '';
         echo '<p><em><strong class="ws-menu-page-hilite">*IMPORTANT NOTICE*</strong> optimizeMember\'s import format changed in optimizeMember Pro v130203+ ( with respect to Custom Registration/Profile Fields only ). If you are importing Custom Fields, please review <a href="http://www.optimizepress.com/kb/importing-updating-users/#custom-registration-profile-fields" target="_blank" rel="external nofollow x-link">this article</a> before you import new Users/Members or mass update any existing Users/Members. <strong>VERY important!</strong></em></p>' . "\n";
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form method="post" enctype="multipart/form-data" name="ws_plugin__optimizemember_pro_import_users_form" id="ws-plugin--optimizemember-pro-import-users-form">' . "\n";
         echo '<input type="hidden" name="ws_plugin__optimizemember_pro_import_users" id="ws-plugin--optimizemember-pro-import-users" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-pro-import-users")) . '" />' . "\n";
         /**/
         echo '<input type="file" name="ws_plugin__optimizemember_pro_import_users_file" id="ws-plugin--optimizemember-pro-import-users-file" />&nbsp;&nbsp;&nbsp;(up to 1000 lines per file)&nbsp;&nbsp;&nbsp;<input type="submit" class="button-primary" value="Import Now" /><br /><br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_pro_import_users_direct_input" id="ws-plugin--optimizemember-pro-import-users-direct-input" rows="10" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit(trim(stripslashes($_POST["ws_plugin__optimizemember_pro_import_users_direct_input"]))) . '</textarea><br />' . "\n";
         /**/
         echo 'One User/Member per line please. Here is a quick example:<br />' . "\n";
         echo '<code>"ID","Username","First Name","Last Name","Display Name","Email"</code>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo 'If you fill the ID field, the Import routine will update an account matching the ID you specify ( so long as the account ID does NOT belong to an Administrator, this is for security ). When importing new Users/Members, you can leave the ID field empty Don\'t remove it, just leave it empty ( i.e. <code>""</code> ).<br /><br />' . "\n";
         /**/
         echo 'Example: <code>"","Username","First Name","Last Name","Display Name","Email"</code><br /><br />' . "\n";
         /**/
         echo 'Additional extended information can also be included; even Custom Registration/Profile Fields:<br />' . "\n";
         echo '<code>"ID","Username","First Name","Last Name","Display Name","Email","Website","Level[0-9]+ or Role ID","Custom Capabilities","Registration Date ( mm/dd/yyyy )","First Payment Date ( mm/dd/yyyy )","Last Payment Date ( mm/dd/yyyy )","Auto-EOT Date ( mm/dd/yyyy )","Custom Value ( starts w/domain )","Paid Subscr. ID","Paid Subscr. Gateway","Custom Field Value","Another Custom Field Value", ...</code><br /><br />' . "\n";
         /**/
         echo 'Here is a full example with all fields filled in, including extended details; and two Custom Field values:<br />' . "\n";
         echo '<code>"","johnsmith22","John","Smith","John Smith","*****@*****.**","http://www.example.com/","2","music,videos","12/31/2000","01/10/2001","12/31/2020","12/31/2021","www.example.com|123.357.125.654","I-2342934SSER243","paypal","fishing,biking,computers","xx-large"</code><br /><br />' . "\n";
         /**/
         echo 'Here is a full example with some fields left empty:<br />' . "\n";
         echo '<code>"","johnsmith22","John","Smith","John Smith","*****@*****.**","","optimizemember_level2","","","","","12/31/2021"</code>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<em>* If you supply a Paid Subscr. Gateway, you must use one of these values: <code>paypal</code>, <code>alipay</code>, <code>authnet</code>, <code>ccbill</code>, <code>clickbank</code>, <code>google</code>.</em><br /><br />' . "\n";
         /**/
         echo '<em>* If you supply Custom Fields, your Custom Field values should be listed in alphabetical order, based on your Custom Field IDs (i.e. values listed in the order of your alphabetized Custom Field IDs). This is based on the Custom Field IDs you\'ve configured with optimizeMember. See: <code>optimizeMember -> General Options -> Registration/Profile Fields</code>. In the example above, you will see two Custom Field values (<code>... "fishing,biking,computers","xx-large"</code>). The first value comes first, because it maps to the Custom Field ID <code>interests</code>, and the second one comes last, because it maps to the Custom Field ID <code>t_shirt_size</code> (e.g. alphabetical order — based on the underlying Custom Field IDs that you\'re mapping this data to).</em><br /><br />' . "\n";
         echo '<em>* If you have a Custom Field that contains an array of multiple values, you can import the array using PHP\'s <a href="http://php.net/manual/en/function.serialize.php" target="_blank" rel="external">serialize()</a> function. This allows you to convert the array into a string representation. optimizeMember will automatically unserialize the value during importation. If you have any trouble, please perform an export first. optimizeMember\'s export files are already formatted for easy re-importation. In other words, you can use them as a guideline for building your own import files.</em><br /><br />' . "\n";
         /**/
         echo '<em>* If you supply "First Payment Date", you have two options available. You can either supply a simple date in this format ( mm/dd/yyyy ), or you can import an array of First Payment Dates, in the form of Unix timestamps. optimizeMember has the ability to record and monitor First Payment Dates at each specific Membership Level. The array it expects, consists of the following: <code>array("level" => [timestamp of first payment date regardless of level], "level1" => [timestamp of first payment date at level #1], "level2" => [timestamp], "level3" => [timestamp], "level4" => [timestamp])</code>. Of course, if you decide to import an array with some of these timestamps, you will need to use PHP\'s <a href="http://php.net/manual/en/function.serialize.php" target="_blank" rel="external">serialize()</a> function to convert the array into a string representation. If you have any trouble, please perform an export first. optimizeMember\'s export files are already formatted for easy re-importation. In other words, you can use them as a guideline for building your own import files. By default, optimizeMember exports an array of timestamps.</em>' . "\n";
         /**/
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     } else {
         echo '<div class="ws-menu-page-group" title="User/Member CSV Importation"' . (isset($_POST["ws_plugin__optimizemember_pro_import_users"]) ? ' default-state="open"' : '') . '>' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-user-importation-section">' . "\n";
         echo '<h3>User/Member Importation ( upload file / or direct input )</h3>' . "\n";
         echo '<p>Import files can be uploaded in CSV format, or you can copy/paste data into the form field provided. In either case, you MUST follow the examples given below. Please double-check your data before clicking the Import button. Make sure that all data fields are properly encapsulated by double-quotes, and separated by commas. You\'ll also need to make sure that all of your data fields are in the proper order, based on the examples given below. After importing Users/Members, you can inspect your work by going to: <code>WordPress -> Users</code>.</p>' . "\n";
         echo '<p><em><strong>*No Email Notification*</strong> This import routine works silently. Users/Members will NOT be contacted by optimizeMember; that is, unless you have another plugin installed that conflicts with optimizeMember\'s ability to perform the Import properly. You should always test one or two accounts before importing a large number of Users all at once. If you want Users/Members to be contacted, you can add them manually, by going to <code>WordPress -> Users -> Add New</code>, and selecting one of the optimizeMember Roles from the drop-down menu.</em></p>' . "\n";
         echo version_compare(PHP_VERSION, "5.3", "<") ? '<p><em><strong>*PHP v5.3+ recommended*</strong> In order for optimizeMember to properly import CSV files containing escape sequences, PHP v5.3 or higher is required. While optimizeMember may be able to parse import files in most cases, PHP v5.3 provides the best stability.</em></p>' . "\n" : '';
         echo '<p><em><strong class="ws-menu-page-hilite">*IMPORTANT NOTICE*</strong> optimizeMember\'s import format changed in optimizeMember Pro v130203+ ( with respect to Custom Registration/Profile Fields only ). If you are importing Custom Fields, please review <a href="http://www.optimizepress.com/kb/importing-updating-users/#custom-registration-profile-fields" target="_blank" rel="external nofollow x-link">this article</a> before you import new Users/Members or mass update any existing Users/Members. <strong>VERY important!</strong></em></p>' . "\n";
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form method="post" enctype="multipart/form-data" name="ws_plugin__optimizemember_pro_import_users_form" id="ws-plugin--optimizemember-pro-import-users-form">' . "\n";
         echo '<input type="hidden" name="ws_plugin__optimizemember_pro_import_users" id="ws-plugin--optimizemember-pro-import-users" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-pro-import-users")) . '" />' . "\n";
         /**/
         echo '<input type="file" name="ws_plugin__optimizemember_pro_import_users_file" id="ws-plugin--optimizemember-pro-import-users-file" />&nbsp;&nbsp;&nbsp;(up to 1000 lines per file)&nbsp;&nbsp;&nbsp;<input type="submit" class="button-primary" value="Import Now" /><br /><br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_pro_import_users_direct_input" id="ws-plugin--optimizemember-pro-import-users-direct-input" rows="10" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit(trim(stripslashes($_POST["ws_plugin__optimizemember_pro_import_users_direct_input"]))) . '</textarea><br />' . "\n";
         /**/
         echo 'One User/Member per line please. Here is a quick example:<br />' . "\n";
         echo '<code>"ID","Username","Password","First Name","Last Name","Display Name","Email"</code><br /><br />' . "\n";
         /**/
         echo 'If you fill the ID field, the Import routine will update an account matching the ID you specify ( so long as the account ID does NOT belong to an Administrator, this is for security ). When importing new Users/Members, you can leave the ID field empty Don\'t remove it, just leave it empty ( i.e. <code>""</code> ).<br /><br />' . "\n";
         /**/
         echo 'Example: <code>"","Username","First Name","Last Name","Display Name","Email"</code>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo 'Additional extended information can also be included; even Custom Registration/Profile Fields:<br />' . "\n";
         //echo 'Please see this KB article for more detailed instructions: <a href="http://www.optimizepress.com/kb/importing-updating-users/" target="_blank" rel="external nofollow x-link">Import (Or Mass Update Users)</a>' . "\n";
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     echo '<div class="ws-menu-page-group" title="User/Member CSV Exportation">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-user-exportation-section">' . "\n";
     echo '<h3>User/Member Exportation ( download CSV export files )</h3>' . "\n";
     /**/
     echo '<form method="post" name="ws_plugin__optimizemember_pro_export_users_form" id="ws-plugin--optimizemember-pro-export-users-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_pro_export_users" id="ws-plugin--optimizemember-pro-export-users" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-pro-export-users")) . '" />' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-export-users-format">' . "\n";
     echo 'CSV File Preference:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<select name="ws_plugin__optimizemember_pro_export_users_format" id="ws-plugin--optimizemember-pro-export-users-format">' . "\n";
     echo '<option value="" selected="selected">Default ( CSV, perfectly formatted for easy re-importation )</option>' . "\n";
     echo '<option value="readable">Easy-Read ( CSV w/ improved readability; CANNOT be re-imported )</option>' . "\n";
     echo '</select><br />' . "\n";
     echo '<em>Open CSV files with Notepad, MS Excel, or <a href="http://www.openoffice.org/" target="_blank" rel="external">OpenOffice</a> ( recommended ).</em>';
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-export-users-start">' . "\n";
     echo 'CSV File Exportation:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo 'You have a total of ' . number_format(c_ws_plugin__optimizemember_utils_users::users_in_database()) . ' User/Member rows in the database' . (is_multisite() ? ' for this site' : '') . '.<br />' . "\n";
     echo 'You can export up to 1000 database rows in each file; starting from a particular row that you specify.<br />' . "\n";
     echo 'Export, starting with row#: <input type="text" autocomplete="off" name="ws_plugin__optimizemember_pro_export_users_start" id="ws-plugin--optimizemember-pro-export-users-start" style="width:100px;" value="1" class="input-inline" /> <input type="submit" class="button-primary" value="Export Now" />' . "\n";
     /**/
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<em>Please note. Export files do NOT contain Passwords. Passwords are stored by WordPress with one-way encryption. In other words, it\'s not possible for optimizeMember to include them in the export file. However, this does NOT create a problem, because when/if you re-import existing Users/Members with the Password field empty, optimizeMember will simply keep the existing Password that is already on file. For further information, please read all Import instructions, regarding Passwords.</em>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</form>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="optimizeMember Options ( Import/Export )"' . (isset($_POST["ws_plugin__optimizemember_pro_import_ops"]) ? ' default-state="open"' : '') . '>' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-ops-importation-exportation-section">' . "\n";
     /**/
     echo '<h3 style="margin-bottom:5px;">optimizeMember Options Export <small>( <a href="' . esc_attr(site_url("/?ws_plugin__optimizemember_pro_export_ops=" . urlencode(wp_create_nonce("ws-plugin--optimizemember-pro-export-ops")))) . '">download serialized export file</a> )</small></h3>' . "\n";
     echo '<p style="margin-top:5px;">This allows you to export your current optimizeMember configuration, and then import it into another instance of WordPress.' . "\n";
     /**/
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<h3 style="margin-bottom:5px;">optimizeMember Options Import <small>( upload your serialized export file )</small></h3>' . "\n";
     echo '<p style="margin-top:5px;">This allows you to import your optimizeMember configuration export file, from another instance of WordPress.' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form method="post" enctype="multipart/form-data" name="ws_plugin__optimizemember_pro_import_ops_form" id="ws-plugin--optimizemember-pro-import-ops-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_pro_import_ops" id="ws-plugin--optimizemember-pro-import-ops" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-pro-import-ops")) . '" />' . "\n";
     echo '<input type="file" name="ws_plugin__optimizemember_pro_import_ops_file" id="ws-plugin--optimizemember-pro-import-ops-file" />&nbsp;&nbsp;&nbsp;<input type="submit" class="button-primary" value="Import Now" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
Ejemplo n.º 22
0
 /**
  * Shortcode `[optimizeMember-Pro-AuthNet-Form /]`.
  *
  * @package optimizeMember\AuthNet
  * @since 1.5
  *
  * @attaches-to ``add_shortcode("optimizeMember-Pro-AuthNet-Form");``
  *
  * @param array $attr An array of Attributes.
  * @param str $content Content inside the Shortcode.
  * @param str $shortcode The actual Shortcode name itself.
  * @return str The resulting Form Code, HTML markup.
  */
 public static function sc_authnet_form($attr = FALSE, $content = FALSE, $shortcode = FALSE)
 {
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_pro_before_sc_authnet_form", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     c_ws_plugin__optimizemember_no_cache::no_cache_constants(true);
     /**/
     $attr = c_ws_plugin__optimizemember_utils_strings::trim_qts_deep((array) $attr);
     /**/
     $attr = shortcode_atts(array("ids" => "0", "exp" => "72", "level" => $attr["register"] ? "0" : "1", "ccaps" => "", "desc" => "", "cc" => "USD", "custom" => $_SERVER["HTTP_HOST"], "ta" => "0", "tp" => "0", "tt" => "D", "ra" => "0.01", "rp" => "1", "rt" => "M", "rr" => "1", "rrt" => "", "modify" => "0", "cancel" => "0", "sp" => "0", "register" => "0", "update" => "0", "accept" => "visa,mastercard,amex,discover", "coupon" => "", "accept_coupons" => "0", "default_country_code" => "US", "captcha" => "", "template" => "", "success" => ""), $attr);
     /**/
     $attr["tt"] = strtoupper($attr["tt"]);
     $attr["rt"] = strtoupper($attr["rt"]);
     $attr["rr"] = strtoupper($attr["rr"]);
     $attr["ccaps"] = strtolower($attr["ccaps"]);
     $attr["rr"] = $attr["rt"] === "L" ? "BN" : $attr["rr"];
     $attr["rr"] = $attr["level"] === "*" ? "BN" : $attr["rr"];
     $attr["rr"] = !$attr["tp"] && !$attr["rr"] ? "BN" : $attr["rr"];
     $attr["cc"] = "USD";
     $attr["default_country_code"] = strtoupper($attr["default_country_code"]);
     $attr["success"] = c_ws_plugin__optimizemember_utils_urls::n_amps($attr["success"]);
     /**/
     $attr["accept"] = trim($attr["accept"]) ? preg_split("/[;,]+/", preg_replace("/[\r\n\t\\s]+/", "", strtolower($attr["accept"]))) : array();
     $attr["accept"] = empty($attr["accept"]) ? array_merge($attr["accept"], array("visa")) : $attr["accept"];
     /**/
     $attr["coupon"] = $_GET["s2p-coupon"] ? trim(strip_tags(stripslashes($_GET["s2p-coupon"]))) : $attr["coupon"];
     /**/
     $attr["singular"] = get_the_ID();
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_pro_before_sc_authnet_form_after_shortcode_atts", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     if ($attr["cancel"]) {
         $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
         /*
         Obtain a possible response and/or validation error.
         */
         $response = c_ws_plugin__optimizemember_pro_authnet_responses::authnet_cancellation_response($attr);
         /*
         Empty post vars on successful response.
         */
         $_p = $response["response"] && !$response["error"] ? array() : $_p;
         /*
         Build the reCaptcha box via JavaScript.
         */
         if ($attr["captcha"]) {
             $captcha = '<div id="s2member-pro-authnet-cancellation-form-captcha-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-cancellation-form-section s2member-pro-authnet-form-captcha-section s2member-pro-authnet-cancellation-form-captcha-section">' . "\n";
             /**/
             $captcha .= '<div id="s2member-pro-authnet-cancellation-form-captcha-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-cancellation-form-section-title s2member-pro-authnet-form-captcha-section-title s2member-pro-authnet-cancellation-form-captcha-section-title">' . "\n";
             $captcha .= _x("Security Code", "s2member-front", "s2member") . "\n";
             $captcha .= '</div>' . "\n";
             /**/
             $captcha .= '<div id="s2member-pro-authnet-cancellation-form-captcha-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-cancellation-form-div s2member-pro-authnet-form-captcha-div s2member-pro-authnet-cancellation-form-captcha-div">' . "\n";
             /**/
             $captcha .= '<label id="s2member-pro-authnet-cancellation-form-captcha-label" class="s2member-pro-authnet-form-captcha-label s2member-pro-authnet-cancellation-form-captcha-label">' . "\n";
             $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr["captcha"], 10) . "\n";
             $captcha .= '</label>' . "\n";
             /**/
             $captcha .= '</div>' . "\n";
             /**/
             $captcha .= '</div>' . "\n";
         }
         /*
         Build the hidden input variables.
         */
         $hidden_inputs = '<input type="hidden" name="optimizemember_pro_authnet_cancellation[nonce]" id="s2member-pro-authnet-cancellation-nonce" value="' . esc_attr(wp_create_nonce("s2member-pro-authnet-cancellation")) . '" />';
         $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_authnet_cancellation[attr]" id="s2member-pro-authnet-cancellation-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
         /*
         Get the form template.
         */
         $custom_template = file_exists(TEMPLATEPATH . "/authnet-cancellation-form.php") ? TEMPLATEPATH . "/authnet-cancellation-form.php" : false;
         $custom_template = file_exists(TEMPLATEPATH . "/authnet-cancellation-form.html") ? TEMPLATEPATH . "/authnet-cancellation-form.html" : $custom_template;
         $custom_template = $attr["template"] && file_exists(TEMPLATEPATH . "/" . $attr["template"]) ? TEMPLATEPATH . "/" . $attr["template"] : $custom_template;
         $custom_template = $attr["template"] && file_exists(WP_CONTENT_DIR . "/" . $attr["template"]) ? WP_CONTENT_DIR . "/" . $attr["template"] : $custom_template;
         /**/
         $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . "/templates/forms/authnet-cancellation-form.php"));
         $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
         /*
         Fill in the action.
         */
         $code = preg_replace("/%%action%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["REQUEST_URI"])), $code);
         /*
         Fill in the response.
         */
         $code = preg_replace("/%%response%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($response["response"]), $code);
         /*
         Fill in the description.
         */
         $code = preg_replace("/%%description%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($attr["desc"]), $code);
         /*
         Fill the captcha section.
         */
         $code = preg_replace("/%%captcha%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($captcha), $code);
         /*
         Fill hidden inputs.
         */
         $code = preg_replace("/%%hidden_inputs%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($hidden_inputs), $code);
         /**/
         eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
         do_action("ws_plugin__optimizemember_pro_during_sc_authnet_cancellation_form", get_defined_vars());
         unset($__refs, $__v);
         /* Unset defined __refs, __v. */
     } else {
         if ($attr["register"]) {
             $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
             /*
             Obtain a possible response and/or validation error.
             */
             $response = c_ws_plugin__optimizemember_pro_authnet_responses::authnet_registration_response($attr);
             /*
             Empty post vars on successful response.
             */
             $_p = $response["response"] && !$response["error"] ? array() : $_p;
             /*
             Build all of the custom fields.
             */
             if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_fields"]) {
                 /* Only display Custom Fields if configured. */
                 if ($fields_applicable = c_ws_plugin__optimizemember_custom_reg_fields::custom_fields_configured_at_level($attr["level"], "registration")) {
                     $tabindex = 99;
                     /* Start tabindex at 99 ( +1 below = 100 ). */
                     /**/
                     $custom_fields = '<div id="s2member-pro-authnet-registration-form-custom-fields-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-registration-form-section s2member-pro-authnet-form-custom-fields-section s2member-pro-authnet-registration-form-custom-fields-section">' . "\n";
                     /**/
                     $custom_fields .= '<div id="s2member-pro-authnet-registration-form-custom-fields-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-registration-form-section-title s2member-pro-authnet-form-custom-fields-section-title s2member-pro-authnet-registration-form-custom-fields-section-title">' . "\n";
                     $custom_fields .= _x("Additional Info", "s2member-front", "s2member") . "\n";
                     $custom_fields .= '</div>' . "\n";
                     /**/
                     foreach (json_decode($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_fields"], true) as $field) {
                         if (in_array($field["id"], $fields_applicable)) {
                             $field_var = preg_replace("/[^a-z0-9]/i", "_", strtolower($field["id"]));
                             $field_id_class = preg_replace("/_/", "-", $field_var);
                             /**/
                             if (!empty($field["section"]) && $field["section"] === "yes") {
                                 /* Starts a new section? */
                                 $custom_fields .= '<div id="s2member-pro-authnet-registration-form-custom-reg-field-' . $field_id_class . '-divider-section" class="s2member-pro-authnet-form-div s2member-pro-authnet-registration-form-div s2member-pro-authnet-form-custom-reg-field-divider-section' . (!empty($field["sectitle"]) ? '-title' : '') . ' s2member-pro-authnet-form-custom-reg-field-' . $field_id_class . '-divider-section' . (!empty($field["sectitle"]) ? '-title' : '') . ' s2member-pro-authnet-registration-form-custom-reg-field-' . $field_id_class . '-divider-section' . (!empty($field["sectitle"]) ? '-title' : '') . '">' . (!empty($field["sectitle"]) ? $field["sectitle"] : '') . '</div>';
                             }
                             /**/
                             $custom_fields .= '<div id="s2member-pro-authnet-registration-form-custom-reg-field-' . $field_id_class . '-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-registration-form-div s2member-pro-authnet-form-custom-reg-field-' . $field_id_class . '-div s2member-pro-authnet-registration-form-custom-reg-field-' . $field_id_class . '-div">' . "\n";
                             /**/
                             $custom_fields .= '<label for="s2member-pro-authnet-registration-custom-reg-field-' . esc_attr($field_id_class) . '" id="s2member-pro-authnet-registration-form-custom-reg-field-' . $field_id_class . '-label" class="s2member-pro-authnet-form-custom-reg-field-' . $field_id_class . '-label s2member-pro-authnet-registration-form-custom-reg-field-' . $field_id_class . '-label">' . "\n";
                             $custom_fields .= '<span' . (preg_match("/^(checkbox|pre_checkbox)\$/", $field["type"]) ? ' style="display:none;"' : '') . '>' . $field["label"] . ($field["required"] === "yes" ? ' *' : '') . '</span></label>' . (preg_match("/^(checkbox|pre_checkbox)\$/", $field["type"]) ? '' : '<br />') . "\n";
                             $custom_fields .= c_ws_plugin__optimizemember_custom_reg_fields::custom_field_gen(__FUNCTION__, $field, "optimizemember_pro_authnet_registration[custom_fields][", "s2member-pro-authnet-registration-custom-reg-field-", "s2member-pro-authnet-custom-reg-field-" . $field_id_class . " s2member-pro-authnet-registration-custom-reg-field-" . $field_id_class, "", $tabindex = $tabindex + 1, "", $_p, $_p["optimizemember_pro_authnet_registration"]["custom_fields"][$field_var], "registration");
                             /**/
                             $custom_fields .= '</div>' . "\n";
                         }
                     }
                     /**/
                     $custom_fields .= '</div>' . "\n";
                 }
             }
             /*
             Build the reCaptcha box via JavaScript.
             */
             if ($attr["captcha"]) {
                 $captcha = '<div id="s2member-pro-authnet-registration-form-captcha-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-registration-form-section s2member-pro-authnet-form-captcha-section s2member-pro-authnet-registration-form-captcha-section">' . "\n";
                 /**/
                 $captcha .= '<div id="s2member-pro-authnet-registration-form-captcha-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-registration-form-section-title s2member-pro-authnet-form-captcha-section-title s2member-pro-authnet-registration-form-captcha-section-title">' . "\n";
                 $captcha .= _x("Security Code", "s2member-front", "s2member") . "\n";
                 $captcha .= '</div>' . "\n";
                 /**/
                 $captcha .= '<div id="s2member-pro-authnet-registration-form-captcha-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-registration-form-div s2member-pro-authnet-form-captcha-div s2member-pro-authnet-registration-form-captcha-div">' . "\n";
                 /**/
                 $captcha .= '<label id="s2member-pro-authnet-registration-form-captcha-label" class="s2member-pro-authnet-form-captcha-label s2member-pro-authnet-registration-form-captcha-label">' . "\n";
                 $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr["captcha"], 200) . "\n";
                 $captcha .= '</label>' . "\n";
                 /**/
                 $captcha .= '</div>' . "\n";
                 /**/
                 $captcha .= '</div>' . "\n";
             }
             /*
             Build the opt-in checkbox.
             */
             if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_opt_in"] && c_ws_plugin__optimizemember_list_servers::list_servers_integrated()) {
                 $opt_in = '<div id="s2member-pro-authnet-registration-form-custom-reg-field-opt-in-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-registration-form-div s2member-pro-authnet-form-custom-reg-field-opt-in-div s2member-pro-authnet-registration-form-custom-reg-field-opt-in-div">' . "\n";
                 /**/
                 $opt_in .= '<label for="s2member-pro-authnet-registration-form-custom-reg-field-opt-in" id="s2member-pro-authnet-registration-form-custom-reg-field-opt-in-label" class="s2member-pro-authnet-form-custom-reg-field-opt-in-label s2member-pro-authnet-registration-form-custom-reg-field-opt-in-label">' . "\n";
                 $opt_in .= '<input type="checkbox" name="optimizemember_pro_authnet_registration[custom_fields][opt_in]" id="s2member-pro-authnet-registration-form-custom-reg-field-opt-in" class="s2member-pro-authnet-form-custom-reg-field-opt-in s2member-pro-authnet-registration-form-custom-reg-field-opt-in" value="1"' . (empty($_p) && $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_opt_in"] == 1 || $_p["optimizemember_pro_authnet_registration"]["custom_fields"]["opt_in"] ? ' checked="checked"' : '') . ' tabindex="300" />' . "\n";
                 $opt_in .= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_opt_in_label"] . "\n";
                 $opt_in .= '</label>' . "\n";
                 /**/
                 $opt_in .= '</div>' . "\n";
             }
             /*
             Build the hidden input variables.
             */
             $hidden_inputs = '<input type="hidden" name="optimizemember_pro_authnet_registration[nonce]" id="s2member-pro-authnet-registration-nonce" value="' . esc_attr(wp_create_nonce("s2member-pro-authnet-registration")) . '" />';
             $hidden_inputs .= !$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_names"] ? '<input type="hidden" id="s2member-pro-authnet-registration-names-not-required-or-not-possible" value="1" />' : '';
             $hidden_inputs .= !$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_password"] ? '<input type="hidden" id="s2member-pro-authnet-registration-password-not-required-or-not-possible" value="1" />' : '';
             $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_authnet_registration[attr]" id="s2member-pro-authnet-registration-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
             /*
             Get the form template.
             */
             $custom_template = file_exists(TEMPLATEPATH . "/authnet-registration-form.php") ? TEMPLATEPATH . "/authnet-registration-form.php" : false;
             $custom_template = file_exists(TEMPLATEPATH . "/authnet-registration-form.html") ? TEMPLATEPATH . "/authnet-registration-form.html" : $custom_template;
             $custom_template = $attr["template"] && file_exists(TEMPLATEPATH . "/" . $attr["template"]) ? TEMPLATEPATH . "/" . $attr["template"] : $custom_template;
             $custom_template = $attr["template"] && file_exists(WP_CONTENT_DIR . "/" . $attr["template"]) ? WP_CONTENT_DIR . "/" . $attr["template"] : $custom_template;
             /**/
             $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . "/templates/forms/authnet-registration-form.php"));
             $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
             /*
             Fill in the action.
             */
             $code = preg_replace("/%%action%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["REQUEST_URI"])), $code);
             /*
             Fill in the response.
             */
             $code = preg_replace("/%%response%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($response["response"]), $code);
             /*
             Fill in the description.
             */
             $code = preg_replace("/%%description%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($attr["desc"]), $code);
             /*
             Fill in the registration section.
             */
             $code = preg_replace("/%%first_name_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_p["optimizemember_pro_authnet_registration"]["first_name"])), $code);
             $code = preg_replace("/%%last_name_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_p["optimizemember_pro_authnet_registration"]["last_name"])), $code);
             $code = preg_replace("/%%email_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_registration"]["email"])), $code);
             $code = preg_replace("/%%username_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_registration"]["username"])), $code);
             $code = preg_replace("/%%password1_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_registration"]["password1"])), $code);
             $code = preg_replace("/%%password2_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_registration"]["password2"])), $code);
             /*
             Fill in the custom fields section.
             */
             $code = preg_replace("/%%custom_fields%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($custom_fields), $code);
             /*
             Fill the captcha section.
             */
             $code = preg_replace("/%%captcha%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($captcha), $code);
             /*
             Fill the opt-in box.
             */
             $code = preg_replace("/%%opt_in%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($opt_in), $code);
             /*
             Fill hidden inputs.
             */
             $code = preg_replace("/%%hidden_inputs%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($hidden_inputs), $code);
             /**/
             eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
             do_action("ws_plugin__optimizemember_pro_during_sc_authnet_registration_form", get_defined_vars());
             unset($__refs, $__v);
             /* Unset defined __refs, __v. */
         } else {
             if ($attr["update"]) {
                 $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
                 /*
                 Obtain a possible response and/or validation error.
                 */
                 $response = c_ws_plugin__optimizemember_pro_authnet_responses::authnet_update_response($attr);
                 /*
                 Empty post vars on successful response.
                 */
                 $_p = $response["response"] && !$response["error"] ? array() : $_p;
                 /*
                 Build the list of card type options.
                 */
                 foreach (array("Visa" => _x("Visa", "s2member-front", "s2member"), "MasterCard" => _x("MasterCard", "s2member-front", "s2member"), "Discover" => _x("Discover", "s2member-front", "s2member"), "Amex" => _x("American Express", "s2member-front", "s2member")) as $card_type_v => $card_type_l) {
                     $card_type_options .= '<label for="s2member-pro-authnet-update-card-type-' . esc_attr(strtolower($card_type_v)) . '" id="s2member-pro-authnet-update-form-card-type-' . esc_attr(strtolower($card_type_v)) . '-label" class="s2member-pro-authnet-form-card-type-label s2member-pro-authnet-update-form-card-type-label s2member-pro-authnet-form-card-type-' . esc_attr(strtolower($card_type_v)) . '-label s2member-pro-authnet-update-form-card-type-' . esc_attr(strtolower($card_type_v)) . '-label' . (!in_array(strtolower($card_type_v), $attr["accept"]) ? ' disabled' : '') . '">' . "\n" . '<input type="radio" aria-required="true" name="optimizemember_pro_authnet_update[card_type]" id="s2member-pro-authnet-update-card-type-' . esc_attr(strtolower($card_type_v)) . '" class="s2member-pro-authnet-card-type-' . esc_attr(strtolower($card_type_v)) . ' s2member-pro-authnet-update-card-type-' . esc_attr(strtolower($card_type_v)) . '" value="' . esc_attr($card_type_v) . '"' . (!empty($_p["optimizemember_pro_authnet_update"]["card_type"]) && in_array(strtolower($_p["optimizemember_pro_authnet_update"]["card_type"]), $attr["accept"]) && $_p["optimizemember_pro_authnet_update"]["card_type"] === $card_type_v ? ' checked="checked"' : '') . (!in_array(strtolower($card_type_v), $attr["accept"]) ? ' disabled="disabled"' : '') . ' tabindex="10" />' . "\n" . '</label>';
                 }
                 /*
                 Build the list of country code options.
                 $country_default_by_currency = false. Authorize.Net always processes in USD, so the country is empty by default.
                 Authorize.Net always processes in USD. International transactions are converted automatically through banking institutions.
                 */
                 $country_default_by_currency = !$_p["optimizemember_pro_authnet_update"]["country"] && $attr["cc"] === "USD" ? "US" : $country_default_by_currency;
                 $country_default_by_currency = !$_p["optimizemember_pro_authnet_update"]["country"] && $attr["cc"] === "CAD" ? "CA" : $country_default_by_currency;
                 $country_default_by_currency = !$_p["optimizemember_pro_authnet_update"]["country"] && $attr["cc"] === "GBP" ? "GB" : $country_default_by_currency;
                 $country_default_by_currency = apply_filters("ws_plugin__optimizemember_pro_authnet_default_country", false, get_defined_vars());
                 /**/
                 $default_country_v = $attr["default_country_code"] ? $attr["default_country_code"] : $country_default_by_currency;
                 /**/
                 $country_options = '<option value=""></option>';
                 /* Start with an empty option value. */
                 /**/
                 foreach (preg_split("/[\r\n]+/", file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . "/iso-3166-1.txt")) as $country) {
                     list($country_l, $country_v) = preg_split("/;/", $country, 2);
                     /**/
                     if ($country_l && $country_v) {
                         /* Here we also check on the default pre-selected country; as determined above; based on currency. */
                         $country_options .= '<option value="' . esc_attr(strtoupper($country_v)) . '"' . ($_p["optimizemember_pro_authnet_update"]["country"] === $country_v || $default_country_v === $country_v ? ' selected="selected"' : '') . '>' . esc_html(ucwords(strtolower($country_l))) . '</option>';
                     }
                 }
                 /*
                 Build the reCaptcha box via JavaScript.
                 */
                 if ($attr["captcha"]) {
                     $captcha = '<div id="s2member-pro-authnet-update-form-captcha-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-update-form-section s2member-pro-authnet-form-captcha-section s2member-pro-authnet-update-form-captcha-section">' . "\n";
                     /**/
                     $captcha .= '<div id="s2member-pro-authnet-update-form-captcha-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-update-form-section-title s2member-pro-authnet-form-captcha-section-title s2member-pro-authnet-update-form-captcha-section-title">' . "\n";
                     $captcha .= _x("Security Code", "s2member-front", "s2member") . "\n";
                     $captcha .= '</div>' . "\n";
                     /**/
                     $captcha .= '<div id="s2member-pro-authnet-update-form-captcha-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-update-form-div s2member-pro-authnet-form-captcha-div s2member-pro-authnet-update-form-captcha-div">' . "\n";
                     /**/
                     $captcha .= '<label id="s2member-pro-authnet-update-form-captcha-label" class="s2member-pro-authnet-form-captcha-label s2member-pro-authnet-update-form-captcha-label">' . "\n";
                     $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr["captcha"], 200) . "\n";
                     $captcha .= '</label>' . "\n";
                     /**/
                     $captcha .= '</div>' . "\n";
                     /**/
                     $captcha .= '</div>' . "\n";
                 }
                 /*
                 Build the hidden input variables.
                 */
                 $hidden_inputs = '<input type="hidden" name="optimizemember_pro_authnet_update[nonce]" id="s2member-pro-authnet-update-nonce" value="' . esc_attr(wp_create_nonce("s2member-pro-authnet-update")) . '" />';
                 $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_authnet_update[attr]" id="s2member-pro-authnet-update-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
                 /*
                 Get the form template.
                 */
                 $custom_template = file_exists(TEMPLATEPATH . "/authnet-update-form.php") ? TEMPLATEPATH . "/authnet-update-form.php" : false;
                 $custom_template = file_exists(TEMPLATEPATH . "/authnet-update-form.html") ? TEMPLATEPATH . "/authnet-update-form.html" : $custom_template;
                 $custom_template = $attr["template"] && file_exists(TEMPLATEPATH . "/" . $attr["template"]) ? TEMPLATEPATH . "/" . $attr["template"] : $custom_template;
                 $custom_template = $attr["template"] && file_exists(WP_CONTENT_DIR . "/" . $attr["template"]) ? WP_CONTENT_DIR . "/" . $attr["template"] : $custom_template;
                 /**/
                 $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . "/templates/forms/authnet-update-form.php"));
                 $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
                 /*
                 Fill in the action.
                 */
                 $code = preg_replace("/%%action%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["REQUEST_URI"])), $code);
                 /*
                 Fill in the response.
                 */
                 $code = preg_replace("/%%response%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($response["response"]), $code);
                 /*
                 Fill in the description.
                 */
                 $code = preg_replace("/%%description%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($attr["desc"]), $code);
                 /*
                 Fill in the billing method section.
                 */
                 $code = preg_replace("/%%card_type_options%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($card_type_options), $code);
                 $code = preg_replace("/%%card_number_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_update"]["card_number"])), $code);
                 $code = preg_replace("/%%card_expiration_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_update"]["card_expiration"])), $code);
                 $code = preg_replace("/%%card_verification_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_update"]["card_verification"])), $code);
                 $code = preg_replace("/%%card_start_date_issue_number_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_update"]["card_start_date_issue_number"])), $code);
                 /*
                 Fill in the billing address section.
                 */
                 $code = preg_replace("/%%street_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_update"]["street"])), $code);
                 $code = preg_replace("/%%city_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_update"]["city"])), $code);
                 $code = preg_replace("/%%state_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_update"]["state"])), $code);
                 $code = preg_replace("/%%country_options%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($country_options), $code);
                 $code = preg_replace("/%%zip_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_update"]["zip"])), $code);
                 /*
                 Fill the captcha section.
                 */
                 $code = preg_replace("/%%captcha%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($captcha), $code);
                 /*
                 Fill hidden inputs.
                 */
                 $code = preg_replace("/%%hidden_inputs%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($hidden_inputs), $code);
                 /**/
                 eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
                 do_action("ws_plugin__optimizemember_pro_during_sc_authnet_update_form", get_defined_vars());
                 unset($__refs, $__v);
                 /* Unset defined __refs, __v. */
             } else {
                 if ($attr["sp"]) {
                     $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
                     /*
                     Configure internal attributes.
                     */
                     $attr["sp_ids_exp"] = "sp:" . $attr["ids"] . ":" . $attr["exp"];
                     /* Combined `sp:ids:expiration hours`. */
                     $attr["coupon"] = $_p["optimizemember_pro_authnet_sp_checkout"]["coupon"] ? $_p["optimizemember_pro_authnet_sp_checkout"]["coupon"] : $attr["coupon"];
                     /*
                     Obtain a possible response and/or validation error.
                     */
                     $response = c_ws_plugin__optimizemember_pro_authnet_responses::authnet_sp_checkout_response($attr);
                     /*
                     Empty post vars on successful response.
                     */
                     $_p = $response["response"] && !$response["error"] ? array() : $_p;
                     /*
                     Build the list of card type options.
                     */
                     foreach (array("Visa" => _x("Visa", "s2member-front", "s2member"), "MasterCard" => _x("MasterCard", "s2member-front", "s2member"), "Discover" => _x("Discover", "s2member-front", "s2member"), "Amex" => _x("American Express", "s2member-front", "s2member")) as $card_type_v => $card_type_l) {
                         $card_type_options .= '<label for="s2member-pro-authnet-sp-checkout-card-type-' . esc_attr(strtolower($card_type_v)) . '" id="s2member-pro-authnet-sp-checkout-form-card-type-' . esc_attr(strtolower($card_type_v)) . '-label" class="s2member-pro-authnet-form-card-type-label s2member-pro-authnet-sp-checkout-form-card-type-label s2member-pro-authnet-form-card-type-' . esc_attr(strtolower($card_type_v)) . '-label s2member-pro-authnet-sp-checkout-form-card-type-' . esc_attr(strtolower($card_type_v)) . '-label' . (!in_array(strtolower($card_type_v), $attr["accept"]) ? ' disabled' : '') . '">' . "\n" . '<input type="radio" aria-required="true" name="optimizemember_pro_authnet_sp_checkout[card_type]" id="s2member-pro-authnet-sp-checkout-card-type-' . esc_attr(strtolower($card_type_v)) . '" class="s2member-pro-authnet-card-type-' . esc_attr(strtolower($card_type_v)) . ' s2member-pro-authnet-sp-checkout-card-type-' . esc_attr(strtolower($card_type_v)) . '" value="' . esc_attr($card_type_v) . '"' . (!empty($_p["optimizemember_pro_authnet_sp_checkout"]["card_type"]) && in_array(strtolower($_p["optimizemember_pro_authnet_sp_checkout"]["card_type"]), $attr["accept"]) && $_p["optimizemember_pro_authnet_sp_checkout"]["card_type"] === $card_type_v ? ' checked="checked"' : '') . (!in_array(strtolower($card_type_v), $attr["accept"]) ? ' disabled="disabled"' : '') . ' tabindex="100" />' . "\n" . '</label>';
                     }
                     /*
                     Build the list of country code options.
                     $country_default_by_currency = false. Authorize.Net always processes in USD, so the country is empty by default.
                     Authorize.Net always processes in USD. International transactions are converted automatically through banking institutions.
                     */
                     $country_default_by_currency = !$_p["optimizemember_pro_authnet_sp_checkout"]["country"] && $attr["cc"] === "USD" ? "US" : $country_default_by_currency;
                     $country_default_by_currency = !$_p["optimizemember_pro_authnet_sp_checkout"]["country"] && $attr["cc"] === "CAD" ? "CA" : $country_default_by_currency;
                     $country_default_by_currency = !$_p["optimizemember_pro_authnet_sp_checkout"]["country"] && $attr["cc"] === "GBP" ? "GB" : $country_default_by_currency;
                     $country_default_by_currency = apply_filters("ws_plugin__optimizemember_pro_authnet_default_country", false, get_defined_vars());
                     /**/
                     $default_country_v = $attr["default_country_code"] ? $attr["default_country_code"] : $country_default_by_currency;
                     /**/
                     $country_options = '<option value=""></option>';
                     /* Start with an empty option value. */
                     /**/
                     foreach (preg_split("/[\r\n]+/", file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . "/iso-3166-1.txt")) as $country) {
                         list($country_l, $country_v) = preg_split("/;/", $country, 2);
                         /**/
                         if ($country_l && $country_v) {
                             /* Here we also check on the default pre-selected country; as determined above; based on currency. */
                             $country_options .= '<option value="' . esc_attr(strtoupper($country_v)) . '"' . ($_p["optimizemember_pro_authnet_sp_checkout"]["country"] === $country_v || $default_country_v === $country_v ? ' selected="selected"' : '') . '>' . esc_html(ucwords(strtolower($country_l))) . '</option>';
                         }
                     }
                     /*
                     Build the reCaptcha box via JavaScript.
                     */
                     if ($attr["captcha"]) {
                         $captcha = '<div id="s2member-pro-authnet-sp-checkout-form-captcha-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-sp-checkout-form-section s2member-pro-authnet-form-captcha-section s2member-pro-authnet-sp-checkout-form-captcha-section">' . "\n";
                         /**/
                         $captcha .= '<div id="s2member-pro-authnet-sp-checkout-form-captcha-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-sp-checkout-form-section-title s2member-pro-authnet-form-captcha-section-title s2member-pro-authnet-sp-checkout-form-captcha-section-title">' . "\n";
                         $captcha .= _x("Security Code", "s2member-front", "s2member") . "\n";
                         $captcha .= '</div>' . "\n";
                         /**/
                         $captcha .= '<div id="s2member-pro-authnet-sp-checkout-form-captcha-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-sp-checkout-form-div s2member-pro-authnet-form-captcha-div s2member-pro-authnet-sp-checkout-form-captcha-div">' . "\n";
                         /**/
                         $captcha .= '<label id="s2member-pro-authnet-sp-checkout-form-captcha-label" class="s2member-pro-authnet-form-captcha-label s2member-pro-authnet-sp-checkout-form-captcha-label">' . "\n";
                         $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr["captcha"], 300) . "\n";
                         $captcha .= '</label>' . "\n";
                         /**/
                         $captcha .= '</div>' . "\n";
                         /**/
                         $captcha .= '</div>' . "\n";
                     }
                     /*
                     Build the opt-in checkbox.
                     */
                     if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_opt_in"] && c_ws_plugin__optimizemember_list_servers::list_servers_integrated()) {
                         $opt_in = '<div id="s2member-pro-authnet-sp-checkout-form-custom-reg-field-opt-in-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-sp-checkout-form-div s2member-pro-authnet-form-custom-reg-field-opt-in-div s2member-pro-authnet-sp-checkout-form-custom-reg-field-opt-in-div">' . "\n";
                         /**/
                         $opt_in .= '<label for="s2member-pro-authnet-sp-checkout-form-custom-reg-field-opt-in" id="s2member-pro-authnet-sp-checkout-form-custom-reg-field-opt-in-label" class="s2member-pro-authnet-form-custom-reg-field-opt-in-label s2member-pro-authnet-sp-checkout-form-custom-reg-field-opt-in-label">' . "\n";
                         $opt_in .= '<input type="checkbox" name="optimizemember_pro_authnet_sp_checkout[custom_fields][opt_in]" id="s2member-pro-authnet-sp-checkout-form-custom-reg-field-opt-in" class="s2member-pro-authnet-form-custom-reg-field-opt-in s2member-pro-authnet-sp-checkout-form-custom-reg-field-opt-in" value="1"' . (empty($_p) && $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_opt_in"] == 1 || $_p["optimizemember_pro_authnet_sp_checkout"]["custom_fields"]["opt_in"] ? ' checked="checked"' : '') . ' tabindex="400" />' . "\n";
                         $opt_in .= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_opt_in_label"] . "\n";
                         $opt_in .= '</label>' . "\n";
                         /**/
                         $opt_in .= '</div>' . "\n";
                     }
                     /*
                     Build the hidden input variables.
                     */
                     $hidden_inputs = '<input type="hidden" name="optimizemember_pro_authnet_sp_checkout[nonce]" id="s2member-pro-authnet-sp-checkout-nonce" value="' . esc_attr(wp_create_nonce("s2member-pro-authnet-sp-checkout")) . '" />';
                     $hidden_inputs .= !$attr["accept_coupons"] ? '<input type="hidden" id="s2member-pro-authnet-sp-checkout-coupons-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= !c_ws_plugin__optimizemember_pro_authnet_utilities::authnet_tax_may_apply() ? '<input type="hidden" id="s2member-pro-authnet-sp-checkout-tax-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_authnet_sp_checkout[attr]" id="s2member-pro-authnet-sp-checkout-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
                     /*
                     Get the form template.
                     */
                     $custom_template = file_exists(TEMPLATEPATH . "/authnet-sp-checkout-form.php") ? TEMPLATEPATH . "/authnet-sp-checkout-form.php" : false;
                     $custom_template = file_exists(TEMPLATEPATH . "/authnet-sp-checkout-form.html") ? TEMPLATEPATH . "/authnet-sp-checkout-form.html" : $custom_template;
                     $custom_template = $attr["template"] && file_exists(TEMPLATEPATH . "/" . $attr["template"]) ? TEMPLATEPATH . "/" . $attr["template"] : $custom_template;
                     $custom_template = $attr["template"] && file_exists(WP_CONTENT_DIR . "/" . $attr["template"]) ? WP_CONTENT_DIR . "/" . $attr["template"] : $custom_template;
                     /**/
                     $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . "/templates/forms/authnet-sp-checkout-form.php"));
                     $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
                     /*
                     Fill in the action.
                     */
                     $code = preg_replace("/%%action%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["REQUEST_URI"])), $code);
                     /*
                     Fill in the response.
                     */
                     $code = preg_replace("/%%response%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($response["response"]), $code);
                     /*
                     Fill in the description.
                     */
                     $code = preg_replace("/%%description%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($attr["desc"]), $code);
                     /*
                     Fill in the coupon value.
                     */
                     $code = preg_replace("/%%coupon_response%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(c_ws_plugin__optimizemember_pro_authnet_utilities::authnet_apply_coupon($attr, $attr["coupon"], "response", array("affiliates-1px-response"))), $code);
                     $code = preg_replace("/%%coupon_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($attr["coupon"])), $code);
                     /*
                     Fill in the registration section.
                     */
                     $code = preg_replace("/%%first_name_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_p["optimizemember_pro_authnet_sp_checkout"]["first_name"])), $code);
                     $code = preg_replace("/%%last_name_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_p["optimizemember_pro_authnet_sp_checkout"]["last_name"])), $code);
                     $code = preg_replace("/%%email_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_sp_checkout"]["email"])), $code);
                     /*
                     Fill in the billing method section.
                     */
                     $code = preg_replace("/%%card_type_options%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($card_type_options), $code);
                     $code = preg_replace("/%%card_number_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_sp_checkout"]["card_number"])), $code);
                     $code = preg_replace("/%%card_expiration_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_sp_checkout"]["card_expiration"])), $code);
                     $code = preg_replace("/%%card_verification_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_sp_checkout"]["card_verification"])), $code);
                     $code = preg_replace("/%%card_start_date_issue_number_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_sp_checkout"]["card_start_date_issue_number"])), $code);
                     /*
                     Fill in the billing address section.
                     */
                     $code = preg_replace("/%%street_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_sp_checkout"]["street"])), $code);
                     $code = preg_replace("/%%city_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_sp_checkout"]["city"])), $code);
                     $code = preg_replace("/%%state_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_sp_checkout"]["state"])), $code);
                     $code = preg_replace("/%%country_options%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($country_options), $code);
                     $code = preg_replace("/%%zip_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_sp_checkout"]["zip"])), $code);
                     /*
                     Fill the captcha section.
                     */
                     $code = preg_replace("/%%captcha%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($captcha), $code);
                     /*
                     Fill the opt-in box.
                     */
                     $code = preg_replace("/%%opt_in%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($opt_in), $code);
                     /*
                     Fill hidden inputs.
                     */
                     $code = preg_replace("/%%hidden_inputs%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($hidden_inputs), $code);
                     /**/
                     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
                     do_action("ws_plugin__optimizemember_pro_during_sc_authnet_sp_form", get_defined_vars());
                     unset($__refs, $__v);
                     /* Unset defined __refs, __v. */
                 } else {
                     $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
                     /*
                     Configure internal attributes.
                     */
                     $attr["level_ccaps_eotper"] = $attr["rr"] === "BN" && $attr["rt"] !== "L" ? $attr["level"] . ":" . $attr["ccaps"] . ":" . $attr["rp"] . " " . $attr["rt"] : $attr["level"] . ":" . $attr["ccaps"];
                     $attr["level_ccaps_eotper"] = rtrim($attr["level_ccaps_eotper"], ":");
                     /* Clean any trailing separators from this string. */
                     $attr["coupon"] = $_p["optimizemember_pro_authnet_checkout"]["coupon"] ? $_p["optimizemember_pro_authnet_checkout"]["coupon"] : $attr["coupon"];
                     /*
                     Obtain a possible response and/or validation error.
                     */
                     $response = c_ws_plugin__optimizemember_pro_authnet_responses::authnet_checkout_response($attr);
                     /*
                     Empty post vars on successful response.
                     */
                     $_p = $response["response"] && !$response["error"] ? array() : $_p;
                     /*
                     Build the list of card type options.
                     */
                     foreach (array("Visa" => _x("Visa", "s2member-front", "s2member"), "MasterCard" => _x("MasterCard", "s2member-front", "s2member"), "Discover" => _x("Discover", "s2member-front", "s2member"), "Amex" => _x("American Express", "s2member-front", "s2member")) as $card_type_v => $card_type_l) {
                         $card_type_options .= '<label for="s2member-pro-authnet-checkout-card-type-' . esc_attr(strtolower($card_type_v)) . '" id="s2member-pro-authnet-checkout-form-card-type-' . esc_attr(strtolower($card_type_v)) . '-label" class="s2member-pro-authnet-form-card-type-label s2member-pro-authnet-checkout-form-card-type-label s2member-pro-authnet-form-card-type-' . esc_attr(strtolower($card_type_v)) . '-label s2member-pro-authnet-checkout-form-card-type-' . esc_attr(strtolower($card_type_v)) . '-label' . (!in_array(strtolower($card_type_v), $attr["accept"]) ? ' disabled' : '') . '">' . "\n" . '<input type="radio" aria-required="true" name="optimizemember_pro_authnet_checkout[card_type]" id="s2member-pro-authnet-checkout-card-type-' . esc_attr(strtolower($card_type_v)) . '" class="s2member-pro-authnet-card-type-' . esc_attr(strtolower($card_type_v)) . ' s2member-pro-authnet-checkout-card-type-' . esc_attr(strtolower($card_type_v)) . '" value="' . esc_attr($card_type_v) . '"' . (!empty($_p["optimizemember_pro_authnet_checkout"]["card_type"]) && in_array(strtolower($_p["optimizemember_pro_authnet_checkout"]["card_type"]), $attr["accept"]) && $_p["optimizemember_pro_authnet_checkout"]["card_type"] === $card_type_v ? ' checked="checked"' : '') . (!in_array(strtolower($card_type_v), $attr["accept"]) ? ' disabled="disabled"' : '') . ' tabindex="200" />' . "\n" . '</label>';
                     }
                     /*
                     Build the list of country code options.
                     $country_default_by_currency = false. Authorize.Net always processes in USD, so the country is empty by default.
                     Authorize.Net always processes in USD. International transactions are converted automatically through banking institutions.
                     */
                     $country_default_by_currency = !$_p["optimizemember_pro_authnet_checkout"]["country"] && $attr["cc"] === "USD" ? "US" : $country_default_by_currency;
                     $country_default_by_currency = !$_p["optimizemember_pro_authnet_checkout"]["country"] && $attr["cc"] === "CAD" ? "CA" : $country_default_by_currency;
                     $country_default_by_currency = !$_p["optimizemember_pro_authnet_checkout"]["country"] && $attr["cc"] === "GBP" ? "GB" : $country_default_by_currency;
                     $country_default_by_currency = apply_filters("ws_plugin__optimizemember_pro_authnet_default_country", false, get_defined_vars());
                     /**/
                     $default_country_v = $attr["default_country_code"] ? $attr["default_country_code"] : $country_default_by_currency;
                     /**/
                     $country_options = '<option value=""></option>';
                     /* Start with an empty option value. */
                     /**/
                     foreach (preg_split("/[\r\n]+/", file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . "/iso-3166-1.txt")) as $country) {
                         list($country_l, $country_v) = preg_split("/;/", $country, 2);
                         /**/
                         if ($country_l && $country_v) {
                             /* Here we also check on the default pre-selected country; as determined above; based on currency. */
                             $country_options .= '<option value="' . esc_attr(strtoupper($country_v)) . '"' . ($_p["optimizemember_pro_authnet_checkout"]["country"] === $country_v || $default_country_v === $country_v ? ' selected="selected"' : '') . '>' . esc_html(ucwords(strtolower($country_l))) . '</option>';
                         }
                     }
                     /*
                     Build all of the custom fields.
                     */
                     if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_fields"]) {
                         /* Only display Custom Fields if configured. */
                         if ($fields_applicable = c_ws_plugin__optimizemember_custom_reg_fields::custom_fields_configured_at_level($attr["level"] === "*" ? "auto-detection" : $attr["level"], "registration")) {
                             $tabindex = 99;
                             /* Start tabindex at 99 ( +1 below = 100 ). */
                             /**/
                             $custom_fields = '<div id="s2member-pro-authnet-checkout-form-custom-fields-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-checkout-form-section s2member-pro-authnet-form-custom-fields-section s2member-pro-authnet-checkout-form-custom-fields-section">' . "\n";
                             /**/
                             $custom_fields .= '<div id="s2member-pro-authnet-checkout-form-custom-fields-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-checkout-form-section-title s2member-pro-authnet-form-custom-fields-section-title s2member-pro-authnet-checkout-form-custom-fields-section-title">' . "\n";
                             $custom_fields .= _x("Additional Info", "s2member-front", "s2member") . "\n";
                             $custom_fields .= '</div>' . "\n";
                             /**/
                             foreach (json_decode($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_fields"], true) as $field) {
                                 if (in_array($field["id"], $fields_applicable)) {
                                     $field_var = preg_replace("/[^a-z0-9]/i", "_", strtolower($field["id"]));
                                     $field_id_class = preg_replace("/_/", "-", $field_var);
                                     /**/
                                     if (!empty($field["section"]) && $field["section"] === "yes") {
                                         /* Starts a new section? */
                                         $custom_fields .= '<div id="s2member-pro-authnet-checkout-form-custom-reg-field-' . $field_id_class . '-divider-section" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-custom-reg-field-divider-section' . (!empty($field["sectitle"]) ? '-title' : '') . ' s2member-pro-authnet-form-custom-reg-field-' . $field_id_class . '-divider-section' . (!empty($field["sectitle"]) ? '-title' : '') . ' s2member-pro-authnet-checkout-form-custom-reg-field-' . $field_id_class . '-divider-section' . (!empty($field["sectitle"]) ? '-title' : '') . '">' . (!empty($field["sectitle"]) ? $field["sectitle"] : '') . '</div>';
                                     }
                                     /**/
                                     $custom_fields .= '<div id="s2member-pro-authnet-checkout-form-custom-reg-field-' . $field_id_class . '-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-custom-reg-field-' . $field_id_class . '-div s2member-pro-authnet-checkout-form-custom-reg-field-' . $field_id_class . '-div">' . "\n";
                                     /**/
                                     $custom_fields .= '<label for="s2member-pro-authnet-checkout-custom-reg-field-' . esc_attr($field_id_class) . '" id="s2member-pro-authnet-checkout-form-custom-reg-field-' . $field_id_class . '-label" class="s2member-pro-authnet-form-custom-reg-field-' . $field_id_class . '-label s2member-pro-authnet-checkout-form-custom-reg-field-' . $field_id_class . '-label">' . "\n";
                                     $custom_fields .= '<span' . (preg_match("/^(checkbox|pre_checkbox)\$/", $field["type"]) ? ' style="display:none;"' : '') . '>' . $field["label"] . ($field["required"] === "yes" ? ' *' : '') . '</span></label>' . (preg_match("/^(checkbox|pre_checkbox)\$/", $field["type"]) ? '' : '<br />') . "\n";
                                     $custom_fields .= c_ws_plugin__optimizemember_custom_reg_fields::custom_field_gen(__FUNCTION__, $field, "optimizemember_pro_authnet_checkout[custom_fields][", "s2member-pro-authnet-checkout-custom-reg-field-", "s2member-pro-authnet-custom-reg-field-" . $field_id_class . " s2member-pro-authnet-checkout-custom-reg-field-" . $field_id_class, "", $tabindex = $tabindex + 1, "", $_p, $_p["optimizemember_pro_authnet_checkout"]["custom_fields"][$field_var], "registration");
                                     /**/
                                     $custom_fields .= '</div>' . "\n";
                                 }
                             }
                             /**/
                             $custom_fields .= '</div>' . "\n";
                         }
                     }
                     /*
                     Build the reCaptcha box via JavaScript.
                     */
                     if ($attr["captcha"]) {
                         $captcha = '<div id="s2member-pro-authnet-checkout-form-captcha-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-checkout-form-section s2member-pro-authnet-form-captcha-section s2member-pro-authnet-checkout-form-captcha-section">' . "\n";
                         /**/
                         $captcha .= '<div id="s2member-pro-authnet-checkout-form-captcha-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-checkout-form-section-title s2member-pro-authnet-form-captcha-section-title s2member-pro-authnet-checkout-form-captcha-section-title">' . "\n";
                         $captcha .= _x("Security Code", "s2member-front", "s2member") . "\n";
                         $captcha .= '</div>' . "\n";
                         /**/
                         $captcha .= '<div id="s2member-pro-authnet-checkout-form-captcha-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-captcha-div s2member-pro-authnet-checkout-form-captcha-div">' . "\n";
                         /**/
                         $captcha .= '<label id="s2member-pro-authnet-checkout-form-captcha-label" class="s2member-pro-authnet-form-captcha-label s2member-pro-authnet-checkout-form-captcha-label">' . "\n";
                         $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr["captcha"], 400) . "\n";
                         $captcha .= '</label>' . "\n";
                         /**/
                         $captcha .= '</div>' . "\n";
                         /**/
                         $captcha .= '</div>' . "\n";
                     }
                     /*
                     Build the opt-in checkbox.
                     */
                     if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_opt_in"] && c_ws_plugin__optimizemember_list_servers::list_servers_integrated()) {
                         $opt_in = '<div id="s2member-pro-authnet-checkout-form-custom-reg-field-opt-in-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-custom-reg-field-opt-in-div s2member-pro-authnet-checkout-form-custom-reg-field-opt-in-div">' . "\n";
                         /**/
                         $opt_in .= '<label for="s2member-pro-authnet-checkout-form-custom-reg-field-opt-in" id="s2member-pro-authnet-checkout-form-custom-reg-field-opt-in-label" class="s2member-pro-authnet-form-custom-reg-field-opt-in-label s2member-pro-authnet-checkout-form-custom-reg-field-opt-in-label">' . "\n";
                         $opt_in .= '<input type="checkbox" name="optimizemember_pro_authnet_checkout[custom_fields][opt_in]" id="s2member-pro-authnet-checkout-form-custom-reg-field-opt-in" class="s2member-pro-authnet-form-custom-reg-field-opt-in s2member-pro-authnet-checkout-form-custom-reg-field-opt-in" value="1"' . (empty($_p) && $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_opt_in"] == 1 || $_p["optimizemember_pro_authnet_checkout"]["custom_fields"]["opt_in"] ? ' checked="checked"' : '') . ' tabindex="500" />' . "\n";
                         $opt_in .= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_opt_in_label"] . "\n";
                         $opt_in .= '</label>' . "\n";
                         /**/
                         $opt_in .= '</div>' . "\n";
                     }
                     /*
                     Build the hidden input variables.
                     */
                     $hidden_inputs = '<input type="hidden" name="optimizemember_pro_authnet_checkout[nonce]" id="s2member-pro-authnet-checkout-nonce" value="' . esc_attr(wp_create_nonce("s2member-pro-authnet-checkout")) . '" />';
                     $hidden_inputs .= !$attr["accept_coupons"] ? '<input type="hidden" id="s2member-pro-authnet-checkout-coupons-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= !$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_password"] ? '<input type="hidden" id="s2member-pro-authnet-checkout-password-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= !c_ws_plugin__optimizemember_pro_authnet_utilities::authnet_tax_may_apply() ? '<input type="hidden" id="s2member-pro-authnet-checkout-tax-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_authnet_checkout[attr]" id="s2member-pro-authnet-checkout-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
                     /*
                     Get the form template.
                     */
                     $custom_template = file_exists(TEMPLATEPATH . "/authnet-checkout-form.php") ? TEMPLATEPATH . "/authnet-checkout-form.php" : false;
                     $custom_template = file_exists(TEMPLATEPATH . "/authnet-checkout-form.html") ? TEMPLATEPATH . "/authnet-checkout-form.html" : $custom_template;
                     $custom_template = $attr["template"] && file_exists(TEMPLATEPATH . "/" . $attr["template"]) ? TEMPLATEPATH . "/" . $attr["template"] : $custom_template;
                     $custom_template = $attr["template"] && file_exists(WP_CONTENT_DIR . "/" . $attr["template"]) ? WP_CONTENT_DIR . "/" . $attr["template"] : $custom_template;
                     /**/
                     $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . "/templates/forms/authnet-checkout-form.php"));
                     $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
                     /*
                     Fill in the action.
                     */
                     $code = preg_replace("/%%action%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["REQUEST_URI"])), $code);
                     /*
                     Fill in the response.
                     */
                     $code = preg_replace("/%%response%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($response["response"]), $code);
                     /*
                     Fill in the description.
                     */
                     $code = preg_replace("/%%description%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($attr["desc"]), $code);
                     /*
                     Fill in the coupon value.
                     */
                     $code = preg_replace("/%%coupon_response%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(c_ws_plugin__optimizemember_pro_authnet_utilities::authnet_apply_coupon($attr, $attr["coupon"], "response", array("affiliates-1px-response"))), $code);
                     $code = preg_replace("/%%coupon_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($attr["coupon"])), $code);
                     /*
                     Fill in the registration section.
                     */
                     $code = preg_replace("/%%first_name_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_p["optimizemember_pro_authnet_checkout"]["first_name"])), $code);
                     $code = preg_replace("/%%last_name_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_p["optimizemember_pro_authnet_checkout"]["last_name"])), $code);
                     $code = preg_replace("/%%email_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["email"])), $code);
                     $code = preg_replace("/%%username_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["username"])), $code);
                     $code = preg_replace("/%%password1_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["password1"])), $code);
                     $code = preg_replace("/%%password2_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["password2"])), $code);
                     /*
                     Fill in the custom fields section.
                     */
                     $code = preg_replace("/%%custom_fields%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($custom_fields), $code);
                     /*
                     Fill in the billing method section.
                     */
                     $code = preg_replace("/%%card_type_options%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($card_type_options), $code);
                     $code = preg_replace("/%%card_number_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["card_number"])), $code);
                     $code = preg_replace("/%%card_expiration_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["card_expiration"])), $code);
                     $code = preg_replace("/%%card_verification_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["card_verification"])), $code);
                     $code = preg_replace("/%%card_start_date_issue_number_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["card_start_date_issue_number"])), $code);
                     /*
                     Fill in the billing address section.
                     */
                     $code = preg_replace("/%%street_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["street"])), $code);
                     $code = preg_replace("/%%city_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["city"])), $code);
                     $code = preg_replace("/%%state_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["state"])), $code);
                     $code = preg_replace("/%%country_options%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($country_options), $code);
                     $code = preg_replace("/%%zip_value%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(format_to_edit($_p["optimizemember_pro_authnet_checkout"]["zip"])), $code);
                     /*
                     Fill the captcha section.
                     */
                     $code = preg_replace("/%%captcha%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($captcha), $code);
                     /*
                     Fill the opt-in box.
                     */
                     $code = preg_replace("/%%opt_in%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($opt_in), $code);
                     /*
                     Fill hidden inputs.
                     */
                     $code = preg_replace("/%%hidden_inputs%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds($hidden_inputs), $code);
                     /*
                      * Custom button
                      */
                     if (!empty($content)) {
                         $code = preg_replace('/%%button_markup%%/', $content, $code);
                     } else {
                         $code = preg_replace("/%%button_markup%%/", sprintf('<input type="submit" id="s2member-pro-authnet-checkout-submit" class="s2member-pro-authnet-submit s2member-pro-authnet-checkout-submit" value="%s" tabindex="600" />', esc_attr(_x("Submit Form", "s2member-front", "s2member"))), $code);
                     }
                     /**/
                     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
                     $attr["modify"] ? do_action("ws_plugin__optimizemember_pro_during_sc_authnet_modification_form", get_defined_vars()) : do_action("ws_plugin__optimizemember_pro_during_sc_authnet_form", get_defined_vars());
                     unset($__refs, $__v);
                     /* Unset defined __refs, __v. */
                 }
             }
         }
     }
     /**/
     $code = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', $code);
     return apply_filters("ws_plugin__optimizemember_pro_sc_authnet_form", $code, get_defined_vars());
 }
Ejemplo n.º 23
0
 /**
  * Shortcode `[optimizeMember-Pro-Stripe-Form /]`.
  *
  * @package optimizeMember\Stripe
  * @since 140617
  *
  * @attaches-to ``add_shortcode('optimizeMember-Pro-Stripe-Form');``
  *
  * @param array  $attr An array of Attributes.
  * @param string $content Content inside the Shortcode.
  * @param string $shortcode The actual Shortcode name itself.
  *
  * @return string The resulting Form Code, HTML markup.
  */
 public static function sc_stripe_form($attr, $content = '', $shortcode = '')
 {
     $raw_content = $content;
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__optimizemember_pro_before_sc_stripe_form', get_defined_vars());
     unset($__refs, $__v);
     // Ditch these temporary vars.
     c_ws_plugin__optimizemember_no_cache::no_cache_constants(TRUE);
     $attr = c_ws_plugin__optimizemember_utils_strings::trim_qts_deep((array) $attr);
     $options = array();
     // Initialize options to an empty array.
     $option_selections = '';
     // Initialize w/ no options.
     if ($content && ($content = strip_tags($content))) {
         // This allows for nested Pro Form Shortcodes as options.
         $content = str_replace('optimizeMember-Pro-Stripe-Form ', 'optimizeMember-Pro-Stripe-xFormOption ', $content);
     }
     if ($content && ($content_options = do_shortcode($content))) {
         foreach (preg_split('/\\s*\\|\\:\\:\\|\\s*/', $content_options, NULL, PREG_SPLIT_NO_EMPTY) as $_content_option_key => $_content_option) {
             $_content_option_id = $_content_option_key + 1;
             $options[$_content_option_id] = maybe_unserialize(trim($_content_option));
             if (!is_array($options[$_content_option_id])) {
                 unset($options[$_content_option_id]);
                 continue;
                 // Invalid option.
             }
             if (!empty($_REQUEST['s2p-option']) && (int) $_REQUEST['s2p-option'] === $_content_option_id) {
                 $options[$_content_option_id]['selected'] = TRUE;
             }
         }
         unset($_content_option_key, $_content_option, $_content_option_id);
         // Housekeeping.
         foreach ($options as $_option_id => $_option) {
             if (!empty($_option['selected'])) {
                 $attr = array_merge($attr, $_option);
                 $_selected_option_id = $_option_id;
             }
         }
         unset($_option_id, $_option);
         // Housekeeping.
         if (empty($_selected_option_id)) {
             foreach ($options as $_option_id => $_option) {
                 $attr = array_merge($attr, $_option);
                 break;
                 // Force a selected option (default).
             }
         }
         unset($_option_id, $_option, $_selected_option_id);
         // Housekeeping.
         foreach ($options as $_option_id => $_option) {
             // Build option selections.
             $option_selections .= '<option value="' . esc_attr($_option_id) . '"' . (!empty($_option['selected']) ? ' selected="selected"' : '') . '>' . esc_html($_option['desc']) . '</option>';
         }
         unset($_option_id, $_option);
         // Housekeeping.
     }
     $attr = shortcode_atts(array('ids' => '0', 'exp' => '72', 'level' => @$attr['register'] ? '0' : '1', 'ccaps' => '', 'desc' => '', 'cc' => 'USD', 'custom' => $_SERVER['HTTP_HOST'], 'ta' => '0', 'tp' => '0', 'tt' => 'D', 'ra' => '0.01', 'rp' => '1', 'rt' => 'M', 'rr' => '1', 'rrt' => '', 'modify' => '0', 'cancel' => '0', 'sp' => '0', 'register' => '0', 'update' => '0', 'coupon' => '', 'accept_coupons' => '0', 'default_country_code' => 'US', 'captcha' => '', 'template' => '', 'success' => ''), $attr);
     $attr['tt'] = strtoupper($attr['tt']);
     // Term lengths absolutely must be provided in upper-case format. Only after running shortcode_atts().
     $attr['rt'] = strtoupper($attr['rt']);
     // Term lengths absolutely must be provided in upper-case format. Only after running shortcode_atts().
     $attr['rr'] = strtoupper($attr['rr']);
     // Must be provided in upper-case format. Numerical, or BN value. Only after running shortcode_atts().
     $attr['ccaps'] = strtolower($attr['ccaps']);
     // Custom Capabilities must be typed in lower-case format. Only after running shortcode_atts().
     $attr['ccaps'] = str_replace(' ', '', $attr['ccaps']);
     // Custom Capabilities should not have spaces.
     $attr['rr'] = $attr['rt'] === 'L' ? 'BN' : $attr['rr'];
     // Lifetime Subscriptions require Buy Now. Only after running shortcode_atts().
     $attr['rr'] = $attr['level'] === '*' ? 'BN' : $attr['rr'];
     // Independent Ccaps require Buy Now. Only after running shortcode_atts().
     $attr['rr'] = !$attr['tp'] && !$attr['rr'] ? 'BN' : $attr['rr'];
     // No Trial / non-recurring. Only after running shortcode_atts().
     $attr['default_country_code'] = strtoupper($attr['default_country_code']);
     // This MUST be in uppercase format.
     $attr['success'] = c_ws_plugin__optimizemember_utils_urls::n_amps($attr['success']);
     // Normalize ampersands.
     $attr['coupon'] = !empty($_GET['s2p-coupon']) ? trim(strip_tags(stripslashes($_GET['s2p-coupon']))) : $attr['coupon'];
     $attr['singular'] = get_the_ID();
     // Collect the Singular ID for this Post/Page.
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__optimizemember_pro_before_sc_stripe_form_after_shortcode_atts', get_defined_vars());
     unset($__refs, $__v);
     // Ditch these temporary vars.
     if ($attr['cancel']) {
         $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
         $response = c_ws_plugin__optimizemember_pro_stripe_responses::stripe_cancellation_response($attr);
         $_p = $response['response'] && !$response['error'] ? array() : $_p;
         if ($attr['captcha']) {
             $captcha = '<div id="optimizemember-pro-stripe-cancellation-form-captcha-section" class="optimizemember-pro-stripe-form-section optimizemember-pro-stripe-cancellation-form-section optimizemember-pro-stripe-form-captcha-section optimizemember-pro-stripe-cancellation-form-captcha-section">' . "\n";
             $captcha .= '<div id="optimizemember-pro-stripe-cancellation-form-captcha-section-title" class="optimizemember-pro-stripe-form-section-title optimizemember-pro-stripe-cancellation-form-section-title optimizemember-pro-stripe-form-captcha-section-title optimizemember-pro-stripe-cancellation-form-captcha-section-title">' . "\n";
             $captcha .= _x('Security Code', 's2member-front', 's2member') . "\n";
             $captcha .= '</div>' . "\n";
             $captcha .= '<div id="optimizemember-pro-stripe-cancellation-form-captcha-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-cancellation-form-div optimizemember-pro-stripe-form-captcha-div optimizemember-pro-stripe-cancellation-form-captcha-div">' . "\n";
             $captcha .= '<label id="optimizemember-pro-stripe-cancellation-form-captcha-label" class="optimizemember-pro-stripe-form-captcha-label optimizemember-pro-stripe-cancellation-form-captcha-label">' . "\n";
             $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr['captcha'], 10) . "\n";
             $captcha .= '</label>' . "\n";
             $captcha .= '</div>' . "\n";
             $captcha .= '</div>' . "\n";
         } else {
             $captcha = '';
         }
         // Not applicable.
         $hidden_inputs = '<input type="hidden" name="optimizemember_pro_stripe_cancellation[nonce]" id="optimizemember-pro-stripe-cancellation-nonce" value="' . esc_attr(wp_create_nonce('optimizemember-pro-stripe-cancellation')) . '" />';
         $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_cancellation[attr]" id="optimizemember-pro-stripe-cancellation-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
         $hidden_inputs .= '<input type="hidden" name="s2p-option" value="' . esc_attr((string) @$_REQUEST['s2p-option']) . '" />';
         $custom_template = file_exists(TEMPLATEPATH . '/stripe-cancellation-form.php') ? TEMPLATEPATH . '/stripe-cancellation-form.php' : FALSE;
         $custom_template = file_exists(TEMPLATEPATH . '/stripe-cancellation-form.html') ? TEMPLATEPATH . '/stripe-cancellation-form.html' : $custom_template;
         $custom_template = $attr['template'] && file_exists(TEMPLATEPATH . '/' . $attr['template']) ? TEMPLATEPATH . '/' . $attr['template'] : $custom_template;
         $custom_template = $attr['template'] && file_exists(WP_CONTENT_DIR . '/' . $attr['template']) ? WP_CONTENT_DIR . '/' . $attr['template'] : $custom_template;
         $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . '/templates/forms/stripe-cancellation-form.php'));
         $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
         $code = preg_replace('/%%action%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr($_SERVER['REQUEST_URI'])), $code);
         $code = preg_replace('/%%response%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($response['response']), $code);
         $code = preg_replace('/%%description%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($attr['desc']), $code);
         $code = preg_replace('/%%captcha%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($captcha), $code);
         $code = preg_replace('/%%hidden_inputs%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($hidden_inputs), $code);
         foreach (array_keys(get_defined_vars()) as $__v) {
             $__refs[$__v] =& ${$__v};
         }
         do_action('ws_plugin__optimizemember_pro_during_sc_stripe_cancellation_form', get_defined_vars());
         unset($__refs, $__v);
         // Ditch these temporary vars.
     } else {
         if ($attr['register']) {
             $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
             $response = c_ws_plugin__optimizemember_pro_stripe_responses::stripe_registration_response($attr);
             $_p = $response['response'] && !$response['error'] ? array() : $_p;
             $custom_fields = '';
             // Initialize custom fields.
             if ($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_fields']) {
                 // Only display Custom Fields if configured.
                 if ($fields_applicable = c_ws_plugin__optimizemember_custom_reg_fields::custom_fields_configured_at_level($attr['level'], 'registration')) {
                     $tabindex = 99;
                     // Start tabindex at 99 ( +1 below = 100 ).
                     $custom_fields = '<div id="optimizemember-pro-stripe-registration-form-custom-fields-section" class="optimizemember-pro-stripe-form-section optimizemember-pro-stripe-registration-form-section optimizemember-pro-stripe-form-custom-fields-section optimizemember-pro-stripe-registration-form-custom-fields-section">' . "\n";
                     $custom_fields .= '<div id="optimizemember-pro-stripe-registration-form-custom-fields-section-title" class="optimizemember-pro-stripe-form-section-title optimizemember-pro-stripe-registration-form-section-title optimizemember-pro-stripe-form-custom-fields-section-title optimizemember-pro-stripe-registration-form-custom-fields-section-title">' . "\n";
                     $custom_fields .= _x('Additional Info', 's2member-front', 's2member') . "\n";
                     $custom_fields .= '</div>' . "\n";
                     foreach (json_decode($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_fields'], TRUE) as $field) {
                         if (in_array($field['id'], $fields_applicable)) {
                             $field_var = preg_replace('/[^a-z0-9]/i', '_', strtolower($field['id']));
                             $field_id_class = preg_replace('/_/', '-', $field_var);
                             if (!empty($field['section']) && $field['section'] === 'yes') {
                                 // Starts a new section?
                                 $custom_fields .= '<div id="optimizemember-pro-stripe-registration-form-custom-reg-field-' . $field_id_class . '-divider-section" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-registration-form-div optimizemember-pro-stripe-form-custom-reg-field-divider-section' . (!empty($field['sectitle']) ? '-title' : '') . ' optimizemember-pro-stripe-form-custom-reg-field-' . $field_id_class . '-divider-section' . (!empty($field['sectitle']) ? '-title' : '') . ' optimizemember-pro-stripe-registration-form-custom-reg-field-' . $field_id_class . '-divider-section' . (!empty($field['sectitle']) ? '-title' : '') . '">' . (!empty($field['sectitle']) ? $field['sectitle'] : '') . '</div>';
                             }
                             $custom_fields .= '<div id="optimizemember-pro-stripe-registration-form-custom-reg-field-' . $field_id_class . '-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-registration-form-div optimizemember-pro-stripe-form-custom-reg-field-' . $field_id_class . '-div optimizemember-pro-stripe-registration-form-custom-reg-field-' . $field_id_class . '-div">' . "\n";
                             $custom_fields .= '<label for="optimizemember-pro-stripe-registration-custom-reg-field-' . esc_attr($field_id_class) . '" id="optimizemember-pro-stripe-registration-form-custom-reg-field-' . $field_id_class . '-label" class="optimizemember-pro-stripe-form-custom-reg-field-' . $field_id_class . '-label optimizemember-pro-stripe-registration-form-custom-reg-field-' . $field_id_class . '-label">' . "\n";
                             $custom_fields .= '<span' . (preg_match('/^(checkbox|pre_checkbox)$/', $field['type']) ? ' style="display:none;"' : '') . '>' . $field['label'] . ($field['required'] === 'yes' ? ' *' : '') . '</span></label>' . (preg_match('/^(checkbox|pre_checkbox)$/', $field['type']) ? '' : '<br />') . "\n";
                             $custom_fields .= c_ws_plugin__optimizemember_custom_reg_fields::custom_field_gen(__FUNCTION__, $field, 'optimizemember_pro_stripe_registration[custom_fields][', 'optimizemember-pro-stripe-registration-custom-reg-field-', 'optimizemember-pro-stripe-custom-reg-field-' . $field_id_class . ' optimizemember-pro-stripe-registration-custom-reg-field-' . $field_id_class, '', $tabindex = $tabindex + 1, '', $_p, @$_p['optimizemember_pro_stripe_registration']['custom_fields'][$field_var], 'registration');
                             $custom_fields .= '</div>' . "\n";
                         }
                     }
                     $custom_fields .= '</div>' . "\n";
                 }
             }
             if ($attr['captcha']) {
                 $captcha = '<div id="optimizemember-pro-stripe-registration-form-captcha-section" class="optimizemember-pro-stripe-form-section optimizemember-pro-stripe-registration-form-section optimizemember-pro-stripe-form-captcha-section optimizemember-pro-stripe-registration-form-captcha-section">' . "\n";
                 $captcha .= '<div id="optimizemember-pro-stripe-registration-form-captcha-section-title" class="optimizemember-pro-stripe-form-section-title optimizemember-pro-stripe-registration-form-section-title optimizemember-pro-stripe-form-captcha-section-title optimizemember-pro-stripe-registration-form-captcha-section-title">' . "\n";
                 $captcha .= _x('Security Code', 's2member-front', 's2member') . "\n";
                 $captcha .= '</div>' . "\n";
                 $captcha .= '<div id="optimizemember-pro-stripe-registration-form-captcha-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-registration-form-div optimizemember-pro-stripe-form-captcha-div optimizemember-pro-stripe-registration-form-captcha-div">' . "\n";
                 $captcha .= '<label id="optimizemember-pro-stripe-registration-form-captcha-label" class="optimizemember-pro-stripe-form-captcha-label optimizemember-pro-stripe-registration-form-captcha-label">' . "\n";
                 $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr['captcha'], 200) . "\n";
                 $captcha .= '</label>' . "\n";
                 $captcha .= '</div>' . "\n";
                 $captcha .= '</div>' . "\n";
             } else {
                 $captcha = '';
             }
             // Not applicable.
             if ($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_opt_in'] && c_ws_plugin__optimizemember_list_servers::list_servers_integrated()) {
                 $opt_in = '<div id="optimizemember-pro-stripe-registration-form-custom-reg-field-opt-in-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-registration-form-div optimizemember-pro-stripe-form-custom-reg-field-opt-in-div optimizemember-pro-stripe-registration-form-custom-reg-field-opt-in-div">' . "\n";
                 $opt_in .= '<label for="optimizemember-pro-stripe-registration-form-custom-reg-field-opt-in" id="optimizemember-pro-stripe-registration-form-custom-reg-field-opt-in-label" class="optimizemember-pro-stripe-form-custom-reg-field-opt-in-label optimizemember-pro-stripe-registration-form-custom-reg-field-opt-in-label">' . "\n";
                 $opt_in .= '<input type="checkbox" name="optimizemember_pro_stripe_registration[custom_fields][opt_in]" id="optimizemember-pro-stripe-registration-form-custom-reg-field-opt-in" class="optimizemember-pro-stripe-form-custom-reg-field-opt-in optimizemember-pro-stripe-registration-form-custom-reg-field-opt-in" value="1"' . (empty($_p) && $GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_opt_in'] == 1 || @$_p['optimizemember_pro_stripe_registration']['custom_fields']['opt_in'] ? ' checked="checked"' : '') . ' tabindex="300" />' . "\n";
                 $opt_in .= $GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_opt_in_label'] . "\n";
                 $opt_in .= '</label>' . '\\n';
                 $opt_in .= '</div>' . '\\n';
             } else {
                 $opt_in = '';
             }
             // Not applicable.
             $hidden_inputs = '<input type="hidden" name="optimizemember_pro_stripe_registration[nonce]" id="optimizemember-pro-stripe-registration-nonce" value="' . esc_attr(wp_create_nonce('optimizemember-pro-stripe-registration')) . '" />';
             $hidden_inputs .= !$GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_names'] ? '<input type="hidden" id="optimizemember-pro-stripe-registration-names-not-required-or-not-possible" value="1" />' : '';
             $hidden_inputs .= !$GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_password'] ? '<input type="hidden" id="optimizemember-pro-stripe-registration-password-not-required-or-not-possible" value="1" />' : '';
             $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_registration[attr]" id="optimizemember-pro-stripe-registration-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
             $hidden_inputs .= '<input type="hidden" name="s2p-option" value="' . esc_attr((string) @$_REQUEST['s2p-option']) . '" />';
             $custom_template = file_exists(TEMPLATEPATH . '/stripe-registration-form.php') ? TEMPLATEPATH . '/stripe-registration-form.php' : FALSE;
             $custom_template = file_exists(TEMPLATEPATH . '/stripe-registration-form.html') ? TEMPLATEPATH . '/stripe-registration-form.html' : $custom_template;
             $custom_template = $attr['template'] && file_exists(TEMPLATEPATH . '/' . $attr['template']) ? TEMPLATEPATH . '/' . $attr['template'] : $custom_template;
             $custom_template = $attr['template'] && file_exists(WP_CONTENT_DIR . '/' . $attr['template']) ? WP_CONTENT_DIR . '/' . $attr['template'] : $custom_template;
             $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . '/templates/forms/stripe-registration-form.php'));
             $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
             $code = preg_replace('/%%action%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr($_SERVER['REQUEST_URI'])), $code);
             $code = preg_replace('/%%response%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($response['response']), $code);
             $code = preg_replace('/%%options%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($option_selections), $code);
             $code = preg_replace('/%%description%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($attr['desc']), $code);
             $code = preg_replace('/%%first_name_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr(@$_p['optimizemember_pro_stripe_registration']['first_name'])), $code);
             $code = preg_replace('/%%last_name_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr(@$_p['optimizemember_pro_stripe_registration']['last_name'])), $code);
             $code = preg_replace('/%%email_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_registration']['email'])), $code);
             $code = preg_replace('/%%username_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_registration']['username'])), $code);
             $code = preg_replace('/%%password1_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_registration']['password1'])), $code);
             $code = preg_replace('/%%password2_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_registration']['password2'])), $code);
             $code = preg_replace('/%%custom_fields%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($custom_fields), $code);
             $code = preg_replace('/%%captcha%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($captcha), $code);
             $code = preg_replace('/%%opt_in%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($opt_in), $code);
             $code = preg_replace('/%%hidden_inputs%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($hidden_inputs), $code);
             foreach (array_keys(get_defined_vars()) as $__v) {
                 $__refs[$__v] =& ${$__v};
             }
             do_action('ws_plugin__optimizemember_pro_during_sc_stripe_registration_form', get_defined_vars());
             unset($__refs, $__v);
             // Ditch these temporary vars.
         } else {
             if ($attr['update']) {
                 $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
                 $response = c_ws_plugin__optimizemember_pro_stripe_responses::stripe_update_response($attr);
                 $_p = $response['response'] && !$response['error'] ? array() : $_p;
                 if ($attr['captcha']) {
                     $captcha = '<div id="optimizemember-pro-stripe-update-form-captcha-section" class="optimizemember-pro-stripe-form-section optimizemember-pro-stripe-update-form-section optimizemember-pro-stripe-form-captcha-section optimizemember-pro-stripe-update-form-captcha-section">' . "\n";
                     $captcha .= '<div id="optimizemember-pro-stripe-update-form-captcha-section-title" class="optimizemember-pro-stripe-form-section-title optimizemember-pro-stripe-update-form-section-title optimizemember-pro-stripe-form-captcha-section-title optimizemember-pro-stripe-update-form-captcha-section-title">' . "\n";
                     $captcha .= _x('Security Code', 's2member-front', 's2member') . "\n";
                     $captcha .= '</div>' . "\n";
                     $captcha .= '<div id="optimizemember-pro-stripe-update-form-captcha-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-update-form-div optimizemember-pro-stripe-form-captcha-div optimizemember-pro-stripe-update-form-captcha-div">' . "\n";
                     $captcha .= '<label id="optimizemember-pro-stripe-update-form-captcha-label" class="optimizemember-pro-stripe-form-captcha-label optimizemember-pro-stripe-update-form-captcha-label">' . "\n";
                     $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr['captcha'], 200) . "\n";
                     $captcha .= '</label>' . "\n";
                     $captcha .= '</div>' . "\n";
                     $captcha .= '</div>' . "\n";
                 } else {
                     $captcha = '';
                 }
                 // Not applicable.
                 $hidden_inputs = '<input type="hidden" name="optimizemember_pro_stripe_update[nonce]" id="optimizemember-pro-stripe-update-nonce" value="' . esc_attr(wp_create_nonce('optimizemember-pro-stripe-update')) . '" />';
                 $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_update[card_token]" id="optimizemember-pro-stripe-update-card-token" value="' . esc_attr(@$_p['optimizemember_pro_stripe_update']['card_token']) . '" />';
                 $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_update[card_token_summary]" id="optimizemember-pro-stripe-update-card-token-summary" value="' . esc_attr(@$_p['optimizemember_pro_stripe_update']['card_token_summary']) . '" />';
                 $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_update[attr]" id="optimizemember-pro-stripe-update-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
                 $hidden_inputs .= '<input type="hidden" name="s2p-option" value="' . esc_attr((string) @$_REQUEST['s2p-option']) . '" />';
                 $custom_template = file_exists(TEMPLATEPATH . '/stripe-update-form.php') ? TEMPLATEPATH . '/stripe-update-form.php' : FALSE;
                 $custom_template = file_exists(TEMPLATEPATH . '/stripe-update-form.html') ? TEMPLATEPATH . '/stripe-update-form.html' : $custom_template;
                 $custom_template = $attr['template'] && file_exists(TEMPLATEPATH . '/' . $attr['template']) ? TEMPLATEPATH . '/' . $attr['template'] : $custom_template;
                 $custom_template = $attr['template'] && file_exists(WP_CONTENT_DIR . '/' . $attr['template']) ? WP_CONTENT_DIR . '/' . $attr['template'] : $custom_template;
                 $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . '/templates/forms/stripe-update-form.php'));
                 $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
                 $code = preg_replace('/%%action%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr($_SERVER['REQUEST_URI'])), $code);
                 $code = preg_replace('/%%response%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($response['response']), $code);
                 $code = preg_replace('/%%description%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($attr['desc']), $code);
                 $code = preg_replace('/%%card_token%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_html(@$_p['optimizemember_pro_stripe_update']['card_token'])), $code);
                 $code = preg_replace('/%%card_token_summary%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_html(@$_p['optimizemember_pro_stripe_update']['card_token_summary'])), $code);
                 $code = preg_replace('/%%captcha%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($captcha), $code);
                 $code = preg_replace('/%%hidden_inputs%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($hidden_inputs), $code);
                 foreach (array_keys(get_defined_vars()) as $__v) {
                     $__refs[$__v] =& ${$__v};
                 }
                 do_action('ws_plugin__optimizemember_pro_during_sc_stripe_update_form', get_defined_vars());
                 unset($__refs, $__v);
                 // Ditch these temporary vars.
             } else {
                 if ($attr['sp']) {
                     $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
                     $attr['sp_ids_exp'] = 'sp:' . $attr['ids'] . ':' . $attr['exp'];
                     // Combined `sp:ids:expiration hours`.
                     $attr['coupon'] = !empty($_p['optimizemember_pro_stripe_sp_checkout']['coupon']) ? $_p['optimizemember_pro_stripe_sp_checkout']['coupon'] : $attr['coupon'];
                     $response = c_ws_plugin__optimizemember_pro_stripe_responses::stripe_sp_checkout_response($attr);
                     $_p = $response['response'] && !$response['error'] ? array() : $_p;
                     $country_default_by_currency = !@$_p['optimizemember_pro_stripe_sp_checkout']['country'] && $attr['cc'] === 'USD' ? 'US' : '';
                     $country_default_by_currency = !@$_p['optimizemember_pro_stripe_sp_checkout']['country'] && $attr['cc'] === 'CAD' ? 'CA' : $country_default_by_currency;
                     $country_default_by_currency = !@$_p['optimizemember_pro_stripe_sp_checkout']['country'] && $attr['cc'] === 'GBP' ? 'GB' : $country_default_by_currency;
                     $country_default_by_currency = apply_filters('ws_plugin__optimizemember_pro_stripe_default_country', $country_default_by_currency, get_defined_vars());
                     $default_country_v = $attr['default_country_code'] ? $attr['default_country_code'] : $country_default_by_currency;
                     $country_options = '<option value=""></option>';
                     // Start with an empty option value.
                     foreach (preg_split('/[' . "\r\n" . ']+/', file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . '/iso-3166-1.txt')) as $country) {
                         list($country_l, $country_v) = preg_split('/;/', $country, 2);
                         if ($country_l && $country_v) {
                             // Here we also check on the default pre-selected country; as determined above; based on currency.
                             $country_options .= '<option value="' . esc_attr(strtoupper($country_v)) . '"' . (@$_p['optimizemember_pro_stripe_sp_checkout']['country'] === $country_v || $default_country_v === $country_v ? ' selected="selected"' : '') . '>' . esc_html(ucwords(strtolower($country_l))) . '</option>';
                         }
                     }
                     if ($attr['captcha']) {
                         $captcha = '<div id="optimizemember-pro-stripe-sp-checkout-form-captcha-section" class="optimizemember-pro-stripe-form-section optimizemember-pro-stripe-sp-checkout-form-section optimizemember-pro-stripe-form-captcha-section optimizemember-pro-stripe-sp-checkout-form-captcha-section">' . "\n";
                         $captcha .= '<div id="optimizemember-pro-stripe-sp-checkout-form-captcha-section-title" class="optimizemember-pro-stripe-form-section-title optimizemember-pro-stripe-sp-checkout-form-section-title optimizemember-pro-stripe-form-captcha-section-title optimizemember-pro-stripe-sp-checkout-form-captcha-section-title">' . "\n";
                         $captcha .= _x('Security Code', 's2member-front', 's2member') . "\n";
                         $captcha .= '</div>' . "\n";
                         $captcha .= '<div id="optimizemember-pro-stripe-sp-checkout-form-captcha-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-sp-checkout-form-div optimizemember-pro-stripe-form-captcha-div optimizemember-pro-stripe-sp-checkout-form-captcha-div">' . "\n";
                         $captcha .= '<label id="optimizemember-pro-stripe-sp-checkout-form-captcha-label" class="optimizemember-pro-stripe-form-captcha-label optimizemember-pro-stripe-sp-checkout-form-captcha-label">' . "\n";
                         $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr['captcha'], 300) . "\n";
                         $captcha .= '</label>' . "\n";
                         $captcha .= '</div>' . "\n";
                         $captcha .= '</div>' . "\n";
                     } else {
                         $captcha = '';
                     }
                     // Not applicable.
                     /*
                     Build the opt-in checkbox.
                     */
                     if ($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_opt_in'] && c_ws_plugin__optimizemember_list_servers::list_servers_integrated()) {
                         $opt_in = '<div id="optimizemember-pro-stripe-sp-checkout-form-custom-reg-field-opt-in-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-sp-checkout-form-div optimizemember-pro-stripe-form-custom-reg-field-opt-in-div optimizemember-pro-stripe-sp-checkout-form-custom-reg-field-opt-in-div">' . "\n";
                         $opt_in .= '<label for="optimizemember-pro-stripe-sp-checkout-form-custom-reg-field-opt-in" id="optimizemember-pro-stripe-sp-checkout-form-custom-reg-field-opt-in-label" class="optimizemember-pro-stripe-form-custom-reg-field-opt-in-label optimizemember-pro-stripe-sp-checkout-form-custom-reg-field-opt-in-label">' . "\n";
                         $opt_in .= '<input type="checkbox" name="optimizemember_pro_stripe_sp_checkout[custom_fields][opt_in]" id="optimizemember-pro-stripe-sp-checkout-form-custom-reg-field-opt-in" class="optimizemember-pro-stripe-form-custom-reg-field-opt-in optimizemember-pro-stripe-sp-checkout-form-custom-reg-field-opt-in" value="1"' . (empty($_p) && $GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_opt_in'] == 1 || @$_p['optimizemember_pro_stripe_sp_checkout']['custom_fields']['opt_in'] ? ' checked="checked"' : '') . ' tabindex="400" />' . "\n";
                         $opt_in .= $GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_opt_in_label'] . "\n";
                         $opt_in .= '</label>' . "\n";
                         $opt_in .= '</div>' . "\n";
                     } else {
                         $opt_in = '';
                     }
                     // Not applicable.
                     $hidden_inputs = '<input type="hidden" name="optimizemember_pro_stripe_sp_checkout[nonce]" id="optimizemember-pro-stripe-sp-checkout-nonce" value="' . esc_attr(wp_create_nonce('optimizemember-pro-stripe-sp-checkout')) . '" />';
                     $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_sp_checkout[card_token]" id="optimizemember-pro-stripe-sp-checkout-card-token" value="' . esc_attr(@$_p['optimizemember_pro_stripe_sp_checkout']['card_token']) . '" />';
                     $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_sp_checkout[card_token_summary]" id="optimizemember-pro-stripe-sp-checkout-card-token-summary" value="' . esc_attr(@$_p['optimizemember_pro_stripe_sp_checkout']['card_token_summary']) . '" />';
                     $hidden_inputs .= !$attr['accept_coupons'] ? '<input type="hidden" id="optimizemember-pro-stripe-sp-checkout-coupons-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= !c_ws_plugin__optimizemember_pro_stripe_utilities::tax_may_apply() ? '<input type="hidden" id="optimizemember-pro-stripe-sp-checkout-tax-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= ($cp_attr = c_ws_plugin__optimizemember_pro_stripe_utilities::apply_coupon($attr, $attr['coupon'])) && $cp_attr['ta'] <= 0.0 && $cp_attr['ra'] <= 0.0 ? '<input type="hidden" id="optimizemember-pro-stripe-sp-checkout-payment-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_sp_checkout[attr]" id="optimizemember-pro-stripe-sp-checkout-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
                     $custom_template = file_exists(TEMPLATEPATH . '/stripe-sp-checkout-form.php') ? TEMPLATEPATH . '/stripe-sp-checkout-form.php' : FALSE;
                     $custom_template = file_exists(TEMPLATEPATH . '/stripe-sp-checkout-form.html') ? TEMPLATEPATH . '/stripe-sp-checkout-form.html' : $custom_template;
                     $custom_template = $attr['template'] && file_exists(TEMPLATEPATH . '/' . $attr['template']) ? TEMPLATEPATH . '/' . $attr['template'] : $custom_template;
                     $custom_template = $attr['template'] && file_exists(WP_CONTENT_DIR . '/' . $attr['template']) ? WP_CONTENT_DIR . '/' . $attr['template'] : $custom_template;
                     $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . '/templates/forms/stripe-sp-checkout-form.php'));
                     $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
                     $code = preg_replace('/%%action%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr($_SERVER['REQUEST_URI'])), $code);
                     $code = preg_replace('/%%response%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($response['response']), $code);
                     $code = preg_replace('/%%options%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($option_selections), $code);
                     $code = preg_replace('/%%description%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($attr['desc']), $code);
                     $code = preg_replace('/%%coupon_response%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(c_ws_plugin__optimizemember_pro_stripe_utilities::apply_coupon($attr, $attr['coupon'], 'response', array('affiliates-1px-response'))), $code);
                     $code = preg_replace('/%%coupon_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit($attr['coupon'])), $code);
                     $code = preg_replace('/%%first_name_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr(@$_p['optimizemember_pro_stripe_sp_checkout']['first_name'])), $code);
                     $code = preg_replace('/%%last_name_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr(@$_p['optimizemember_pro_stripe_sp_checkout']['last_name'])), $code);
                     $code = preg_replace('/%%email_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_sp_checkout']['email'])), $code);
                     $code = preg_replace('/%%card_token%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_html(@$_p['optimizemember_pro_stripe_sp_checkout']['card_token'])), $code);
                     $code = preg_replace('/%%card_token_summary%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_html(@$_p['optimizemember_pro_stripe_sp_checkout']['card_token_summary'])), $code);
                     $code = preg_replace('/%%state_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_sp_checkout']['state'])), $code);
                     $code = preg_replace('/%%country_options%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($country_options), $code);
                     $code = preg_replace('/%%zip_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_sp_checkout']['zip'])), $code);
                     $code = preg_replace('/%%captcha%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($captcha), $code);
                     $code = preg_replace('/%%opt_in%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($opt_in), $code);
                     $code = preg_replace('/%%hidden_inputs%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($hidden_inputs), $code);
                     foreach (array_keys(get_defined_vars()) as $__v) {
                         $__refs[$__v] =& ${$__v};
                     }
                     do_action('ws_plugin__optimizemember_pro_during_sc_stripe_sp_form', get_defined_vars());
                     unset($__refs, $__v);
                     // Ditch these temporary vars.
                 } else {
                     $_p = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_POST));
                     $attr['level_ccaps_eotper'] = $attr['rr'] === 'BN' && $attr['rt'] !== 'L' ? $attr['level'] . ':' . $attr['ccaps'] . ':' . $attr['rp'] . ' ' . $attr['rt'] : $attr['level'] . ':' . $attr['ccaps'];
                     $attr['level_ccaps_eotper'] = rtrim($attr['level_ccaps_eotper'], ':');
                     // Clean any trailing separators from this string.
                     $attr['coupon'] = !empty($_p['optimizemember_pro_stripe_checkout']['coupon']) ? $_p['optimizemember_pro_stripe_checkout']['coupon'] : $attr['coupon'];
                     $response = c_ws_plugin__optimizemember_pro_stripe_responses::stripe_checkout_response($attr);
                     $_p = $response['response'] && !$response['error'] ? array() : $_p;
                     $country_default_by_currency = !@$_p['optimizemember_pro_stripe_checkout']['country'] && $attr['cc'] === 'USD' ? 'US' : '';
                     $country_default_by_currency = !@$_p['optimizemember_pro_stripe_checkout']['country'] && $attr['cc'] === 'CAD' ? 'CA' : $country_default_by_currency;
                     $country_default_by_currency = !@$_p['optimizemember_pro_stripe_checkout']['country'] && $attr['cc'] === 'GBP' ? 'GB' : $country_default_by_currency;
                     $country_default_by_currency = apply_filters('ws_plugin__optimizemember_pro_stripe_default_country', $country_default_by_currency, get_defined_vars());
                     $default_country_v = $attr['default_country_code'] ? $attr['default_country_code'] : $country_default_by_currency;
                     $country_options = '<option value=""></option>';
                     // Start with an empty option value.
                     foreach (preg_split('/[' . "\r\n" . ']+/', file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . '/iso-3166-1.txt')) as $country) {
                         list($country_l, $country_v) = preg_split('/;/', $country, 2);
                         if ($country_l && $country_v) {
                             // Here we also check on the default pre-selected country; as determined above; based on currency.
                             $country_options .= '<option value="' . esc_attr(strtoupper($country_v)) . '"' . (@$_p['optimizemember_pro_stripe_checkout']['country'] === $country_v || $default_country_v === $country_v ? ' selected="selected"' : '') . '>' . esc_html(ucwords(strtolower($country_l))) . '</option>';
                         }
                     }
                     $custom_fields = '';
                     // Initialize custom fields.
                     if ($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_fields']) {
                         // Only display Custom Fields if configured.
                         if ($fields_applicable = c_ws_plugin__optimizemember_custom_reg_fields::custom_fields_configured_at_level($attr['level'] === '*' ? 'auto-detection' : $attr['level'], 'registration')) {
                             $tabindex = 99;
                             // Start tabindex at 99 (+1 below = 100).
                             $custom_fields = '<div id="optimizemember-pro-stripe-checkout-form-custom-fields-section" class="optimizemember-pro-stripe-form-section optimizemember-pro-stripe-checkout-form-section optimizemember-pro-stripe-form-custom-fields-section optimizemember-pro-stripe-checkout-form-custom-fields-section">' . "\n";
                             $custom_fields .= '<div id="optimizemember-pro-stripe-checkout-form-custom-fields-section-title" class="optimizemember-pro-stripe-form-section-title optimizemember-pro-stripe-checkout-form-section-title optimizemember-pro-stripe-form-custom-fields-section-title optimizemember-pro-stripe-checkout-form-custom-fields-section-title">' . "\n";
                             $custom_fields .= _x('Additional Info', 's2member-front', 's2member') . "\n";
                             $custom_fields .= '</div>' . "\n";
                             foreach (json_decode($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_fields'], TRUE) as $field) {
                                 if (in_array($field['id'], $fields_applicable)) {
                                     $field_var = preg_replace('/[^a-z0-9]/i', '_', strtolower($field['id']));
                                     $field_id_class = preg_replace('/_/', '-', $field_var);
                                     if (!empty($field['section']) && $field['section'] === 'yes') {
                                         // Starts a new section?
                                         $custom_fields .= '<div id="optimizemember-pro-stripe-checkout-form-custom-reg-field-' . $field_id_class . '-divider-section" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-checkout-form-div optimizemember-pro-stripe-form-custom-reg-field-divider-section' . (!empty($field['sectitle']) ? '-title' : '') . ' optimizemember-pro-stripe-form-custom-reg-field-' . $field_id_class . '-divider-section' . (!empty($field['sectitle']) ? '-title' : '') . ' optimizemember-pro-stripe-checkout-form-custom-reg-field-' . $field_id_class . '-divider-section' . (!empty($field['sectitle']) ? '-title' : '') . '">' . (!empty($field['sectitle']) ? $field['sectitle'] : '') . '</div>';
                                     }
                                     $custom_fields .= '<div id="optimizemember-pro-stripe-checkout-form-custom-reg-field-' . $field_id_class . '-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-checkout-form-div optimizemember-pro-stripe-form-custom-reg-field-' . $field_id_class . '-div optimizemember-pro-stripe-checkout-form-custom-reg-field-' . $field_id_class . '-div">' . "\n";
                                     $custom_fields .= '<label for="optimizemember-pro-stripe-checkout-custom-reg-field-' . esc_attr($field_id_class) . '" id="optimizemember-pro-stripe-checkout-form-custom-reg-field-' . $field_id_class . '-label" class="optimizemember-pro-stripe-form-custom-reg-field-' . $field_id_class . '-label optimizemember-pro-stripe-checkout-form-custom-reg-field-' . $field_id_class . '-label">' . "\n";
                                     $custom_fields .= '<span' . (preg_match('/^(checkbox|pre_checkbox)$/', $field['type']) ? ' style="display:none;"' : '') . '>' . $field['label'] . ($field['required'] === 'yes' ? ' *' : '') . '</span></label>' . (preg_match('/^(checkbox|pre_checkbox)$/', $field['type']) ? '' : '<br />') . "\n";
                                     $custom_fields .= c_ws_plugin__optimizemember_custom_reg_fields::custom_field_gen(__FUNCTION__, $field, 'optimizemember_pro_stripe_checkout[custom_fields][', 'optimizemember-pro-stripe-checkout-custom-reg-field-', 'optimizemember-pro-stripe-custom-reg-field-' . $field_id_class . ' optimizemember-pro-stripe-checkout-custom-reg-field-' . $field_id_class, '', $tabindex = $tabindex + 1, '', $_p, @$_p['optimizemember_pro_stripe_checkout']['custom_fields'][$field_var], 'registration');
                                     $custom_fields .= '</div>' . "\n";
                                 }
                             }
                             $custom_fields .= '</div>' . "\n";
                         }
                     }
                     if ($attr['captcha']) {
                         $captcha = '<div id="optimizemember-pro-stripe-checkout-form-captcha-section" class="optimizemember-pro-stripe-form-section optimizemember-pro-stripe-checkout-form-section optimizemember-pro-stripe-form-captcha-section optimizemember-pro-stripe-checkout-form-captcha-section">' . "\n";
                         $captcha .= '<div id="optimizemember-pro-stripe-checkout-form-captcha-section-title" class="optimizemember-pro-stripe-form-section-title optimizemember-pro-stripe-checkout-form-section-title optimizemember-pro-stripe-form-captcha-section-title optimizemember-pro-stripe-checkout-form-captcha-section-title">' . "\n";
                         $captcha .= _x('Security Code', 's2member-front', 's2member') . "\n";
                         $captcha .= '</div>' . "\n";
                         $captcha .= '<div id="optimizemember-pro-stripe-checkout-form-captcha-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-checkout-form-div optimizemember-pro-stripe-form-captcha-div optimizemember-pro-stripe-checkout-form-captcha-div">' . "\n";
                         $captcha .= '<label id="optimizemember-pro-stripe-checkout-form-captcha-label" class="optimizemember-pro-stripe-form-captcha-label optimizemember-pro-stripe-checkout-form-captcha-label">' . "\n";
                         $captcha .= c_ws_plugin__optimizemember_utils_captchas::recaptcha_script_tag($attr['captcha'], 400) . "\n";
                         $captcha .= '</label>' . "\n";
                         $captcha .= '</div>' . "\n";
                         $captcha .= '</div>' . "\n";
                     } else {
                         $captcha = '';
                     }
                     // Not applicable.
                     if ($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_opt_in'] && c_ws_plugin__optimizemember_list_servers::list_servers_integrated()) {
                         $opt_in = '<div id="optimizemember-pro-stripe-checkout-form-custom-reg-field-opt-in-div" class="optimizemember-pro-stripe-form-div optimizemember-pro-stripe-checkout-form-div optimizemember-pro-stripe-form-custom-reg-field-opt-in-div optimizemember-pro-stripe-checkout-form-custom-reg-field-opt-in-div">' . "\n";
                         $opt_in .= '<label for="optimizemember-pro-stripe-checkout-form-custom-reg-field-opt-in" id="optimizemember-pro-stripe-checkout-form-custom-reg-field-opt-in-label" class="optimizemember-pro-stripe-form-custom-reg-field-opt-in-label optimizemember-pro-stripe-checkout-form-custom-reg-field-opt-in-label">' . "\n";
                         $opt_in .= '<input type="checkbox" name="optimizemember_pro_stripe_checkout[custom_fields][opt_in]" id="optimizemember-pro-stripe-checkout-form-custom-reg-field-opt-in" class="optimizemember-pro-stripe-form-custom-reg-field-opt-in optimizemember-pro-stripe-checkout-form-custom-reg-field-opt-in" value="1"' . (empty($_p) && $GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_opt_in'] == 1 || @$_p['optimizemember_pro_stripe_checkout']['custom_fields']['opt_in'] ? ' checked="checked"' : '') . ' tabindex="500" />' . "\n";
                         $opt_in .= $GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_opt_in_label'] . "\n";
                         $opt_in .= '</label>' . "\n";
                         $opt_in .= '</div>' . "\n";
                     } else {
                         $opt_in = '';
                     }
                     // Not applicable.
                     $hidden_inputs = '<input type="hidden" name="optimizemember_pro_stripe_checkout[nonce]" id="optimizemember-pro-stripe-checkout-nonce" value="' . esc_attr(wp_create_nonce('optimizemember-pro-stripe-checkout')) . '" />';
                     $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_checkout[card_token]" id="optimizemember-pro-stripe-checkout-card-token" value="' . esc_attr(@$_p['optimizemember_pro_stripe_checkout']['card_token']) . '" />';
                     $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_checkout[card_token_summary]" id="optimizemember-pro-stripe-checkout-card-token-summary" value="' . esc_attr(@$_p['optimizemember_pro_stripe_checkout']['card_token_summary']) . '" />';
                     $hidden_inputs .= !$attr['accept_coupons'] ? '<input type="hidden" id="optimizemember-pro-stripe-checkout-coupons-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= !$GLOBALS['WS_PLUGIN__']['optimizemember']['o']['custom_reg_password'] ? '<input type="hidden" id="optimizemember-pro-stripe-checkout-password-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= !c_ws_plugin__optimizemember_pro_stripe_utilities::tax_may_apply() ? '<input type="hidden" id="optimizemember-pro-stripe-checkout-tax-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= ($cp_attr = c_ws_plugin__optimizemember_pro_stripe_utilities::apply_coupon($attr, $attr['coupon'])) && $cp_attr['ta'] <= 0.0 && $cp_attr['ra'] <= 0.0 ? '<input type="hidden" id="optimizemember-pro-stripe-checkout-payment-not-required-or-not-possible" value="1" />' : '';
                     $hidden_inputs .= '<input type="hidden" name="optimizemember_pro_stripe_checkout[attr]" id="optimizemember-pro-stripe-checkout-attr" value="' . esc_attr(c_ws_plugin__optimizemember_utils_encryption::encrypt(serialize($attr))) . '" />';
                     $custom_template = file_exists(TEMPLATEPATH . '/stripe-checkout-form.php') ? TEMPLATEPATH . '/stripe-checkout-form.php' : FALSE;
                     $custom_template = file_exists(TEMPLATEPATH . '/stripe-checkout-form.html') ? TEMPLATEPATH . '/stripe-checkout-form.html' : $custom_template;
                     $custom_template = $attr['template'] && file_exists(TEMPLATEPATH . '/' . $attr['template']) ? TEMPLATEPATH . '/' . $attr['template'] : $custom_template;
                     $custom_template = $attr['template'] && file_exists(WP_CONTENT_DIR . '/' . $attr['template']) ? WP_CONTENT_DIR . '/' . $attr['template'] : $custom_template;
                     $code = trim(file_get_contents($custom_template ? $custom_template : dirname(dirname(dirname(dirname(__FILE__)))) . '/templates/forms/stripe-checkout-form.php'));
                     $code = trim(!$custom_template || !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? c_ws_plugin__optimizemember_utilities::evl($code) : $code);
                     $code = preg_replace('/%%action%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr($_SERVER['REQUEST_URI'])), $code);
                     $code = preg_replace('/%%response%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($response['response']), $code);
                     $code = preg_replace('/%%options%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($option_selections), $code);
                     $code = preg_replace('/%%description%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($attr['desc']), $code);
                     $code = preg_replace('/%%coupon_response%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(c_ws_plugin__optimizemember_pro_stripe_utilities::apply_coupon($attr, $attr['coupon'], 'response', array('affiliates-1px-response'))), $code);
                     $code = preg_replace('/%%coupon_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit($attr['coupon'])), $code);
                     $code = preg_replace('/%%first_name_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr(@$_p['optimizemember_pro_stripe_checkout']['first_name'])), $code);
                     $code = preg_replace('/%%last_name_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_attr(@$_p['optimizemember_pro_stripe_checkout']['last_name'])), $code);
                     $code = preg_replace('/%%email_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_checkout']['email'])), $code);
                     $code = preg_replace('/%%username_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_checkout']['username'])), $code);
                     $code = preg_replace('/%%password1_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_checkout']['password1'])), $code);
                     $code = preg_replace('/%%password2_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_checkout']['password2'])), $code);
                     $code = preg_replace('/%%custom_fields%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($custom_fields), $code);
                     $code = preg_replace('/%%card_token%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_html(@$_p['optimizemember_pro_stripe_checkout']['card_token'])), $code);
                     $code = preg_replace('/%%card_token_summary%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(esc_html(@$_p['optimizemember_pro_stripe_checkout']['card_token_summary'])), $code);
                     $code = preg_replace('/%%state_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_checkout']['state'])), $code);
                     $code = preg_replace('/%%country_options%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($country_options), $code);
                     $code = preg_replace('/%%zip_value%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs(format_to_edit(@$_p['optimizemember_pro_stripe_checkout']['zip'])), $code);
                     $code = preg_replace('/%%captcha%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($captcha), $code);
                     $code = preg_replace('/%%opt_in%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($opt_in), $code);
                     $code = preg_replace('/%%hidden_inputs%%/', c_ws_plugin__optimizemember_utils_strings::esc_refs($hidden_inputs), $code);
                     if (!empty($raw_content)) {
                         $code = preg_replace('/%%submit_button%%/', $raw_content, $code);
                     } else {
                         $button_code = '<button style="padding:15px;" type="submit" id="optimizemember-pro-stripe-checkout-submit" class="optimizemember-pro-stripe-submit optimizemember-pro-stripe-checkout-submit btn btn-primary" tabindex="600">' . esc_html(_x("Submit Form", "s2member-front", "s2member")) . '</button>';
                         $code = preg_replace('/%%submit_button%%/', $button_code, $code);
                     }
                     foreach (array_keys(get_defined_vars()) as $__v) {
                         $__refs[$__v] =& ${$__v};
                     }
                     $attr['modify'] ? do_action('ws_plugin__optimizemember_pro_during_sc_stripe_modification_form', get_defined_vars()) : do_action('ws_plugin__optimizemember_pro_during_sc_stripe_form', get_defined_vars());
                     unset($__refs, $__v);
                     // Ditch these temporary vars.
                 }
             }
         }
     }
     return apply_filters('ws_plugin__optimizemember_pro_sc_stripe_form', $code, get_defined_vars());
 }
Ejemplo n.º 24
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /**/
     echo '<div class="op-bsw-header">';
     echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
     echo '</div>';
     echo '<div class="op-bsw-main-content">';
     echo '<h2>AliPay 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__optimizemember_pro_options_form" id="ws-plugin--optimizemember-pro-options-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_options_save" id="ws-plugin--optimizemember-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-options-save")) . '" />' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="AliPay Account Details">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-alipay-account-details-section">' . "\n";
     echo '<h3>AliPay Account Details ( required )</h3>' . "\n";
     echo '<p><a href="http://www.optimizepress.com/alipay" target="_blank" rel="external">AliPay</a> is China\'s leading independent third-party online payment platform. Established in 2004 by Alibaba Group, a leading international e-commerce service provider, AliPay is dedicated to providing it\'s members and merchants with a "simple, secure and speedy" online payment solution. If you\'re a merchant in the USA, AliPay is THE way to reach a population of over 1.3 billion in China. AliPay is similar to what we call PayPal here in the USA.</p>' . "\n";
     echo '<p>optimizeMember has been integrated with AliPay for Direct Payments. In order to take advantage of this integration, you will need to have an AliPay Merchant Account with Direct Pay enabled ( aka: 前台自助--即时到账收款 ). This can sometimes take a couple of days to acquire. Once you\'ve been approved at AliPay, you\'ll be given a Partner ID, and a Security Code; which you\'ll need to fill in below.</p>' . "\n";
     echo '<p><em>* optimizeMember only integrates AliPay "Buy Now" functionality. AliPay does NOT support Recurring Billing or Trial Periods.</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-alipay-partner-id">' . "\n";
     echo 'AliPay Partner ID:' . "\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__optimizemember_pro_alipay_partner_id" id="ws-plugin--optimizemember-pro-alipay-partner-id" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_alipay_partner_id"]) . '" /><br />' . "\n";
     echo 'This is provided by AliPay. Check your AliPay Merchant account for this information.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-alipay-seller-email">' . "\n";
     echo 'AliPay Seller Email:' . "\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__optimizemember_pro_alipay_seller_email" id="ws-plugin--optimizemember-pro-alipay-seller-email" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_alipay_seller_email"]) . '" /><br />' . "\n";
     echo 'This is the Email Address configured in your AliPay Merchant account.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-alipay-security-code">' . "\n";
     echo 'AliPay Security Code:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<input type="password" autocomplete="off" name="ws_plugin__optimizemember_pro_alipay_security_code" id="ws-plugin--optimizemember-pro-alipay-security-code" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_alipay_security_code"]) . '" /><br />' . "\n";
     echo 'This is provided by AliPay. Check your AliPay Merchant account for this information.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     /**/
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-gateway-debug-logs">' . "\n";
         echo 'Enable Logging Routines?<br />' . "\n";
         echo '<small><em class="ws-menu-page-hilite">* This setting applies universally. [ <a href="#" onclick="alert(\'This configuration option may ALSO appear under ( optimizeMember -> PayPal Options ). Feel free to configure it here; but please remember that this setting is applied universally ( i.e. SHARED ) among all Payment Gateways integrated with optimizeMember.\'); return false;">?</a> ]</em></small>' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="radio" name="ws_plugin__optimizemember_gateway_debug_logs" id="ws-plugin--optimizemember-gateway-debug-logs-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-gateway-debug-logs-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__optimizemember_gateway_debug_logs" id="ws-plugin--optimizemember-gateway-debug-logs-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-gateway-debug-logs-1">Yes, enable debugging, with API, IPN &amp; Return Page logging.</label><br />' . "\n";
         echo '<em>This enables API, IPN and Return Page logging. The log files are stored here:<br /><code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["logs_dir"])) . '</code></em>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
     }
     /**/
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="AliPay Return-Page Template">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-alipay-return-page-template">' . "\n";
     echo '<h3>AliPay Return-Page Template ( optional, for further customization )</h3>' . "\n";
     echo '<p>With optimizeMember Pro installed, you have the ability to customize your <a href="' . esc_attr(site_url("/?optimizemember_pro_alipay_return&optimizemember_paypal_return=1&optimizemember_paypal_proxy=alipay&optimizemember_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">Return-Page Template</a>. Each of your Customers are returned back to your site immediately after they complete checkout at AliPay. Your Return-Page displays a message and instructions for the Customer. optimizeMember may change the message and instructions dynamically, based on what the Customer is actually doing <em>( i.e. based on the type of transaction that is taking place )</em>. So, although we do NOT recommend that you attempt to change the message and instructions presented dynamically by optimizeMember, you CAN certainly control the Header, and/or the overall appearance of optimizeMember\'s Return-Page Template.</p>' . "\n";
     echo '<p>The quickest/easiest way, is to simply add some HTML code in the box below. For instance, you might include an &lt;img&gt; tag with your logo. The box below, allows you to customize the Header section <em>( i.e. the top )</em> of optimizeMember\'s default Return-Page Template. Everything else, including the textual response and other important details that each Customer needs to know about, are already handled dynamically by optimizeMember <em>( based on the type of transaction that is taking place )</em>. All you need to do is customize the Header with your logo and anything else you feel is important. Although this Header customization is completely optional, we recommend an <a href="http://www.w3schools.com/tags/tag_img.asp" target="_blank" rel="external">&lt;img&gt; tag</a>, with a logo that is around 300px wide. After you "Save All Changes" below, you may <a href="' . esc_attr(site_url("/?optimizemember_pro_alipay_return&optimizemember_paypal_return=1&optimizemember_paypal_proxy=alipay&optimizemember_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">click this link to see what your Header looks like</a>.</p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-alipay-return-template-header">' . "\n";
     echo 'Return-Page Template Header:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<textarea name="ws_plugin__optimizemember_pro_alipay_return_template_header" id="ws-plugin--optimizemember-pro-alipay-return-template-header" rows="5" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_alipay_return_template_header"]) . '</textarea><br />' . "\n";
     echo 'Any valid XHTML / JavaScript' . (is_multisite() && c_ws_plugin__optimizemember_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 class="ws-menu-page-hr"></div>' . "\n";
     /**/
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<p>It is also possible to build your own Return-Page Template, if you prefer. If you feel the need to create your own Return-Page Template, please make a copy of optimizeMember\'s default template: <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir"] . "/includes/templates/returns/default-template.php")) . '</code>. Place your copy of this default template, inside your active WordPress theme directory, and name the file: <code>/alipay-return.php</code>. optimizeMember will automatically find your Return-Page Template in this location, and optimizeMember will use your template, instead of the default. Further details are provided inside optimizeMember\'s default template file. Once your custom template file is in place, you may <a href="' . esc_attr(site_url("/?optimizemember_pro_alipay_return&optimizemember_paypal_return=1&optimizemember_paypal_proxy=alipay&optimizemember_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">click this link to see what it looks like</a>.</p>' . "\n";
     }
     /**/
     echo '<p>It is also possible to bypass optimizeMember\'s Return-Page system all together, if you prefer. For further details, please read more about the <code>success=""</code> Shortcode Attribute for AliPay Buttons generated by optimizeMember. You will find details on this inside your Dashboard, under: <code>optimizeMember -> AliPay Buttons -> Shortcode Attributes ( Explained )</code>. If you use the <code>success=""</code> Attribute in your Shortcode, the initial redirection back to optimizeMember\'s default Return-Page handler MUST still occur. However, instead of optimizeMember displaying a Return-Page Template to the Customer, optimizeMember will silently redirect the Customer to the URL that you specified in the <code>success="http://..."</code> Attribute of your Shortcode, allowing you to take complete control over what happens next.</p>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="Signup Confirmation Email ( Standard )">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-signup-confirmation-email-section">' . "\n";
     echo '<h3>Signup Confirmation Email ( required, but the default works fine )</h3>' . "\n";
     echo '<p>This email is sent to new Customers after they return from a successful signup at AliPay. The <strong>primary</strong> purpose of this email, is to provide the Customer with instructions, along with a link to register a Username for their Membership. You may also customize this further, by providing details that are specifically geared to your site.</p>' . "\n";
     /**/
     echo '<p><em class="ws-menu-page-hilite">* This email configuration is universally applied to all Payment Gateway integrations. [ <a href="#" onclick="alert(\'This configuration panel may ALSO appear under ( optimizeMember -> PayPal Options ). Feel free to configure this email here; but please remember that this configuration is applied universally ( i.e. SHARED ) among all Payment Gateways integrated with optimizeMember.\'); return false;">?</a> ]</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-signup-email-recipients">' . "\n";
     echo 'Signup Confirmation 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__optimizemember_signup_email_recipients" id="ws-plugin--optimizemember-signup-email-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["signup_email_recipients"]) . '" /><br />' . "\n";
     echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
     echo '<code>"%%full_name%%" &lt;%%payer_email%%&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--optimizemember-signup-email-subject">' . "\n";
     echo 'Signup Confirmation 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__optimizemember_signup_email_subject" id="ws-plugin--optimizemember-signup-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["signup_email_subject"]) . '" /><br />' . "\n";
     echo 'Subject Line used in the email sent to a Customer after a successful signup has occurred through AliPay.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-signup-email-message">' . "\n";
     echo 'Signup Confirmation Email Message:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<textarea name="ws_plugin__optimizemember_signup_email_message" id="ws-plugin--optimizemember-signup-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["signup_email_message"]) . '</textarea><br />' . "\n";
     echo 'Message Body used in the email sent to a Customer after a successful signup has occurred through AliPay.<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>%%registration_url%%</code> = The full URL ( generated by optimizeMember ) where the Customer can get registered.</li>' . "\n";
     echo '<li><code>%%subscr_id%%</code> = The AliPay Transaction/Subscription ID as recorded in your AliPay Merchant account. [ <a href="#" onclick="alert(\'If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality with AliPay; the %%subscr_id%% is actually set to the Transaction ID for the purchase. AliPay does not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. If a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0.\\n\\n* AliPay integration does NOT support Initial/Trial Periods at this time.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. This value is <code>always > 0</code>, no matter what. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. The %%regular%% rate is always > 0. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\\n\\n* AliPay integration does NOT support Initial/Trial Periods at this time.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\\n\\n* AliPay integration does NOT support Recurring Billing at this time.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
     echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
     echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
     echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
     echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
     echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the Subscription is for.</li>' . "\n";
     echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
     echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D ( this means 1 Day )\\n%%initial_term%% = 1 W ( this means 1 Week )\\n%%initial_term%% = 1 M ( this means 1 Month )\\n%%initial_term%% = 1 Y ( this means 1 Year )\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\\n\\n* AliPay integration does NOT support Initial/Trial Periods at this time.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%initial_cycle%%</code> = This is the <code>%%initial_term%%</code> from above, converted to a cycle representation of: <code><em>X days/weeks/months/years</em></code>. [ <a href="#" onclick="alert(\'* AliPay integration does NOT support Initial/Trial Periods at this time.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D ( this means 1 Day )\\n%%regular_term%% = 1 W ( this means 1 Week )\\n%%regular_term%% = 1 M ( this means 1 Month )\\n%%regular_term%% = 1 Y ( this means 1 Year )\\n%%regular_term%% = 1 L ( this means 1 Lifetime )\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period ( or duration ) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\\n\\n* AliPay integration does NOT support Recurring Billing at this time.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%regular_cycle%%</code> = This is the <code>%%regular_term%%</code> from above, converted to a cycle representation of: <code><em>[every] X days/weeks/months/years — OR daily, weekly, bi-weekly, monthly, bi-monthly, quarterly, yearly, or lifetime</em></code>. This is a very useful Replacment Code. Its value is dynamic; depending on term length, recurring status, and period/term lengths configured.</li>' . "\n";
     echo '<li><code>%%recurring/regular_cycle%%</code> = Example ( <code>14.95 / Monthly</code> ), or ... ( <code>0 / non-recurring</code> ); depending on the value of <code>%%recurring%%</code>. [ <a href="#" onclick="alert(\'* AliPay integration does NOT support Recurring Billing at this time.\'); return false;">?</a> ]</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 '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="Specific Post/Page Confirmation Email ( Standard )">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-sp-confirmation-email-section">' . "\n";
     echo '<h3>Specific Post/Page Confirmation Email ( required, but the default works fine )</h3>' . "\n";
     echo '<p>This email is sent to new Customers after they return from a successful purchase at AliPay, for Specific Post/Page Access. ( see: <code>optimizeMember -> Restriction Options -> Specific Post/Page Access</code> ). This is NOT used for Membership sales, only for Specific Post/Page Access. The <strong>primary</strong> purpose of this email, is to provide the Customer with instructions, along with a link to access the Specific Post/Page they\'ve purchased access to. If you\'ve created a Specific Post/Page Package ( with multiple Posts/Pages bundled together into one transaction ), this ONE link ( <code>%%sp_access_url%%</code> ) will automatically authenticate them for access to ALL of the Posts/Pages included in their transaction. You may customize this email further, by providing details that are specifically geared to your site.</p>' . "\n";
     /**/
     echo '<p><em class="ws-menu-page-hilite">* This email configuration is universally applied to all Payment Gateway integrations. [ <a href="#" onclick="alert(\'This configuration panel may ALSO appear under ( optimizeMember -> PayPal Options ). Feel free to configure this email here; but please remember that this configuration is applied universally ( i.e. SHARED ) among all Payment Gateways integrated with optimizeMember.\'); return false;">?</a> ]</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-sp-email-recipients">' . "\n";
     echo 'Specific Post/Page Confirmation 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__optimizemember_sp_email_recipients" id="ws-plugin--optimizemember-sp-email-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sp_email_recipients"]) . '" /><br />' . "\n";
     echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
     echo '<code>"%%full_name%%" &lt;%%payer_email%%&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--optimizemember-sp-email-subject">' . "\n";
     echo 'Specific Post/Page Confirmation 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__optimizemember_sp_email_subject" id="ws-plugin--optimizemember-sp-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sp_email_subject"]) . '" /><br />' . "\n";
     echo 'Subject Line used in the email sent to a Customer after a successful purchase has occurred through AliPay, for Specific Post/Page Access.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-sp-email-message">' . "\n";
     echo 'Specific Post/Page Confirmation Email Message:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<textarea name="ws_plugin__optimizemember_sp_email_message" id="ws-plugin--optimizemember-sp-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sp_email_message"]) . '</textarea><br />' . "\n";
     echo 'Message Body used in the email sent to a Customer after a successful purchase has occurred through AliPay, for Specific Post/Page Access.<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>%%sp_access_url%%</code> = The full URL ( generated by optimizeMember ) where the Customer can gain access.</li>' . "\n";
     echo '<li><code>%%sp_access_exp%%</code> = Human readable expiration for <code>%%sp_access_url%%</code>. Ex: <em>( link expires in <code>%%sp_access_exp%%</code> )</em>.</li>' . "\n";
     echo '<li><code>%%txn_id%%</code> = The AliPay Transaction ID. AliPay assigns a unique identifier for every purchase.</li>' . "\n";
     echo '<li><code>%%amount%%</code> = The full Amount that you charged for Specific Post/Page Access. This value will <code>always be > 0</code>.</li>' . "\n";
     echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
     echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
     echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
     echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
     echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
     echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
     echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</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 '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="Automatic EOT Behavior">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-eot-behavior-section">' . "\n";
     echo '<h3>AliPay EOT Behavior ( required, please choose )</h3>' . "\n";
     echo '<p>EOT = End Of Term. By default, optimizeMember will demote a paid Member to a Free Subscriber whenever their Subscription term has ended ( i.e. expired ), been cancelled, refunded, charged back to you, etc. optimizeMember demotes them to a Free Subscriber, so they will no longer have Member Level Access to your site. However, in some cases, you may prefer to have Customer accounts deleted completely, instead of just being demoted. This is where you choose which method works best for your site. If you don\'t want optimizeMember to take ANY action at all, you can disable optimizeMember\'s EOT System temporarily, or even completely.</p>' . "\n";
     echo '<p>The AliPay IPN service will notify optimizeMember whenever a refund or chargeback occurs. For example, if you issue a refund to an unhappy Customer through AliPay, optimizeMember will eventually be notified <em>( with a 24-48 hour delay )</em>, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically ( based on your configuration ). ~ Otherwise, under normal circumstances, optimizeMember will not process an EOT until the User has completely used up the time they paid for.</em></p>' . "\n";
     /**/
     echo '<p id="ws-plugin--optimizemember-auto-eot-system-enabled-via-cron"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["auto_eot_system_enabled"] == 2 && (!function_exists("wp_cron") || !wp_get_schedule("ws_plugin__optimizemember_auto_eot_system__schedule")) ? '' : ' style="display:none;"') . '>If you\'d like to run optimizeMember\'s Auto-EOT System through a more traditional Cron Job; instead of through <code>WP-Cron</code>, you will need to configure a Cron Job through your server control panel; provided by your hosting company. Set the Cron Job to run <code>once about every 10 minutes to an hour</code>. You\'ll want to configure an HTTP Cron Job that loads this URL:<br /><code>' . esc_html(site_url("/?optimizemember_auto_eot_system_via_cron=1")) . '</code></p>' . "\n";
     /**/
     echo '<p><em class="ws-menu-page-hilite">* These options are universally applied to all Payment Gateway integrations. [ <a href="#" onclick="alert(\'These settings may ALSO appear under ( optimizeMember -> PayPal Options ). Feel free to configure them here; but please remember that these configuration options are applied universally ( i.e. they\\\'re SHARED ) among all Payment Gateways integrated with optimizeMember.\'); return false;">?</a> ]</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-auto-eot-system-enabled">' . "\n";
     echo 'Enable optimizeMember\'s Auto-EOT System?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<select name="ws_plugin__optimizemember_auto_eot_system_enabled" id="ws-plugin--optimizemember-auto-eot-system-enabled">' . "\n";
     /* Very advanced conditionals here. If the Auto-EOT System is NOT running, or NOT fully configured, this will indicate that no option is set - as sort of a built-in acknowledgment/warning in the UI panel. */
     echo $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["auto_eot_system_enabled"] == 1 && (!function_exists("wp_cron") || !wp_get_schedule("ws_plugin__optimizemember_auto_eot_system__schedule")) || $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["auto_eot_system_enabled"] == 2 && (function_exists("wp_cron") && wp_get_schedule("ws_plugin__optimizemember_auto_eot_system__schedule")) || !$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["auto_eot_system_enabled"] && (function_exists("wp_cron") && wp_get_schedule("ws_plugin__optimizemember_auto_eot_system__schedule")) ? '<option value=""></option>' . "\n" : '';
     echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["auto_eot_system_enabled"] == 1 && function_exists("wp_cron") && wp_get_schedule("ws_plugin__optimizemember_auto_eot_system__schedule") ? ' selected="selected"' : '') . '>Yes ( enable the Auto-EOT System through WP-Cron )</option>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<option value="2"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["auto_eot_system_enabled"] == 2 && (!function_exists("wp_cron") || !wp_get_schedule("ws_plugin__optimizemember_auto_eot_system__schedule")) ? ' selected="selected"' : '') . '>Yes ( but, I\'ll run it with my own Cron Job )</option>' . "\n" : '';
     echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["auto_eot_system_enabled"] && (!function_exists("wp_cron") || !wp_get_schedule("ws_plugin__optimizemember_auto_eot_system__schedule")) ? ' selected="selected"' : '') . '>No ( disable the Auto-EOT System )</option>' . "\n";
     echo '</select><br />' . "\n";
     echo 'Recommended setting: ( <code>Yes / enable via WP-Cron</code> )' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-membership-eot-behavior">' . "\n";
     echo 'Membership EOT Behavior ( demote or delete )?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<select name="ws_plugin__optimizemember_membership_eot_behavior" id="ws-plugin--optimizemember-membership-eot-behavior">' . "\n";
     echo '<option value="demote"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["membership_eot_behavior"] === "demote" ? ' selected="selected"' : '') . '>Demote ( convert them to a Free Subscriber )</option>' . "\n";
     echo '<option value="delete"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["membership_eot_behavior"] === "delete" ? ' selected="selected"' : '') . '>Delete ( erase their account completely )</option>' . "\n";
     echo '</select>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-triggers-immediate-eot">' . "\n";
     echo 'Refunds/Reversals ( trigger immediate EOT )?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<select name="ws_plugin__optimizemember_triggers_immediate_eot" id="ws-plugin--optimizemember-triggers-immediate-eot">' . "\n";
     echo '<option value="none"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["triggers_immediate_eot"] === "none" ? ' selected="selected"' : '') . '>Neither ( I\'ll review these two events manually )</option>' . "\n";
     echo '<option value="refunds"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["triggers_immediate_eot"] === "refunds" ? ' selected="selected"' : '') . '>Refunds ( refunds ALWAYS trigger an immediate EOT action )</option>' . "\n";
     echo '<option value="reversals"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["triggers_immediate_eot"] === "reversals" ? ' selected="selected"' : '') . '>Reversals ( chargebacks ALWAYS trigger an immediate EOT action )</option>' . "\n";
     echo '<option value="refunds,reversals"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["triggers_immediate_eot"] === "refunds,reversals" ? ' selected="selected"' : '') . '>Refunds/Reversals ( ALWAYS trigger an immediate EOT action )</option>' . "\n";
     echo '</select><br />' . "\n";
     echo 'This setting will <a href="#" onclick="alert(\'A Refund/Reversal Notification will ALWAYS be processed internally by optimizeMember, even if no action is taken by optimizeMember. This way you\\\'ll have the full ability to listen for these two events on your own; if you prefer ( optional ). For more information, check your Dashboard under: `optimizeMember -> API Notifications -> Refunds/Reversals`.\'); return false;">NOT affect</a> optimizeMember\'s internal API Notifications for Refund/Reversal events.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-eot-time-ext-behavior">' . "\n";
     echo 'Fixed-Term Extensions ( auto-extend )?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<select name="ws_plugin__optimizemember_eot_time_ext_behavior" id="ws-plugin--optimizemember-eot-time-ext-behavior">' . "\n";
     echo '<option value="extend"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["eot_time_ext_behavior"] === "extend" ? ' selected="selected"' : '') . '>Yes ( default, automatically extend any existing EOT Time )</option>' . "\n";
     echo '<option value="reset"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["eot_time_ext_behavior"] === "reset" ? ' selected="selected"' : '') . '>No ( do NOT extend; optimizeMember should reset EOT Time completely )</option>' . "\n";
     echo '</select><br />' . "\n";
     echo 'This setting will only affect Buy Now transactions for fixed-term lengths. By default, optimizeMember will automatically extend any existing EOT Time that a Customer may have.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     // echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<p class="submit"><input type="submit" class="op-pb-button green" value="Save All Changes" /></p>' . "\n";
     /**/
     echo '</form>' . "\n";
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
Ejemplo n.º 25
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /**/
     echo '<div class="op-bsw-header">';
     echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
     echo '</div>';
     echo '<div class="op-bsw-main-content inline-input-fields">';
     echo '<h2>OptimizeMember Pro / PayPal Pro Forms</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 '<div class="ws-menu-page-group" title="Quick-Start Guide For PayPal Pro">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-forms-guide-section">' . "\n";
     echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/large-icon.png" title="optimizeMember ( a Membership management system for WordPress )" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n";
     echo '<h3>Quick-Start Guide For PayPal Pro Integration</h3>' . "\n";
     //echo '<p style="margin-bottom:0;"><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/pro-forms/" target="_blank" rel="external">optimizeMember Pro Forms</a>.</p>'."\n";
     //echo '<p style="margin-top:0;"><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/paypal-account-types/" target="_blank" rel="external">PayPal Compatibility (Account Types)</a>.</p>'."\n";
     echo '<p>The optimizeMember Pro Module makes it possible for optimizeMember to use PayPal Pro Forms ( instead of standard PayPal Buttons ). PayPal Pro Forms integrate seamlessly with WordPress Shortcodes. This allows you to keep Customers on your site at all times, and it consolidates the Checkout / Registration steps into a single form that you can dress up just the way you like. If you would like to take advantage of PayPal Pro integration, please supply your PayPal API Username, Password, and Signature. See <code>optimizeMember -> PayPal Options</code>.</p>' . "\n";
     echo '<p><em><strong>*PayPal Pro Integration*</strong> You will need a <a href="http://www.optimizepress.com/paypal" target="_blank" rel="external">PayPal Business Account, w/Pro Service</a>. PayPal Pro accounts require a formal application, along with a small monthly fee. Once you have a PayPal Pro account, you\'ll need access to your <a href="http://www.optimizepress.com/paypal-profile-api-access" target="_blank" rel="external">PayPal API Credentials</a>. Log into your PayPal Pro account, and navigate to <code>Profile -> API Access (or Request API Credentials)</code>. You\'ll choose <code>( Request API Signature )</code>.</em></p>' . "\n";
     echo '<p><em><strong>*Recurring Billing*</strong> If you plan to use any of the ( `Subscription` ) options in the Form Generators below, you will ALSO need <a href="http://www.optimizepress.com/paypal-pro-recurring-payments-faqs" target="_blank" rel="external">Recurring Billing</a> enabled for your PayPal Pro account. PayPal\'s Recurring Billing service for Pro accounts is <strong>required</strong> for all types of ( `Subscriptions` ), whether you intend for them to be recurring or not. However, it is NOT required for ( `Buy Now` ) functionality. The drop-down menus, in the sections below, have been marked ( `Subscription` ) and ( `Buy Now` ) just for this reason. This way you can see which options will require the use of PayPal\'s Recurring Billing service. PayPal will charge you a small monthly fee for their Recurring Billing service; which is an add-on for PayPal Pro accounts.</em></p>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*Secure Server*</strong> In order to comply with PayPal and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your PayPal Pro Forms on an SSL enabled site. Please check with your hosting provider to ask about obtaining an SSL certificate for your domain. Please note... when you create PayPal Pro Forms with optimizeMember; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with ( <code>https://</code> ). &mdash; You can skip the SSL certificate during Sandbox testing. SSL is not required until you officially go live. Once you\'re live, you can add the Custom Field <code>optimizemember_force_ssl = yes</code> to any Post/Page.</em></p>' . "\n" : '<p><em><strong>*Secure Server*</strong> In order to comply with PayPal and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your PayPal Pro Forms on an SSL enabled page. When you create PayPal Pro Forms with optimizeMember; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with ( <code>https://</code> ). You can add the Custom Field <code>optimizemember_force_ssl = yes</code> to any Post/Page that contains a Pro Form Shortcode. This tells optimizeMember to force those special Posts/Pages to be viewed over SSL at all times; no matter what.</em></p>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*SSL Compatibility*</strong> All themes available at <a href="http://www.optimizepress.com/" target="_blank" rel="external">optimizePress.com</a> include full support for SSL, as does WordPress itself. However, there are many themes/plugins that do NOT support SSL enabled Posts/Pages like they should. For this reason, you should be very careful when choosing a WordPress theme to use with optimizeMember Pro. Otherwise, your visitors could see the famous "Secure/Insecure" warnings in Internet Explorer browsers. With optimizeMember installed, you can add the Custom Field <code>optimizemember_force_ssl = yes</code> to any Post/Page. optimizeMember will buffer output on those special Posts/Pages, converting everything over to <code>https://</code> for you automatically, and forcing those specific Posts/Pages to be viewed over a secure SSL connection; so long as your server supports the https protocol.</em></p>' . "\n" : '';
     echo '<p><em><strong>*PayPal Pro is NOT Absolutely Required*</strong> optimizeMember is very flexible. It is now possible to integrate Pro Forms without a PayPal Pro account, whereby the enhanced Form Shortcodes that optimizeMember provides can be integrated ONLY with PayPal Express Checkout. In other words, if you get declined for PayPal Pro service, you can still use optimizeMember Pro Forms. Ask PayPal to activate Express Checkout for you. ( it\'s free ). Once Express Checkout is enabled, you will have access to your <a href="http://www.optimizepress.com/paypal-profile-api-access" target="_blank" rel="external">PayPal API Credentials</a>. Log into your PayPal account, and navigate to <code>Profile -> API Access (or Request API Credentials)</code>. You\'ll choose <code>( Request API Signature )</code>. Now ... here is the tricky part; whenever you generate a Pro Form Shortcode with optimizeMember, be sure to change  <code>accept="paypal,visa,mastercard,amex,discover,maestro,solo"</code> to just <code>accept="paypal"</code>; thereby excluding the on-site credit card processing functionality; which is available only with PayPal Pro.</em></p>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Pro / Free Registration Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-registration-forms-section">' . "\n";
     echo '<h3>One Form Does It All For Free Registrations ( copy/paste )</h3>' . "\n";
     echo '<p>Whenever a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0.</p>' . "\n";
     echo '<p><em><strong>*Note*</strong> the use of this particular Form will override your Open Registration configuration. In other words, making this Form available is the same as turning Open Registration <code>(on)</code>. One of the benefits to this functionality, is that it makes it possible for you to integrate this Free Registration Form in creative ways ( i.e. making it available ONLY under certain circumstances ); while still leaving Open Registration <code>(off)</code> throughout the rest of the site.</em></p>' . "\n";
     echo '<p><em><strong>*Tip ( optional )*</strong> It is also possible to change the <code>level="0"</code> Attribute to something other than the default Level #0 ( Free Subscriber ). For example, if you need to, you can change it to <code>level="1"</code>, attach Custom Capabilities with the <code>ccaps=""</code> Attribute, and even limit this access to a certain timeframe with <code>tp="30" tt="D"</code> ( i.e. 30 Days ). So this Form is very flexible. It can be used to allow free access to just about any aspect of your service. For more information on Attributes, please see the section below: Shortcode Attributes ( Explained ).</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-registration-form-shortcode.php")));
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr("0")), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level0_label"])), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-registration-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
         $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
         echo '<div class="ws-menu-page-group" title="PayPal Pro Forms For Level ' . $labelText . ' Access">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-level' . $n . '-forms-section">' . "\n";
         echo '<h3>Pro Form Generator For Level ' . $labelText . ' Access</h3>' . "\n";
         echo '<p>Very simple. All you do is customize the form fields provided, for each Membership Level that you plan to offer. Then press (Generate Form Code). These special PayPal Forms are customized to work with optimizeMember seamlessly. Member accounts will be activated instantly, in an automated fashion. When you, or a Member, cancels their Membership, or fails to make payments on time, optimizeMember will automatically terminate their Membership privileges. optimizeMember makes extensive use of the PayPal IPN service. optimizeMember receives updates from PayPal behind-the-scene.</p>' . "\n";
         echo '<p><em>* Forms are NOT saved here. This is only a Form Generator. Once you\'ve generated your Form, copy/paste it into any Post/Page you like. You\'ll want to provide your visitors with a link to the Post/Page where this Form is located. We suggest placing a link to this Form on your Membership Options Page. That way your visitors can get registered &amp; checkout!</em></p>' . "\n";
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form onsubmit="return false;">' . "\n";
         echo '<p id="ws-plugin--optimizemember-pro-level' . $n . '-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-trial-period" value="0" size="6" /> <select id="ws-plugin--optimizemember-pro-level' . $n . '-trial-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-trial-amount" value="0.00" size="4" /></p>' . "\n";
         echo '<p><span id="ws-plugin--optimizemember-pro-level' . $n . '-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-level' . $n . '-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/" . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_payflow_api_username"] ? "payflow" : "paypal") . "-membership-regular-terms.php"))) . '</select></p>' . "\n";
         echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-desc" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="68" /></p>' . "\n";
         echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nWith PayPal Pro integration, this is only applied to PayPal Express Checkout pages; when/if a Customer chooses PayPal as the Payment Method.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-page-style" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-pro-level' . $n . '-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Form Code" onclick="ws_plugin__optimizemember_pro_paypalFormGenerate(\'level' . $n . '\');" class="button-primary" /></p>' . "\n";
         echo '<p' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-ccaps" size="40" /></p>' . "\n";
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form onsubmit="return false;">' . "\n";
         echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
         $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-checkout-form-shortcode.php")));
         $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($n)), $ws_plugin__optimizemember_pro_temp_s);
         $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"])), $ws_plugin__optimizemember_pro_temp_s);
         $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
         echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Pro Billing Modification Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-modification-forms-section">' . "\n";
     echo '<h3>Pro Form Generator For Billing Modifications</h3>' . "\n";
     echo '<p>If you\'d like to give your Members ( and/or your Free Subscribers ) the ability to change ( modify ) their billing plan; you can generate a new PayPal Modification Form here. Configure the updated Level, pricing, terms, etc. Then, make that new Modification Form available to Members who are logged into their existing account with you. For example, you might want to insert a "Level #2" Upgrade link 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> Very simple. A Member clicks a link to a special Post/Page, which contains a Modification Form you\'ve generated. The Member fills in their billing information. After a successful form submission, optimizeMember will update the status of their account to the Level, pricing, and terms that you configure below. If the Member already has an existing paid Subscription with you, that paid Subscription will be cancelled automatically behind-the-scene, and a new paid Subscription will be created to replace the old one. Again, the new paid Subscription is based on the Level, pricing, and terms that you specify below. If you need to give Customers some sort of grace period when/if they upgrade to a more expensive plan, please feel free to handle this through the application of free days, or with special pricing configured below.</em></p>' . "\n";
     echo '<p><em><strong>*Integrating Conditionals*</strong> Since each Modification Form is configured for a specific Level, you may want to create multiple Modification Forms, one for each combination you intend to make available. optimizeMember\'s API Conditionals can help you display the proper Form to each Customer, based on the status of their existing account. For further details, see: <code>optimizeMember -> API Scripting</code>.</em></p>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*Independent Custom Capabilities*</strong> If you just want to sell an existing Member new Custom Capabilities, without affecting their paid Subscription in any way, please see the next Form Generator: <code>Capability (Buy Now) Forms</code>. Independent Capability Forms facilitate Buy Now functionality, specifically for Custom Capabilities, without affecting the Customer\'s primary Subscription and Membership Level Access.</em></p>' . "\n" : '';
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     /**/
     echo '<p>Modification: <select id="ws-plugin--optimizemember-pro-modification-level">' . "\n";
     /**/
     for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
         $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
         echo '<optgroup label="Level ' . $labelText . '">' . "\n";
         echo '<option value="upgrade:' . $n . '">&uarr; Upgrade To Level ' . $labelText . '</option>' . "\n";
         echo $n < $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? '<option value="downgrade:' . $n . '">&darr; Downgrade To Level ' . $labelText . '</option>' . "\n" : '';
         echo '</optgroup>' . "\n";
         /**/
         echo $n < $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? '<option disabled="disabled"></option>' . "\n" : '';
     }
     /**/
     echo '</select></p>' . "\n";
     /**/
     echo '<p id="ws-plugin--optimizemember-pro-modification-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-trial-period" value="0" size="6" /> <select id="ws-plugin--optimizemember-pro-modification-trial-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-trial-amount" value="0.00" size="4" /></p>' . "\n";
     echo '<p><span id="ws-plugin--optimizemember-pro-modification-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-modification-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/" . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_payflow_api_username"] ? "payflow" : "paypal") . "-membership-regular-terms.php"))) . '</select></p>' . "\n";
     echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
     echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nWith PayPal Pro integration, this is only applied to PayPal Express Checkout pages; when/if a Customer chooses PayPal as the Payment Method.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-page-style" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-pro-modification-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Form Code" onclick="ws_plugin__optimizemember_pro_paypalFormGenerate(\'modification\');" class="button-primary" /></p>' . "\n";
     echo '<p' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-ccaps" size="40" /></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-checkout-form-shortcode.php")));
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr("1")), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level1_label"])), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/\\/]\$/", 'modify="1" /]', $ws_plugin__optimizemember_pro_temp_s);
     /* Adds modify="1" to the end of the Shortcode. */
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-group" title="PayPal Pro Capability (Buy Now) Forms">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-ccap-forms-section">' . "\n";
         echo '<h3>Pro Form Generator For Independent Custom Capabilities</h3>' . "\n";
         echo '<p>This is VERY advanced. For further details, please check your Dashboard: <code>optimizeMember -> API Scripting -> Custom Capabiities</code>.</p>' . "\n";
         echo '<p>With optimizeMember, you can sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site <em>( i.e. you could even sell Independent Custom Capabilities to Users at Membership Level #0, normally referred to as Free Subscribers, if you like )</em>. So this is quite flexible. Independent Custom Capabilities do NOT rely on any specific Membership Level. That\'s why optimizeMember refers to these as `Independent` Custom Capabilities, because you can sell Capabilities this way, through Buy Now functionality, and the Customer\'s Membership Level Access, along with any existing paid Subscription they may already have with you, will remain completely unaffected. That being said, if you intend to charge a recurring fee for Custom Capabilities, please use a <code>Billing Modification Form</code> instead; because Independent Custom Capabilities can only be sold through Buy Now functionality.</p>' . "\n";
         echo '<p>Independent Custom Capabilities are added to a Customer\'s account immediately after checkout, and the Customer will have the Custom Capabilities for as long as their Membership lasts, based on their primary Subscription with your site, and/or forever, if they have a Lifetime account with you. In other words, Independent Custom Capabilities will exist on the Customer\'s account forever, or until an EOT <em>( End Of Term )</em> occurs on their primary Subscription with you; in which case optimizeMember would demote or delete the Customer\'s account <em>( based on your EOT configuration )</em>, and all Custom Capabilities are removed as well.</p>' . "\n";
         echo '<p>Very simple. All you do is customize the form fields provided, for each set of Custom Capabilities that you plan to sell. Then press (Generate Form Code). These special PayPal Forms are customized to work with optimizeMember seamlessly. The Customer will be granted additional access to one or more Custom Capabilities that you specify; while the Customer\'s Membership Level Access and any existing paid Subscription they may already have with you, will remain completely unaffected.</p>' . "\n";
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form onsubmit="return false;">' . "\n";
         /**/
         echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-ccap-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-ccap-terms.php"))) . '</select></p>' . "\n";
         echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
         echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nWith PayPal Pro integration, this is only applied to PayPal Express Checkout pages; when/if a Customer chooses PayPal as the Payment Method.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-page-style" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-pro-ccap-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Form Code" onclick="ws_plugin__optimizemember_pro_paypalCcapFormGenerate();" class="button-primary" /></p>' . "\n";
         echo '<p>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-ccaps" size="40" /></p>' . "\n";
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form onsubmit="return false;">' . "\n";
         echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
         $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-ccaps-checkout-form-shortcode.php")));
         $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
         echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Pro Billing Update Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-update-forms-section">' . "\n";
     echo '<h3>One Form Does It All For Billing Updates ( copy/paste )</h3>' . "\n";
     echo '<p>An Update Form can be provided to existing Members, as a way for them to update their billing information; without modifying their existing paid Subscription in any way. For instance, a Customer may need to update their billing information, because their credit card is expiring, or because they moved their bank account.</p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-update-form-shortcode.php")));
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-update-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Pro Billing Cancellation Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-cancellation-forms-section">' . "\n";
     echo '<h3>One Form Does It All For Cancellations ( copy/paste )</h3>' . "\n";
     echo '<p>According to PayPal\'s policy on recurring billing, you MUST provide each and every Customer with an easy to way to cancel future charges. Generating a Cancellation Form here, and making that Form available to all Customers is our recommendation. For further details and legalities, please visit the <a href="https://www.x.com/" target="_blank" rel="external">PayPal Developer Network</a>.</p>' . "\n";
     echo '<p><em><strong>*Cancellation Process*</strong> Very simple. A Member clicks a link to a Post/Page that contains a Cancellation Form you\'ve generated. The Member clicks the Submit button to confirm the cancellation. optimizeMember is notified silently behind-the-scene, and will immediately cancel all future billing. optimizeMember will later terminate their account access, at the correct point in time. This works in conjunction with the optimizeMember Auto-EOT System. For further details, see: <code>optimizeMember -> PayPal Options -> EOT Behavior</code>.</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-cancellation-form-shortcode.php")));
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-cancellation-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Member Registration Access Links">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-reg-links-section">' . "\n";
     echo '<h3>Registration Access Link Generator ( for Customer Service )</h3>' . "\n";
     echo '<p>optimizeMember Pro Forms consolidate the Registration/Checkout process into a single-step solution, so it is unlikely that you will ever need this tool. That being said, if you DO need to deal with a Customer Service issue that requires a simple paid Registration Access Link to be created manually, you can use this tool for that. Alternatively, you can create their account yourself/manually by going to <code>optimizeMember -> Add A Member</code>. Either of these methods will work fine.</p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<p>Paid Membership Level#: <select id="ws-plugin--optimizemember-pro-reg-link-level">' . "\n";
     for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
         $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
         echo '<option value="' . $n . '">optimizeMember Level ' . $labelText . '</option>' . "\n";
     }
     echo '</select></p>' . "\n";
     echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID ( aka: Recurring Profile ID, Transaction ID ) must be unique. This value can be obtained from inside your PayPal account in the History tab. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, optimizeMember will be unable to maintain future communication with the PayPal IPN ( i.e. Notification ) service if this value does not reflect a real Paid Subscr. ID that exists in your PayPal History log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-custom" value="' . esc_attr($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__optimizemember_pro_paypalRegLinkGenerate();" class="button-primary" /> <img id="ws-plugin--optimizemember-pro-reg-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
     echo '<p' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
     echo '<p>Fixed Term Length ( for Buy Now transactions ): <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction ( i.e. there is no Initial/Trial Period and no recurring charges for ongoing access ), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is revoked by optimizeMember at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D ( this means 1 Day )\\n1 W ( this means 1 Week )\\n1 M ( this means 1 Month )\\n1 Y ( this means 1 Year )\\n1 L ( this means 1 Lifetime )\'); return false;">[?]</a></p>' . "\n";
     echo '<p id="ws-plugin--optimizemember-pro-reg-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Specific Post/Page (Buy Now) Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-sp-forms-section">' . "\n";
     echo '<h3>Pro Form Generator For Specific Post/Page Forms</h3>' . "\n";
     echo '<p>optimizeMember now supports an additional layer of functionality ( very powerful ), which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" functionality. Your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
     echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. optimizeMember will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link ( see: <code>optimizeMember -> PayPal Options -> Specific Post/Page Email</code> ). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
     echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress. A Specific Post/Page that is protected by optimizeMember, might contain a download link for your eBook, access to file &amp; music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress Post/Page that you\'ve created. To protect Specific Posts/Pages, please see: <code>optimizeMember -> Restriction Options -> Specific Post/Page Access</code>. Once you\'ve configured your Specific Post/Page Restrictions, those Posts/Pages will be available in the menus below.</p>' . "\n";
     echo '<p>Very simple. All you do is customize the form fields provided, for each Post/Page that you plan to sell. Then press (Generate Form Code). These special PayPal Forms are customized to work with optimizeMember seamlessly. You can even Package Additional Posts/Pages together into one transaction.</p>' . "\n";
     echo '<p><em>* Forms are NOT saved here. This is only a Form Generator. Once you\'ve generated your Form, copy/paste it into any Post/Page you like. You\'ll want to provide your visitors with a link to the Post/Page where this Form is located.</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-leading-id">' . "\n";
     echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
     /**/
     $ws_plugin__optimizemember_pro_temp_a_singulars = c_ws_plugin__optimizemember_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
     /**/
     foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
         echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
     }
     /**/
     echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\\n\\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-additional-ids" multiple="multiple" style="height:100px;">' . "\n";
     echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
     /**/
     foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
         echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
     }
     /**/
     echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and optimizeMember generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* optimizeMember sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     /**/
     echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-sp-hours">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select></p>' . "\n";
     echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
     echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nWith PayPal Pro integration, this is only applied to PayPal Express Checkout pages; when/if a Customer chooses PayPal as the Payment Method.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-page-style" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-pro-sp-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Form Code" onclick="ws_plugin__optimizemember_pro_paypalSpFormGenerate();" class="button-primary" /></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-sp-checkout-form-shortcode.php")));
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Specific Post/Page Access Links">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-sp-links-section">' . "\n";
     echo '<h3>Specific Post/Page Link Generator ( for Customer Service )</h3>' . "\n";
     echo '<p>optimizeMember automatically generates Specific Post/Page Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Specific Post/Page Link to be created manually, you can use this tool for that.</p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-link-leading-id">' . "\n";
     echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
     /**/
     $ws_plugin__optimizemember_pro_temp_a_singulars = c_ws_plugin__optimizemember_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
     /**/
     foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
         echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
     }
     /**/
     echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\\n\\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-link-additional-ids" multiple="multiple" style="height:100px; min-width:450px;">' . "\n";
     echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
     /**/
     foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
         echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
     }
     /**/
     echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and optimizeMember generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* optimizeMember sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-link-hours">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select> <input type="button" value="Generate Access Link" onclick="ws_plugin__optimizemember_pro_paypalSpLinkGenerate();" class="button-primary" /> <img id="ws-plugin--optimizemember-pro-sp-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
     echo '<p id="ws-plugin--optimizemember-pro-sp-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-group" title="Custom Return URLs Upon Success">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-forms-success-section">' . "\n";
         echo '<h3>Custom Return URLs Upon Success ( optional, for developers )</h3>' . "\n";
         echo '<p>optimizeMember Pro opens the door for Custom Return URLs upon success. You can add a special attribute to any Form Shortcode ( <code>success="/my-thank-you-page/"</code> ). This makes it possible to integrate PayPal Pro Forms in very creative ways; and even receive/verify Replacement Code variables, as needed. For example, ( <code>success="/my-thank-you-page/?subscr_id=%%subscr_id%%"</code> ).</p>' . "\n";
         echo '<p><em>A Custom Return URL is 100% optional. In fact, if you only need to obtain details for the purpose of tracking sales, you should just use the simpler API Tracking methods provided by optimizeMember, under: <code>optimizeMember -> API / Tracking</code>. In other words, if you don\'t use the <code>success=""</code> attribute in your Shortcode, optimizeMember will handle things gracefully, all on its own. So using a Custom Return URL is only necessary when you need advanced customization for one reason or another.</em></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Free Registration Forms ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-free-registration\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-free-registration" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%role%%</code> = The Role ID <code>( subscriber, optimizemember_level[0-9]+, administrator, editor, author, contributor )</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>%%auto_eot_time%%</code> = Auto-EOT Time ( if applicable ). Ex: <code>1299925670</code> ( <em>unix timestamp</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, 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>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use <a href="http://www.optimizepress.com/codex/stable/s2member/api_functions/package-functions/#src_doc_optimizemember_decrypt()" target="_blank" rel="external">optimizemember_decrypt()</a>.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported here:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\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> optimizeMember -> 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 style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\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 '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Membership Sales / Signups &amp; Modifications ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-sales\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-sales" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%subscr_id%%</code> = The PayPal Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase. PayPal does not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. Even if that amount is 0.\\n\\nIf a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0. So be careful using %%initial%% when you offer a 100% Free Trial Period, because a $0.00 sale amount could cause havoc with affiliate programs.\\n\\nIf you\\\'re offering a 100% Free Trial Period, and you need to track sales through affiliate programs, you can either hard-code an amount; or use `optimizeMember -> API Notifications -> Payment Notifications` instead.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. This value is <code>always > 0</code>, no matter what. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. The %%regular%% rate is always > 0. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) for the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D ( this means 1 Day )\\n%%initial_term%% = 1 W ( this means 1 Week )\\n%%initial_term%% = 1 M ( this means 1 Month )\\n%%initial_term%% = 1 Y ( this means 1 Year )\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D ( this means 1 Day )\\n%%regular_term%% = 1 W ( this means 1 Week )\\n%%regular_term%% = 1 M ( this means 1 Month )\\n%%regular_term%% = 1 Y ( this means 1 Year )\\n%%regular_term%% = 1 L ( this means 1 Lifetime )\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period ( or duration ) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%modification%%</code> = <code>1</code> if/when a Billing Modification has just taken place; otherwise <code>0</code> indicates a new Customer.</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use optimizemember_decrypt().</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported here:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\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> optimizeMember -> 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 style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\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 '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Independent Custom Capability Sales ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-ccaps\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-ccaps" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%txn_id%%</code> = The Payment Transaction ID, which is always unique for each payment received.</li>' . "\n";
         echo '<li><code>%%amount%%</code> = The Amount of the payment. Most affiliate programs calculate commissions from this.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>*level:custom_capabilities:fixed term</em></code> ) that the payment is for. [ <a href="#" onclick="alert(\'With Independent Custom Capabilities, the `level` portion of this string will be an asterisk ( `*` ), since the Membership Level is irrelevant, and remains `as it was`.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use optimizemember_decrypt().</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported here:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\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> optimizeMember -> 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 style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\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 '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Specific Post/Page Transactions ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-sp-sales\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-sp-sales" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%sp_access_url%%</code> = The full URL ( generated by optimizeMember ) where the Customer can gain access.</li>' . "\n";
         echo '<li><code>%%sp_access_exp%%</code> = Human readable expiration for <code>%%sp_access_url%%</code>. Ex: <em>( link expires in <code>%%sp_access_exp%%</code> )</em>.</li>' . "\n";
         echo '<li><code>%%txn_id%%</code> = The PayPal Transaction ID. PayPal assigns a unique identifier for every purchase.</li>' . "\n";
         echo '<li><code>%%amount%%</code> = The full Amount of the sale. Most affiliate programs calculate commissions from this.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link to the Specific Post/Page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link to the Specific Post/Page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use optimizemember_decrypt().</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\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 '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Cancellations &amp; Billing Updates ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-cancellations-updates\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-cancellations-updates" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link back to their account page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link back to their account page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use optimizemember_decrypt().</li>' . "\n";
         echo '</ul>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Verify The Integrity Of Replacement Codes ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-verification\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-verification" style="display:none;">' . "\n";
         echo '<p>If you know a little PHP, you can verify the integrity of the Replacement Codes returned by optimizeMember. This is important, because in this particular situation, Replacement Codes are passed publicly in the query string of your Custom Return URL. In other words, a Customer could manually change one of the values; like the dollar amounts. For this reason, you should always verify the integrity of the details being returned to any processing routines that receive this information. In the PHP code for your Custom Return URL, you can use this optimizeMember API Function: <code>optimizemember_pro_paypal_s2p_v_query_ok()</code>.</p>' . "\n";
         echo '<p>Here are some examples:</p>' . "\n";
         echo '<p>1. <strong>Shortcode attribute:</strong> <code>success="/thank-you/?subscr_id=%%subscr_id%%&amp;initial=%%initial%%&amp;regular=%%regular%%"</code></p>' . "\n";
         echo '<p>2. <strong>optimizeMember returns Customer to:</strong> <code>/thank-you/?subscr_id=123&amp;initial=0.00&amp;regular=24.95&amp;s2p-v=234098234-23409sdfs234sd234209sdf</code></p>' . "\n";
         echo '<p>3. <strong>Now, in your Custom Return Page, you will need to do this before trusting anything:</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-s2p-v-query-ok-1.x-php")) . '</p>' . "\n";
         echo '<p>optimizeMember will only verify a query string for up to 10 seconds. After 10 seconds, <code>optimizemember_pro_paypal_s2p_v_query_ok()</code> will always return <code>false</code>, even if the integrity of the query string is valid. This prevents a Customer from bookmarking your Return URL; thereby causing duplicate commissions; in case you\'re using it for tracking purposes.</p>' . "\n";
         echo '<p>Again, if you only need to obtain details for the purpose of tracking sales, you should just use the simpler API Tracking methods provided by optimizeMember, under: <code>optimizeMember -> API / Tracking</code>. The API Tracking methods are specifically designed for tracking sales, exactly ONE time for each Customer.</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><em>If it is your intention to allow Customers to bookmark your Custom Return URL, you can still do that. Just be aware that <code>optimizemember_pro_paypal_s2p_v_query_ok()</code> will return <code>false</code> after the first 10 seconds. If you want to verify after 10 seconds, you can pass a second argument to the function, like this:</em></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-s2p-v-query-ok-2.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Could a Customer change the timestamp in the URL?</h3>' . "\n";
         echo '<p>Based on the structure of the URL, it would appear possible; however, it\'s NOT. optimizeMember uses an advanced checksum.</p>' . "\n";
         echo '<h3>Can I get rid of the <code>s2p-v</code> variable?</h3>' . "\n";
         echo '<p>No, this variable is always passed to your Custom Return URL, it\'s for important verification purposes.</p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     echo '<div class="ws-menu-page-group" title="Shortcode Attributes ( Explained )">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-shortcode-attrs-section">' . "\n";
     echo '<h3>Shortcode Attributes ( Explained In Full Detail )</h3>' . "\n";
     echo '<p>When you generate a Form, optimizeMember will make a <a href="http://codex.wordpress.org/Shortcode_API#Overview" target="_blank" rel="external">Shortcode</a> available to you. Like most Shortcodes for WordPress, optimizeMember reads Attributes in your Shortcode. These Attributes will be pre-configured by one of optimizeMember\'s Form Generators automatically; so there really is nothing more you need to do. However, many site owners like to know exactly how these Shortcode Attributes work. Below, is a brief overview of each possible Shortcode Attribute.</p>' . "\n";
     /**/
     echo '<table class="form-table" style="margin-top:0;">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr style="padding-top:0;">' . "\n";
     /**/
     echo '<td style="padding-top:0;">' . "\n";
     echo '<ul>' . "\n";
     echo '<li><code>accept="paypal,visa,mastercard,amex,discover,maestro,solo"</code> Accepted Billing Methods. A comma-delimited list of Billing Methods you want to accept. Due to a PayPal policy, you may NOT exclude PayPal from this list; optimizeMember won\'t let you. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>accept_via_paypal="paypal"</code> Accepted Billing via PayPal. A comma-delimited list of Billing Methods you want to accept through PayPal, as opposed to processing them on-site. Due to a PayPal policy, you may NOT exclude PayPal from this list; optimizeMember won\'t let you. <strong>Tip:</strong> If you don\'t have a PayPal Pro account, you can set <code>accept="paypal"</code>, or set <code>accept_via_paypal="paypal,visa,mastercard,amex,discover,maestro,solo"</code>. With one or both of these configurations, all you need is a PayPal Standard account with Express Checkout <em>( which is free )</em>. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>accept_coupons="1"</code> Accept Coupons? Possible values: <code>0</code> = do NOT accept Coupons on this particular Form; <code>1</code> = DO accept Coupon Codes on this particular Form.</li>' . "\n";
     echo '<li><code>cancel="0"</code> Cancellation Form. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Cancellation Form, <code>1</code> = this IS a Cancellation Form.</li>' . "\n";
     echo '<li><code>captcha="clean"</code> When you set this Attribute, visitors must prove they\'re human by typing a <a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank" rel="external">captcha/security code</a>. Possible values: <code>0</code> = do NOT require a captcha code on this Form; <code>clean</code> = DO require a captcha code on this Form; using the <code>clean</code> theme style. Possible theme styles include: <code>red</code>, <code>white</code>, <code>clean</code>, and <code>blackglass</code>. This service is powered by Google\'s reCaptcha system.</li>' . "\n";
     echo '<li><code>cc="USD"</code> 3 character Currency Code. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<li><code>ccaps="music,videos"</code> A comma-delimited list of Custom Capabilities. Only valid w/ Membership Level Access and/or Independent Custom Capabilities.</li>' . "\n" : '';
     echo '<li><code>coupon="SAVE-10"</code> Default/pre-filled Coupon Code. This is optional, and the Coupon Code ( if supplied ) must exist in your Coupon Code configuration.</li>' . "\n";
     echo '<li><code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '"</code> must start with your domain. Additional values can be piped in ( ex: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3|etc"</code> ). Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>default_country_code="US"</code> If you set this 2-character value, it will pre-configure the default Country that is selected in the drop-down menu for Checkout and Billing Update Forms. This MUST be an uppercase country code, following the <a href="http://www.iso.org/iso/english_country_names_and_code_elements" target="_blank" rel="external">ISO-3166-1 specification</a>. If this is empty ( i.e. <code>""</code> ) optimizeMember will set the default country code automatically; based on currency. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>desc="Gold Membership @ $29/mo"</code> A brief purchase Description. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>dg="0"</code> The Digital Goods directive. optimizeMember will eventually be integrated with <a href="http://www.optimizepress.com/paypal-express-co-digitals" target="_blank" rel="external">Digital Goods</a> for inline Express Checkout. But for now, this should always be <code>0</code>.</li>' . "\n";
     echo '<li><code>exp="72"</code> Access Expires ( in hours ). Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
     echo '<li><code>ids="14"</code> A Post/Page ID#, or a comma-delimited list of IDs. Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
     echo '<li><code>lc=""</code> Optional 2 character Locale Code <em>( i.e. Country Code )</em>. This controls the interface language used if/when a Customer chooses PayPal Express Checkout as their payment method. If unspecified, the language is determined by PayPal Express Checkout when possible, defaulting to <code>US</code> <em>english</em> when not possible. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>level="1"</code> Membership Level [1-4] <em>( or, up to the number of configured Levels )</em>. Only valid for Forms providing Membership Level Access, which includes Free Registration Forms too. Free Registration Forms allow a value of <code>level="0"</code> whenever <code>register="1"</code> for Free Registration. In addition, Free Registration Forms will also allow visitors to register for free, even at higher Levels if you wish. Free Registration Forms will accept any value [0-4] <em>( or, up to the number of configured Levels )</em>.' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' With Independent Custom Capabilities this MUST be set to <code>level="*"</code>, and <code>ccaps=""</code> must NOT be empty <em>( i.e. <code>level="*" ccaps="music,videos"</code> )</em>.') . '</li>' . "\n";
     echo '<li><code>modify="0"</code> Modification directive. Only valid w/ Membership Level Access. Possible values: <code>0</code> = allows Customers to modify their current Subscription or sign up for a new one, <code>1</code> = allows Customers to only modify their current Subscription. When <code>modify="1"</code>, optimizeMember will force a Customer to be logged-in before they can fill out the Form ( very handy ). This is slightly different than PayPal "Button" Codes; there is no "2" option for "Forms"; only <code>0</code> &amp; <code>1</code> are valid values.</li>' . "\n";
     echo '<li><code>ns="1"</code> The <em>no_shipping</em> directive. Possible values: <code>0</code> = prompt for an address, but do not require one, <code>1</code> = do not prompt for a shipping address, <code>2</code> = prompt for an address, and require one. Applies only to PayPal Express Checkout; because Pro Forms do not ask for a Shipping Address. However, you may request a Shipping Address by creating Custom Fields under: <em>optimizeMember -> General Options -> Registration/Profile Fields</em>. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>ps="paypal"</code> PayPal checkout Page Style. Applies only to PayPal Express Checkout. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>register="0"</code> Free Registration Form. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Free Registration Form, <code>1</code> = this IS a Free Registration Form.</li>' . "\n";
     echo '<li><code>ra="0.01"</code> Regular, Buy Now, and/or Recurring Amount. Must be &gt;= <code>0.01</code>. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>rp="1"</code> Regular Period. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Must be &gt;= <code>1</code> ( ex: <code>1</code> Week, <code>2</code> Months, <code>1</code> Month, <code>3</code> Days ).</li>' . "\n";
     echo '<li><code>rt="M"</code> Regular Term. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Possible values: <code>D</code> = Days, <code>W</code> = Weeks, <code>M</code> = Months, <code>Y</code> = Years, <code>L</code> = Lifetime. — <strong>NOTICE (regarding Payflow):</strong> Please be aware that <code>D</code> = Days is NOT possible under PayPal Pro (Payflow Edition). If you are operating a PayPal Pro account, with the Payflow Edition, please take note. Payflow supports ONLY a specific set of recurring intervals. Pro Forms integrated with the Payflow API, can be configured to charge: weekly, bi-weekly, monthly, quarterly, every six months, or yearly.</li>' . "\n";
     echo '<li><code>rr="1"</code> Recurring directive. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Possible values: <code>0</code> = non-recurring "Subscription" with possible Trial Period for free, or at a different Trial Amount; <code>1</code> = recurring "Subscription" with possible Trial Period for free, or at a different Trial Amount; <code>BN</code> = non-recurring "Buy Now" functionality, no Trial Period possible.</li>' . "\n";
     echo '<li><code>rrt=""</code> Recurring Times <em>( i.e. a fixed number of installments )</em>. Only valid w/ Membership Level Access. When unspecified, any recurring charges will remain ongoing until cancelled, or until payments start failing. If this is set to <code>1 or higher</code> the regular recurring charges will only continue for X billing cycles, depending on what you specify. This is only valid when <code>rr="1"</code> for recurring "Subscriptions". Please note that a fixed number of installments, also means a fixed period of access. If a Customer\'s billing is monthly, and you set <code>rrt="3"</code>, billing will continue for only 3 monthly installments. After that, billing would stop, and their access to the site would be revoked as well <em>( based on your EOT Behavior setting under: optimizeMember -> PayPal Options )</em>.</li>' . "\n";
     echo '<li><code>rra="2"</code> Reattempt failed payments? Possible values: <code>0</code> = do NOT reattempt billing when/if a recurring payment fails; <code>1 or higher</code> = yes, DO reattempt billing when/if a recurring payment fails. With PayPal Pro integration, PayPal will retry a maximum of 2 times whenever <code>rra="2"</code>; after that, a Subscription would be terminated due to Max Failed Payments having been reached. With PayPal Pro integration, the value of this attribute also configures Max Failed Payments. So a setting of <code>rra="2"</code> means that you allow a maximum of 2 failed payments.</li>' . "\n";
     echo '<li><code>sp="0"</code> Specific Post/Page Form. Possible values: <code>0</code> = this is NOT a Specific Post/Page Access Form, <code>1</code> = this IS a Specific Post/Page Access Form.</li>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<li><code>success=""</code> 100% optional. This can be used to create a Custom Return URL on success. Please see the sub-section above titled: <em>Custom Return URLs on Success</em>.</li>' . "\n" : '';
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<li><code>template=""</code> 100% optional. This can be a custom template file that exists inside your WordPress theme directory. For example: <code>template="checkout.php"</code>.</li>' . "\n" : '';
     echo '<li><code>ta="0.00"</code> Trial Amount. Only valid w/ Membership Level Access. Must be <code>0</code> when <code>rt="L"</code> or when <code>rr="BN"</code>.</li>' . "\n";
     echo '<li><code>tp="0"</code> Trial Period. Only valid w/ Membership Level Access. Must be <code>0</code> when <code>rt="L"</code> or when <code>rr="BN"</code>.</li>' . "\n";
     echo '<li><code>tt="D"</code> Trial Term. Only valid w/ Membership Level Access. Possible values: <code>D</code> = Days, <code>W</code> = Weeks, <code>M</code> = Months, <code>Y</code> = Years.</li>' . "\n";
     echo '<li><code>update="0"</code> Billing Update Form. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Billing Update Form, <code>1</code> = this IS a Billing Update Form.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
Ejemplo n.º 26
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /**/
     echo '<div class="op-bsw-header">';
     echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
     echo '</div>';
     echo '<div class="op-bsw-main-content">';
     echo '<h2>API / Notifications</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__optimizemember_options_form" id="ws-plugin--optimizemember-options-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_options_save" id="ws-plugin--optimizemember-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-options-save")) . '" />' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_configured" id="ws-plugin--optimizemember-configured" value="1" />' . "\n";
     /**/
     do_action("ws_plugin__optimizemember_during_api_ops_page_before_left_sections", get_defined_vars());
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_display_signup_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_before_signup_notifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Signup Notifications">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-signup-notifications-section">' . "\n";
         echo '<h3>Signup Notification URLs ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever a new Subscription is created, you\'ll want to read this section. This is marked `Signup`, because the URLs that you list below, will be notified each time a "new", "paying" Member, signs up. Depending on your fee structure, this may include a first Initial Payment that establishes their Subscription, or it may not. This Notification will only be triggered once for each Member. Signup Notifications are sent right after a "new", "paying" Member, signs up successfully through your Payment Gateway, regardless of whether any money has actually been transacted initially. In other words, this Notification is triggered anytime a "new", "paying" Member, signs up through your Payment Gateway, even if you provided them with a 100% Free Trial Period <em>( e.g. no money is being transacted intially )</em>.</p>' . "\n";
         echo '<p>This Notification will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all. This Notification will NOT be processed when an "existing" User/Member pays for a new Subscription <em>( see: Modification Notifications for that scenario )</em>.' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' And, this Notification will NOT be processed on Buy Now transactions for Independent Custom Capabilities <em>( see: Payment Notifications for that scenario )</em>.') . '</p>' . "\n";
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>( and other service integrations )</em> are already built into optimizeMember. They remain active at all times. These Signup Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_during_signup_notifications", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-signup-notification-urls">' . "\n";
         echo 'Signup Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_signup_notification_urls" id="ws-plugin--optimizemember-signup-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["signup_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'Signup Notifications take place silently behind-the-scene, using an HTTP connection.<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>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase. Payment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. Even if that amount is 0.\\n\\nIf a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0. So be careful using %%initial%% when you offer a 100% Free Trial Period, because a $0.00 sale amount could cause havoc with affiliate programs.\\n\\nIf you\\\'re offering a 100% Free Trial Period, and you need to track sales through affiliate programs, you can either hard-code an amount; or use `Payment Notifications` instead.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. This value is <code>always > 0</code>, no matter what. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. The %%regular%% rate is always > 0. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) for the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D ( this means 1 Day )\\n%%initial_term%% = 1 W ( this means 1 Week )\\n%%initial_term%% = 1 M ( this means 1 Month )\\n%%initial_term%% = 1 Y ( this means 1 Year )\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D ( this means 1 Day )\\n%%regular_term%% = 1 W ( this means 1 Week )\\n%%regular_term%% = 1 M ( this means 1 Month )\\n%%regular_term%% = 1 Y ( this means 1 Year )\\n%%regular_term%% = 1 L ( this means 1 Lifetime )\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period ( or duration ) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</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 '</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--optimizemember-signup-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\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__optimizemember_signup_notification_recipients" id="ws-plugin--optimizemember-signup-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["signup_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_display_registration_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_before_registration_notifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Registration Notifications">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-registration-notifications-section">' . "\n";
         echo '<h3>Registration Notification URLs ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever a "new" Member is created, you\'ll want to read this section. This is marked `Registration`, because the URLs that you list below, will be notified each time a "new" Member registers a Username. This is usually triggered right after a `Signup` Notification; at the point in which a "new" Member successfully completes the Registration form, and they are assigned a Username.</p>' . "\n";
         echo '<p>This Notification is ALSO triggered whenever you create a "new" User inside your WordPress Dashboard.</p>' . "\n";
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>( and other service integrations )</em> are already built into optimizeMember. They remain active at all times. These Registration Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_during_registration_notifications", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-registration-notification-urls">' . "\n";
         echo 'Registration Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_registration_notification_urls" id="ws-plugin--optimizemember-registration-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["registration_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'Registration Notifications take place silently behind-the-scene, using an HTTP connection.<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, optimizemember_level[0-9]+, administrator, editor, author, contributor )</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>%%auto_eot_time%%</code> = Auto-EOT Time ( if applicable ). Ex: <code>1299925670</code> ( <em>unix timestamp</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 '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</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> optimizeMember -> 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 '</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--optimizemember-registration-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\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__optimizemember_registration_notification_recipients" id="ws-plugin--optimizemember-registration-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["registration_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_after_registration_notifications", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_display_payment_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_before_payment_notifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Payment Notifications">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-payment-notifications-section">' . "\n";
         echo '<h3>Payment Notification URLs ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever payment transactions <em>( including Recurring Payments )</em> take place, you\'ll want to read this section. This is marked `Payment`, because the URLs that you list below, will be notified each time an actual payment occurs. Depending on your fee structure, this may include a first Initial Payment that establishes a Subscription. But more importantly, this will be triggered on all future payments that are received for the lifetime of the Subscription.</p>' . "\n";
         echo '<p>So, unlike the `Signup` Notification, `Payment` Notifications take place whenever actual payments are received, instead of just once after signup is completed. If a payment is required during signup <em>( i.e. no Free Trial is being offered )</em>, a Signup Notification will be triggered, and a Payment Notification will ALSO be triggered. In other words, a Payment Notification occurs anytime funds are received, no matter what.</p>' . "\n";
         echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p>Payment Notifications are also triggered whenever a Buy Now purchase for Independent Custom Capabilities takes place.</p>' . "\n" : '';
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>( and other service integrations )</em> are already built into optimizeMember. They remain active at all times. These Payment Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_during_payment_notifications", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-payment-notification-urls">' . "\n";
         echo 'Payment Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_payment_notification_urls" id="ws-plugin--optimizemember-payment-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["payment_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'Payment Notifications take place silently behind-the-scene, using an HTTP connection.<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>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There are some exceptions. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, and/or Independent Custom Capabilities, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the payment.\\n\\nPayment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), which goes for Independent Custom Capability purchases too; using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%txn_id%%</code> = The Payment Transaction ID, which is always unique for each payment received.</li>' . "\n";
         echo '<li><code>%%amount%%</code> = The Amount of the payment. Most affiliate programs calculate commissions from this.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' or Capabilities.') . '</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' or Capabilities.') . '</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' or Capabilities.') . '</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' or Capabilities.') . '</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the payment is for.' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' [ <a href="#" onclick="alert(\'If the Payment Notification is for Independent Custom Capabilities, the `level` portion of this string will be an asterisk ( `*` ), since the Membership Level is irrelevant, and remains `as it was` in that scenario. In all other cases, the `level` portion will be a numeric value.\'); return false;">?</a> ]') . '</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</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> optimizeMember -> 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 '</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--optimizemember-payment-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\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__optimizemember_payment_notification_recipients" id="ws-plugin--optimizemember-payment-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["payment_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_after_payment_notifications", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_display_modification_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_before_modification_notifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Modification Notifications">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-modification-notifications-section">' . "\n";
         echo '<h3>Modification Notification URLs ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified each time a new Subscription is created by an "existing" User/Member, or an "existing" Member modifies their paid Subscription terms, you\'ll want to read this section. This is marked `Modification`, because the URLs that you list below, will be notified each time an "existing" User/Member <em>( even if they are/were a Free Subscriber )</em> signs up for a paid Subscription <em>( i.e. a Modification takes place against an existing account within WordPress )</em>, or an "existing" Member modifies their paid Subscription terms <em>( again, a Modification takes places against an existing account within WordPress )</em>. Depending on your fee structure, this may include a first Initial Payment that establishes their Subscription, or it may not.</p>' . "\n";
         echo '<p>Modification Notifications are sent right after a Member signs up and/or modifies billing terms successfully through your Payment Gateway, regardless of whether any money has actually been transacted initially. In other words, this Notification is triggered, even if you provided them with a 100% Free Trial Period <em>( e.g. no money is being transacted intially )</em>.</p>' . "\n";
         echo '<p>This Notification will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all. This Notification will NOT be processed for "new" Users/Members <em>( see: Signup Notifications for that scenario )</em>.' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' And, this Notification will NOT be processed for Independent Custom Capability purchases <em>( see: Payment Notifications for that scenario )</em>.') . '</p>' . "\n";
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>( and other service integrations )</em> are already built into optimizeMember. They remain active at all times. These Modification Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_during_modification_notifications", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-modification-notification-urls">' . "\n";
         echo 'Modification Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_modification_notification_urls" id="ws-plugin--optimizemember-modification-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["modification_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'Modification Notifications take place silently behind-the-scene, using an HTTP connection.<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>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase. Payment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. Even if that amount is 0.\\n\\nIf a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0. So be careful using %%initial%% when you offer a 100% Free Trial Period, because a $0.00 sale amount could cause havoc with affiliate programs.\\n\\nIf you\\\'re offering a 100% Free Trial Period, and you need to track sales through affiliate programs, you can either hard-code an amount; or use `Payment Notifications` instead.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. This value is <code>always > 0</code>, no matter what. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. The %%regular%% rate is always > 0. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) for the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D ( this means 1 Day )\\n%%initial_term%% = 1 W ( this means 1 Week )\\n%%initial_term%% = 1 M ( this means 1 Month )\\n%%initial_term%% = 1 Y ( this means 1 Year )\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D ( this means 1 Day )\\n%%regular_term%% = 1 W ( this means 1 Week )\\n%%regular_term%% = 1 M ( this means 1 Month )\\n%%regular_term%% = 1 Y ( this means 1 Year )\\n%%regular_term%% = 1 L ( this means 1 Lifetime )\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period ( or duration ) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</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> optimizeMember -> 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 '</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--optimizemember-modification-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\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__optimizemember_modification_notification_recipients" id="ws-plugin--optimizemember-modification-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["modification_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_display_cancellation_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_before_cancellation_notifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Cancellation Notifications">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-cancellation-notifications-section">' . "\n";
         echo '<h3>Cancellation Notification URLs ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever Subscriptions are cancelled through your Payment Gateway, you\'ll want to read this section. This is marked `Cancellation`, because the URLs that you list below, will be notified each time a Subscription is cancelled. A Cancellation is triggered when you cancel a Customer\'s Subscription through your Payment Gateway, or when a Customer cancels their own Subscription.</p>' . "\n";
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>( and other service integrations )</em> are already built into optimizeMember. They remain active at all times. These Cancellation Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
         echo '<p><em><strong>*Understanding Cancellations*</strong> It\'s important to realize that a Cancellation is not an EOT ( End Of Term ). All that happens during a Cancellation event, is that billing is stopped, and it\'s understood that the Customer is going to lose access, at some point in the future. This does NOT mean, that access will be revoked immediately. A separate EOT event will automatically handle a (demotion or deletion) later, at the appropriate time; which could be several days, or even a year after the Cancellation took place.</em></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 your Payment Gateway... but, optimizeMember 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. optimizeMember 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 optimizeMember.</em></p>' . "\n";
         echo '<p><em>optimizeMember will not process an EOT ( End Of Term ) 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, optimizeMember will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). optimizeMember 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";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_during_cancellation_notifications", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-cancellation-notification-urls">' . "\n";
         echo 'Cancellation Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_cancellation_notification_urls" id="ws-plugin--optimizemember-cancellation-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["cancellation_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'Cancellation Notifications take place silently behind-the-scene, using an HTTP connection.<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>%%subscr_id%%</code> = The Paid Subscription ID, which remained constant throughout the lifetime of the Membership. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the original Transaction ID for the purchase. Payment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there was only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <em>level:custom_capabilities:fixed term</em> ) that the Subscription was for.</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</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> optimizeMember -> 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 '</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--optimizemember-cancellation-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\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__optimizemember_cancellation_notification_recipients" id="ws-plugin--optimizemember-cancellation-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["cancellation_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_after_cancellation_notifications", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_display_eot_deletion_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_before_eot_deletion_notifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="EOT/Deletion Notifications">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-eot-deletion-notifications-section">' . "\n";
         echo '<h3>EOT/Deletion Notification URLs ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever Subscriptions have ended <em>( and a Member is demoted to a Free Subscriber )</em>, or when an account is deleted from the system, you\'ll want to read this section. This is marked `EOT/Deletion`, because the URLs that you list below, will be notified in both cases.</p>' . "\n";
         echo '<p><strong>EOT = End Of Term.</strong> An EOT is triggered <em>immediately</em> when you refund a Customer, when a Customer forces a chargeback to occur, or when a paid Subscription ends naturally <em>( i.e. expires )</em>, and your Payment Gateway sends optimizeMember an EOT ( End Of Term ) response. Delayed EOTs occur after a Cancellation, either as a result of you cancelling a Customer\'s Subscription, or a Customer cancelling their own Subscription. A Cancellation usually results in a delayed EOT, because a Cancellation does NOT always warrant an immediate action; there could still be time left on their Subscription.</p>' . "\n";
         echo '<p>Manual Deletions will trigger this Notification too. If you delete an account manually from within your WordPress Dashboard, your URLs can be notified automatically through this API Notification, and this scenario can be detected through the Replacement Code <code>%%eot_del_type%%</code>, which is documented below. So the two events are an EOT <em>( of any kind )</em> and/or a Manual Deletion.</p>' . "\n";
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>( and other service integrations )</em> are already built into optimizeMember. They remain active at all times. These EOT/Deletion Notifications are an added layer of functionality, and they are completely optional.</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 your Payment Gateway... but, optimizeMember 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. optimizeMember 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 optimizeMember.</em></p>' . "\n";
         echo '<p><em>optimizeMember will not process an EOT ( End Of Term ) 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, optimizeMember will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). optimizeMember 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";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_during_eot_deletion_notifications", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-eot-del-notification-urls">' . "\n";
         echo 'EOT/Deletion Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_eot_del_notification_urls" id="ws-plugin--optimizemember-eot-del-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["eot_del_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'EOT/Deletion Notifications take place silently behind-the-scene, using an HTTP connection.<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>%%eot_del_type%%</code> = The type of event that triggered this Notification. [ <a href="#" onclick="alert(\'List of possible values:\\n\\nuser-removal-deletion ( i.e. manual removal/deletion )\\nauto-eot-cancellation-expiration-demotion\\nauto-eot-cancellation-expiration-deletion\\nipn-cancellation-expiration-demotion\\nipn-cancellation-expiration-deletion\\nipn-refund-reversal-demotion\\nipn-refund-reversal-deletion\'); return false;">list of possible values</a> ]</li>' . "\n";
         echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remained constant throughout the lifetime of the Membership. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the original Transaction ID for the purchase. Payment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there was only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</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> optimizeMember -> 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 '</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--optimizemember-eot-del-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\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__optimizemember_eot_del_notification_recipients" id="ws-plugin--optimizemember-eot-del-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["eot_del_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_after_eot_deletion_notifications", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_display_refund_reversal_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_before_refund_reversal_notifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Refund/Reversal Notifications">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-refund-reversal-notifications-section">' . "\n";
         echo '<h3>Refund/Reversal Notification URLs ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever Subscriptions have been refunded or reversed <em>( i.e. charged back to you )</em>, you\'ll want to read this section. This is marked `Refund/Reversal`, because the URLs that you list below, will ONLY be notified in those specific cases, as opposed to EOT/Deletion Notifications, which are all-inclusive.</p>' . "\n";
         echo '<p>This is very similar to the EOT/Deletion Notification described above. However, there is an important distinction. The all-inclusive EOT/Deletion Notification includes cancellations, expirations, failed payments, refunds, chargebacks, and even manual deletions by the Administrator from within the Dashboard. In other words, EOT/Deletion Notifications are processed ANY time a deletion or End Of Term action takes place. This API Notification, that is, Refund/Reversal Notifications, do NOT include all of those scenarios.</p>' . "\n";
         echo '<p>So the distinction is that Refund/Reversal Notifications are ONLY sent under two specific circumstances: 1. You log into your Payment Gateway and refund a payment that is associated with a Subscription. 2. The Customer complains to your Payment Gateway and a chargeback occurs, forcing a Reversal. In both of these cases, an EOT/Deletion Notification will be sent <em>( as described in the previous section )</em>, but since EOT/Deletion is a broader Notification, these Refund/Reversal Notifications are here so you can nail down specific back-office operations in these two specific scenarios.</p>' . "\n";
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>( and other service integrations )</em> are already built into optimizeMember. They remain active at all times. These Refund/Reversal Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_during_refund_reversal_notifications", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-ref-rev-notification-urls">' . "\n";
         echo 'Refund/Reversal Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_ref_rev_notification_urls" id="ws-plugin--optimizemember-ref-rev-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ref_rev_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'Refund/Reversal Notifications take place silently behind-the-scene, using an HTTP connection.<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>%%subscr_id%%</code> = The Paid Subscription ID, which remained constant throughout the lifetime of the Membership. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the original Transaction ID for the purchase. Payment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there was only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%parent_txn_id%%</code> = The Parent Transaction ID, associated with the original payment being refunded/reversed.</li>' . "\n";
         echo '<li><code>%%-amount%%</code> = The Negative Amount of the payment, that was refunded or reversed back to the Customer.</li>' . "\n";
         echo '<li><code>%%-fee%%</code> = The Negative Payment Gateway fee, that was refunded back to you as the Merchant/Seller.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <em>level:custom_capabilities:fixed term</em> ) that the payment was for.</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</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> optimizeMember -> 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 '</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--optimizemember-ref-rev-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\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__optimizemember_ref_rev_notification_recipients" id="ws-plugin--optimizemember-ref-rev-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ref_rev_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_after_refund_reversal_notifications", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_display_sp_sale_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_before_sp_sale_notifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Specific Post/Page ~ Sale Notifications">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-sp-sale-notifications-section">' . "\n";
         echo '<h3>Specific Post/Page ~ Sale Notification URLs ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever Specific Post/Page sales take place, you\'ll want to read this section. This is marked `Specific Post/Page`, because the URLs that you list below, will be notified each time a payment occurs, on a sale providing access to a Specific Post/Page.</p>' . "\n";
         echo '<p>This is one of only two API Notifications that are sent for Specific Post/Page Access <em>( i.e. this one, and another below, for Refunds/Reversals )</em>. All of the other API Notifications are designed for Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and Independent Custom Capabilities') . '. None of the other API Notifications will ever be processed for Specific Post/Page Access. If you intend to respond to events related to Specific Post/Page Access, you MUST use one of the two API Notifications specifically geared to Post/Page Access.</p>' . "\n";
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>( and other service integrations )</em> are already built into optimizeMember. They remain active at all times. These Sale Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_during_sp_sale_notifications", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-sp-sale-notification-urls">' . "\n";
         echo 'Specific Post/Page ~ Sale Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_sp_sale_notification_urls" id="ws-plugin--optimizemember-sp-sale-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sp_sale_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'Specific Post/Page ~ Sale Notifications take place silently behind-the-scene, using an HTTP connection.<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>%%sp_access_url%%</code> = The full URL ( generated by optimizeMember ) where the Customer can gain access.</li>' . "\n";
         echo '<li><code>%%sp_access_exp%%</code> = Human readable expiration for <code>%%sp_access_url%%</code>. Ex: <em>( link expires in <code>%%sp_access_exp%%</code> )</em>.</li>' . "\n";
         echo '<li><code>%%txn_id%%</code> = The Paid Transaction ID. Payment Gateways assign a unique identifier for every purchase.</li>' . "\n";
         echo '<li><code>%%amount%%</code> = The full Amount of the sale. Most affiliate programs calculate commissions from this.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customers\'s IP Address, during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</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 '</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--optimizemember-sp-sale-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\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__optimizemember_sp_sale_notification_recipients" id="ws-plugin--optimizemember-sp-sale-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sp_sale_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_after_sp_sale_notifications", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_display_sp_refund_reversal_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_before_sp_refund_reversal_notifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Specific Post/Page ~ Refund/Reversal Notifications">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-sp-refund-reversal-notifications-section">' . "\n";
         echo '<h3>Specific Post/Page ~ Refund/Reversal Notification URLs ( optional )</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever sales have been refunded or reversed <em>( i.e. charged back to you )</em>, you\'ll want to read this section. This is marked `Specific Post/Page`, because the URLs that you list below, will be notified each time a Refund or Reversal occurs, on a sale that provided access to a Specific Post/Page.</p>' . "\n";
         echo '<p>This is one of only two Notifications that are sent for Specific Post/Page Access <em>( i.e. this one, and another above, for Sales )</em>. All of the other API Notifications are designed for Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and Independent Custom Capabilities') . '. None of the other API Notifications will ever be processed for Specific Post/Page Access. If you intend to respond to events related to Specific Post/Page Access, you MUST use one of the two API Notifications specifically geared to Post/Page Access.</p>' . "\n";
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>( and other service integrations )</em> are already built into optimizeMember. They remain active at all times. These Refund/Reversal Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_during_sp_refund_reversal_notifications", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-sp-ref-rev-notification-urls">' . "\n";
         echo 'Specific Post/Page ~ Refund/Reversal Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_sp_ref_rev_notification_urls" id="ws-plugin--optimizemember-sp-ref-rev-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sp_ref_rev_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'Specific Post/Page ~ Refund/Reversal Notifications take place silently behind-the-scene, using an HTTP connection.<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>%%parent_txn_id%%</code> = The Parent Transaction ID, associated with the original payment being refunded/reversed.</li>' . "\n";
         echo '<li><code>%%-amount%%</code> = The Negative Amount of the payment, that was refunded or reversed back to the Customer.</li>' . "\n";
         echo '<li><code>%%-fee%%</code> = The Negative Payment Gateway fee, that was refunded back to you as the Merchant/Seller.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased access to a Specific Post/Page.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</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 '</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--optimizemember-sp-ref-rev-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\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__optimizemember_sp_ref_rev_notification_recipients" id="ws-plugin--optimizemember-sp-ref-rev-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sp_ref_rev_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_api_ops_page_during_left_sections_after_sp_refund_reversal_notifications", get_defined_vars());
     }
     /**/
     do_action("ws_plugin__optimizemember_during_api_ops_page_after_left_sections", get_defined_vars());
     /**/
     // echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<p class="submit"><input type="submit" class="op-pb-button green" value="Save All Changes" /></p>' . "\n";
     /**/
     echo '</form>' . "\n";
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
Ejemplo n.º 27
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /**/
     echo '<div class="op-bsw-header">';
     echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
     echo '</div>';
     echo '<div class="op-bsw-main-content">';
     echo '<h2>Restriction 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__optimizemember_options_form" id="ws-plugin--optimizemember-options-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_options_save" id="ws-plugin--optimizemember-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-options-save")) . '" />' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_configured" id="ws-plugin--optimizemember-configured" value="1" />' . "\n";
     /**/
     do_action("ws_plugin__optimizemember_during_res_ops_page_before_left_sections", get_defined_vars());
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_display_post_level_access", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_before_post_level_access", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Post Access Restrictions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-post-level-access-section">' . "\n";
         echo '<h3>Post Level Access Restrictions ( optional )</h3>' . "\n";
         echo '<p>Here you can specify Posts that are restricted to certain Membership Access Levels. optimizeMember also supports Custom <a href="http://codex.wordpress.org/Post_Types" target="_blank" rel="external">Post Types</a> here. If you have a theme or plugin installed, which has enabled Custom Post Types <em>( i.e. Music/Videos or something else )</em>, you can put the IDs for those Posts here.</p>' . "\n";
         echo '<p><em><strong>*Note*</strong> Protecting individual Posts, ONLY protects the Permalinks for those Posts. It is still possible for excerpts of protected content to be seen in search results generated by WordPress, feeds, and Archive views; such as your Home Page, inside a Category listing, or through other queries formulated by your theme. This is the intended functionality. Excerpts are a great way to "tease" public visitors. In other words, public visitors may have access to excerpts introduced by your theme, but any attempt to view the full Post ( i.e. the Permalink ) will result in an automatic redirect to your Membership Options Page; requiring registration.</em></p>' . "\n";
         echo '<p><em><strong>*Note*</strong> If you would like to protect many Posts at once ( including Archive views ), you can use Category Level Restrictions, Tag Level Restrictions, or have a look down below at optimizeMember\'s options for "Alternative View Protection", which deals with search results, as well as feeds.</em></p>' . "\n";
         //echo ((!is_multisite () || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () || is_main_site ()) && empty($GLOBALS["WS_PLUGIN__"]["wp_show_ids"])) ? '<p><em><strong>*Tip*</strong> Can\'t find your Post IDs? Get <a href="http://wordpress.org/extend/plugins/wp-show-ids/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_during_post_level_access", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         /**/
         for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
             $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--optimizemember-level' . $n . '-posts">' . "\n";
             echo $n === $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? 'Posts That Require Highest Level' . $labelText . ':' . "\n" : 'Posts That Require Level ' . $labelText . ' Or Higher:' . "\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__optimizemember_level' . $n . '_posts" id="ws-plugin--optimizemember-level' . $n . '-posts" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_posts"]) . '" /><br />' . "\n";
             echo 'Post IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> — or you can type: <code>all</code>.<br />' . "\n";
             echo 'You can also include all Post IDs of a specific <a href="http://codex.wordpress.org/Post_Types" target="_blank" rel="external">Post Type</a>. Ex: <code>1,2,3,34,all-newspapers</code>.<br />' . "\n";
             echo '<em>( which protects several Post IDs, and <code>all</code> Posts of type: <code>newspaper</code> )</em>' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '</tr>' . "\n";
         }
         /**/
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_after_post_level_access", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_display_page_level_access", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_before_page_level_access", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Page Access Restrictions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-page-level-access-section">' . "\n";
         echo '<h3>Page Level Access Restrictions ( optional )</h3>' . "\n";
         echo '<p>Here you can specify Pages that are restricted to certain Membership Access Levels.</p>' . "\n";
         //echo ((!is_multisite () || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () || is_main_site ()) && !$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]) ? '<p><em><strong>*Tip*</strong> Can\'t find your Page IDs? Get <a href="http://wordpress.org/extend/plugins/wp-show-ids/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_during_page_level_access", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         /**/
         for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
             $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--optimizemember-level' . $n . '-pages">' . "\n";
             echo $n === $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? 'Pages That Require Highest Level ' . $labelText . ':' . "\n" : 'Pages That Require Level ' . $labelText . ' Or Higher:' . "\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__optimizemember_level' . $n . '_pages" id="ws-plugin--optimizemember-level' . $n . '-pages" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_pages"]) . '" /><br />' . "\n";
             echo 'Page IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> — or you can type: <code>all</code>.' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '</tr>' . "\n";
         }
         /**/
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_after_page_level_access", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_display_tag_level_access", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_before_tag_level_access", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Tag Access Restrictions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-tag-level-access-section">' . "\n";
         echo '<h3>Tag Level Access Restrictions ( optional )</h3>' . "\n";
         echo '<p>Here you can specify Tags that are restricted to certain Membership Access Levels. This is very similar to Category Level Access. When you restrict access to a Tag Archive, it also restricts access to any Post having that Tag; even if a Post has other Tags. <em>*Tip*</em> ... Tags can be applied to any Post, without affecting your Category structure at all. If you\'d like to use Tags with Pages, get <a href="http://wordpress.org/extend/plugins/page-tagger/" target="_blank" rel="external">Page Tagger</a>.</p>' . "\n";
         echo '<p>Tags are caSe sensitive. The Tag <code>members only</code> is NOT the same as <code>Members Only</code>.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_during_tag_level_access", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         /**/
         for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
             $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--optimizemember-level' . $n . '-ptags">' . "\n";
             echo $n === $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? 'Tags That Require Highest Level ' . $labelText . ':' . "\n" : 'Tags That Require Level ' . $labelText . ' Or Higher:' . "\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__optimizemember_level' . $n . '_ptags" id="ws-plugin--optimizemember-level' . $n . '-ptags" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_ptags"]) . '" /><br />' . "\n";
             echo 'Tags in comma-delimited format. Example: ' . ($n === 0 ? '<code>free,subscribers only</code>' : '<code>members,members only</code>') . ' — or you can type: <code>all</code>.' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '</tr>' . "\n";
         }
         /**/
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_after_tag_level_access", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_display_category_level_access", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_before_category_level_access", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Category Access Restrictions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-category-level-access-section">' . "\n";
         echo '<h3>Category Level Access Restrictions ( optional )</h3>' . "\n";
         echo '<p>Here you can specify Categories that are restricted to certain Membership Access Levels. Category restrictions are a bit more complex. When you restrict access to a Category, it also restricts access to any child Categories it may have <em>( aka: sub-Categories )</em>. In other words, restricting a Category, protects a Category Archive, all of its child Category Archives, and any Posts contained within the Category, or its child Categories. This is a VERY powerful form of protection, so please be careful. It\'s very easy to protect too much content by accident.</p>' . "\n";
         //echo ((!is_multisite () || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () || is_main_site ()) && !$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]) ? '<p><em><strong>*Tip*</strong> Can\'t find your Category IDs? Get <a href="http://wordpress.org/extend/plugins/wp-show-ids/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_during_category_level_access", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         /**/
         for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
             $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--optimizemember-level' . $n . '-catgs">' . "\n";
             echo $n === $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? 'Categories That Require Highest Level ' . $labelText . ':' . "\n" : 'Categories That Require Level ' . $labelText . ' Or Higher:' . "\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__optimizemember_level' . $n . '_catgs" id="ws-plugin--optimizemember-level' . $n . '-catgs" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_catgs"]) . '" /><br />' . "\n";
             echo 'Category IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> — or you can type: <code>all</code>.' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '</tr>' . "\n";
             /**/
             echo '<tr>' . "\n";
         }
         /**/
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_after_category_level_access", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_display_uri_level_access", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_before_uri_level_access", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="URI Restrictions ( typical w/BuddyPress )">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-uri-level-access-section">' . "\n";
         echo '<h3>URI Level Access Restrictions ( optional )</h3>' . "\n";
         echo '<p>Here you can specify URIs <em>( or word fragments found in URIs )</em> that are restricted to certain Membership Access Levels. Control over URIs is a little more complex. This section is intended for advanced webmasters only. That being said, here are the basics... A <code>REQUEST_URI</code>, is the portion of a <code>URL</code> that comes immediately after the domain. This is a URL <code>http://www.example.com/path/to/file.php</code>, and this is the URI: <code>/path/to/file.php</code>. In other words, a <code>REQUEST_URI</code> is the full path to a real <em>( or virtual )</em> directory and/or file on your domain.</p>' . "\n";
         echo '<p>In the fields below, you can provide a list <em>( one per line )</em> of URIs on your site that should be off-limits based on Membership Level. You can also use word fragments instead of a full URI. If a word fragment is found anywhere in the URI, it will be protected. Wildcards and other regex patterns are NOT supported here, and therefore you don\'t need to escape special characters or anything. Please note, these ARE caSe sensitive. You must be specific with respect to case sensitivity. The word fragment <code>some-path/</code> would NOT match a URI that contains <code>some-Path/</code>. <em>A few <a href="#" onclick="alert(\'URI 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 optimizeMember Level.\\n%%current_user_role%% = The current User\\\'s WordPress Role.' . (!is_multisite() || !c_ws_plugin__optimizemember_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 want to protect BuddyPress Groups, you could add URI protection, like this: /members/%%current_user_login%%/groups/\'); return false;">Replacement Codes</a> are also supported here.</em></p>' . "\n";
         echo '<p><em><strong>*BuddyPress ( and similar )*</strong> URI Restrictions work great with plugins like BuddyPress that add new areas to your site ( where those new areas are NOT necessarily a Post/Page/Tag/Category ). In other words, anytime you\'d like to protect a specific feature offered by BuddyPress ( or other plugins ), you\'ll need to nail down specific word fragments found in the URIs associated with those areas. For instance, with BuddyPress you might have: [ <a href="#" onclick="alert(\'/members/\\n/groups/\\n/blogs/\\n/activity/\\n/messages/\\n/profile/\\n/friends/\\n/settings/\'); return false;">click for example</a> ].</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_during_uri_level_access", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         /**/
         for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
             $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--optimizemember-level' . $n . '-ruris">' . "\n";
             echo $n === $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? 'URIs That Require Highest Level ' . $labelText . ':' . "\n" : 'URIs That Require Level ' . $labelText . ' Or Higher:' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             /**/
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             /**/
             echo '<td>' . "\n";
             echo '<textarea name="ws_plugin__optimizemember_level' . $n . '_ruris" id="ws-plugin--optimizemember-level' . $n . '-ruris" rows="3" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_ruris"]) . '</textarea><br />' . "\n";
             echo 'URIs and/or word fragments found in URIs. One per line please.' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '</tr>' . "\n";
         }
         /**/
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_after_uri_level_access", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_display_query_level_access", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_before_query_level_access", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Alternative View Protection ( please read )">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-query-level-access-section">' . "\n";
         echo '<h3>Alternative View Protection ( optional / experimental )</h3>' . "\n";
         echo '<p>optimizeMember protects Categories, Tags, Posts, Pages, Files, URIs &amp; more. BUT, even with all of those security restrictions, it\'s still possible for protected content excerpts to be seen through XML feeds, in search results generated by WordPress; and/or <em>( depending on your theme )</em>, possibly in other Archive views; which might include: Posts by Author, Posts by Date, a list of featured items formulated by your theme, OR even through other widgets/plugins adding functionality to your site. ~ We refer to all of these collectively, as "Alternative Views".</p>' . "\n";
         echo '<p>Using the options below, you can tell optimizeMember to protect some <em>( or all )</em> of these "Alternative Views", by filtering WordPress database queries for you. optimizeMember can automatically hide protected content that is NOT available to the current User/Member. In other words, optimizeMember is capable of pre-filtering ALL database queries, so that excerpts of protected content will not be allowed to slip through. This is marked "experimental", because we\'re still testing this against MANY widget/plugin/theme combinations. Please <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Forum URI")) . '" target="_blank">report</a> all bugs.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_during_uri_level_access", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-filter-wp-query">' . "\n";
         echo 'Protect Alternative Views?' . "\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:105px;">' . "\n";
         echo '<input type="hidden" name="ws_plugin__optimizemember_filter_wp_query[]" value="update-signal" />' . "\n";
         foreach (array("all" => "<strong>Filter ALL WordPress queries</strong>; protecting all Alternative Views.", "searches" => "&#9492;&#9472; Searches ( hide protected content in search results )", "feeds" => "&#9492;&#9472; Feeds ( hide protected content in standard XML/RSS/ATOM feeds )", "comment-feeds" => "&#9492;&#9472; Comment Feeds ( hide comments associated with protected content, in comment feeds )", "nav-menus" => "&#9492;&#9472; Nav Menus ( hide protected content in menus generated with <em>WordPress -> Appearance -> Menus</em> )") as $ws_plugin__optimizemember_temp_s_value => $ws_plugin__optimizemember_temp_s_label) {
             echo '<input type="checkbox" name="ws_plugin__optimizemember_filter_wp_query[]" id="ws-plugin--optimizemember-filter-wp-query-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '" value="' . esc_attr($ws_plugin__optimizemember_temp_s_value) . '"' . (in_array($ws_plugin__optimizemember_temp_s_value, $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["filter_wp_query"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-filter-wp-query-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '">' . $ws_plugin__optimizemember_temp_s_label . '</label><br />' . "\n";
         }
         echo '</div>' . "\n";
         echo '<strong>Attn Developers:</strong> Filters can be suppressed dynamically, using this technique:<br />' . "\n";
         echo '<code><a href="http://codex.wordpress.org/Function_Reference/query_posts" target="_blank" rel="external">query_posts</a>("suppress_filters=true");</code><br />' . "\n";
         echo '<code><a href="http://codex.wordpress.org/Function_Reference/get_posts" target="_blank" rel="external">get_posts</a>()</code> auto-suppresses filters.<br />' . "\n";
         //echo 'Also see <a href="http://www.optimizepress.com/codex/stable/s2member/api_functions/package-functions/#src_doc_attach_optimizemember_query_filters()" target="_blank" rel="external">this article</a> in the optimizeMember Codex.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_after_query_level_access", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_display_sp_access", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_before_sp_access", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Specific Post/Page Access Restrictions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-sp-access-section">' . "\n";
         echo '<h3>Specific Post/Page Access Restrictions ( optional )</h3>' . "\n";
         echo '<p>optimizeMember now supports an additional layer of functionality <em>( very powerful )</em>, which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" Buttons, and your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
         echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. optimizeMember will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link ( see: <code>optimizeMember -> PayPal Options -> Specific Post/Page Email</code> ). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
         echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress. A Specific Post/Page that is protected by optimizeMember, might contain a download link for your eBook, access to file &amp; music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress Post/Page that you\'ve created.</p>' . "\n";
         echo '<p>Very simple. All you do is protect the Specific Post/Page IDs that are being sold on your site. Then, you can go to <code>optimizeMember -> PayPal Buttons -> Specific Post/Page</code> to generate "Buy Now" Buttons that you can insert into your WordPress Editor, and make available on your site. The Button Generator for optimizeMember, will even let you Package Additional Posts/Pages together into one transaction.</p>' . "\n";
         //echo ((!is_multisite () || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () || is_main_site ()) && !$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]) ? '<p><em><strong>*Tip*</strong> Can\'t find your Post/Page IDs? Get <a href="http://wordpress.org/extend/plugins/wp-show-ids/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_during_sp_access", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-specific-ids">' . "\n";
         echo 'Specific Post/Page IDs Being Sold On Your Site:' . "\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__optimizemember_specific_ids" id="ws-plugin--optimizemember-specific-ids" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["specific_ids"]) . '" /><br />' . "\n";
         echo 'Post/Page IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> * Note... the word <code>all</code> does NOT work here. Also, please be careful not to create a conflict with other Access Restrictions. If you are going to sell Specific Post/Page Access, you should enter specific Post/Page IDs here; and <strong>make SURE that you\'ve NOT already protected any of these Posts/Pages with Member Level Access Restrictions</strong>. In other words, if you configure optimizeMember, in such as a way, that a Post/Page requires Membership Level Access, you cannot sell that same Post/Page through Specific Post/Page Access. Doing so, would create a conflict. Customers that purchased Specific Post/Page Access, would be unable to access the Post/Page - without also having a Membership. Not good. So please be careful.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_after_sp_access", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_display_brute_force_restrictions", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_before_brute_force_restrictions", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Brute Force IP/Login Restrictions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-brute-force-restrictions-section">' . "\n";
         echo '<h3>Brute Force IP/Login Restrictions ( prevents username/password guessing )</h3>' . "\n";
         echo '<input type="button" id="ws-plugin--optimizemember-brute-force-restrictions-reset-button" value="Reset Brute Force Logs" class="ws-menu-page-right button" style="min-width:175px;" />' . "\n";
         echo '<p>As with any Membership system, it is possible for someone to try and guess Username/Password combinations by attempting a <a href="http://en.wikipedia.org/wiki/Brute-force_attack" target="_blank" rel="external">Brute Force Attack</a>; whereby multiple/repeated logins are strategically attempted with various Username/Password combinations until a correct guess is made. It is NOT likely that you\'ll be attacked in this way, but it\'s still a good idea to protect your system; just in case somebody tries this. optimizeMember thwarts this behavior by monitoring failed login attempts that occur within a short period of time. Whenever optimizeMember detects an IP address <em>( i.e. a remote user )</em> that is consistently failing to enter a valid Username/Password, a temporary ban is created; preventing additional attempts from taking place for 30 minutes. This temporary ban, will ONLY affect the offending IP address.</p>' . "\n";
         echo '<p><em>*Note* an empty IP address ( associated with someone browsing anonymously ), is also considered a unique IP address, so it cannot circumvent optimizeMember\'s security.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_during_ip_restrictions", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-max-failed-login-attempts">' . "\n";
         echo 'Maximum Failed Login Attempts:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__optimizemember_max_failed_login_attempts" id="ws-plugin--optimizemember-max-failed-login-attempts">' . "\n";
         $ws_plugin__optimizemember_temp_s = apply_filters("ws_plugin__optimizemember_track_failed_logins__exp_time", "30 minutes");
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 1 ? ' selected="selected"' : '') . '>Allow 1 failed login attempt ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="2"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 2 ? ' selected="selected"' : '') . '>Allow 2 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="3"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 3 ? ' selected="selected"' : '') . '>Allow 3 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="4"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 4 ? ' selected="selected"' : '') . '>Allow 4 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="5"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 5 ? ' selected="selected"' : '') . '>Allow 5 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="10"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 10 ? ' selected="selected"' : '') . '>Allow 10 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="20"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 20 ? ' selected="selected"' : '') . '>Allow 20 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="30"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 30 ? ' selected="selected"' : '') . '>Allow 30 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="40"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 40 ? ' selected="selected"' : '') . '>Allow 40 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="50"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 50 ? ' selected="selected"' : '') . '>Allow 50 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="75"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 75 ? ' selected="selected"' : '') . '>Allow 75 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="100"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 100 ? ' selected="selected"' : '') . '>Allow 100 failed login attempts ( then punish for ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="0"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_failed_login_attempts"] == 0 ? ' selected="selected"' : '') . '>Allow infinite failed logins ( Brute Force Restrictions disabled )</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'When/if you change this, you should also <strong>Reset Brute Force Logs</strong> ( click button above ).' . "\n";
         echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<br /><br />The default period of "30 minutes" could be modified through this WordPress Filter:<br /><code>ws_plugin__optimizemember_track_failed_logins__exp_time</code>' . "\n" : '';
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_after_ip_restrictions", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_display_ip_restrictions", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_before_ip_restrictions", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Unique IP Access Restrictions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-ip-restrictions-section">' . "\n";
         echo '<h3>Unique IP Access Restrictions ( prevents username/link sharing )</h3>' . "\n";
         echo '<input type="button" id="ws-plugin--optimizemember-ip-restrictions-reset-button" value="Reset IP Restriction Logs" class="ws-menu-page-right button" style="min-width:175px;" />' . "\n";
         echo '<p>As with any Membership system, it is possible for one Member to signup, and then share their Username with someone else; or even post it online for the whole world to see. This is known as Link Sharing <em>( aka: Username Sharing )</em>. It is NOT likely that you\'ll be attacked in this way, but it\'s still a good idea to protect your system; just in case somebody tries this. optimizeMember\'s IP Restrictions work for Membership Level Access <em>( account logins )</em>, Specific Post/Page Access, Registration Links, and other secure Entry Points. In all cases, the rules are simple. A single Username, Access Link, and/or Entry Point ... is only valid for a certain number of unique IP addresses. Once that limit is reached, optimizeMember assumes there has been a security breach. At that time, optimizeMember will place a temporary ban <em>( preventing access )</em> to a Specific Post/Page, or to an account associated with a particular Username. This temporary ban, will ONLY affect the offending Link and/or Username associated with the security breach. You can fine-tune this behavior, using the options below.</p>' . "\n";
         echo '<p><em>*Note* an empty IP address ( associated with someone browsing anonymously ), is also considered a unique IP address, so it cannot circumvent optimizeMember\'s security.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_during_ip_restrictions", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-max-ip-restriction">' . "\n";
         echo 'Maximum Unique IP Addresses Allowed:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__optimizemember_max_ip_restriction" id="ws-plugin--optimizemember-max-ip-restriction">' . "\n";
         $ws_plugin__optimizemember_temp_s = apply_filters("ws_plugin__optimizemember_ip_restrictions__concurrency_time_per_ip", "30 days");
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 1 ? ' selected="selected"' : '') . '>Allow up to 1 unique IP per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="2"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 2 ? ' selected="selected"' : '') . '>Allow up to 2 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="3"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 3 ? ' selected="selected"' : '') . '>Allow up to 3 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="4"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 4 ? ' selected="selected"' : '') . '>Allow up to 4 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="5"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 5 ? ' selected="selected"' : '') . '>Allow up to 5 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="10"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 10 ? ' selected="selected"' : '') . '>Allow up to 10 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="20"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 20 ? ' selected="selected"' : '') . '>Allow up to 20 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="30"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 30 ? ' selected="selected"' : '') . '>Allow up to 30 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="40"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 40 ? ' selected="selected"' : '') . '>Allow up to 40 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="50"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 50 ? ' selected="selected"' : '') . '>Allow up to 50 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="75"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 75 ? ' selected="selected"' : '') . '>Allow up to 75 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="100"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 100 ? ' selected="selected"' : '') . '>Allow up to 100 different IPs per Customer ( every ' . $ws_plugin__optimizemember_temp_s . ' )</option>' . "\n";
         echo '<option value="0"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction"] == 0 ? ' selected="selected"' : '') . '>Allow infinite IPs ( all IP Restrictions are disabled )</option>' . "\n";
         echo '</select>' . "\n";
         echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<br />The default period of "30 days" could be modified through this WordPress Filter:<br /><code>ws_plugin__optimizemember_ip_restrictions__concurrency_time_per_ip</code>' . "\n" : '';
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-max-ip-restriction-time">' . "\n";
         echo 'Security Breach Timeout Period:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__optimizemember_max_ip_restriction_time" id="ws-plugin--optimizemember-max-ip-restriction-time">' . "\n";
         echo '<option value="300"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 300 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 5 mins )</option>' . "\n";
         echo '<option value="900"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 900 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 15 mins )</option>' . "\n";
         echo '<option value="1800"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 1800 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 30 mins )</option>' . "\n";
         echo '<option value="3600"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 3600 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 1 hour )</option>' . "\n";
         echo '<option value="7200"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 7200 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 2 hours )</option>' . "\n";
         echo '<option value="14400"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 14400 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 4 hours )</option>' . "\n";
         echo '<option value="21600"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 21600 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 6 hours )</option>' . "\n";
         echo '<option value="28800"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 28800 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 8 hours )</option>' . "\n";
         echo '<option value="43200"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 43200 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 12 hours )</option>' . "\n";
         echo '<option value="86400"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 86400 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 24 hours )</option>' . "\n";
         echo '<option value="172800"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 172800 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 2 days )</option>' . "\n";
         echo '<option value="345600"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 345600 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 4 days )</option>' . "\n";
         echo '<option value="604800"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 604800 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 1 week )</option>' . "\n";
         echo '<option value="1209600"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 1209600 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 2 weeks )</option>' . "\n";
         echo '<option value="2629743"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 2629743 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 1 month )</option>' . "\n";
         echo '<option value="5259487"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 5259487 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 2 months )</option>' . "\n";
         echo '<option value="7889231"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 7889231 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 3 months )</option>' . "\n";
         echo '<option value="15778463"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 15778463 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 6 months )</option>' . "\n";
         echo '<option value="31556926"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["max_ip_restriction_time"] == 31556926 ? ' selected="selected"' : '') . '>If limit is exceeded ( punish for 1 year )</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'When/if you change this, you should also <strong>Reset IP Restriction Logs</strong> ( click button above ).' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_res_ops_page_during_left_sections_after_ip_restrictions", get_defined_vars());
     }
     /**/
     do_action("ws_plugin__optimizemember_during_res_ops_page_after_left_sections", get_defined_vars());
     /**/
     //echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<p class="submit"><input type="submit" class="op-pb-button green" value="Save All Changes" /></p>' . "\n";
     /**/
     echo '</form>' . "\n";
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
Ejemplo n.º 28
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /**/
     echo '<div class="op-bsw-header">';
     echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
     echo '</div>';
     echo '<div class="op-bsw-main-content">';
     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__optimizemember_options_form" id="ws-plugin--optimizemember-options-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_options_save" id="ws-plugin--optimizemember-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-options-save")) . '" />' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_configured" id="ws-plugin--optimizemember-configured" value="1" />' . "\n";
     /**/
     do_action("ws_plugin__optimizemember_during_gen_ops_page_before_left_sections", get_defined_vars());
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_membership_levels", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_membership_levels", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Define Membership Levels And Packages">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-membership-levels-section">' . "\n";
         echo '<h3>Membership Levels and Packages ( required, please customize these )</h3>' . "\n";
         echo '<p>The default Membership Levels are labeled generically; feel free to modify them as needed. optimizeMember supports Free Subscribers <em>( at Level #0 )</em>, along with several Primary Roles for paid Membership <em>( i.e. Levels 1-10 )</em>, created by the OptimizeMember plugin. OptimizeMember also supports unlimited Custom Capability Packages <em>( see <code>optimizeMember -> 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 / Redirect Page, so it only includes Payment Buttons for the Levels being used.</p>' . "\n";
         /**do_action ("ws_plugin__optimizemember_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__"]["optimizemember"]["c"]["levels"]; $n++) {
             $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--optimizemember-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__optimizemember_level' . $n . '_label" id="ws-plugin--optimizemember-level' . $n . '-label" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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 '<div class="ws-menu-page-section ws-plugin--optimizemember-membership-levels-section">' . "\n";
         echo '<h3>Packages</h3>' . "\n";
         echo '<p>Packages are a great way to protect individual products or content.  You can protect any content to a particular package by using the admin options on the page and this will ensure only users with that package added to their account will be given access</p>' . "\n";
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th style="padding-top:0;">' . "\n";
         echo '<label for="ws-plugin--optimizemember-ccp">' . "\n";
         echo 'Add new package:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<input type="hidden" name="ws_plugin__optimizemember_ccp[]" value="update-signal" />' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" name="ws_plugin__optimizemember_ccp[]" id="ws-plugin--optimizemember-ccp" value="" />';
         if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) {
             echo '<h3>Available packages</h3>' . "\n";
             foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) {
                 if (!empty($val)) {
                     echo '<input type="hidden" name="ws_plugin__optimizemember_ccp[]" value="' . $val . '" />' . "\n";
                     echo $val . '<br />' . "\n";
                 }
             }
         }
         //echo 'This affects your administrative Dashboard only <em>( i.e. your list of Users )</em>.<br />optimizeMember can force WordPress to use your Labels instead of referencing Roles by `optimizeMember Level #`. If this is your first installation of optimizeMember, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with optimizeMember\'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 optimizeMember Level #.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<table class="form-table" style="margin-top:0;display:none;">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th style="padding-top:0;">' . "\n";
         echo '<label for="ws-plugin--optimizemember-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__optimizemember_apply_label_translations" id="ws-plugin--optimizemember-apply-label-translations-" value="1" checked="checked" />';
         //echo '<input type="radio" name="ws_plugin__optimizemember_apply_label_translations" id="ws-plugin--optimizemember-apply-label-translations-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-apply-label-translations-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__optimizemember_apply_label_translations" id="ws-plugin--optimizemember-apply-label-translations-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-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 />optimizeMember can force WordPress to use your Labels instead of referencing Roles by `optimizeMember Level #`. If this is your first installation of optimizeMember, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with optimizeMember\'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 optimizeMember Level #.' . "\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--optimizemember-filter-wp-query">' . "\n";
         echo 'Hide links?' . "\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:105px;">' . "\n";
         echo '<input type="hidden" name="ws_plugin__optimizemember_filter_wp_query[]" value="update-signal" />' . "\n";
         foreach (array("all" => "<strong>Hide links to protected content for non-members</strong>") as $ws_plugin__optimizemember_temp_s_value => $ws_plugin__optimizemember_temp_s_label) {
             echo '<input type="checkbox" name="ws_plugin__optimizemember_filter_wp_query[]" id="ws-plugin--optimizemember-filter-wp-query-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '" value="' . esc_attr($ws_plugin__optimizemember_temp_s_value) . '"' . (in_array($ws_plugin__optimizemember_temp_s_value, $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["filter_wp_query"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-filter-wp-query-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '">' . $ws_plugin__optimizemember_temp_s_label . '</label><br />' . "\n";
             break;
         }
         echo 'This option will hide links to any protected content for members who do not have access to that content<br />' . "\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--optimizemember-reset-roles-button button" style="min-width:175px;" />' . "\n";
         echo '<p>The button to the right, is a nifty tool, which allows you to reset optimizeMember\'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 optimizeMember, and you need to reset them back to the way optimizeMember expects them to be, please use this tool. <em>Attn Developers: it is also possible lock-in your modified Roles/Capabilities with an optimizeMember Filter. Please see <a href="http://www.optimizepress.com/forums/viewtopic.php?f=36&t=15420&p=45162#p45162" target="_blank" rel="external">this thread for details</a>.</em></p>' . "\n";
         /**/
         // echo '<p class="submit"><input id="opmNewSave" type="submit" class="op-pb-button green" value="Save Changes" /></p>' . "\n";
         // echo '<p id="msg"><p>';
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_membership_levels", get_defined_vars());
     }
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_list_server_integration", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_list_server_integration", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Define Mailing List/Autoresponder Configurations">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-list-server-integration-section">' . "\n";
         echo '<h3>Mailing List/Autoresponder Configurations</h3>' . "\n";
         echo '<p>To enable and configure email marketing service go to <a href="' . admin_url() . 'admin.php?page=optimizepress#email_marketing_services">OP theme/plugin Dashboard settings</a></p>' . "\n";
         echo '<p>Note: Lists/follow upsequences can take up to 1 minute to be retrieved from your provider.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_list_server_integration", get_defined_vars());
         /**/
         $providers = op_assets_provider_list();
         $providersDetails = array();
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         /**/
         for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
             $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
             $provider = format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_provider"]);
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<h4>' . ($n === 0 ? 'Level #' . $n . ' <em>(Free Subscribers)</em>' . "\n" : 'Level #' . $n . ' Members') . '</h4>' . "\n";
             echo '</th>' . "\n";
             echo '</tr>' . "\n";
             /**/
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<label for="ws_plugin__optimizemember_level' . $n . '_provider" id="ws_plugin__optimizemember_level' . $n . '_provider_label">' . "\n";
             echo 'List Provider:' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             echo '<th>' . "\n";
             echo '<label for="ws_plugin__optimizemember_level' . $n . '_list" id="ws_plugin__optimizemember_level' . $n . '_list_label">' . "\n";
             if ($provider === 'infusionsoft') {
                 echo 'Follow up sequence:' . "\n";
             } else {
                 echo 'List:' . "\n";
             }
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             /**/
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             /**/
             echo '<td>' . "\n";
             echo '<select data-level="' . $n . '" name="ws_plugin__optimizemember_level' . $n . '_provider" id="ws_plugin__optimizemember_level' . $n . '_provider" class="ws_plugin__optimizemember_level_provider">' . "\n";
             echo '<option value="0">Select provider</option>' . "\n";
             if (count($providers) > 0) {
                 foreach ($providers as $providerId => $providerName) {
                     /*
                      * Subscribing is happening on their URL and can't be done in background
                      */
                     if ($providerId === 'oneshoppingcart') {
                         continue;
                     }
                     echo '<option value="' . $providerId . '"' . selected($providerId, $provider, false) . '>' . $providerName . '</option>' . "\n";
                 }
             }
             echo '</select><br />' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '<td>' . "\n";
             echo '<select data-level="' . $n . '" name="ws_plugin__optimizemember_level' . $n . '_list" id="ws_plugin__optimizemember_level' . $n . '_list" class="ws_plugin__optimizemember_level_list">' . "\n";
             $provider = format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_provider"]);
             if (!empty($provider)) {
                 $list = format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_list"]);
                 if (isset($providersDetails[$provider])) {
                     $details = $providersDetails[$provider];
                 } else {
                     $details = op_assets_provider_items($provider, true);
                     if (count($details) > 0) {
                         $details = $details['lists'];
                         $providersDetails[$provider] = $details;
                     }
                 }
                 foreach ($details as $listId => $item) {
                     echo '<option value="' . $listId . '"' . selected($list, $listId, false) . '>' . $item['name'] . '</option>' . "\n";
                 }
             } else {
                 echo '<option value="0">Select provider first</option>' . "\n";
             }
             echo '</select><br />' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '</tr>' . "\n";
         }
         /**/
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         // echo '<p class="submit"><input id="opmNewSave" type="submit" class="op-pb-button green" value="Save Changes" /></p>' . "\n";
         // echo '<p class="save_info"><p>';
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_list_server_integration", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_membership_options_page", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_membership_options_page", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Membership Options / Redirect Page">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-membership-options-page-section">' . "\n";
         echo '<h3>Membership Options / Redirect Page ( required, please customize this )</h3>' . "\n";
         echo '<p>This is where visitors who do not have access to your restricted membership content will be redirected to.  We recommend using this page either as a login page, or as a page where you offer promote your membership or product.</p>' . "\n";
         echo '<p>If you want to add a login form on your page, use the "Membership Login Form" element in the Liveeditor to add a login form for your visitors to login</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 / Redirect Page, which points directly to your Registration Form, instead of routing a Customer through your Payment Gateway first. For further details, please check the section above: <code>optimizeMember -> General Options -> Open Registration</code>.</em></p>' . "\n";
         echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> Even with BuddyPress, optimizeMember still needs a Membership Options / Redirect 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 optimizeMember )</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__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? ' For more on this advanced topic, please check your Dashboard here: <code>optimizeMember -> API Scripting -> Membership Options / Redirect Page / Variables</code>.' : '') . '</em></p>' . "\n" : '';
         echo '<p><em><strong>*Tip*</strong> optimizeMember will NEVER allow this Page to be protected from public access.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_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--optimizemember-membership-options-page">' . "\n";
         echo 'Membership Options / Redirect Page:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__optimizemember_membership_options_page" id="ws-plugin--optimizemember-membership-options-page">' . "\n";
         echo '<option value="">&mdash; Select &mdash;</option>' . "\n";
         foreach ($ws_plugin__optimizemember_temp_a = array_merge((array) get_pages()) as $ws_plugin__optimizemember_temp_o) {
             echo '<option value="' . esc_attr($ws_plugin__optimizemember_temp_o->ID) . '"' . ($ws_plugin__optimizemember_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["membership_options_page"] ? ' selected="selected"' : '') . '>' . esc_html($ws_plugin__optimizemember_temp_o->post_title) . '</option>' . "\n";
         }
         echo '</select><br />' . "\n";
         echo 'Select a page which your users will be redirected to when they try to access content they\'re not currently allowed to view.  We recommend having a login form on this page or details of your membership or product' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_membership_options_page", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_login_welcome_page", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_login_welcome_page", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Members Home Page / Login Welcome Page">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-login-welcome-page-section">' . "\n";
         echo '<h3>Members Home Page / 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__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> optimizeMember integrates with BuddyPress. Your Login Welcome Page affects BuddyPress too.</em></p>' . "\n" : '';
         echo '<p><em><strong>*Tip*</strong> This special Page will be protected from public access ( automatically ) by optimizeMember.</em></p>' . "\n";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://help.optimizepress.com/customer/portal/articles/1281577-customizing-your-login-welcome-page" target="_blank" rel="external">Customizing Your Login Welcome Page</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_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--optimizemember-login-welcome-page">' . "\n";
         echo 'Members Home Page / Login Welcome Page:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__optimizemember_login_welcome_page" id="ws-plugin--optimizemember-login-welcome-page">' . "\n";
         echo '<option value="">&mdash; Select &mdash;</option>' . "\n";
         foreach ($ws_plugin__optimizemember_temp_a = array_merge((array) get_pages()) as $ws_plugin__optimizemember_temp_o) {
             echo '<option value="' . esc_attr($ws_plugin__optimizemember_temp_o->ID) . '"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_redirection_override"] && $ws_plugin__optimizemember_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_welcome_page"] ? ' selected="selected"' : '') . '>' . esc_html($ws_plugin__optimizemember_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>.<br /><br />' . "\n";
         echo '&darr; 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.\\n%%current_user_id%% = The current User\\\'s ID.\\n%%current_user_level%% = The current User\\\'s optimizeMember Level.\\n%%current_user_role%% = The current User\\\'s WordPress Role.' . (!is_multisite() || !c_ws_plugin__optimizemember_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 setup a Special Redirection URL, like this: ' . site_url("/members/%%current_user_login%%/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 '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_redirection_override" id="ws-plugin--optimizemember-login-redirection-override" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_redirection_override"]) . '" /><br />' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_login_welcome_page", get_defined_vars());
     }
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_email_config", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_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--optimizemember-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 optimizeMember plugin.</p>' . "\n";
         do_action("ws_plugin__optimizemember_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--optimizemember-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__optimizemember_reg_email_from_name" id="ws-plugin--optimizemember-reg-email-from-name" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_reg_email_from_email" id="ws-plugin--optimizemember-reg-email-from-email" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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 optimizeMember 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 optimizeMember 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--optimizemember-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__optimizemember_reg_email_support_link" id="ws-plugin--optimizemember-reg-email-support-link" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-pluggables-wp-new-user-notification" value="' . esc_attr(empty($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["pluggables"]["wp_new_user_notification"]) ? '0' : '1') . '" />' . "\n";
         echo empty($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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 optimizeMember 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 optimizeMember 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 optimizeMember\'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__optimizemember_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__optimizemember_new_user_emails_enabled" id="ws-plugin--optimizemember-new-user-emails-enabled">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["new_user_emails_enabled"] ? ' selected="selected"' : '') . '>No ( default, use WordPress defaults )</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["new_user_emails_enabled"] ? ' selected="selected"' : '') . '>Yes ( customize New User Emails with optimizeMember )</option>' . "\n";
         echo '</select>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div id="ws-plugin--optimizemember-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--optimizemember-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, optimizeMember will also send new paying Customers a Signup Confirmation Email, which you can customize from your Dashboard, under: <code>optimizeMember -> 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__optimizemember_during_gen_ops_page_during_left_sections_during_new_user_email", get_defined_vars());
         /**/
         echo '<div id="ws-plugin--optimizemember-new-user-email-details" style="display:none;">' . "\n";
         echo c_ws_plugin__optimizemember_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 optimizeMember\'s separate email to paying Members. See: <code>optimizeMember -> 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--optimizemember-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__optimizemember_new_user_email_subject" id="ws-plugin--optimizemember-new-user-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_new_user_email_message" id="ws-plugin--optimizemember-new-user-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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>%%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> optimizeMember -> 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 '</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--optimizemember-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__optimizemember_during_gen_ops_page_during_left_sections_during_new_user_admin_email", get_defined_vars());
         /**/
         echo '<div id="ws-plugin--optimizemember-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--optimizemember-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__optimizemember_new_user_admin_email_recipients" id="ws-plugin--optimizemember-new-user-admin-email-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_new_user_admin_email_subject" id="ws-plugin--optimizemember-new-user-admin-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_new_user_admin_email_message" id="ws-plugin--optimizemember-new-user-admin-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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>%%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> optimizeMember -> 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 '</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__optimizemember_during_gen_ops_page_during_left_sections_after_email_config", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_open_registration", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_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--optimizemember-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>optimizeMember -> Multisite (Config)</code> panel.</p>' . "\n";
             do_action("ws_plugin__optimizemember_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--optimizemember-open-registration-section">' . "\n";
             echo '<h3>Open Registration / Free Subscribers ( optional )</h3>' . "\n";
             echo '<p>optimizeMember supports Free Subscribers ( at Level #0 ), along with four Primary Levels [1-10] 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__optimizemember_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--optimizemember-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__optimizemember_allow_subscribers_in" id="ws-plugin--optimizemember-allow-subscribers-in">' . "\n";
             echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>No ( do NOT allow Open Registration )</option>' . "\n";
             echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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__optimizemember_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Standard Registration Form.\\n* optimizeMember makes this form available to logged-in Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_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__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_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 optimizeMember software reserves Level #0; to be used ONLY for Free Subscribers. All other Membership Levels [1-4] require payment.' . "\n";
             echo c_ws_plugin__optimizemember_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__optimizemember_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">here</a>.<br />optimizeMember 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__optimizemember_during_gen_ops_page_during_left_sections_after_open_registration", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_login_registration", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_login_registration", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Login Page & Registration Form Design">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-login-registration-section">' . "\n";
         echo '<h3>Login/Registration Page Customization ( required )</h3>' . "\n";
         echo '<p>These settings customize your Standard Login/Registration Pages:<br />( <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Standard Registration Form.\\n* optimizeMember makes this form available to logged-in Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_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__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '</a> )</p>' . "\n";
         echo is_multisite() && c_ws_plugin__optimizemember_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__optimizemember_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Multisite Registration Form.\\n* optimizeMember makes this form available to logged-in Super Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_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__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::wp_signup_url()) . '</a> )</em></p>' . "\n" : '';
         echo c_ws_plugin__optimizemember_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__optimizemember_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . '</a> )</em></p>' . "\n" : '';
         do_action("ws_plugin__optimizemember_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;">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--optimizemember-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__optimizemember_login_reg_font_size" id="ws-plugin--optimizemember-login-reg-font-size" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_font_family" id="ws-plugin--optimizemember-login-reg-font-family" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_font_field_size" id="ws-plugin--optimizemember-login-reg-font-field-size" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_background_color" id="ws-plugin--optimizemember-login-reg-background-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_background_image" id="ws-plugin--optimizemember-login-reg-background-image" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_image"]) . '" /><br />' . "\n";
         echo '<input type="button" id="ws-plugin--optimizemember-login-reg-background-image-media-btn" value="Open Media Library" class="ws-menu-page-media-btn button" rel="ws-plugin--optimizemember-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--optimizemember-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__optimizemember_login_reg_background_image_repeat" id="ws-plugin--optimizemember-login-reg-background-image-repeat">' . "\n";
         echo '<option value="repeat"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_image_repeat"] === "repeat" ? ' selected="selected"' : '') . '>Seamless Tile ( background-repeat: repeat; )</option>' . "\n";
         echo '<option value="repeat-x"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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__"]["optimizemember"]["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__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_background_text_color" id="ws-plugin--optimizemember-login-reg-background-text-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_background_text_shadow_color" id="ws-plugin--optimizemember-login-reg-background-text-shadow-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_background_box_shadow_color" id="ws-plugin--optimizemember-login-reg-background-box-shadow-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_logo_src" id="ws-plugin--optimizemember-login-reg-logo-src" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_logo_src"]) . '" /><br />' . "\n";
         echo '<input type="button" id="ws-plugin--optimizemember-login-reg-logo-src-media-btn" value="Open Media Library" class="ws-menu-page-media-btn button" rel="ws-plugin--optimizemember-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--optimizemember-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__optimizemember_login_reg_logo_src_width" id="ws-plugin--optimizemember-login-reg-logo-src-width" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_logo_src_height" id="ws-plugin--optimizemember-login-reg-logo-src-height" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_logo_url" id="ws-plugin--optimizemember-login-reg-logo-url" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_login_reg_logo_title" id="ws-plugin--optimizemember-login-reg-logo-title" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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 '<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__optimizemember_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--optimizemember-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__optimizemember_login_reg_footer_design" id="ws-plugin--optimizemember-login-reg-footer-design" rows="3" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_footer_design"]) . '</textarea><br />' . "\n";
         echo 'This optional HTML' . (!is_multisite() || !c_ws_plugin__optimizemember_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";
         /**/
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_login_registration", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_custom_reg_fields", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_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--optimizemember-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__optimizemember_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Standard Registration Form.\\n* optimizeMember makes this form available to logged-in Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_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__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '</a> )</p>' . "\n";
         echo is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site() ? '<p><em>The Main Site of a Multisite Blog Farm uses this Form. optimizeMember supports Custom Fields here too.<br />( <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Multisite Registration Form.\\n* optimizeMember makes this form available to logged-in Super Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_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__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::wp_signup_url()) . '</a> )</em></p>' . "\n" : '';
         echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">here</a>.<br />optimizeMember 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__optimizemember_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__optimizemember_custom_reg_fields" id="ws-plugin--optimizemember-custom-reg-fields" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_fields"]) . '" />' . "\n";
         echo '<div id="ws-plugin--optimizemember-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--optimizemember-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__optimizemember_custom_reg_names" id="ws-plugin--optimizemember-custom-reg-names">' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>Yes ( always collect First/Last Names during registration )</option>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["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__optimizemember_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__optimizemember_utils_conds::pro_is_installed() ? '<br /><em>* optimizeMember 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--optimizemember-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__optimizemember_custom_reg_display_name" id="ws-plugin--optimizemember-custom-reg-display-name">' . "\n";
         echo '<option value="full"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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__"]["optimizemember"]["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__"]["optimizemember"]["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__"]["optimizemember"]["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__"]["optimizemember"]["o"]["custom_reg_display_name"] ? ' selected="selected"' : '') . '>No ( leave Display Name at default WordPress value )</option>' . "\n";
         echo '</select>' . "\n";
         echo c_ws_plugin__optimizemember_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--optimizemember-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__optimizemember_custom_reg_password" id="ws-plugin--optimizemember-custom-reg-password"' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site() && !c_ws_plugin__optimizemember_utils_conds::pro_is_installed() ? ' disabled="disabled"' : '') . '>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>No ( send auto-generated passwords via email; after registration )</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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__optimizemember_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 optimizeMember. YOU are affected by this limitation, NOT them.\\n\\n* NOTE: optimizeMember (Pro) removes this limitation.\\nIf you install the optimizeMember Pro Module, you WILL be able to allow Custom Passwords through optimizeMember Pro Forms; even on a Multisite Blog Farm.\'); return false;" tabindex="-1">[?]</a></em>' . "\n" : '';
         echo c_ws_plugin__optimizemember_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--optimizemember-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__optimizemember_custom_reg_force_personal_emails" id="ws-plugin--optimizemember-custom-reg-force-personal-emails" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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(\'optimizeMember 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__optimizemember_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--optimizemember-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__optimizemember_custom_reg_fields_4bp[]" value="update-signal"' . (!c_ws_plugin__optimizemember_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__optimizemember_temp_s_value => $ws_plugin__optimizemember_temp_s_label) {
             echo '<input type="checkbox" name="ws_plugin__optimizemember_custom_reg_fields_4bp[]" id="ws-plugin--optimizemember-custom-reg-fields-4bp-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '" value="' . esc_attr($ws_plugin__optimizemember_temp_s_value) . '"' . (in_array($ws_plugin__optimizemember_temp_s_value, $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_fields_4bp"]) ? ' checked="checked"' : '') . (!c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? ' disabled="disabled"' : '') . ' /> <label for="ws-plugin--optimizemember-custom-reg-fields-4bp-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '">' . $ws_plugin__optimizemember_temp_s_label . '</label><br />' . "\n";
         }
         echo '</div>' . "\n";
         echo !c_ws_plugin__optimizemember_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 optimizeMember ) into BuddyPress as well. However, if you configure Profile Fields with BuddyPress, those will NOT be integrated with optimizeMember. Therefore, if you need Custom Registration/Profile Fields to work with both optimizeMember and with BuddyPress, please configure them with optimizeMember.</em>';
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_custom_reg_fields", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_profile_modifications", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_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--optimizemember-profile-modifications-section">' . "\n";
         echo '<h3>Giving Members The Ability To Modify Their Profile</h3>' . "\n";
         echo '<p>optimizeMember 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 optimizeMember. <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; optimizeMember 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>[optimizeMember-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 optimizeMember, including Password changes; and any Custom Registration/Profile Fields that you\'ve configured with optimizeMember.</p>' . "\n";
         echo '<p>Alternatively, optimizeMember also gives you the ability to send your Members to a <a href="' . esc_attr(site_url("/?optimizemember_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("/?optimizemember_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__optimizemember_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 optimizeMember, you can also enable optimizeMember\'s Profile Field integration with BuddyPress ( recommended ). For further details, see: <code>optimizeMember -> General Options -> Registration/Profile Fields</code>.</em></p>' . "\n" : '';
         do_action("ws_plugin__optimizemember_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--optimizemember-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__optimizemember_force_admin_lockouts" id="ws-plugin--optimizemember-force-admin-lockouts">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["force_admin_lockouts"] ? ' selected="selected"' : '') . '>No ( I want to use the WordPress default methodologies )</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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> ), optimizeMember 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('[optimizeMember-Profile /]') . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" 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 OPTIMIZEMEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \\?\\>/", c_ws_plugin__optimizemember_utils_strings::esc_ds(site_url("/?optimizemember_profile=1")), file_get_contents(dirname(__FILE__) . "/code-samples/current-user-profile-modification-page-url-2-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_profile_modifications", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_other_membership_options_header", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_other_membership_options_header", get_defined_vars());
         /**/
         echo '<div style="border-bottom:1px solid #DFDFDF; margin:-20px 0 9px 0; padding:0;">&nbsp;</div>' . "\n";
         // echo '<div id="icon-tools" class="icon32" style="margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0;"><br /></div>' . "\n";
         echo '<h2 style="margin-top:30px;">Other Membership Options</h2>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_other_membership_options_header", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_url_shortening", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_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--optimizemember-url-shortening-section">' . "\n";
         echo '<h3>URL Shortening Service API ( Preference )</h3>' . "\n";
         echo '<p>In a few special cases, long URLs generated by optimizeMember, 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 optimizeMember sends out to a new paying Customer, may contain a link which is shortened to prevent corruption by email applications. By default, optimizeMember uses the tinyURL API, which has proven itself to be the most reliable. However, in cases where an API service call fails, optimizeMember will automatically use one or more of its other APIs as a backup. The option below, allows you to configure which URL Shortening API optimizeMember should try first <em>( i.e. the one you prefer )</em>.</p>' . "\n";
         do_action("ws_plugin__optimizemember_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--optimizemember-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__optimizemember_default_url_shortener" id="ws-plugin--optimizemember-default-url-shortener">' . "\n";
         echo '<option value="tiny_url"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["default_url_shortener"] === "tiny_url" ? ' selected="selected"' : '') . '>tinyurl.com ( free tinyURL™ API service )</option>' . "\n";
         echo '<option value="goo_gl"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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--optimizemember-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__optimizemember_default_custom_str_url_shortener" id="ws-plugin--optimizemember-default-custom-str-url-shortener" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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(\'optimizeMember makes it possible for advanced site owners to use a custom URL shortening service they prefer, over the ones currently pre-integrated with optimizeMember. 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 optimizeMember receives, as a result of optimizeMember 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( optimizeMember expects a shortened URL in the response from Bitly )\\n\\n* If you configure optimizeMember to use your own custom URL shortening service, optimizeMember 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, optimizeMember 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 optimizeMember in this way, you might take a look at this WordPress Filter ( `ws_plugin__optimizemember_url_shorten` ), which optimizeMember makes available for advanced circumstances. Search optimizeMember\\\'s source code for `ws_plugin__optimizemember_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__optimizemember_during_gen_ops_page_during_left_sections_after_url_shortening", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_deactivation", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() || is_super_admin(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_deactivation", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Deactivation Safeguards"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["run_deactivation_routines"] ? ' default-state="open"' : '') . '>' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-deactivation-section">' . "\n";
         echo '<h3>Deactivation Safeguards ( highly recommended )</h3>' . "\n";
         echo is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() && is_super_admin() ? '<p><em class="ws-menu-page-hilite">On a Multisite Blog Farm, this panel is ONLY visible to YOU, as a Super Administrator. optimizeMember automatically Safeguards everything on a Multisite Blog Farm. However, as the Super Administrator, you may turn this off; on a per-Blog basis. For example, if you\'re going to de-activate optimizeMember on this particular Blog, you can turn OFF the Safeguards below, so that optimizeMember will completely erase itself.</em></p>' . "\n" : '<p>By default, optimizeMember will retain all of it\'s Roles, Capabilities, and your Configuration Options when/if you deactivate optimizeMember from the Plugins Menu in WordPress. However, if you would like for optimizeMember to erase itself completely, please choose: <code>No ( upon deactivation, erase all data/options )</code>.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_deactivation", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-run-deactivation-routines">' . "\n";
         echo 'Safeguard optimizeMember Data/Options?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__optimizemember_run_deactivation_routines" id="ws-plugin--optimizemember-run-deactivation-routines">' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["run_deactivation_routines"] ? ' selected="selected"' : '') . '>Yes ( safeguard all data/options )</option>' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["run_deactivation_routines"] ? ' selected="selected"' : '') . '>No ( upon deactivation, 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__optimizemember_during_gen_ops_page_during_left_sections_after_deactivation", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_security", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_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--optimizemember-security-section">' . "\n";
         echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/large-icon.png" title="optimizeMember ( 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, optimizeMember 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 optimizeMember unique/secure, you should configure a Security Encryption Key. optimizeMember 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 optimizeMember in the future. Some of the sensitive data that optimizeMember stores, will be encrypted with this Key. If you change it, that data can no longer be read, even by optimizeMember itself. In other words, don\'t use optimizeMember for six months, then decide to change your Key. That would break your installation.</p>' . "\n";
         do_action("ws_plugin__optimizemember_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--optimizemember-sec-encryption-key">' . "\n";
         echo 'Security Encryption Key ( at least 60 chars )' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key"] ? ' <a href="#" onclick="ws_plugin__optimizemember_enableSecurityKey(); return false;" title="( not recommended )">edit key</a>' : ' <a href="#" onclick="ws_plugin__optimizemember_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__optimizemember_sec_encryption_key" id="ws-plugin--optimizemember-sec-encryption-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key"]) . '"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key"] ? ' disabled="disabled"' : '') . ' />' . "\n";
         echo !$GLOBALS["WS_PLUGIN__"]["optimizemember"]["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__optimizemember_utils_strings::random_str_gen(64))) . '</code></em>' . "\n" : '';
         echo count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key_history"]) > 1 ? '<br /><a href="#" onclick="ws_plugin__optimizemember_securityKeyHistory(); return false;">Click here</a> for a history of your last 10 Encryption Keys.<div id="ws-plugin--optimizemember-sec-encryption-key-history" style="display:none;"><code>' . implode('</code><br /><code>', $GLOBALS["WS_PLUGIN__"]["optimizemember"]["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 OptimizeMember\'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 OptimizeMember 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__optimizemember_during_gen_ops_page_during_left_sections_after_security", get_defined_vars());
     }
     /**/
     do_action("ws_plugin__optimizemember_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" class="op-pb-button green" value="Save All Changes" /></p>' . "\n";
     /**/
     echo '</form>' . "\n";
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
Ejemplo n.º 29
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /**/
     echo '<div class="op-bsw-header">';
     echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
     echo '</div>';
     echo '<div class="op-bsw-main-content">';
     echo '<h2>NEW General Options</h2>' . "\n";
     echo '<p>' . _('Use these options to customize styling and functionality of your pages. Ensure you also create and assign menus to your blog Menus within the <a href="nav-menus.php">Wordpress Menus admin panel</a> if you want to use navigation menus on your pages.') . '</p>';
     /**/
     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__optimizemember_new_options_form" id="ws-plugin--optimizemember-new-options-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_options_save" id="ws-plugin--optimizemember-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-options-save")) . '" />' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_configured" id="ws-plugin--optimizemember-configured" value="1" />' . "\n";
     echo '<input type="hidden" name="action" value="optimizemember-new-options" />' . "\n";
     /**/
     do_action("ws_plugin__optimizemember_during_gen_ops_page_before_left_sections", get_defined_vars());
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_membership_levels", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_membership_levels", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Define Membership Levels And Packages">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-membership-levels-section">' . "\n";
         echo '<h3>Membership Levels and Packages ( required, please customize these )</h3>' . "\n";
         echo '<p>The default Membership Levels are labeled generically; feel free to modify them as needed. optimizeMember 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 optimizeMember plugin.' . (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? ' optimizeMember also supports unlimited Custom Capability Packages <em>( see <code>optimizeMember -> 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__optimizemember_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__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember Pro</a>. However, Custom Capabilities are possible in all versions of optimizeMember, including the free version. Custom Capabilities are a great way to extend optimizeMember in creative ways. If you\'re an advanced site owner, a theme designer, or a web developer integrating optimizeMember for a client, please check your Dashboard, under: <code>optimizeMember -> API Scripting -> Custom Capabilities</code>. </em></p>' . "\n" : '';
         do_action("ws_plugin__optimizemember_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__"]["optimizemember"]["c"]["levels"]; $n++) {
             $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<label for="ws-plugin--optimizemember-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__optimizemember_level' . $n . '_label" id="ws-plugin--optimizemember-level' . $n . '-label" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["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 '<div class="ws-menu-page-section ws-plugin--optimizemember-membership-levels-section">' . "\n";
         echo '<h3>Packages</h3>' . "\n";
         echo '<p>Packages are a great way to protect individual products or content.  You can protect any content to a particular package by using the admin options on the page and this will ensure only users with that package added to their account will be given access</p>' . "\n";
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th style="padding-top:0;">' . "\n";
         echo '<label for="ws-plugin--optimizemember-ccp">' . "\n";
         echo 'Add new package:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<input type="hidden" name="ws_plugin__optimizemember_ccp[]" value="update-signal" />' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" name="ws_plugin__optimizemember_ccp[]" id="ws-plugin--optimizemember-ccp" value="" />';
         if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) {
             echo '<h3>Available packages</h3>' . "\n";
             foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) {
                 if (!empty($val)) {
                     echo '<input type="hidden" name="ws_plugin__optimizemember_ccp[]" value="' . $val . '" />' . "\n";
                     echo $val . '<br />' . "\n";
                 }
             }
         }
         //echo 'This affects your administrative Dashboard only <em>( i.e. your list of Users )</em>.<br />optimizeMember can force WordPress to use your Labels instead of referencing Roles by `optimizeMember Level #`. If this is your first installation of optimizeMember, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with optimizeMember\'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 optimizeMember Level #.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<table class="form-table" style="margin-top:0;display:none;">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th style="padding-top:0;">' . "\n";
         echo '<label for="ws-plugin--optimizemember-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__optimizemember_apply_label_translations" id="ws-plugin--optimizemember-apply-label-translations-" value="1" checked="checked" />';
         //echo '<input type="radio" name="ws_plugin__optimizemember_apply_label_translations" id="ws-plugin--optimizemember-apply-label-translations-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-apply-label-translations-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__optimizemember_apply_label_translations" id="ws-plugin--optimizemember-apply-label-translations-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-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 />optimizeMember can force WordPress to use your Labels instead of referencing Roles by `optimizeMember Level #`. If this is your first installation of optimizeMember, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with optimizeMember\'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 optimizeMember Level #.' . "\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--optimizemember-filter-wp-query">' . "\n";
         echo 'Hide links?' . "\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:105px;">' . "\n";
         echo '<input type="hidden" name="ws_plugin__optimizemember_filter_wp_query[]" value="update-signal" />' . "\n";
         foreach (array("all" => "<strong>Hide links to protected content for non-members</strong>") as $ws_plugin__optimizemember_temp_s_value => $ws_plugin__optimizemember_temp_s_label) {
             echo '<input type="checkbox" name="ws_plugin__optimizemember_filter_wp_query[]" id="ws-plugin--optimizemember-filter-wp-query-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '" value="' . esc_attr($ws_plugin__optimizemember_temp_s_value) . '"' . (in_array($ws_plugin__optimizemember_temp_s_value, $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["filter_wp_query"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-filter-wp-query-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '">' . $ws_plugin__optimizemember_temp_s_label . '</label><br />' . "\n";
             break;
         }
         echo 'This option will hide links to any protected content for members who do not have access to that content<br />' . "\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--optimizemember-reset-roles-button button" style="min-width:175px;" />' . "\n";
         echo '<p>The button to the right, is a nifty tool, which allows you to reset optimizeMember\'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 optimizeMember, and you need to reset them back to the way optimizeMember expects them to be, please use this tool. <em>Attn Developers: it is also possible lock-in your modified Roles/Capabilities with an optimizeMember Filter. </em></p>' . "\n";
         /**/
         echo '<p class="submit"><input id="opmNewSave" type="submit" class="op-pb-button green" value="Save Changes" /></p>' . "\n";
         echo '<p id="msg"><p>';
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_membership_levels", get_defined_vars());
     }
     if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_list_server_integration", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_list_server_integration", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Define Mailing List/Autoresponder Configurations">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-list-server-integration-section">' . "\n";
         echo '<h3>Mailing List/Autoresponder Configurations</h3>' . "\n";
         echo '<p>To enable and configure email marketing service go to <a href="' . admin_url() . 'admin.php?page=optimizepress#email_marketing_services">OP theme/plugin Dashboard settings</a></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_list_server_integration", get_defined_vars());
         /**/
         $providers = op_assets_provider_list();
         $providersDetails = array();
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         /**/
         for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
             $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
             $provider = format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_provider"]);
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<h4>' . ($n === 0 ? 'Level #' . $n . ' <em>(Free Subscribers)</em>' . "\n" : 'Level #' . $n . ' Members') . '</h4>' . "\n";
             echo '</th>' . "\n";
             echo '</tr>' . "\n";
             /**/
             echo '<tr>' . "\n";
             /**/
             echo '<th>' . "\n";
             echo '<label for="ws_plugin__optimizemember_level' . $n . '_provider" id="ws_plugin__optimizemember_level' . $n . '_provider_label">' . "\n";
             echo 'List Provider:' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             echo '<th>' . "\n";
             echo '<label for="ws_plugin__optimizemember_level' . $n . '_list" id="ws_plugin__optimizemember_level' . $n . '_list_label">' . "\n";
             if ($provider === 'infusionsoft') {
                 echo 'Follow up sequence:' . "\n";
             } else {
                 echo 'List:' . "\n";
             }
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             /**/
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             /**/
             echo '<td>' . "\n";
             echo '<select data-level="' . $n . '" name="ws_plugin__optimizemember_level' . $n . '_provider" id="ws_plugin__optimizemember_level' . $n . '_provider" class="ws_plugin__optimizemember_level_provider">' . "\n";
             echo '<option value="0">Select provider</option>' . "\n";
             if (count($providers) > 0) {
                 foreach ($providers as $providerId => $providerName) {
                     /*
                      * Subscribing is happening on their URL and can't be done in background
                      */
                     if ($providerId === 'oneshoppingcart') {
                         continue;
                     }
                     echo '<option value="' . $providerId . '"' . selected($providerId, $provider, false) . '>' . $providerName . '</option>' . "\n";
                 }
             }
             echo '</select><br />' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '<td>' . "\n";
             echo '<select data-level="' . $n . '" name="ws_plugin__optimizemember_level' . $n . '_list" id="ws_plugin__optimizemember_level' . $n . '_list" class="ws_plugin__optimizemember_level_list">' . "\n";
             $provider = format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_provider"]);
             if (!empty($provider)) {
                 $list = format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_list"]);
                 if (isset($providersDetails[$provider])) {
                     $details = $providersDetails[$provider];
                 } else {
                     $details = op_assets_provider_items($provider, true);
                     if (count($details) > 0) {
                         $details = $details['lists'];
                         $providersDetails[$provider] = $details;
                     }
                 }
                 foreach ($details as $listId => $item) {
                     echo '<option value="' . $listId . '"' . selected($list, $listId, false) . '>' . $item['name'] . '</option>' . "\n";
                 }
             } else {
                 echo '<option value="0">Select provider first</option>' . "\n";
             }
             echo '</select><br />' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '</tr>' . "\n";
         }
         /**/
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<p class="submit"><input id="opmNewSave" type="submit" class="op-pb-button green" value="Save Changes" /></p>' . "\n";
         echo '<p class="save_info"><p>';
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_list_server_integration", get_defined_vars());
     }
     /**/
     /**/
     do_action("ws_plugin__optimizemember_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" class="button-primary" value="Save All Changes" /></p>' . "\n";
     /**/
     echo '</form>' . "\n";
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
Ejemplo n.º 30
0
 /**
  *
  * shortcode parsing for child elements of membership download element
  */
 static function download($atts, $content)
 {
     // Decode encoded chars
     $atts = op_urldecode($atts);
     extract(shortcode_atts(array('title' => '', 'icon' => '', 'icon_folder' => 'file_download', 'file' => '', 'package' => '', 'level' => '', 'new_window' => '', 'hide_alert' => ''), $atts));
     if (empty($file)) {
         return '';
     }
     $hideAlert = '';
     if (!empty($package) || !empty($level)) {
         if (defined('WS_PLUGIN__OPTIMIZEMEMBER_VERSION')) {
             // is OPM element present and OPM activated?
             $filesDir = $GLOBALS['WS_PLUGIN__']['optimizemember']['c']['files_dir'];
             $hideFiles = false;
             if (isset($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['filter_wp_query']) && 'all' === $GLOBALS['WS_PLUGIN__']['optimizemember']['o']['filter_wp_query'][0]) {
                 $hideFiles = true;
             }
             $uploads = wp_upload_dir();
             $baseUploadDir = $uploads['basedir'];
             $baseUploadUrl = $uploads['baseurl'];
             $fileNameWithFolder = str_replace($baseUploadUrl, '', $file);
             $onlyFileName = basename($file);
             $fullFilePath = $baseUploadDir . '/' . $fileNameWithFolder;
             $attachmentId = op_get_image_id($baseUploadUrl . $fileNameWithFolder);
             // protection needed based on level or package selected
             if (!empty($package)) {
                 // if package selected, level is ignored
                 $destinationFolder = $filesDir . '/access-optimizemember-ccap-' . $package;
                 $forUrl = '/access-optimizemember-ccap-' . $package;
             } else {
                 if (!empty($level)) {
                     $destinationFolder = $filesDir . '/access-optimizemember-level' . $level;
                     $forUrl = '/access-optimizemember-level' . $level;
                 }
             }
             $amazon = false;
             if (c_ws_plugin__optimizemember_utils_conds::using_amazon_s3_storage()) {
                 $amazon = true;
             }
             if (c_ws_plugin__optimizemember_utils_conds::using_amazon_cf_storage()) {
                 $amazon = true;
             }
             if (!$amazon) {
                 if (!is_dir($destinationFolder)) {
                     mkdir($destinationFolder, 0777, true);
                 }
                 // copying only in admin
                 if (defined('OP_LIVEEDITOR')) {
                     copy($fullFilePath, $destinationFolder . '/' . $onlyFileName);
                     /// below code should be uncommented if we decide to remove the file from uploads folder
                     //rename($fullFilePath, $destinationFolder . '/' . $onlyFileName);
                     // removing image from db, too
                     //if (!empty($attachmentId)) wp_delete_attachment($attachmentId);
                 }
             }
             $protected = true;
             // hide alert?
             if (!empty($hide_alert) && $hide_alert == 'Y') {
                 $hideAlert = '&optimizemember_skip_confirmation=yes';
             }
             // dealing with level or packages
             $hideContent = false;
             if (empty($package)) {
                 if (!current_user_can("access_optimizemember_level" . $level)) {
                     $hideContent = true;
                 }
             } else {
                 if (!current_user_can("access_optimizemember_ccap_" . $package)) {
                     $hideContent = true;
                 }
             }
         } else {
             if (defined('OP_LIVEEDITOR')) {
                 return '<p>In order to use this element, you have to enable OptimizeMember plugin !!!</p>';
             } else {
                 return '';
             }
         }
     } else {
         $protected = false;
     }
     if ($protected) {
         if (!$amazon) {
             $fileLink = site_url('?optimizemember_file_download=') . $forUrl . '/' . $onlyFileName . $hideAlert;
         } else {
             /// below code should be uncommented if we decide to remove the file from uploads folder
             // removing file from uploads folder
             //unlink($fullFilePath);
             //if (!empty($attachmentId)) wp_delete_attachment($attachmentId);
             $fileLink = site_url('?optimizemember_file_download=') . '/' . $onlyFileName . $hideAlert;
         }
     } else {
         $fileLink = $file;
     }
     $blank = '';
     if (!empty($new_window) && $new_window == 'Y') {
         $blank = ' target="_blank" ';
     }
     $html = '';
     if ($protected && (false === $hideContent || false === $hideFiles)) {
         $html .= '<li>';
         $html .= '<a ' . $blank . ' href="' . $fileLink . '"><img src="' . OP_ASSETS_URL . 'images/' . $icon_folder . '/icons/' . $icon . '" alt="icon" class="thumb" /></a>';
         $html .= '<div class="content">';
         $html .= '<a ' . $blank . 'href="' . $fileLink . '">' . $title . '</a>';
         $html .= '<p>' . urldecode($content) . '</p>';
         $html .= '</div>';
         $html .= '</li>';
     } else {
         if (!$protected) {
             $html .= '<li>';
             $html .= '<a ' . $blank . ' href="' . $fileLink . '"><img src="' . OP_ASSETS_URL . 'images/' . $icon_folder . '/icons/' . $icon . '" alt="icon" class="thumb" /></a>';
             $html .= '<div class="content">';
             $html .= '<a ' . $blank . ' href="' . $fileLink . '">' . $title . '</a>';
             $html .= '<p>' . urldecode($content) . '</p>';
             $html .= '</div>';
             $html .= '</li>';
         }
     }
     return $html;
 }