示例#1
0
 /**
  * Loads optimizeMember's text domain for translations.
  *
  * @package optimizeMember\Translations
  * @since 110815
  *
  * @attaches-to ``add_action("init");``
  *
  * @return null
  */
 public static function load()
 {
     load_plugin_textdomain("s2member", false, c_ws_plugin__optimizemember_utils_dirs::rel_path(WP_PLUGIN_DIR, dirname(dirname(__FILE__)) . "/translations"));
     load_plugin_textdomain("s2member");
     /* Allows `.mo` file to be loaded from the `/wp-content/plugins/s2member-[locale].mo`. */
     /**/
     do_action("ws_plugin__optimizemember_during_translations_load", get_defined_vars());
     /**/
     add_filter("gettext", "c_ws_plugin__optimizemember_translations::translation_mangler", 10, 3);
     /**/
 }
 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";
 }
 /**
  * Builds the options panel for this Payment Gateway.
  *
  * @package optimizeMember\Menu_Pages
  * @since 140617
  */
 public static function stripe_ops_page()
 {
     c_ws_plugin__optimizemember_menu_pages::update_all_options();
     // Updates options.
     $logs_dir = $GLOBALS['WS_PLUGIN__']['optimizemember']['c']['logs_dir'];
     if (!is_dir($logs_dir) && is_writable(dirname(c_ws_plugin__optimizemember_utils_dirs::strip_dir_app_data($logs_dir)))) {
         mkdir($logs_dir, 0777, TRUE) . clearstatcache();
     }
     $htaccess = $GLOBALS['WS_PLUGIN__']['optimizemember']['c']['logs_dir'] . '/.htaccess';
     $htaccess_contents = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents($GLOBALS['WS_PLUGIN__']['optimizemember']['c']['logs_dir_htaccess'])));
     if (is_dir($logs_dir) && is_writable($logs_dir) && !file_exists($htaccess)) {
         file_put_contents($htaccess, $htaccess_contents) . clearstatcache();
     }
     if ($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['gateway_debug_logs']) {
         if (!is_dir($logs_dir)) {
             // If the security-enabled logs directory does not exist yet.
             c_ws_plugin__optimizemember_admin_notices::display_admin_notice('The security-enabled logs directory (<code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($logs_dir)) . '</code>) does not exist. Please create this directory manually &amp; make it writable (chmod 777).', TRUE);
         } else {
             if (!is_writable($logs_dir)) {
                 // If the logs directory is not writable yet.
                 c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Permissions error. The security-enabled logs directory (<code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($logs_dir)) . '</code>) is not writable. Please make this directory writable (chmod 777).', TRUE);
             }
         }
         if (!file_exists($htaccess)) {
             // If the .htaccess file has not been created yet.
             c_ws_plugin__optimizemember_admin_notices::display_admin_notice('The .htaccess protection file (<code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($htaccess)) . '</code>) does not exist. Please create this file manually. Inside your .htaccess file, add this:<br /><pre>' . esc_html($htaccess_contents) . '</pre>', TRUE);
         } else {
             if (!preg_match('/deny from all/i', file_get_contents($htaccess))) {
                 // Else if the .htaccess file does not offer the required protection.
                 c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Unprotected. The .htaccess protection file (<code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($htaccess)) . '</code>) does not contain <code>deny from all</code>. Inside your .htaccess file, add this:<br /><pre>' . esc_html($htaccess_contents) . '</pre>', TRUE);
             }
         }
     }
     include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/menu-pages/stripe-ops.inc.php';
 }
示例#4
0
 /**
  * Deactivation routines for optimizeMember.
  *
  * @package optimizeMember\Installation
  * @since 3.5
  *
  * @return null
  */
 public static function deactivate()
 {
     global $wpdb;
     /* Global database object reference. */
     global $current_site, $current_blog;
     /* Multisite. */
     /**/
     do_action("ws_plugin__optimizemember_before_deactivation", get_defined_vars());
     /**/
     /*THIS LINES MOVE PRO FOLDER INTO RIGHT PLACE!*/
     //@rename(WP_PLUGIN_DIR.'/optimizeMember-pro', $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir"].'/optimizeMember-pro');
     if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["run_deactivation_routines"]) {
         c_ws_plugin__optimizemember_roles_caps::unlink_roles();
         /* Unlink Roles/Caps. */
         /**/
         c_ws_plugin__optimizemember_files::remove_no_gzip_from_root_htaccess();
         /**/
         if (is_dir($files_dir = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) {
             if (file_exists($htaccess = $files_dir . "/.htaccess")) {
                 if (is_writable($htaccess)) {
                     unlink($htaccess);
                 }
             }
             /**/
             @rmdir($files_dir) . @rmdir(c_ws_plugin__optimizemember_utils_dirs::strip_dir_app_data($files_dir));
         }
         /**/
         if (is_dir($logs_dir = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["logs_dir"])) {
             foreach (scandir($logs_dir) as $log_file) {
                 if (is_file($log_file = $logs_dir . "/" . $log_file)) {
                     if (is_writable($log_file)) {
                         unlink($log_file);
                     }
                 }
             }
             /**/
             @rmdir($logs_dir) . @rmdir(c_ws_plugin__optimizemember_utils_dirs::strip_dir_app_data($logs_dir));
         }
         /**/
         delete_option("ws_plugin__optimizemember_cache");
         delete_option("ws_plugin__optimizemember_notices");
         delete_option("ws_plugin__optimizemember_options");
         delete_option("ws_plugin__optimizemember_configured");
         delete_option("ws_plugin__optimizemember_activated_levels");
         delete_option("ws_plugin__optimizemember_activated_version");
         delete_option("ws_plugin__optimizemember_activated_mms_version");
         /**/
         if (is_multisite() && is_main_site()) {
             /* Site options? */
             delete_site_option("ws_plugin__optimizemember_options");
         }
         /**/
         $wpdb->query("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql(like_escape("optimizemember_")) . "%'");
         $wpdb->query("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '" . esc_sql(like_escape("_transient_s2m_")) . "%'");
         $wpdb->query("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '" . esc_sql(like_escape("_transient_timeout_s2m_")) . "%'");
         $wpdb->query("DELETE FROM `" . $wpdb->postmeta . "` WHERE `meta_key` LIKE '%" . esc_sql(like_escape("optimizemember_")) . "%'");
         $wpdb->query("DELETE FROM `" . $wpdb->usermeta . "` WHERE `meta_key` LIKE '%" . esc_sql(like_escape("optimizemember_")) . "%'");
         /**/
         do_action("ws_plugin__optimizemember_during_deactivation", get_defined_vars());
     }
     /**/
     do_action("ws_plugin__optimizemember_after_deactivation", get_defined_vars());
     /**/
     return;
     /* Return for uniformity. */
 }
示例#5
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>Google 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="Google Account Details">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-google-account-details-section">' . "\n";
     echo '<h3>Google Account Details ( required )</h3>' . "\n";
     echo '<p><a href="http://www.optimizepress.com/google-checkout" target="_blank" rel="external">Google Checkout</a> is a fast, secure checkout process that helps increase sales by bringing you more customers and allowing them to buy from you quickly and easily with a single login. Google\'s Payment Guarantee protects 98% of Checkout orders on average. When an order is guaranteed, you get paid even if it results in a chargeback.</p>' . "\n";
     echo '<p>optimizeMember has been integrated with Google for Direct Payments and also for Recurring Billing. In order to take advantage of this integration, you will need to have a Google Checkout Account. Once you have an account, all of the details below can be obtained from inside of your Google Merchant account. If you need assistance, please check their <a href="http://www.optimizepress.com/google-checkout-help" target="_blank" rel="external">help section</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-google-merchant-id">' . "\n";
     echo 'Google Merchant 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_google_merchant_id" id="ws-plugin--optimizemember-pro-google-merchant-id" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_google_merchant_id"]) . '" /><br />' . "\n";
     echo 'You\'ll find this in your Google Checkout account, under: <code>Settings -> Integration</code>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-google-merchant-key">' . "\n";
     echo 'Google Merchant Key:' . "\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_google_merchant_key" id="ws-plugin--optimizemember-pro-google-merchant-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_google_merchant_key"]) . '" /><br />' . "\n";
     echo 'You\'ll find this in your Google Checkout account, under: <code>Settings -> Integration</code>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th style="padding-top:0;">' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-google-sandbox">' . "\n";
     echo 'Developer/Sandbox Testing?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<input type="radio" name="ws_plugin__optimizemember_pro_google_sandbox" id="ws-plugin--optimizemember-pro-google-sandbox-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_google_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-pro-google-sandbox-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__optimizemember_pro_google_sandbox" id="ws-plugin--optimizemember-pro-google-sandbox-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_google_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-pro-google-sandbox-1">Yes, enable support for Sandbox testing.</label><br />' . "\n";
     echo '<em>Only enable this if you\'ve provided Sandbox credentials above.<br />This puts optimizeMember\'s Google integration into Sandbox mode.<br />See: <a href="http://www.optimizepress.com/google-checkout-sandbox-accounts" target="_blank" rel="external">Google Sandbox Accounts</a></em>' . "\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="Google API v2.5 Integration">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-google-api-section">' . "\n";
     echo '<h3>Google API Callback v2.5 Integration ( required )<br />aka: Google IPN ( Instant Payment Notifications )</h3>' . "\n";
     echo '<p>Log into your Google Checkout account and navigate to this section:<br /><code>Settings -> Integration</code></p>' . "\n";
     echo '<p>Your Google API v2.5 (Callback URL) is:<br /><code>' . esc_html(site_url("/?optimizemember_pro_google_notify=1")) . '</code></p>' . "\n";
     echo '<p>Set your API (Callback Content) to:<br /><code>Notification Serial Number</code>.</strong></p>' . "\n";
     echo '<p>Only Post Digitally Signed Carts: <code>On</code></p>' . "\n";
     echo '<p>Notification Filtering: <code>Off ( important )</code></p>' . "\n";
     /**/
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<p>Now navigate to this section:<br /><code>Settings -> Preferences</code></p>' . "\n";
     echo '<p>Set Order Processing to: <code>Authorize And Charge</code></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 Google. 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 Google.' . "\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 Google.<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> = A unique Subscription ID ( i.e. the optimizeMember TID/SID #; always with an `s2-` prefix ). [ <a href="#" onclick="alert(\'The reason optimizeMember generates a unique TID/SID # ( always with an `s2-` prefix ), is because the built-in Order # Google generates is NOT dynamic enough to handle everything optimizeMember makes possible with Membership Access. Google Orders ( by themselves ) do NOT allow site owners to track multiple payments with a common Subscription ID. So optimizeMember makes up for this minor deficiency.\\n\\nFor instance, with Recurring Google Subscriptions, optimizeMember\\\'s %%subscr_id%% will remain constant throughout all future payments; making things easier to keep track of ( on the back-end management side of things ).\'); 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.\'); 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>%%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>.</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>%%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>.</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 Google, 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 Google, 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 Google, 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> = A unique Transaction ID for this purchase ( always generated by Google ). [ <a href="#" onclick="alert(\'This is always the built-in Order # generated by Google Checkout.\'); return false;">?</a> ]</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>Google 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 Google IPN service will notify optimizeMember whenever a refund or chargeback occurs. For example, if you issue a refund to an unhappy Customer through Google, optimizeMember will eventually be notified, 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";
 }
示例#6
0
 /**
  * Get the system's temporary directory.
  *
  * @package optimizeMember\Utilities
  * @since 111017
  *
  * @param str $fallback Defaults to true. If true, fallback on WordPress routine if not available, or if not writable.
  * @return str|bool Full string path to a writable temp directory, else false on failure.
  */
 public static function get_temp_dir($fallback = TRUE)
 {
     $temp_dir = ($temp_dir = realpath(sys_get_temp_dir())) && is_writable($temp_dir) ? $temp_dir : false;
     $temp_dir = !$temp_dir && $fallback && ($wp_temp_dir = realpath(get_temp_dir())) && is_writable($wp_temp_dir) ? $wp_temp_dir : $temp_dir;
     /**/
     return $temp_dir ? c_ws_plugin__optimizemember_utils_dirs::n_dir_seps($temp_dir) : false;
 }
示例#7
0
 /**
  * Builds and handles the Download Options page.
  * 
  * @package optimizeMember\Menu_Pages
  * @since 3.5
  * 
  * @return null
  */
 public static function down_ops_page()
 {
     do_action("ws_plugin__optimizemember_before_down_ops_page", get_defined_vars());
     /**/
     c_ws_plugin__optimizemember_menu_pages::update_all_options();
     /**/
     $files_dir = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"];
     /**/
     $htaccess = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"] . "/.htaccess";
     $htaccess_contents = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir_htaccess"])));
     /**/
     $no_gzip_htaccess = ABSPATH . ".htaccess";
     $no_gzip_htaccess_contents = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_no_gzip_htaccess"])));
     /**/
     if (!c_ws_plugin__optimizemember_files::no_gzip_rules_in_root_htaccess()) {
         c_ws_plugin__optimizemember_files::write_no_gzip_into_root_htaccess() . clearstatcache();
     }
     /**/
     if (!is_dir($files_dir) && is_writable(dirname(c_ws_plugin__optimizemember_utils_dirs::strip_dir_app_data($files_dir)))) {
         mkdir($files_dir, 0777, true) . clearstatcache();
     }
     /**/
     if (is_dir($files_dir) && is_writable($files_dir) && !file_exists($htaccess)) {
         file_put_contents($htaccess, $htaccess_contents) . clearstatcache();
     }
     /**/
     if (!c_ws_plugin__optimizemember_files::no_gzip_rules_in_root_htaccess()) {
         c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Possible GZIP conflict on server. Unable to write GZIP exclusions into root .htaccess file (<code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($no_gzip_htaccess)) . '</code>). Please read the panel below: <strong>Preventing GZIP Conflicts</strong>, and add this section yourself:<br /><pre>' . esc_html($no_gzip_htaccess_contents) . '</pre>', true);
     }
     /**/
     if (!is_dir($files_dir)) {
         /* If the security-enabled files directory does not exist yet. */
         c_ws_plugin__optimizemember_admin_notices::display_admin_notice('The security-enabled files directory (<code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($files_dir)) . '</code>) does not exist. Please create this directory manually.', true);
     }
     /**/
     if (!file_exists($htaccess)) {
         /* If the `.htaccess` file has not been created yet. */
         c_ws_plugin__optimizemember_admin_notices::display_admin_notice('The .htaccess protection file (<code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($htaccess)) . '</code>) does not exist. Please create this file manually. Inside your .htaccess file, add this:<br /><pre>' . esc_html($htaccess_contents) . '</pre>', true);
     } else {
         if (!preg_match("/deny from all/i", file_get_contents($htaccess))) {
             /* Else if the `.htaccess` file does not offer the required protection. */
             c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Unprotected. The .htaccess protection file (<code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($htaccess)) . '</code>) does not contain <code>deny from all</code>. Inside your .htaccess file, add this:<br /><pre>' . esc_html($htaccess_contents) . '</pre>', true);
         }
     }
     /**/
     if (!empty($_POST["ws_plugin__optimizemember_amazon_cf_files_auto_configure_distros"]) && ($nonce = $_POST["ws_plugin__optimizemember_amazon_cf_files_auto_configure_distros"]) && wp_verify_nonce($nonce, "ws-plugin--optimizemember-amazon-cf-files-auto-configure-distros")) {
         if (($amazon_cf_auto_configure_distros = c_ws_plugin__optimizemember_files_in::amazon_cf_auto_configure_distros()) && $amazon_cf_auto_configure_distros["success"]) {
             c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Amazon CloudFront Distributions auto-configured successfully. Please allow 30 minutes for propagation.' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_downloads_cname"] ? '<br /><em>Downloads Distribution CNAME: <code>' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_downloads_cname"]) . ' &mdash;&raquo; ' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_downloads_dname"]) . '</code></em>' : '') . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_streaming_cname"] ? '<br /><em>Streaming Distribution CNAME: <code>' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_streaming_cname"]) . ' &mdash;&raquo; ' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_streaming_dname"]) . '</code></em>' : ''));
         } else {
             /* Else there was an error. We need to report this back to the site owner so they can understand what's going on. */
             (c_ws_plugin__optimizemember_menu_pages::$pre_display_errors["cf_files_auto_configure_distros"] = true) . c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Unable to auto-configure Amazon CloudFront Distributions.<br />Error code: <code>' . esc_html($amazon_cf_auto_configure_distros["code"]) . '</code>. Error Message: <code>' . esc_html($amazon_cf_auto_configure_distros["message"]) . '</code>', true);
         }
     }
     /**/
     if (!empty($_POST["ws_plugin__optimizemember_amazon_s3_files_auto_configure_acls"]) && ($nonce = $_POST["ws_plugin__optimizemember_amazon_s3_files_auto_configure_acls"]) && wp_verify_nonce($nonce, "ws-plugin--optimizemember-amazon-s3-files-auto-configure-acls")) {
         if (($amazon_s3_auto_configure_acls = c_ws_plugin__optimizemember_files_in::amazon_s3_auto_configure_acls()) && $amazon_s3_auto_configure_acls["success"]) {
             c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Amazon S3 ACLs auto-configured successfully.');
         } else {
             /* Else there was an error. We need to report this back to the site owner so they can understand what's going on. */
             (c_ws_plugin__optimizemember_menu_pages::$pre_display_errors["s3_files_auto_configure_acls"] = true) . c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Unable to auto-configure Amazon S3 ACLs.<br />Error code: <code>' . esc_html($amazon_s3_auto_configure_acls["code"]) . '</code>. Error Message: <code>' . esc_html($amazon_s3_auto_configure_acls["message"]) . '</code>', true);
         }
     }
     /**/
     include_once dirname(dirname(__FILE__)) . "/menu-pages/down-ops.inc.php";
     /**/
     do_action("ws_plugin__optimizemember_after_down_ops_page", get_defined_vars());
     /**/
     return;
     /* Return for uniformity. */
 }
示例#8
0
 /**
  * Generates an RSA-SHA1 signature from the command line.
  *
  * Used by {@link optimizeMember\Utilities\c_ws_plugin__optimizemember_utils_strings::rsa_sha1_sign()}.
  *
  * @package optimizeMember\Utilities
  * @since 111017
  *
  * @param str $string Input string/data, to be signed by this routine.
  * @param str $key The secret key that will be used in this signature.
  * @param str $openssl Optional. Defaults to `openssl`. Path to OpenSSL executable.
  * @return str|bool An RSA-SHA1 signature string, or false on failure.
  */
 public static function _rsa_sha1_shell_sign($string = FALSE, $key = FALSE, $openssl = FALSE)
 {
     if (function_exists("shell_exec") && ($esa = "escapeshellarg") && ($openssl = $openssl && is_string($openssl) ? $openssl : "openssl") && ($temp_dir = c_ws_plugin__optimizemember_utils_dirs::get_temp_dir())) {
         file_put_contents($string_file = $temp_dir . "/" . md5(uniqid("", true) . "rsa-sha1-string") . ".tmp", (string) $string);
         file_put_contents($private_key_file = $temp_dir . "/" . md5(uniqid("", true) . "rsa-sha1-private-key") . ".tmp", (string) $key);
         file_put_contents($rsa_sha1_sig_file = $temp_dir . "/" . md5(uniqid("", true) . "rsa-sha1-sig") . ".tmp", "");
         /**/
         @shell_exec($esa($openssl) . " sha1 -sign " . $esa($private_key_file) . " -out " . $esa($rsa_sha1_sig_file) . " " . $esa($string_file));
         $signature = file_get_contents($rsa_sha1_sig_file);
         /* Was the signature was written? */
         unlink($rsa_sha1_sig_file) . unlink($private_key_file) . unlink($string_file);
         /* Cleanup. */
     }
     return !empty($signature) ? $signature : false;
 }
示例#9
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>File Download 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_amazon_cf_files_distros_auto_config_status" id="ws-plugin--optimizemember-amazon-cf-files-distros-auto-config-status" value="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distros_auto_config_status"]) . '" />' . "\n";
     echo '<input type="hidden" name="ws_plugin__optimizemember_configured" id="ws-plugin--optimizemember-configured" value="1" />' . "\n";
     /**/
     do_action("ws_plugin__optimizemember_during_down_ops_page_before_left_sections", get_defined_vars());
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_restrictions", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_restrictions", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Basic Download Restrictions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-restrictions-section">' . "\n";
         echo '<h3>File Download Restrictions ( required, if providing access to protected files )</h3>' . "\n";
         echo '<p>If your Membership offering allows access to restricted files, you\'ll want to configure these options.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_restrictions", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Upload restricted files to this security-enabled directory:</strong><br /><code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '</code></p>' . "\n";
         echo '<p>- Now, you can link to any protected file, using this special format:<br />&nbsp;&nbsp;<code>' . esc_html(site_url("/?optimizemember_file_download=example-file.zip")) . '</code><br />&nbsp;&nbsp;<small><em><strong>optimizemember_file_download</strong> = file, relative to the /' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/ directory. In other words, just the file name.</em></small></p>' . "\n";
         echo '<p>- Or, use: <code>[opmFile download="example-file.zip" /]</code> <em>( easier Shortcode if you prefer )</em><br />&nbsp;&nbsp;<small><em><strong>Shortcode equivalent:</strong> <code>[opmFile /]</code> produces the entire URL for you, easier.</em></small></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p>optimizeMember will allow access to these protected files, based on the configuration you specify below. Repeated downloads of the same exact file are NOT tabulated against the totals below. Once a file has been downloaded, future downloads of the same exact file, by the same exact Member will not be counted against them. In other words, if a Member downloads the same file three times, the system only counts that as one unique download. In addition, multiple variations of popular media formats are only counted once. This is because many site owners provide multiple download options to their Users/Members, for compatibility purposes. Files that have the same exact name, with one of these extensions, will only be counted ONE time: <code>' . esc_html(implode(", ", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["streaming_file_extns"])) . '</code>.</p>' . "\n";
         echo '<p>optimizeMember will automatically detect links, anywhere in your content, and/or anywhere in your theme files, that contain <code>optimizemember_file_download</code> or <code>optimizemember-files</code>. Whenever a logged-in Member clicks a link that contains <code>optimizemember_file_download</code> or <code>optimizemember-files</code>, the system will politely ask the user to confirm the download using a very intuitive JavaScript confirmation prompt, which contains specific details about your configured download limitations. This way your Members will be aware of how many files they\'ve downloaded in the current period; and they\'ll be able to make a conscious decision about whether to proceed with a specific download or not. If you want to suppress this JavaScript confirmation prompt, you can add this to the end of your links: <code>&amp;optimizemember_skip_confirmation</code>. Shortcode alternative: <code>[opmFile skip_confirmation="yes" /]</code>.</p>' . "\n";
         echo '<p><em>* The above only applies to Users who are logged in as Members. For all other visitors in the general public, the <code>?optimizemember_file_download</code> links will redirect them your Membership Options Page, so that new visitors can signup, in order to gain access, by becoming a Member. You may also want to have a look down below at optimizeMember\'s "Advanced Download Restrictions", which provides a greater degree of flexibility.</em></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<table class="form-table" style="margin-top:0;">' . "\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 style="padding-top:0;">' . "\n";
             echo '<label for="ws-plugin--optimizemember-level' . $n . '-file-downloads-allowed">' . "\n";
             echo $n === $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? 'File Downloads ( Highest Level ' . $labelText . ' ):' . "\n" : 'File Downloads ( Level ' . $labelText . ' Or Higher ):' . "\n";
             echo '</label>' . "\n";
             echo '</th>' . "\n";
             /**/
             echo '</tr>' . "\n";
             echo '<tr>' . "\n";
             /**/
             echo '<td>' . "\n";
             echo '<input type="text" maxlength="9" autocomplete="off" name="ws_plugin__optimizemember_level' . $n . '_file_downloads_allowed" id="ws-plugin--optimizemember-level' . $n . '-file-downloads-allowed" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_file_downloads_allowed"]) . '" style="width:200px;" /> every <input type="text" maxlength="3" autocomplete="off" name="ws_plugin__optimizemember_level' . $n . '_file_downloads_allowed_days" id="ws-plugin--optimizemember-level' . $n . '-file-downloads-allowed-days" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_file_downloads_allowed_days"]) . '" style="width:200px;" onkeyup="if(this.value > 365){ alert(\'( 365 days is the maximum ).\\nThis keeps the logs optimized.\'); this.value = 365; }" /> day(s).<br />' . "\n";
             echo 'Only this many unique downloads will be permitted every X day(s), at ' . ($n === $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? 'highest Level ' . $labelText : 'Level ' . $labelText . ' or higher') . '.<br />' . "\n";
             echo '<em>* To allow UNLIMITED downloads, use: <code>999999999</code> ( i.e. <code>999999999</code> = unlimited ).</em>' . "\n";
             echo '</td>' . "\n";
             /**/
             echo '</tr>' . "\n";
             /**/
             echo $n < $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? '<tr><td><div class="ws-menu-page-hr" style="margin:10px 0 10px 0;"></div></td></tr>' : '';
         }
         /**/
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_after_restrictions", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_limit_exceeded_page", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_limit_exceeded_page", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Download Limit Exceeded Page">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-limit-exceeded-page-section">' . "\n";
         echo '<h3>Download Limit Exceeded Page ( required, if providing access to protected files )</h3>' . "\n";
         echo '<p>This Page will be shown when/if a Member reaches their download limit, based on your configuration of <strong>Basic Download Restrictions</strong> above. This Page should be created by you, in WordPress. This Page should provide an informative message to the Member, describing your file access restrictions. Just tell them a little bit about your policy on file downloads, and why they might have reached this Page.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_limit_exceeded_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-file-download-limit-exceeded-page">' . "\n";
         echo 'Download Limit Exceeded Page:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__optimizemember_file_download_limit_exceeded_page" id="ws-plugin--optimizemember-file-download-limit-exceeded-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"]["file_download_limit_exceeded_page"] ? ' selected="selected"' : '') . '>' . esc_html($ws_plugin__optimizemember_temp_o->post_title) . '</option>' . "\n";
         }
         echo '</select><br />' . "\n";
         echo 'We recommend the following title: <code>Download Limit Exceeded</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_down_ops_page_during_left_sections_after_limit_exceeded_page", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_advanced_restrictions", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_advanced_restrictions", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Advanced Download Restrictions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-restrictions-section">' . "\n";
         echo '<h3>Advanced Download Restrictions ( optional, for greater flexibility )</h3>' . "\n";
         echo '<p>By default, optimizeMember uses your Basic Download Restrictions, as configured above. However, you can force optimizeMember to allow File Downloads, using an extra query string parameter: <code>&amp;optimizemember_file_download_key=[Key]</code>. A File Download `Key` is passed through this parameter; it tells optimizeMember to allow the download of this particular file, regardless of Membership Level; and WITHOUT checking any Basic Restrictions, that you may or may not have configured above. The creation of a File Download `Key`, requires a small PHP code snippet. In order to use PHP scripting inside your Posts/Pages, you\'ll need to install this handy plugin ( <a href="http://wordpress.org/extend/plugins/php-execution-plugin/" target="_blank" rel="external">PHP Execution</a> ). There is also a Shortcode equivalent, which does NOT require PHP at all, as seen below.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_advanced_restrictions", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p>' . esc_html(site_url("/?optimizemember_file_download=example-file.zip")) . '<code>&amp;optimizemember_file_download_key=&lt;?php echo optimizemember_file_download_key("example-file.zip"); ?&gt;</code><br />&nbsp;&nbsp;<small><em><strong>optimizemember_file_download_key</strong> = &lt;?php echo optimizemember_file_download_key("file, relative to the /' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/ directory"); ?&gt;</em></small></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p>' . esc_html(site_url("/?optimizemember_file_download=example-file.zip")) . '<code>&amp;optimizemember_file_download_key=[opmKey file_download="example-file.zip" /]</code><br />&nbsp;&nbsp;<small><em><strong>Shortcode equivalent:</strong> <code>[opmKey file_download="example-file.zip" /]</code></em></small></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><code>[opmFile download="example-file.zip" download_key="true" /]</code> <em>( Key is auto-generated in this case )</em><br />&nbsp;&nbsp;<small><em><strong>Shortcode equivalent:</strong> <code>[opmFile /]</code> produces the entire URL, no need to generate a Key yourself.</em></small></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p>The function optimizemember_file_download_key(), is part of the optimizeMember API. It produces a time-sensitive File Download Key that is unique to each and every visitor. Each Key it produces <em>( at the time it is produced )</em>, will be valid for the current day, and only for a specific IP address and User-Agent string; as detected by optimizeMember. This makes it possible for you to create links on your site, which provide access to protected file downloads; and without having to worry about one visitor sharing their link with another. So let\'s take a quick look at what <code>optimizemember_file_download_key()</code> actually produces.</p>' . "\n";
         echo '<p><code>optimizemember_file_download_key("example-file.zip")</code> = a site-specific hash of: <code>date("Y-m-d").$_SERVER["REMOTE_ADDR"].$_SERVER["HTTP_USER_AGENT"].$file</code></p>' . "\n";
         echo '<p>When <code>optimizemember_file_download_key = <em>a valid Key</em></code>, it works independently from Member Level Access. That is, a visitor does NOT have to be logged in to receive access; they just need a valid Key. Using this advanced technique, you could extend optimizeMember\'s file protection routines, or even combine them with Specific Post/Page Access, and more. The possibilities are limitless really.</p>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_after_advanced_restrictions", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_inline_extensions", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_inline_extensions", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Inline File Extensions">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-inline-extensions-section">' . "\n";
         echo '<h3>Inline File Extensions ( optional, for content-disposition )</h3>' . "\n";
         echo '<p>There are two ways to serve files. Inline, or as an Attachment. By default, optimizeMember will serve all of your protected files, as downloadable attachments. Meaning, visitors will be given a file download prompt. Otherwise known as <code>Content-Disposition: attachment</code>. In some cases though, you may wish to serve files inline. For example, PDF files and images should usually be served inline. When you serve a file inline, it is displayed in your browser immediately, rather than your browser prompting you to download the file as an attachment.</p>' . "\n";
         echo '<p>Using the field below, you can list all of the extensions that you want optimizeMember to serve inline ( ex: <code>htm,html,pdf,jpg,jpeg,jpe,gif,png,mp3,mp4,flv,ogg,webm</code> ). Please understand, some files just cannot be displayed inline. For instance, there is no way to display an <code>exe</code> file inline. So only specify extensions that can, and should be displayed inline by a web browser. Alternatively, if you would rather handle this on a case-by-case basis, you can simply add the following to the end of your download links: <code>&amp;optimizemember_file_inline=yes</code>. Shortcode alternative: <code>[opmFile download="example-file.zip" inline="yes" /]</code>.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_inline_extensions", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-file-download-inline-extensions">' . "\n";
         echo 'Default Inline File Extensions ( comma-delimited ):' . "\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_file_download_inline_extensions" id="ws-plugin--optimizemember-file-download-inline-extensions" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["file_download_inline_extensions"]) . '" /><br />' . "\n";
         echo 'Inline extensions, comma-delimited. Ex: <code>htm,html,pdf,jpg,jpeg,jpe,gif,png,mp3,mp4,flv,ogg,webm</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_down_ops_page_during_left_sections_after_inline_extensions", get_defined_vars());
     }
     /**/
     /* if(apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_remote_authorization", true, get_defined_vars()))
     			{
     				do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_remote_authorization", get_defined_vars());
     				
     				echo '<div class="ws-menu-page-group" title="Remote Auth / Podcasting">'."\n";
     				/
     				echo '<div class="ws-menu-page-section ws-plugin--optimizemember-remote-authorization-section">'."\n";
     				echo '<h3>Remote Header Authorization ( optional )</h3>'."\n";
     				echo '<p>This can be enabled on a case-by-case basis. Just add this to the end of your download links: <code>&amp;optimizemember_file_remote=yes</code>. Shortcode alternative: <code>[opmFile download="example-file.zip" remote="yes" /]</code>.</p>'."\n";
     				echo '<p>Remote Header Authorization allows access to file downloads through an entirely different approach. Instead of asking the Member to log into your site through a browser, a Member will be prompted automatically, to log in through HTTP Header Authorization prompts; which is the same technique used in more traditional security systems via .htaccess files. In other words, Remote Header Authorization makes it possible for your Members to access files through remote applications that may NOT use a browser. This is often the case when a Member needs to access protected files through a software client like iTunes; typical with podcasts.</p>'."\n";
     				do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_remote_authorization", get_defined_vars());
     				echo '</div>'."\n";
     				
     				echo '</div>'."\n";
     				
     				do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_after_remote_authorization", get_defined_vars());
     			} */
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_amazon_s3", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_amazon_s3", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Amazon S3/CDN Storage Option"' . (!empty(c_ws_plugin__optimizemember_menu_pages::$pre_display_errors["cf_files_auto_configure_distros"]) ? ' default-state="open"' : '') . '>' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-amazon-s3-section">' . "\n";
         echo '<h3>Amazon S3/CDN Storage &amp; Delivery ( optional )</h3>' . "\n";
         echo '<a href="http://aws.amazon.com/s3/" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/amazon-logo.png" class="ws-menu-page-right" style="width:250px; height:100px; border:0;" alt="." /></a>' . "\n";
         echo '<p>Please note, all of this is optional. optimizeMember can be configured here to ONLY use Amazon S3 <em>( i.e. without Amazon CloudFront )</em>. Or, optimizeMember can be configured to use BOTH Amazon S3 and Amazon CloudFront together. If you want to use Amazon S3 Storage, but you don\'t care about Amazon CloudFront, feel free to leave the entire Amazon CloudFront section empty. The configuration options in the Amazon CloudFront section are ONLY required if you are planning to use both Amazon S3 and Amazon CloudFront together.</p>' . "\n";
         echo '<p>Amazon Simple Storage Service ( <a href="http://aws.amazon.com/s3/" target="_blank" rel="external">Amazon S3</a> ). Amazon S3 is storage for the Internet. It is designed to make web-scale computing easier for developers. Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives developers access to the same highly scalable, reliable, secure, fast, inexpensive infrastructure that Amazon uses to run its own global network of web sites. optimizeMember has been integrated with Amazon S3, so that <em>( if you wish )</em>, instead of using the <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory, you can store all of your protected files inside an Amazon S3 Bucket.</p>' . "\n";
         echo '<p>If you configure the options below, optimizeMember will assume all protected files are inside your Amazon S3 Bucket; and the <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory is no longer used at all. That being said, all other aspects of optimizeMember\'s File Download protection remain the same. The only thing that changes, is the location of your protected files. In other words, Basic Download Restrictions, Download Keys, Inline Extensions, Custom Capability and/or Membership Level Files will all continue to work just as before. The only difference is that optimizeMember will use your Amazon S3 Bucket as a CDN <em>( i.e. Content Delivery Network )</em> instead of the local <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory.</p>' . "\n";
         echo '<p>optimizeMember assumes that you\'re creating a new Amazon S3 Bucket, specifically for this installation; and that your Bucket is NOT available publicly. In other words, if you type this URL into your browser <em>( i.e. <code>http://your-bucket-name.s3.amazonaws.com/</code> )</em>, you should get an error that says: <code>Access Denied</code>. That\'s good, that\'s exactly what you want. You can create your Amazon S3 Bucket using the <a href="https://console.aws.amazon.com/s3/home" target="_blank" rel="external">Amazon interface</a>. Or, some people prefer to use this popular Firefox extension ( <a href="http://www.s3fox.net/" target="_blank" rel="external">S3 Fox Organizer</a> ).</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_amazon_s3", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><em><strong>Dev Note w/Technical Details:</strong> optimizeMember uses "Digitally Signed URLs", authenticated by the Amazon S3 API. Documented for developers <a href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html" target="_blank" rel="external">here</a>. To put it simply, optimizeMember will generate Amazon S3 URLs ( internally ); which allow Customers temporary access to specific files inside your S3 Bucket. optimizeMember\'s Digitally Signed URLs leading to Amazon S3, give a Customer 24 hours to connect to the file inside your S3 Bucket. This connection period of 24 hours is largely irrelevant when used in combination with optimizeMember, because access is renewed for another 24 hours each time you make a file available to a User/Member, and they are authenticated by your configuration of optimizeMember. This connection period of 24 hours is just a secondary line of defense to further prevent the possibility of link sharing. If you need to change this connection timeout of <code>24 hours</code> for some reason ( not likely ), you can use this WordPress Filter: <code>ws_plugin__optimizemember_amazon_s3_file_expires_time</code>.</em></p>' . "\n";
         echo '<p><em><strong>Linking To Protected Files:</strong> Nothing changes. optimizeMember\'s integration with Amazon S3 serves protected files through the same links that all optimizeMember site owners use. For example, you might use: <code>' . esc_html(site_url("/?optimizemember_file_download=example-file.zip")) . '</code>, where <strong>optimizemember_file_download</strong> = the file, relative to the root of your Amazon S3 Bucket. In other words, just the file name in most cases. optimizeMember will redirect Users/Members to a digitally signed Amazon S3 URL, which allows them access to a particular file via Amazon S3. For further details, please review this section of your Dashboard: <code>optimizeMember -> Download Options -> Basic Download Restrictions</code>. Also see: <code>optimizeMember -> Download Options -> Advanced Mod-Rewrite Linkage</code>.</em></p>' . "\n";
         echo '<p><em><strong>Content Type, Disposition &amp; Inline Files:</strong> The query string parameter <code>&amp;optimizemember_file_inline=yes</code> DOES work for files served directly through Amazon S3. optimizeMember DOES have control over the <code>Content-Type</code> and <code>Content-Disposition</code> headers for files being served through Amazon S3. However, Amazon CloudFront servers do NOT automatically determine the MIME type for the objects they serve. If you integrate both Amazon S3 and CloudFront, optimizeMember will NOT have control over headers. Therefore, when you upload a file to your Amazon S3 Bucket, you should set its Content-Type header. Again, with the Amazon S3/CloudFront combination, you MUST configure headers yourself ( such as <code>Content-Type: video/webm</code>, or <code>Content-Disposition: inline|attachment</code> ) that you want Amazon CloudFront to send for a particular file. It\'s quite easy. You do this by setting <code>Properties -> Metadata ( i.e. headers )</code> on a per-file basis, from inside your Amazon S3 Management Console. In short, when you upload a file to your Amazon S3 Bucket, if you want that file to be served a certain way, be sure to configure its <code>Properties -> Metadata</code> accordingly.</em></p>' . "\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-amazon-s3-files-bucket">' . "\n";
         echo 'Amazon S3 File Bucket Name ( where protected files are ):' . "\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_amazon_s3_files_bucket" id="ws-plugin--optimizemember-amazon-s3-files-bucket" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_bucket"]) . '" /><br />' . "\n";
         echo 'Your Amazon S3 Bucket will be used, instead of the <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory.<br />' . "\n";
         echo 'Please type the name of your Bucket. Ex: <code>mys3bucket</code>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-amazon-s3-files-access-key">' . "\n";
         echo 'Amazon Access Key ( Access Key ID ):' . "\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_amazon_s3_files_access_key" id="ws-plugin--optimizemember-amazon-s3-files-access-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_access_key"]) . '" /><br />' . "\n";
         echo 'See: <code>Amazon Web Services Account -> Security Credentials -> Access Credentials</code>.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-amazon-s3-files-secret-key">' . "\n";
         echo 'Amazon Secret Key ( Secret Access Key ):' . "\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_amazon_s3_files_secret_key" id="ws-plugin--optimizemember-amazon-s3-files-secret-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_s3_files_secret_key"]) . '" /><br />' . "\n";
         echo 'See: <code>Amazon Web Services Account -> Security Credentials -> Access Credentials</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_down_ops_page_during_left_sections_after_amazon_s3", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_amazon_cf", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_amazon_cf", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Amazon S3/CloudFront CDN Storage Option"' . (!empty(c_ws_plugin__optimizemember_menu_pages::$pre_display_errors["cf_files_auto_configure_distros"]) ? ' default-state="open"' : '') . '>' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-amazon-cf-section">' . "\n";
         echo '<h3>Amazon S3/CloudFront CDN Storage &amp; Delivery ( optional )</h3>' . "\n";
         echo '<a href="http://aws.amazon.com/cloudfront/" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/amazon-logo.png" class="ws-menu-page-right" style="width:250px; height:100px; border:0;" alt="." /></a>' . "\n";
         echo '<p>Please note, all of this is optional. optimizeMember can be configured to ONLY use Amazon S3 <em>( i.e. without Amazon CloudFront )</em>. Or, optimizeMember can be configured to use BOTH Amazon S3 and Amazon CloudFront together. If you don\'t want to use Amazon CloudFront, please leave this entire section empty. The configuration options in this section are ONLY required if you are planning to use both Amazon S3 and Amazon CloudFront together.</p>' . "\n";
         echo '<p>Amazon Simple Storage Service ( <a href="http://aws.amazon.com/s3/" target="_blank" rel="external">Amazon S3</a> ) combined with <a href="http://aws.amazon.com/cloudfront/" target="_blank" rel="external">Amazon CloudFront</a>. Amazon CloudFront is a web service for content delivery. It integrates with other Amazon Web Services <em>( i.e. Amazon S3 Storage )</em> to give developers and businesses an easy way to distribute content to end users with low latency, and with high data transfer speeds. Amazon CloudFront delivers your static and streaming content using a global network of edge locations. Requests for your Amazon S3 Bucket Objects <em>( i.e. your protected files )</em> are automatically routed to the nearest edge location, so content is delivered with the best possible performance. optimizeMember has been integrated with both Amazon S3 and with Amazon CloudFront. So <em>( if you wish )</em>, instead of using the <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory, you can store all of your protected files inside an Amazon S3 Bucket and serve them via Amazon CloudFront. But again, please understand, the configuration options in this section are ONLY required if you\'re going to use both Amazon S3 &amp; CloudFront together.</p>' . "\n";
         echo '<p><strong>One of the great things about Amazon CloudFront</strong>, is its ability to <strong>stream/seek media files</strong> in the truest sense of the word. For sites delivering protected <em>FLV/MP4/OGG/WEBM</em> and other streaming audio/video file types over the <em>RTMP</em> protocol, Amazon CloudFront is our recommendation. Once you\'ve successfully configured optimizeMember to use both Amazon S3 and Amazon CloudFront together, please review the section below regarding <code>JW Player &amp; RTMP Protocol Examples</code>. optimizeMember will automatically serve your protected files over the <em>RTMP</em> protocol using an Amazon CloudFront Streaming Distribution.</p>' . "\n";
         echo '<p>If you configure the options below, optimizeMember will assume all protected files are inside your Amazon S3 Bucket; and the <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory is no longer used at all. That being said, all other aspects of optimizeMember\'s File Download protection remain the same. The only thing that changes, is the location of your protected files. In other words, Basic Download Restrictions, Download Keys, Custom Capability and/or Membership Level Files will all continue to work just as before. The only difference is that optimizeMember will use your Amazon S3 Bucket, automatically connecting it to both of the Amazon CloudFront Distributions, which optimizeMember auto-configures for you <em>( see below )</em>. In this way, optimizeMember uses Amazon CloudFront as a CDN <em>( i.e. Content Delivery Network )</em> for your protected files.</p>' . "\n";
         echo '<p>optimizeMember assumes that you\'re creating a new Amazon S3 Bucket, specifically for this installation; and that your Bucket is NOT available publicly. In other words, if you type this URL into your browser <em>( i.e. <code>http://your-bucket-name.s3.amazonaws.com/</code> )</em>, you should get an error that says: <code>Access Denied</code>. That\'s good, that\'s exactly what you want. You can create your Amazon S3 Bucket using the <a href="https://console.aws.amazon.com/s3/home" target="_blank" rel="external">Amazon interface</a>. Or, some people prefer to use this popular Firefox extension ( <a href="http://www.s3fox.net/" target="_blank" rel="external">S3 Fox Organizer</a> ). You will also need to enable CloudFront inside your Web Services account at Amazon. Don\'t worry about creating or configuring any CloudFront Distributions, optimizeMember will auto-create and auto-configure those for you, allowing you to serve protected files.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_amazon_cf", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><em><strong>Dev Note w/Technical Details:</strong> optimizeMember\'s auto-configuration routines for Amazon CloudFront (below), are designed to create &amp; configure various components on your Amazon Web Services account, which are all requirements for you to <a href="http://docs.amazonwebservices.com/AmazonCloudFront/2010-11-01/DeveloperGuide/index.html?HowToPrivateContent.html" target="_blank" rel="external">serve protected files through the Amazon S3/CloudFront combination</a>. These components include: an Origin Access Identity, read permissions for the Origin Access Identity, and two private content Distributions. One private content Distribution for file downloads, and another private content Distribution for streaming media files; both connected to and sourced by your Amazon S3 Bucket. In addition, optimizeMember will automatically configure an ACL &amp; Policy ( i.e. permissions ) on your Amazon S3 Bucket to make sure your protected object/files are NOT available to the public.</em></p>' . "\n";
         echo '<p><em><strong>Dev Note w/Technical Details:</strong> optimizeMember uses "Digitally Signed URLs", authenticated by the Amazon CloudFront API. Documented for developers <a href="http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html" target="_blank" rel="external">here</a>. To put it simply, optimizeMember will generate Amazon CloudFront URLs ( internally ); which allow Customers temporary access to specific files inside your S3 Bucket — via CloudFront Distributions. optimizeMember\'s Digitally Signed URLs leading to Amazon S3/CloudFront, give a Customer 24 hours to connect to the file inside your S3 Bucket. This connection period of 24 hours is largely irrelevant when used in combination with optimizeMember, because access is renewed for another 24 hours each time you make a file available to a User/Member, and they are authenticated by your configuration of optimizeMember. This connection period of 24 hours is just a secondary line of defense to further prevent the possibility of link sharing. If you need to change this connection timeout of <code>24 hours</code> for some reason ( not likely ), you can use this WordPress Filter: <code>ws_plugin__optimizemember_amazon_cf_file_expires_time</code>.</em></p>' . "\n";
         echo '<p><em><strong>Linking To Protected Files:</strong> RTMP streams are special, but nothing else changes. optimizeMember\'s integration with Amazon S3/CloudFront serves protected files through the same links that all optimizeMember site owners use. For example, you might use: <code>' . esc_html(site_url("/?optimizemember_file_download=example-file.zip")) . '</code>, where <strong>optimizemember_file_download</strong> = the file, relative to the root of your Amazon S3 Bucket. In other words, just the file name in most cases. optimizeMember will redirect Users/Members to a digitally signed Amazon CloudFront URL, which allows them access to a particular file via Amazon CloudFront. For further details, please review this section of your Dashboard: <code>optimizeMember -> Download Options -> Basic Download Restrictions</code>. Also see: <code>optimizeMember -> Download Options -> Advanced Mod-Rewrite Linkage</code>. If you\'re streaming audio/video files over the RTMP protocol, please review the section below: <code>JW Player &amp; RTMP Protocol Examples</code>.</em></p>' . "\n";
         echo '<p><em><strong>Content Type, Disposition &amp; Inline Files:</strong> An IMPORTANT issue. The query string parameter <code>&amp;optimizemember_file_inline=yes</code> does NOTHING for files served via Amazon CloudFront. optimizeMember has NO control over the <code>Content-Type</code> and/or <code>Content-Disposition</code> headers for a file being served through Amazon CloudFront, and CloudFront servers do NOT automatically determine the MIME type for the objects they serve. Therefore, when you upload a file to your Amazon S3 Bucket, you should set its Content-Type header. That is, you MUST configure headers yourself ( such as <code>Content-Type: video/webm</code>, or <code>Content-Disposition: inline|attachment</code> ) that you want Amazon CloudFront to send for a particular file. It\'s quite easy. You do this by setting <code>Properties -> Metadata ( i.e. headers )</code> on a per-file basis, from inside your Amazon S3 Management Console. In short, when you upload a file to your Amazon S3 Bucket, if you want that file to be served a certain way, be sure to configure its <code>Properties -> Metadata</code> accordingly.</em></p>' . "\n";
         echo stripos(PHP_OS, "win") === 0 && c_ws_plugin__optimizemember_utils_conds::is_localhost() ? '<p><em><strong>Localhost Developers:</strong> optimizeMember\'s Amazon CloudFront integration requires the <a href="http://php.net/manual/en/function.openssl-sign.php" target="_blank" rel="external">openssl_sign()</a> function in PHP so it can digitially sign CloudFront URLs. This function is sometimes problematic on localhost servers such as WAMP &amp; EasyPHP. We recommend installing <a href="http://www.slproweb.com/products/Win32OpenSSL.html" target="_blank" rel="external">this lightweight alternative for Windows</a> while you\'re developing. optimizeMember will automatically find it here: <code>C:\\OpenSSL-Win[32/64]\\bin\\openssl.exe</code>.' . (file_exists("c:\\openssl-win32\\bin\\openssl.exe") || file_exists("c:\\openssl-win64\\bin\\openssl.exe") ? ' <strong class="ws-menu-page-hilite">( optimizeMember has detected that OpenSSL-Win[32/64] IS installed in the correct location, thank you! )</strong>' : ' <strong class="ws-menu-page-hilite">( optimizeMember has detected that OpenSSL-Win[32/64] is NOT currently available )</strong>') . '</em></p>' . "\n" : '';
         /**/
         if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distros_auto_config_status"] === "configured") {
             echo '<p><em class="ws-menu-page-hilite"><strong>Your Amazon CloudFront Distributions are: ( ALREADY configured! )</strong></em>' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_downloads_cname"] ? '<br /><em class="ws-menu-page-hilite">Downloads Distribution CNAME:</em> <em><code>' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_downloads_cname"]) . ' &mdash;&raquo; ' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_downloads_dname"]) . '</code></em>' : '') . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_streaming_cname"] ? '<br /><em class="ws-menu-page-hilite">Streaming Distribution CNAME:</em> <em><code>' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_streaming_cname"]) . ' &mdash;&raquo; ' . esc_html($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_streaming_dname"]) . '</code></em>' : '') . '</p>' . "\n";
         } else {
             if (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distros_auto_config_status"]) {
                 echo '<p><em class="ws-menu-page-hilite"><strong>Your Amazon CloudFront Distributions are: ( NOT yet auto-configured ).</strong></em></p>' . "\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-amazon-cf-files-private-key-id">' . "\n";
         echo 'Amazon CloudFront Key Pair ID ( your Key Pair 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_amazon_cf_files_private_key_id" id="ws-plugin--optimizemember-amazon-cf-files-private-key-id" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_private_key_id"]) . '" data-s-prev-config-value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_private_key_id"]) . '" /><br />' . "\n";
         echo 'See: <code>Amazon Web Services Account -> Security Credentials -> Key Pairs</code>.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-amazon-cf-files-private-key-entry">' . "\n";
         echo 'Amazon CloudFront Private Key ( contents of your <code>pk-[***].pem</code> file ):' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="hidden" name="ws_plugin__optimizemember_amazon_cf_files_private_key" id="ws-plugin--optimizemember-amazon-cf-files-private-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_private_key"]) . '" data-s-prev-config-value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_private_key"]) . '" />' . "\n";
         echo '<textarea name="ws_plugin__optimizemember_amazon_cf_files_private_key_entry" id="ws-plugin--optimizemember-amazon-cf-files-private-key-entry" rows="3" wrap="off" spellcheck="false" style="font-family:Consolas, monospace;">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_private_key"]) . '</textarea><br />' . "\n";
         echo 'See: <code>Amazon Web Services Account -> Security Credentials -> Key Pairs</code>.<br />' . "\n";
         echo '<em>* Note, optimizeMember needs your <strong>Private Key file</strong>, NOT your Public Key file.</em>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-amazon-cf-files-auto-configure-distros">' . "\n";
         echo 'Auto-Configure your Amazon S3/CloudFront combination?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="checkbox" name="ws_plugin__optimizemember_amazon_cf_files_auto_configure_distros" id="ws-plugin--optimizemember-amazon-cf-files-auto-configure-distros" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-amazon-cf-files-auto-configure-distros")) . '"' . (!empty(c_ws_plugin__optimizemember_menu_pages::$pre_display_errors["cf_files_auto_configure_distros"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-amazon-cf-files-auto-configure-distros"><strong>Yes</strong>, automatically configure my Amazon CloudFront Distributions &amp; Amazon S3 ACLs for me.</label><br />' . "\n";
         echo '<em>optimizeMember will auto-configure and/or delete &amp; re-configure your Amazon CloudFront Distributions for you.</em>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="checkbox" name="ws_plugin__optimizemember_amazon_cf_files_auto_configure_distros_w_cnames" id="ws-plugin--optimizemember-amazon-cf-files-auto-configure-distros-w-cnames" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-amazon-cf-files-auto-configure-distros-w-cnames")) . '"' . (!empty(c_ws_plugin__optimizemember_menu_pages::$pre_display_errors["cf_files_auto_configure_distros"]) && ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_downloads_cname"] || $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_streaming_cname"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-amazon-cf-files-auto-configure-distros-w-cnames"><strong>Yes</strong>, I want optimizeMember to auto-configure using custom CNAMES that I\'ll setup.</label><br />' . "\n";
         echo '<em>* Optional, do NOT check this box unless you know what you\'re doing. This requires DNS changes.</em>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div id="ws-plugin--optimizemember-amazon-cf-files-auto-configure-distro-cnames" 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-amazon-cf-files-downloads-distro-cname">' . "\n";
         echo 'Amazon CloudFront CNAME for File Downloads ( optional ):' . "\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_amazon_cf_files_distro_downloads_cname" id="ws-plugin--optimizemember-amazon-cf-files-downloads-distro-cname" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_downloads_cname"]) . '" /><br />' . "\n";
         echo 'Example: <code>s2-file-downloads.' . esc_html(c_ws_plugin__optimizemember_utils_urls::parse_url(site_url(), PHP_URL_HOST)) . '</code>.<br />' . "\n";
         echo '<em>* Optional, do NOT fill this in unless you know what you\'re doing. This requires DNS changes.</em>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-amazon-cf-files-streaming-distro-cname">' . "\n";
         echo 'Amazon CloudFront CNAME for Streaming Files ( optional ):' . "\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_amazon_cf_files_distro_streaming_cname" id="ws-plugin--optimizemember-amazon-cf-files-streaming-distro-cname" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["amazon_cf_files_distro_streaming_cname"]) . '" /><br />' . "\n";
         echo 'Example: <code>s2-streaming-files.' . esc_html(c_ws_plugin__optimizemember_utils_urls::parse_url(site_url(), PHP_URL_HOST)) . '</code>.<br />' . "\n";
         echo '<em>* Optional, do NOT fill this in unless you know what you\'re doing. This requires DNS changes.</em>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_after_amazon_cf", get_defined_vars());
     }
     /**/
     /* if(apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_rtmp_streaming", true, get_defined_vars()))
     				{
     					do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_rtmp_streaming", get_defined_vars());
     					
     					echo '<div class="ws-menu-page-group" title="JW Player v6 &amp; RTMP Protocol Examples">'."\n";
     					
     					echo '<div class="ws-menu-page-section ws-plugin--optimizemember-rtmp-streaming-section">'."\n";
     					echo '<h3>JW Player v6 &amp; RTMP Protocol Examples</h3>'."\n";
     					echo '<a href="http://www.longtailvideo.com/players/" target="_blank"><img src="'.esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]).'/images/jwplayer-logo.png" class="ws-menu-page-right" style="width:179px; height:58px; border:0;" alt="." /></a>'."\n";
     					echo '<p>While it is possible to serve audio/video files protected by optimizeMember, without needing to integrate Amazon S3 or CloudFront; we DO highly recommend that you integrate both Amazon S3 and Amazon CloudFront in order to maximize speed and compatibility across various viewing platforms. That being said, there are code samples below that will serve audio/video files both with and without Amazon S3/CloudFront. You can also check the <a href="'.esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Forum URI")).'" target="_blank" rel="external">optimizeMember Support Forums</a> for tips/tricks if you like.</p>'."\n";
     					echo '<p><strong>One of the great things about Amazon CloudFront</strong>, is its ability to <strong>stream/seek media files</strong> in the truest sense of the word. For sites delivering protected <em>FLV/MP4/OGG/WEBM</em> and other streaming audio/video file types over the <em>RTMP</em> protocol, Amazon CloudFront is our recommendation. Once you\'ve successfully configured optimizeMember to use both Amazon S3 and Amazon CloudFront together, please review the code samples below. optimizeMember can automatically serve your protected files over the <em>RTMP</em> protocol using an Amazon CloudFront Streaming Distribution.</p>'."\n";
     					//echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/jwplayer-opmStream-shortcodes/" target="_blank" rel="external">JW Player w/ <code>[opmStream /]</code> Shortcodes</a>.</p>'."\n";
     					do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_rtmp_streaming", get_defined_vars());
     					
     					echo '<div class="ws-menu-page-hr"></div>'."\n";
     					
     					echo '<h3><code>[opmStream /]</code> Video Shortcode Examples (recommended — it\'s the easiest way)</h3>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp4\').toggle(); return false;" class="ws-dotted-link">JW Player ( MP4 file, via Rewrite URLs. Amazon S3/CloudFront NOT required )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp4" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Works with any audio/video file. This does NOT require optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-opmStream-mp4.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp4-rtmp\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP4, via optimizeMember\'s Amazon S3/CloudFront integration )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp4-rtmp" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Streams with the RTMP protocol, plus there is a full download fallback of the MP4 source file if streaming is not possible on a particular device.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-opmStream-mp4-rtmp.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp4-rtmp-only\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP4 only, via optimizeMember\'s Amazon S3/CloudFront integration )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp4-rtmp-only" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Streams with the RTMP protocol only, with no access to the source file, only to the RTMP stream.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-opmStream-mp4-rtmp-only.x-php")).'</p>'."\n";
     					
     					echo '<div class="ws-menu-page-hr"></div>'."\n";
     					
     					echo '<h3><code>[opmStream /]</code> Audio Shortcode Examples (recommended — it\'s the easiest way)</h3>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp3\').toggle(); return false;" class="ws-dotted-link">JW Player ( MP3 file, via Rewrite URLs. Amazon S3/CloudFront NOT required )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp3" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Works with any audio/video file. This does NOT require optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-opmStream-mp3.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp3-rtmp\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP3, via optimizeMember\'s Amazon S3/CloudFront integration )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp3-rtmp" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Streams with the RTMP protocol, plus there is a full download fallback of the MP3 source file if streaming is not possible on a particular device.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-opmStream-mp3-rtmp.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp3-rtmp-only\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP3 only, via optimizeMember\'s Amazon S3/CloudFront integration )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-opmStream-mp3-rtmp-only" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Streams with the RTMP protocol only, with no access to the source file, only to the RTMP stream.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-opmStream-mp3-rtmp-only.x-php")).'</p>'."\n";
     					
     					echo '<div class="ws-menu-page-hr"></div>'."\n";
     					
     					echo '<h3>PHP Code Examples (for more advanced integrations via PHP — in WordPress themes)</h3>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-standard-mp4\').toggle(); return false;" class="ws-dotted-link">JW Player ( MP4 file, via Rewrite URLs. Amazon S3/CloudFront NOT required )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-standard-mp4" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This does NOT require optimizeMember to be integrated with Amazon S3/CloudFront.<br />Also see: <code>optimizeMember -> Download Options -> Advanced Mod Rewrite Linkage</code>.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-standard-mp4.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-streaming-mp4\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP4, via optimizeMember\'s Amazon S3/CloudFront integration )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-streaming-mp4" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-streaming-mp4.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-streaming-mp4-sca\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP4, via optimizeMember\'s JSON/Shortcode alternative )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-streaming-mp4-sca" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-streaming-mp4-sca.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-streaming-mp4-webm\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP4, advanced w/ multiple fallbacks )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-streaming-mp4-webm" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-streaming-mp4-webm.x-php")).'</p>'."\n";
     					
     					echo '</div>'."\n";
     					
     					echo '</div>'."\n";
     					
     					do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_after_rtmp_streaming", get_defined_vars());
     				}
     			
     			if(apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_rtmp_streaming", true, get_defined_vars()))
     				{
     					do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_rtmp_streaming", get_defined_vars());
     					
     					echo '<div class="ws-menu-page-group" title="JW Player v5 &amp; RTMP Protocol Examples ( Deprecated )">'."\n";
     					
     					echo '<div class="ws-menu-page-section ws-plugin--optimizemember-rtmp-streaming-section">'."\n";
     					echo '<h3>JW Player v5 &amp; RTMP Protocol Examples ( Deprecated )</h3>'."\n";
     					echo '<a href="http://www.longtailvideo.com/players/" target="_blank"><img src="'.esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]).'/images/jwplayer-logo.png" class="ws-menu-page-right" style="width:179px; height:58px; border:0;" alt="." /></a>'."\n";
     					echo '<p>While it is possible to serve audio/video files protected by optimizeMember, without needing to integrate Amazon S3 or CloudFront; we DO highly recommend that you integrate both Amazon S3 and Amazon CloudFront in order to maximize speed and compatibility across various viewing platforms. That being said, there are code samples below that will serve audio/video files both with and without Amazon S3/CloudFront. You can also check the <a href="'.esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Forum URI")).'" target="_blank" rel="external">optimizeMember Support Forums</a> for tips/tricks if you like.</p>'."\n";
     					echo '<p><strong>One of the great things about Amazon CloudFront</strong>, is its ability to <strong>stream/seek media files</strong> in the truest sense of the word. For sites delivering protected <em>FLV/MP4/OGG/WEBM</em> and other streaming audio/video file types over the <em>RTMP</em> protocol, Amazon CloudFront is our recommendation. Once you\'ve successfully configured optimizeMember to use both Amazon S3 and Amazon CloudFront together, please review the code samples below. optimizeMember can automatically serve your protected files over the <em>RTMP</em> protocol using an Amazon CloudFront Streaming Distribution.</p>'."\n";
     					do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_rtmp_streaming", get_defined_vars());
     					
     					echo '<div class="ws-menu-page-hr"></div>'."\n";
     					
     					echo '<h3>PHP Code Examples (for more advanced integrations)</h3>'."\n";
     					echo '<p>These examples exist from past versions of optimizeMember. JW Player v5 is now outdated by JW Player v6 (recommended).</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-v5-standard-mp4\').toggle(); return false;" class="ws-dotted-link">JW Player ( MP4 file, via Rewrite URLs. Amazon S3/CloudFront NOT required )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-v5-standard-mp4" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This does NOT require optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-v5-standard-mp4.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-v5-streaming-mp4\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP4, via optimizeMember\'s Amazon S3/CloudFront integration )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-v5-streaming-mp4" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-v5-streaming-mp4.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-v5-streaming-mp4-sca\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP4, via optimizeMember\'s JSON/Shortcode alternative )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-v5-streaming-mp4-sca" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-v5-streaming-mp4-sca.x-php")).'</p>'."\n";
     					
     					echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-v5-streaming-mp4-webm\').toggle(); return false;" class="ws-dotted-link">JW Player ( RTMP streaming MP4, advanced w/ multiple fallbacks )</a></p>'."\n";
     					echo '<p id="ws-plugin--optimizemember-rtmp-streaming-details-jwplayer-v5-streaming-mp4-webm" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This requires optimizeMember to be integrated with Amazon S3/CloudFront.<br /><br />'.c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/jwplayer-v5-streaming-mp4-webm.x-php")).'</p>'."\n";
     					
     					echo '</div>'."\n";
     					
     					echo '</div>'."\n";
     					
     					do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_after_rtmp_streaming", get_defined_vars());
     				} */
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_rewrite_linkage", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_rewrite_linkage", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Advanced Mod-Rewrite Linkage">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-rewrite-linkage-section">' . "\n";
         echo '<h3>Advanced Mod-Rewrite Linkage</h3>' . "\n";
         echo '<p>optimizeMember automatically creates <code>mod_rewrite</code> rules inside your <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory, which provide additional flexibility in the way protected files can be served to your Customers. With optimizeMember\'s <code>mod_rewrite</code> rules, it is now possible to link directly to a protected file, avoiding the use of query string variables <em>( it\'s completely optional though, i.e. NOT required )</em>.</p>' . "\n";
         echo '<p>This new flexibility may come in handy for site owners serving files through media playback devices that have issues with query string variables. For instance, it is now possible to link to an optimizeMember-protected file directly, like this: <code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/example-file.zip</code> instead of <code>... /?optimizemember_file_download=example-file.zip</code>. Either way works, but the direct link might be easier for some.</p>' . "\n";
         echo '<p>It is also possible to pass query string parameters through a direct link:<br /><code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/example-file.zip?optimizemember_file_inline=yes&amp;optimizemember_file_download_key=[key]</code>.</p>' . "\n";
         echo '<p>That being said, optimizeMember\'s <code>mod_rewrite</code> rules allow for more advanced control over optimizeMember-specific parameters.</p>' . "\n";
         echo '<p>For example, you could just do this for inline files:<br /><code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/optimizemember-file-inline</strong>/example-file.zip</code></p>' . "\n";
         echo '<p>Or, if you really want to get advanced, you could do something like this:<br /><code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/optimizemember-file-inline-[yes|no]/optimizemember-file-download-key-[key]</strong>/example-file.zip</code><br /><code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/optimizemember-file-inline-yes/optimizemember-file-download-key-xS54df5ER4d5x</strong>/example-file.zip</code><br /><code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/optimizemember-file-inline-yes/s2member-skip-confirmation</strong>/example-file.zip</code></p>' . "\n";
         echo '<p>Or even this, if you\'re using Remote Header Authorization:<br /><code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/optimizemember-file-remote</strong>/example-file.zip</code></p>' . "\n";
         echo '<p>Specifying storage location option dynamically:<br /><code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/optimizemember-file-storage-[local|s3|cf]</strong>/example-file.zip</code><br /><code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/optimizemember-file-storage-cf</strong>/example-cloudfront-file.zip</code><br /><code>... /wp-content/plugins/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/optimizemember-file-storage-s3/optimizemember-file-inline</strong>/example-s3-file.html</code></p>' . "\n";
         echo '<p><em>* Note, the order of your optimizeMember-specific parameters with Advanced Mod-Rewrite Linkage is irrelevant. Feel free to add/remove, or even change the order. Everything discussed here is also Multisite compatible. Everything discussed here is also compatible when/if combined with Amazon S3/CDN Storage. However, NONE of this will work on servers that do NOT support <code>mod_rewrite</code>. Almost all web servers do though.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_rewrite_linkage", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_after_rewrite_linkage", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_shortcode_attrs", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_shortcode_attrs", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Shortcode Attributes &amp; API Functions ( Explained )">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-shortcode-attrs-section">' . "\n";
         echo '<h3>Shortcode Attributes &amp; API Functions ( Explained In Full Detail )</h3>' . "\n";
         echo '<p>optimizeMember makes Shortcodes available to you, which allow you to generate File Download URLs and/or File Download Keys. Like most Shortcodes for WordPress, optimizeMember reads Attributes in your Shortcode. Many site owners like to know exactly how these Shortcode Attributes work. Below, is a brief overview of each possible Shortcode Attribute.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_shortcode_attrs", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h4 style="margin:0;"><code>[opmFile /]</code> &amp; <code>[opmStream /]</code> Shortcode Attributes:</h4>' . "\n";
         //echo '<p style="margin:0;"><strong>See also:</strong> API Function <a href="http://www.optimizepress.com/codex/stable/s2member/api_functions/package-functions/#src_doc_optimizemember_file_download_url()" target="_blank" rel="external">optimizemember_file_download_url()</a> for PHP integration.</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>download="file.zip"</code> Location of the file, relative to the <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory; or, relative to the root of your Amazon S3 Bucket, when applicable.</li>' . "\n";
         echo '<li><code>download_key="no"</code> Defaults to <code>no</code>. If <code>download_key="1|on|yes|true|ip-forever|universal"</code>, optimizeMember will return a URL with an optimizeMember-generated File Download Key. You don\'t need to generate the File Download Key yourself, optimizeMember does it for you. If you set <code>download_key="ip-forever"</code>, the File Download Key that optimizeMember generates will last forever, for a specific IP Address; otherwise, by default, all File Download Keys expire after 24 hours automatically. If you set <code>download_key="universal"</code>, optimizeMember will generate a File Download Key that is good for anyone/everyone forever, with NO restrictions on who/where/when a file is accessed <em>( e.g. be careful with this one )</em>.</li>' . "\n";
         echo '<li><code>stream="no"</code> Defaults to <code>no</code> with <code>[opmFile /]</code> Shortcode. Defaults to <code>yes</code> with <code>[opmStream /]</code> Shortcode. If <code>stream="1|on|yes|true"</code>, optimizeMember will return a URL containing a parameter/directive, which forces the File Download to take place over the RTMP protocol if at all possible. This ONLY works when/if optimizeMember is configured to run with both Amazon S3/CloudFront. Please note however, it\'s better to use the example code provided in the section above, regarding: <code>JW Player and the RTMP Protocol</code>. Also note, if <code>get_streamer_json="1|on|yes|true"</code>, optimizeMember will automatically force <code>stream="yes"</code> for you.</li>' . "\n";
         echo '<li><code>inline=""</code> Defaults to <code>[empty]</code> with <code>[opmFile /]</code> Shortcode. Defaults to <code>yes</code> with <code>[opmStream /]</code> Shortcode. If <code>inline="1|on|yes|true"</code>, optimizeMember will serve the file inline, instead of as an actual File Download. If empty, optimizeMember will look at your <code>Inline File Extensions</code> configuration above, and serve the file inline; if, and only if, its extension matches one found in your configuration. By default, optimizeMember serves all files as attachments <em>( i.e. downloads )</em>, except in the case of the <code>[opmStream /]</code> Shortcode where this defaults to <code>yes</code>. Please read the section above regarding <code>Inline File Extensions</code> for further details. Also note, this Shortcode Attribute does NOTHING for files served via Amazon CloudFront. See the tech-notes listed in the Amazon CloudFront section for further details and workarounds.</li>' . "\n";
         echo '<li><code>storage=""</code> Defaults to <code>[empty]</code>. If <code>storage="local|s3|cf"</code>, optimizeMember will serve the file from a specific source location, based on the value of this Shortcode Attribute. For example, if you\'ve configured Amazon S3 and/or CloudFront; but, there are a few files that you want to upload locally to the <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory; you can force optimizeMember to serve a file from local storage by setting <code>storage="local"</code> explicitly.</li>' . "\n";
         echo '<li><code>remote="no"</code> Defaults to <code>no</code>. If <code>remote="1|on|yes|true"</code>, optimizeMember will authenticate access to the File Download via Remote Header Authorization, instead of through your web site. This is similar to <code>.htaccess</code> protection routines of yester-year</code>. Please check the <code>Remote Authorization and Podcasting</code> section for further details about how this works.</li>' . "\n";
         echo '<li><code>ssl=""</code> Defaults to <code>[empty]</code>. If <code>ssl="1|on|yes|true"</code>, optimizeMember will generate a File Download URL with an SSL protocol <em>( i.e. the URL will start with <code>https://</code> or <code>rtmpe://</code> )</em>. If empty, optimizeMember will only generate a File Download URL with an SSL protocol, when/if the Post/Page/URL firing the Shortcode itself, is also being viewed over SSL. Otherwise, optimizeMember will use a non-SSL protocol by default.</li>' . "\n";
         echo '<li><code>rewrite="no"</code> Defaults to <code>no</code> with <code>[opmFile /]</code> Shortcode. Defaults to <code>yes</code> with <code>[opmStream /]</code> Shortcode. If <code>rewrite="1|on|yes|true"</code>, optimizeMember will generate a File Download URL that takes full advantage of optimizeMember\'s Advanced Mod Rewrite functionality. If you\'re running an Apache web server, or another server that supports <code>mod_rewrite</code>, we highly recommend turning this on. optimizeMember\'s <code>mod_rewrite</code> URLs do NOT contain query string parameters, making them more portable/compatible with other software applications and/or plugins for WordPress. If you\'re integrating with JW Player, you MUST use <code>rewrite="yes"</code>.</li>' . "\n";
         echo '<li><code>rewrite_base=""</code> Defaults to <code>[empty]</code>. If <code>rewrite_base="' . esc_attr(site_url("/")) . '"</code>, optimizeMember will generate a File Download URL that takes full advantage of optimizeMember\'s Advanced Mod Rewrite functionality, and it will use the rewrite base URL as a prefix. This could be useful on some WordPress installations that use advanced directory structures. It could also be useful for site owners using virtual directories that point to <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code>. Note, if <code>rewrite_base</code> is set, optimizeMember will automatically force <code>rewrite="yes"</code> for you.</li>' . "\n";
         echo '<li><code>skip_confirmation="no"</code> Defaults to <code>no</code>. If <code>skip_confirmation="1|on|yes|true"</code>, optimizeMember will generate a File Download URL which contains a directive, telling optimizeMember NOT to introduce any JavaScript confirmation prompts on your site, for this File Download URL. Please note, optimizeMember will automatically detect links, anywhere in your content, and/or anywhere in your theme files, that contain <code>optimizemember_file_download</code> or <code>optimizemember-files</code>. Whenever a logged-in Member clicks a link that contains <code>optimizemember_file_download</code> or <code>optimizemember-files</code>, the system will politely ask the User to confirm the download using a very intuitive JavaScript confirmation prompt, which contains specific details about your configured download limitations. This way your Members will be aware of how many files they\'ve downloaded in the current period; and they\'ll be able to make a conscious decision about whether to proceed with a specific download or not.</li>' . "\n";
         echo '<li><code>url_to_storage_source="no"</code> Defaults to <code>no</code> with <code>[opmFile /]</code> Shortcode. Defaults to <code>yes</code> with <code>[opmStream /]</code> Shortcode. If <code>url_to_storage_source="1|on|yes|true"</code>, optimizeMember will generate a File Download URL which points directly to the storage source. This is only functional with Amazon S3 and/or CloudFront integrations. If you create a URL that points directly to the storage source <em>( i.e. points directly to Amazon S3 or CloudFront )</em>, optimizeMember will NOT be able to further authenticate the current User/Member; and, optimizeMember will NOT be able to count the File Download against the current User\'s account record, because the URL being generated does not pass back through optimizeMember at all, it points directly to the storage source. For this reason, if you set <code>url_to_storage_source="true"</code>, you should also set <code>check_user="******"</code> and <code>count_against_user="******"</code>, telling optimizeMember to authenticate the current User, and if authenticated, count this File Download URL against the current User\'s account record in real-time <em>( i.e. as the URL is being generated ) </em>, while it still has a chance to do so. This Shortcode Attribute is useful when you stream files over the RTMP protocol; where an <code>http://</code> URL is not feasible. It also helps in situations where a 3rd-party software application will not work as intended, with optimizeMember\'s internal redirection to Amazon S3/CloudFront files. Important, when <code>check_user="******"</code> and/or <code>count_against_user="******"</code>, the Shortcode will return an empty and/or null object value in situations where the current User/Member does NOT have access to the file.</li>' . "\n";
         echo '<li><code>count_against_user="******"</code> Defaults to <code>no</code> with <code>[opmFile /]</code> Shortcode. Defaults to <code>yes</code> with <code>[opmStream /]</code> Shortcode. If <code>count_against_user="******"</code>, it will automatically force <code>check_user="******"</code> as well. In other words, optimizeMember will authenticate the current User, and if authenticated, count this File Download URL against the current User\'s account record in real-time <em>( i.e. as the URL is being generated ) </em>. This is off by default with the <code>[opmFile /]</code> Shortcode. By default, optimizeMember will simply generate a File Download URL, and upon a User/Member clicking the URL, optimizeMember will authenticate the User/Member at that time, count the File Download against their account record, and serve the File Download. In other words, under normal circumstances, there is no reason to set <code>check_user="******"</code> and/or <code>count_against_user="******"</code> when generating the URL itself. However, this is a useful Shortcode Attribute when <code>url_to_storage_source="true"</code>. Please note, when <code>check_user="******"</code> and/or <code>count_against_user="******"</code>, the Shortcode will return an empty and/or null object value in situations where the current User/Member does NOT have access to the file.</li>' . "\n";
         echo '<li><code>check_user="******"</code> Defaults to <code>no</code> with <code>[opmFile /]</code> Shortcode. Defaults to <code>yes</code> with <code>[opmStream /]</code> Shortcode. If <code>check_user="******"</code>, optimizeMember will authenticate the current User before allowing the File Download URL to be generated. This is off by default with the <code>[opmFile /]</code> Shortcode. By default, optimizeMember will simply generate a File Download URL, and upon a User/Member clicking the URL, optimizeMember will authenticate the User/Member at that time, and serve the File Download to the User/Member. In other words, under normal circumstances, there is no reason to set <code>check_user="******"</code> and/or <code>count_against_user="******"</code> when generating the URL itself. However, this IS a useful Shortcode Attribute when <code>url_to_storage_source="true"</code>. Please note, when <code>check_user="******"</code> and/or <code>count_against_user="******"</code>, the Shortcode will return an empty and/or null object value in situations where the current User/Member does NOT have access to the file.</li>' . "\n";
         echo '<li><code>get_streamer_json="no"</code> Defaults to <code>no</code>. N/A with <code>[opmStream /]</code> Shortcode. If <code>get_streamer_json="1|on|yes|true"</code>, the <code>[opmFile /]</code> Shortcode will return a JSON object for JavaScript notation, making it possible to integrate the <code>[opmFile /]</code> Shortcode into JavaScript routines that configure streaming media players. For further details, please review the section above: <code>JW Player &amp; RTMP Protocol Examples</code>. Note, if you set <code>get_streamer_json="true"</code>, optimizeMember will automatically force <code>url_to_storage_source="true"</code> and <code>stream="true"</code>. For that reason, you should carefully review the details and warning above regarding <code>url_to_storage_source</code>. If you set <code>get_streamer_json="true"</code>, you should also set <code>check_user="******"</code> and <code>count_against_user="******"</code>.</li>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_shortcode_attrs_opmFile_lis", get_defined_vars());
         echo '</ul>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h4 style="margin:0;">Additional <code>[opmStream /]</code> Shortcode Attributes:</h4>' . "\n";
         //echo '<p style="margin:0;"><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/jwplayer-opmStream-shortcodes/" target="_blank" rel="external">JW Player w/ <code>[opmStream /]</code> Shortcodes</a>.</p>'."\n";
         //echo '<p style="margin:0;"><strong>See also:</strong> API Function <a href="http://www.optimizepress.com/codex/stable/s2member/api_functions/package-functions/#src_doc_optimizemember_file_download_url()" target="_blank" rel="external">optimizemember_file_download_url()</a> for PHP integration.</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>file_download="video.mp4"</code> Location of the audio/video file, relative to the <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory; or, relative to the root of your Amazon S3 Bucket, when applicable.</li>' . "\n";
         echo '<li><code>player="jwplayer-v6-rtmp"</code> Required. Current supported players in this Shortcode include: <code>jwplayer-v6</code> (works with any audio/video file, and you do NOT need to have Amazon  S3 or CloudFront™ integrated for this to work), <code>jwplayer-v6-rtmp</code> (streams with the RTMP protocol, plus there is a full download fallback of the source file if streaming is not possible on a particular device; this requires both Amazon S3 and CloudFront™ integration), <code>jwplayer-v6-rtmp-only</code> (streams with the RTMP protocol only, with no access to the source file, only to the RTMP stream; this requires both Amazon S3 and CloudFront™ integration).</li>' . "\n";
         echo '<li><code>player_id=""</code> Optional. HTML div ID for the audio/video player. Defaults to a unique ID generated by optimizeMember for each instance of your Shortcode.</li>' . "\n";
         echo '<li><code>player_path="/jwplayer/jwplayer.js"</code> Required. Path to the player\'s JavaScript file (ex: <code>/jwplayer/jwplayer.js</code> — you should upload the <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">/jwplayer</a> folder to the root of your web directory).</li>' . "\n";
         echo '<li><code>player_[setting]=""</code> Optional. Any additional configuration attributes supported by your audio/video player, prefixed with <code>player_</code>. For JW Player™ v6, see <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player" target="_blank" rel="external">this article please</a>. Examples: <code>player_width="480"</code>, <code>player_height="270"</code>, <code>player_image="http://www.example.com/wp-content/uploads/video-preview.jpg"</code>, <code>player_autostart="true"</code>, <code>player_skin="/jwplayer/my-skin.xml"</code>, <code>player_key="my-license-key"</code>. Please note that "Advanced Options Blocks" listed on <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player" target="_blank" rel="external">this page</a> are NOT supported here. For those, please use: <code>player_option_blocks=""</code>.</li>' . "\n";
         echo '<li><code>player_option_blocks=""</code> Optional. Any "Advanced Option Blocks" supported by your audio/video player. For JW Player™ v6, see <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player" target="_blank" rel="external">this article please</a>. Here are some examples: <code>player_option_blocks="sharing:{}"</code>, <code>player_option_blocks="sharing:{}, logo: {file: \'/logo.png\', link: \'http://example.com\'}"</code>. Or: <code>player_option_blocks="c2hhcmluZzoge30="</code> (base64 encoded version of <code>sharing: {}</code>). Please note that "Advanced Options Blocks" can be defined in plain text or with a <a href="http://www.base64encode.org/" target="_blank" rel="external">base64 encoded string</a>. Advanced Option Blocks are JavaScript objects with properties. If you have trouble defining JavaScript object properties inside a Shortcode Attribute, please use <a href="http://www.base64encode.org/" target="_blank" rel="external">this tool</a> to base64 encode your Advanced Option Blocks, so that you end up with a string that\'s compatible with Shortcode Attributes.</li>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_shortcode_attrs_opmStream_lis", get_defined_vars());
         echo '</ul>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h4 style="margin:0;"><code>[opmKey /]</code> Shortcode Attributes:</h4>' . "\n";
         //echo '<p style="margin:0;"><strong>See also:</strong> API Function <a href="http://www.optimizepress.com/codex/stable/s2member/api_functions/package-functions/#src_doc_optimizemember_file_download_key()" target="_blank" rel="external">optimizemember_file_download_key()</a> for PHP integration.</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>file_download="file.zip"</code> Location of the file, relative to the <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/</code> directory; or, relative to the root of your Amazon S3 Bucket, when applicable.</li>' . "\n";
         echo '<li><code>directive=""</code> Defaults to <code>[empty]</code>. If <code>directive="ip-forever|universal"</code>, optimizeMember will return a special File Download Key. If you set <code>directive="ip-forever"</code>, the File Download Key that optimizeMember generates will last forever, for a specific IP Address; otherwise, by default, all File Download Keys expire after 24 hours automatically. If you set <code>directive="universal"</code>, optimizeMember will generate a File Download Key that is good for anyone/everyone forever, with NO restrictions on who/where/when a file is accessed <em>( e.g. be careful with this one )</em>.</li>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_shortcode_attrs_opmKey_lis", get_defined_vars());
         echo '</ul>' . "\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_down_ops_page_during_left_sections_after_shortcode_attrs", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_display_gzip_conflicts", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_before_gzip_conflicts", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Preventing GZIP Conflicts On Server">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-gzip-conflicts-section">' . "\n";
         echo '<h3>Preventing GZIP Conflicts On Server ( Instructions )</h3>' . "\n";
         echo '<p>Protected files served by optimizeMember through PHP scripts, are already compressed. Therefore, <a href="http://code.google.com/speed/articles/gzip.html" target="_blank" rel="nofollow external xlink">GZIP compression</a> is not needed during protected file delivery. Some web servers (i.e. Apache, LiteSpeed, and similar) include GZIP compression rules through server-side extensions, like <code>mod_deflate</code> for example. While optimizeMember encourages the use of extensions like <code>mod_deflate</code>, it is best to disable GZIP automatically (i.e. temporarily) during optimizeMember\'s delivery of a protected file through a PHP script. This avoids conflicts on the server which might otherwise lead to corrupted file downloads. optimizeMember makes a valiant effort to accomplish this via PHP, all on its own. However, it never hurts to add this section of code to the root <code>.htaccess</code> file for your WordPress installation. Optional, but highly recommended.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_during_gzip_conflicts", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p style="margin:0; font-weight:bold;">optimizeMember automatically adds this to your <code>.htaccess</code> file upon activation of the plugin.</p>' . "\n";
         echo '<p style="margin:0;">The following <code>mod_rewrite</code> rule goes inside this file: <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path(ABSPATH . ".htaccess")) . '</code></p>' . "\n";
         echo '<pre><code>' . esc_html(trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_no_gzip_htaccess"])))) . '</code></pre>';
         echo '<p><strong>* Tip:</strong> this covers all types of integration with optimizeMember File Downloads, even if you\'re using optimizeMember\'s Advanced Mod Rewrite Linkage.</p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_down_ops_page_during_left_sections_after_gzip_conflicts", get_defined_vars());
     }
     /**/
     do_action("ws_plugin__optimizemember_during_down_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";
 }
示例#10
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>Authorize.Net 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="Authorize.Net Account Details">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-authnet-account-details-section">' . "\n";
     echo '<h3>Authorize.Net Account Details ( required )</h3>' . "\n";
     echo '<p><a href="http://www.optimizepress.com/authorize.net" target="_blank" rel="external">Authorize.Net</a> is a leading provider of payment gateway services, managing the submission of billions of transactions to processing networks on behalf of merchant customers. Authorize.Net is a solution offered by the CyberSource Corporation, a wholly owned subsidiary of Visa (NYSE: V).</p>' . "\n";
     echo '<p>optimizeMember has been integrated with Authorize.Net for Direct Payments and also for ARB (Automated Recurring Billing). In order to take advantage of this integration, you will need to have an Authorize.Net Merchant Account. Once you have an account, all of the details below can be obtained from inside of your Authorize.Net account. If you need assistance, please check their <a href="http://www.optimizepress.com/authorize.net-developers" target="_blank" rel="external">help section</a>.</p>' . "\n";
     echo '<p><em><strong>*Authorize.Net Version ( 3.1 )*</strong> optimizeMember integrates with Transaction Version 3.1 for Authorize.Net. Please log into your Authorize.Net Merchant account and make sure your Transaction Version setting is configured as: <code>3.1</code>. You will find this inside your Authorize.Net Merchant account, under: <code>Account -> Settings -> Transaction Version</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 Authorize.Net, you will ALSO need <a href="http://www.optimizepress.com/authorize.net-arb" target="_blank" rel="external">ARB ( Automated Recurring Billing )</a> enabled for your Authorize.Net account. Authorize.Net\'s Recurring Billing service 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 -> Authorize.Net Pro Forms</code>. This way you can see which options will require the use of Authorize.Net\'s Recurring Billing service. Authorize.Net will charge you a small monthly fee for their Automated Recurring Billing service.</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 Authorize.Net and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Authorize.Net 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 Authorize.Net 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 Development/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 Authorize.Net and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Authorize.Net Pro Forms on an SSL enabled page. When you create Authorize.Net 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 '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-authnet-api-login-id">' . "\n";
     echo 'Authorize.Net API Login 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_authnet_api_login_id" id="ws-plugin--optimizemember-pro-authnet-api-login-id" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_authnet_api_login_id"]) . '" /><br />' . "\n";
     echo 'You\'ll find this in your Authorize.Net Merchant account, under: <code>Account -> Settings</code>.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-authnet-api-trans-key">' . "\n";
     echo 'Authorize.Net API Transaction Key:' . "\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_authnet_api_trans_key" id="ws-plugin--optimizemember-pro-authnet-api-trans-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_authnet_api_trans_key"]) . '" /><br />' . "\n";
     echo 'You\'ll find this in your Authorize.Net Merchant account, under: <code>Account -> Settings</code>.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-authnet-api-salt-key">' . "\n";
     echo 'Authorize.Net Secret MD5 Hash:' . "\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_authnet_api_salt_key" id="ws-plugin--optimizemember-pro-authnet-api-salt-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_authnet_api_salt_key"]) . '" /><br />' . "\n";
     echo 'You\'ll set this in your Authorize.Net Merchant account, under: <code>Account -> Settings</code>.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th style="padding-top:0;">' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-authnet-sandbox">' . "\n";
     echo 'Developer/Sandbox Testing?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<input type="radio" name="ws_plugin__optimizemember_pro_authnet_sandbox" id="ws-plugin--optimizemember-pro-authnet-sandbox-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_authnet_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-pro-authnet-sandbox-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__optimizemember_pro_authnet_sandbox" id="ws-plugin--optimizemember-pro-authnet-sandbox-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_authnet_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-pro-authnet-sandbox-1">Yes, enable support for Sandbox testing.</label><br />' . "\n";
     echo '<em>Only enable this if you\'ve provided Developer credentials above.<br />This puts optimizeMember\'s Authorize.Net integration into Sandbox/Test mode.<br />See: <a href="http://www.optimizepress.com/authorize.net-test-accounts" target="_blank" rel="external">Authorize.Net Test Accounts</a></em>' . "\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="Authorize.Net SP / IPN Integration">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-authnet-ipn-section">' . "\n";
     echo '<h3>Authorize.Net Silent Post Integration ( required )<br />aka: Authorize.Net IPN ( Instant Payment Notifications )</h3>' . "\n";
     echo '<p>Log into your Authorize.Net Merchant account and navigate to this section:<br /><code>Account -> Settings -> Silent Post URL</code></p>' . "\n";
     echo '<p>Your Authorize.Net Silent Post URL is:<br /><code>' . esc_html(site_url("/?optimizemember_pro_authnet_notify=1")) . '</code></p>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="Signup Confirmation Email ( Pro Form )">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-signup-confirmation-email-section">' . "\n";
     echo '<h3>Signup Confirmation Email ( required, but the default works fine )<br />— specifically for optimizeMember Pro Form integrations</h3>' . "\n";
     echo '<p>This email is sent to new Customers after they successfully complete an Authorize.Net "Pro Form" submission on your site. The <strong>primary</strong> purpose of this email, is to provide the Customer with a receipt, and NOT to send them a <code>%%registration_url%%</code>, because optimizeMember\'s Authorize.Net Pro Form integration handles that automatically; based on scenario. You may want to 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 Pro Forms.\'); 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-pro-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_pro_signup_email_recipients" id="ws-plugin--optimizemember-pro-signup-email-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_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-pro-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_pro_signup_email_subject" id="ws-plugin--optimizemember-pro-signup-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_signup_email_subject"]) . '" /><br />' . "\n";
     echo 'Subject Line used in the email sent to a Customer after a successful signup has occurred through an Authorize.Net Pro Form.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-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_pro_signup_email_message" id="ws-plugin--optimizemember-pro-signup-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_signup_email_message"]) . '</textarea><br />' . "\n";
     echo 'Message Body used in the email sent to a Customer after a successful signup has occurred through an Authorize.Net Pro Form.<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> = Not needed with Authorize.Net Pro Form integration. Pro Forms handle this automatically.</li>' . "\n";
     echo '<li><code>%%subscr_id%%</code> = The Authorize.Net 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. Authorize.Net 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.\'); 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>%%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>.</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>%%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>.</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 ( Pro Form )">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-sp-confirmation-email-section">' . "\n";
     echo '<h3>Specific Post/Page Confirmation Email ( required, but the default works fine )<br />— specifically for optimizeMember Pro Form integrations</h3>' . "\n";
     echo '<p>This email is sent to new Customers after they successfully complete an Authorize.Net "Pro Form" submission on your site, 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 a receipt, 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 Pro Forms.\'); 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-pro-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_pro_sp_email_recipients" id="ws-plugin--optimizemember-pro-sp-email-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_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-pro-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_pro_sp_email_subject" id="ws-plugin--optimizemember-pro-sp-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_sp_email_subject"]) . '" /><br />' . "\n";
     echo 'Subject Line used in the email sent to a Customer after a successful purchase has occurred through an Authorize.Net Pro Form, for Specific Post/Page Access.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-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_pro_sp_email_message" id="ws-plugin--optimizemember-pro-sp-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_sp_email_message"]) . '</textarea><br />' . "\n";
     echo 'Message Body used in the email sent to a Customer after a successful purchase has occurred through an Authorize.Net Pro Form, 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 Authorize.Net Transaction ID. Authorize.Net 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="Tax Rate Calculations ( Pro Form )">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-tax-rates-section">' . "\n";
     echo '<h3>Tax Rate Calculations for Authorize.Net Pro Forms ( optional )<br />— specifically for optimizeMember Pro Form integrations</h3>' . "\n";
     echo '<p>With Authorize.Net, your software ( optimizeMember Pro ) is solely responsible for calculating Tax Rates. In the fields below, you can set a Global Default Tax Rate, and/or a "Custom Tax Configuration File"; which can be applied to specific countries, specific states, provinces, and even to specific zip code ranges. * Tax Rate calculations are fully compatible with international currencies and locations.</p>' . "\n";
     echo '<p>When you create an Authorize.Net Pro Form with optimizeMember, you\'ll be asked to supply a <em>Charge Amount</em>. Then, during checkout... optimizeMember calculates Tax. The calculated Tax Rate is added to the <em>Charge Amount</em> in your Authorize.Net Pro Form Shortcode. The Tax Rate will be displayed to a Customer during checkout, <strong>after</strong> they\'ve supplied a Billing Address. For example, if you create an Authorize.Net Pro Form that charges a Customer <strong>$24.95</strong>, and the Tax Rate is configured as 7.0%; optimizeMember will automatically calculate the Tax as $1.75. A Customer will pay the Total Amount ( <em>Charge</em> + Tax = <strong>$26.70</strong> ).</p>' . "\n";
     echo '<p><em><strong>*Quick Tip*</strong> If you configure Tax, it\'s good to include a note somewhere in the <code>desc=""</code> attribute of your Shortcode. Something like <code>desc="$x.xx (plus tax)"</code>.</em></p>' . "\n";
     /**/
     echo '<p><em class="ws-menu-page-hilite">* This tax 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 taxes here; but please remember that this configuration is applied universally ( i.e. SHARED ) among all Payment Gateways integrated with optimizeMember Pro Forms.\'); 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-pro-default-tax">' . "\n";
     echo 'Global Default Tax Rate:' . "\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_default_tax" id="ws-plugin--optimizemember-pro-default-tax" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_default_tax"]) . '" /><br />' . "\n";
     echo 'This can be a flat tax <code>( 1.75 )</code>, or a percentage <code>( 7.0% )</code>.' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-tax-rates">' . "\n";
     echo 'Custom Tax Configuration File ( one rate per line )<br />' . "\n";
     echo 'Apply different Tax Rates by country, state/province, or zip code range:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<textarea name="ws_plugin__optimizemember_pro_tax_rates" id="ws-plugin--optimizemember-pro-tax-rates" rows="10" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_tax_rates"]) . '</textarea><br />' . "\n";
     echo 'Please use one of the following formats ( <a href="#" onclick="alert(\'US=7.0%\\nCA=12.0%\\nHK=0.0%\\nFLORIDA/US=7.5%\\nIDAHO/US=6.0%\\nALBERTA/CA=5.0%\\nBRITISH COLUMBIA/CA=12.0%\\n32000-34999/US=7.5%\\n83200-83999/US=6.0%\\n32601/US=6.5%\'); return false;">click for examples</a> )<br /><br />' . "\n";
     echo '<code>2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — low precedence<br />' . "\n";
     echo '<code>STATE OR PROVINCE/2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — higher precedence<br />' . "\n";
     echo '<code>ZIP CODE-ZIP CODE/2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — higher precedence ( zip code range )<br />' . "\n";
     echo '<code>ZIP CODE/2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — highest precedence ( specific zip 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>Authorize.Net 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 ) or is cancelled. 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 Authorize.Net ARB ( Automated Recurring Billing ) service will assist in notifying optimizeMember whenever a Subscription expires. For example, if a Customer cancels their own Subscription; or if you cancel a Customer\'s Subscription through Authorize.Net, optimizeMember will eventually be notified ( with a 24-48 hour delay ), 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" disabled="disabled">' . "\n";
     echo '<option value="none" selected="selected">Neither ( I\'ll review these two events manually )</option>' . "\n";
     echo '</select><br />' . "\n";
     echo 'N/A with Authorize.Net. Authorize.Net does NOT notify optimizeMember on refunds/chargebacks.' . "\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";
 }
示例#11
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /*echo '<div class="ws-menu-page-toolbox">'."\n";
     		c_ws_plugin__optimizemember_menu_pages_tb::display();
     		echo '</div>'."\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 '<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="Stripe Account Details">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-stripe-account-details-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 '<a href="https://stripe.com/us/features" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember_pro"]["c"]["dir_url"]) . '/images/stripe-logo.png" class="ws-menu-page-right" style="width:250px; height:116px; background:#0D1F2F; border-radius:5px; border:0; margin-bottom:10px;" alt="." /></a>' . "\n";
     echo '<h3>Stripe Account Details (required)</h3>' . "\n";
     echo '<p><a href="https://stripe.com/us/features" target="_blank" rel="external">Stripe</a> absolutely rocks! It\'s a developer-friendly way to accept payments online and in mobile apps. They process billions of dollars a year for thousands of companies of all sizes. Easy to integrate; and easy for customers to use.</p>' . "\n";
     echo '<p>OptimizeMember Pro has been integrated with Stripe for Direct Payments and also for Subscriptions (Automated Recurring Billing). In order to take advantage of this integration, you will need to have a Stripe Merchant Account (free). Once you have an account, all of the details below can be obtained from inside of your Stripe account. If you need assistance, please check their <a href="https://support.stripe.com/" target="_blank" rel="external">help section</a>.</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 Stripe and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Stripe 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 Stripe 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 Development/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 Stripe and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Stripe Pro Forms on an SSL enabled page. When you create Stripe 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> Most themes available for WordPress 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 '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-stripe-api-secret-key">' . "\n";
     echo 'Stripe Secret API Key:' . "\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_stripe_api_secret_key" id="ws-plugin--optimizemember-pro-stripe-api-secret-key" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_stripe_api_secret_key']) . '" /><br />' . "\n";
     echo 'You\'ll find this in your Stripe Merchant account, under: <code>Account Settings -› API Keys</code>.' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-stripe-api-publishable-key">' . "\n";
     echo 'Stripe Publishable API Key:' . "\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_stripe_api_publishable_key" id="ws-plugin--optimizemember-pro-stripe-api-publishable-key" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_stripe_api_publishable_key']) . '" /><br />' . "\n";
     echo 'You\'ll find this in your Stripe Merchant account, under: <code>Account Settings -› API Keys</code>.' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-stripe-api-image">' . "\n";
     echo 'Stripe Image Branding:' . "\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_stripe_api_image" id="ws-plugin--optimizemember-pro-stripe-api-image" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_stripe_api_image']) . '" /><br />' . "\n";
     echo 'Minimum size of <code>128px</code> x <code>128px</code> (square). Stripe displays this image above credit card input fields; <code>https://...</code> recommended here.' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-stripe-api-statement-description">' . "\n";
     echo 'Stripe Statement Description:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<td>' . "\n";
     echo '<input type="text" autocomplete="off" maxlength="15" name="ws_plugin__optimizemember_pro_stripe_api_statement_description" id="ws-plugin--optimizemember-pro-stripe-api-statement-description" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_stripe_api_statement_description']) . '" placeholder="MYCOMPANY-INC" /><br />' . "\n";
     echo 'An arbitrary string to be displayed alongside your company name. This appears on your customer\'s credit card statement. 15 characters max. The statement description may NOT include these special characters: <code>' . esc_html('<>"\'') . '</code>' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-stripe-api-validate-zipcode">' . "\n";
     echo 'Stripe Should Verify Zipcodes?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<td>' . "\n";
     echo '<select name="ws_plugin__optimizemember_pro_stripe_api_validate_zipcode" id="ws-plugin--optimizemember-pro-stripe-api-validate-zipcode">' . "\n";
     echo '<option value="0"' . (!$GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_stripe_api_validate_zipcode'] ? ' selected="selected"' : '') . '>No, do NOT validate a customer\'s billing zipcode (default Stripe behavior)</option>' . "\n";
     echo '<option value="1"' . ($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_stripe_api_validate_zipcode'] ? ' selected="selected"' : '') . '>Yes, validate the customer\'s zipcode to be sure it matches the card\'s billing address</option>' . "\n";
     echo '</select>' . "\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 style="padding-top:0;">' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-stripe-sandbox">' . "\n";
     echo 'Sandbox/Test Mode?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<td>' . "\n";
     echo '<input type="radio" name="ws_plugin__optimizemember_pro_stripe_sandbox" id="ws-plugin--optimizemember-pro-stripe-sandbox-0" value="0"' . (!$GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_stripe_sandbox'] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-pro-stripe-sandbox-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__optimizemember_pro_stripe_sandbox" id="ws-plugin--optimizemember-pro-stripe-sandbox-1" value="1"' . ($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_stripe_sandbox'] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-pro-stripe-sandbox-1">Yes, enable support for Sandbox testing.</label><br />' . "\n";
     echo '<em>Only enable this if you\'ve provided test credentials above. This puts OptimizeMember\'s Stripe integration into Sandbox/Test mode. See: <a href="http://www.optimizemember.com/r/stripe-test-accounts/" target="_blank" rel="external">Stripe Test Accounts</a></em>' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\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 '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         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, Webhook/IPN &amp; Return Page logging.</label><br />' . "\n";
         echo '<em>This enables API, Webhook/IPN and Return Page logging. The log files are stored here: <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($GLOBALS['WS_PLUGIN__']['optimizemember']['c']['logs_dir'])) . '</code></em><br />' . "\n";
         echo '<em class="ws-menu-page-hilite">If you have any trouble, please review your OptimizeMember log files for problems. See: <a href="' . esc_attr(admin_url('/admin.php?page=ws-plugin--optimizemember-logs')) . '">Log Viewer</a></em>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<div class="info" style="margin-bottom:0;">' . "\n";
         echo '<p style="font-size:110%; margin-top:0;"><span>We HIGHLY recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems during payment processing. See: <a href="' . esc_attr(admin_url('/admin.php?page=ws-plugin--optimizemember-logs')) . '">Log Files (Debug)</a>.</span></p>' . "\n";
         echo '<p style="font-size:110%; margin-bottom:0;"><span class="ws-menu-page-error">However, it is VERY IMPORTANT to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, secret API credentials, passwords and/or other sensitive information. We STRONGLY suggest that logging be disabled on a live site (for security reasons).</span></p>' . "\n";
         echo '</div>' . "\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="Stripe Webhook (aka: IPN Integration)">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-stripe-ipn-section">' . "\n";
     echo '<a href="https://stripe.com/us/features" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember_pro"]["c"]["dir_url"]) . '/images/stripe-logo.png" class="ws-menu-page-right" style="width:250px; height:116px; background:#0D1F2F; border-radius:5px; border:0; margin-bottom:10px;" alt="." /></a>' . "\n";
     echo '<h3>Stripe Webhook (aka: IPN Integration) [required]</h3>' . "\n";
     echo '<p>Log into your Stripe Merchant account and navigate to this section:<br /><code>Account Settings -› Webhooks</code></p>' . "\n";
     echo '<p>Your Stripe Webhook URL is:<br /><code>' . esc_html(site_url('/?optimizemember_pro_stripe_notify=1')) . '</code></p>' . "\n";
     echo '<div class="info" style="margin-bottom:0;">' . "\n";
     echo '<p>If you are currently in Test/Sandbox mode (i.e. you gave OptimizeMember Test API Credentials); please choose the <code>Test</code> option when entering the Webhook URL in your Stripe Dashboard. Otherwise, under normal circumstances you will want to choose <code>Live</code>.</p>' . "\n";
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     echo '<div class="ws-menu-page-group" title="Signup Confirmation Email">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-signup-confirmation-email-section">' . "\n";
     echo '<h3>Signup Confirmation Email (required, but the default works fine)<br />— specifically for OptimizeMember Pro Form integrations</h3>' . "\n";
     echo '<p>This email is sent to new Customers after they successfully complete a Stripe "Pro Form" submission on your site. The <strong>primary</strong> purpose of this email, is to provide the Customer with a receipt, and NOT to send them a <code>%%registration_url%%</code>, because OptimizeMember\'s Stripe Pro Form integration handles that automatically; based on scenario. You may want to customize this email further, by providing details that are specifically geared to your site.</p>' . "\n";
     echo '<p><em class="ws-menu-page-bright-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 Pro Forms.\'); 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-pro-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_pro_signup_email_recipients" id="ws-plugin--optimizemember-pro-signup-email-recipients" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_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-pro-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_pro_signup_email_subject" id="ws-plugin--optimizemember-pro-signup-email-subject" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_signup_email_subject']) . '" /><br />' . "\n";
     echo 'Subject Line used in the email sent to a Customer after a successful signup has occurred through a Stripe Pro Form.' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-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_pro_signup_email_message" id="ws-plugin--optimizemember-pro-signup-email-message" rows="10">' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_signup_email_message']) . '</textarea><br />' . "\n";
     echo 'Message Body used in the email sent to a Customer after a successful signup has occurred through a Stripe Pro Form.<br /><br />' . "\n";
     echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
     echo '<ul class="ws-menu-page-li-margins">' . "\n";
     echo '<li><code>%%registration_url%%</code> = Not needed with Stripe Pro Form integration. Pro Forms handle this automatically.</li>' . "\n";
     echo '<li><code>%%subscr_id%%</code> = The Stripe 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. Stripe 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>%%subscr_cid%%</code> = Applicable only with Stripe integration. This is the Customer\'s ID in Stripe, which remains constant throughout any &amp; all future payments. Each Stripe Customer has this Customer ID; and also a Subscription and/or Transaction ID [ <a href="#" onclick="alert(\'Applicable only when you integrate OptimizeMember with Stripe. In all other cases, the %%subscr_cid%% is simply set to the %%subscr_id%% value; i.e. it is a duplicate of %%subscr_id%% when running anything other than Stripe.\\n\\nEach Stripe Customer has a Customer ID; and also a Subscription and/or Transaction ID. See %%subscr_id%% for further details.\'); 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.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. If you offer something 100% free, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. 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>%%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>.</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>%%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>.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
     echo '<ul class="ws-menu-page-li-margins">' . "\n";
     echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
     echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER['HTTP_HOST']) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
     echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
     echo '<code>custom="' . esc_html($_SERVER['HTTP_HOST']) . '|christmas-promo"</code>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<div class="ws-menu-page-hr"></div>' . "\n" . '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$stripe</code> variable is the most important one. It contains all of the <code>$_POST</code> variables received from your Pro Form integration (related to the transaction itself); which are then translated into a format that OptimizeMember\'s Core Gateway Processor can understand (e.g. <code>$stripe["item_number"]</code>, <code>$stripe["item_name"]</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>' . "\n" : '';
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     echo '<div class="ws-menu-page-group" title="Modification Confirmation Email">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-modification-confirmation-email-section">' . "\n";
     echo '<h3>Modification Confirmation Email (required, but the default works fine)</h3>' . "\n";
     echo '<p>This email is sent to existing Users after they complete an upgrade/downgrade (if and when you make this possible). For instance, if a Free Subscriber upgrades to a paid Membership Level, OptimizeMember considers this a Modification (NOT a Signup; a Signup is associated only with someone completely new). The <strong>primary</strong> purpose of this email is to provide the Customer with a confirmation that their account was updated. 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-bright-hilite">* The email configuration below 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-modification-email-recipients">' . "\n";
     echo 'Modification 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_modification_email_recipients" id="ws-plugin--optimizemember-modification-email-recipients" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['modification_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-modification-email-subject">' . "\n";
     echo 'Modification 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_modification_email_subject" id="ws-plugin--optimizemember-modification-email-subject" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['modification_email_subject']) . '" /><br />' . "\n";
     echo 'Subject Line used in the email sent to a Customer after a successful modification has occurred through Stripe.' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-modification-email-message">' . "\n";
     echo 'Modification 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_modification_email_message" id="ws-plugin--optimizemember-modification-email-message" rows="10">' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['modification_email_message']) . '</textarea><br />' . "\n";
     echo 'Message Body used in the email sent to a Customer after a successful modification has occurred through Stripe.<br /><br />' . "\n";
     echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
     echo '<ul class="ws-menu-page-li-margins">' . "\n";
     echo '<li><code>%%subscr_id%%</code> = The Stripe 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. Stripe 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>%%subscr_cid%%</code> = Applicable only with Stripe integration. This is the Customer\'s ID in Stripe, which remains constant throughout any &amp; all future payments. Each Stripe Customer has this Customer ID; and also a Subscription and/or Transaction ID [ <a href="#" onclick="alert(\'Applicable only when you integrate OptimizeMember with Stripe. In all other cases, the %%subscr_cid%% is simply set to the %%subscr_id%% value; i.e. it is a duplicate of %%subscr_id%% when running anything other than Stripe.\\n\\nEach Stripe Customer has a Customer ID; and also a Subscription and/or Transaction ID. See %%subscr_id%% for further details.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%initial%%</code> = The Initial Fee. 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 when they completed checkout, no matter what. Even if that amount is 0. If a Customer upgrades/downgrades 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. If you offer something 100% free, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. 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>%%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>.</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>%%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>.</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 Stripe.</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 Stripe.</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 Stripe.</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 Stripe.</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 email:</strong>' . "\n";
     echo '<ul class="ws-menu-page-li-margins">' . "\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 class="ws-menu-page-li-margins">' . "\n";
     echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
     echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER['HTTP_HOST']) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
     echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
     echo '<code>custom="' . esc_html($_SERVER['HTTP_HOST']) . '|christmas-promo"</code>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<div class="ws-menu-page-hr"></div>' . "\n" . '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$stripe</code> variable is the most important one. It contains all of the <code>$_POST</code> variables received from your Pro Form integration (related to the transaction itself); which are then translated into a format that OptimizeMember\'s Core Gateway Processor can understand (e.g. <code>$stripe["item_number"]</code>, <code>$stripe["item_name"]</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>' . "\n" : '';
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     echo '<div class="ws-menu-page-group" title="Capability Confirmation Email">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-ccap-confirmation-email-section">' . "\n";
     echo '<h3>Capability Confirmation Email (required, but the default works fine)</h3>' . "\n";
     echo '<p>This email is sent to existing Users after they complete a Buy Now purchase for one or more Custom Capabilities (if and when you make this possible); see: <code>Dashboard -› OptimizeMember -› Stripe Forms -› Capability (Buy Now)</code>. The <strong>primary</strong> purpose of this email is to provide the Customer with a confirmation that their account was updated. 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-bright-hilite">* The email configuration below 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-ccap-email-recipients">' . "\n";
     echo 'Capability 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_ccap_email_recipients" id="ws-plugin--optimizemember-ccap-email-recipients" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['ccap_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-ccap-email-subject">' . "\n";
     echo 'Capability 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_ccap_email_subject" id="ws-plugin--optimizemember-ccap-email-subject" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['ccap_email_subject']) . '" /><br />' . "\n";
     echo 'Subject Line used in the email sent to a Customer after a purchase is completed through Stripe.' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-ccap-email-message">' . "\n";
     echo 'Capability 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_ccap_email_message" id="ws-plugin--optimizemember-ccap-email-message" rows="10">' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['ccap_email_message']) . '</textarea><br />' . "\n";
     echo 'Message Body used in the email sent to a Customer after a purchase is completed through Stripe.<br /><br />' . "\n";
     echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
     echo '<ul class="ws-menu-page-li-margins">' . "\n";
     echo '<li><code>%%txn_id%%</code> = The Stripe Transaction ID. Stripe assigns a unique identifier for every purchase.</li>' . "\n";
     echo '<li><code>%%txn_cid%%</code> = Applicable only with Stripe integration. This is the Customer\'s ID in Stripe. Each Stripe Customer has this Customer ID; and also a Transaction ID associated with their purchase of a the Custom Capability [ <a href="#" onclick="alert(\'Applicable only when you integrate OptimizeMember with Stripe. In all other cases, the %%txn_cid%% is simply set to the %%txn_id%% value; i.e. it is a duplicate of %%txn_id%% when running anything other than Stripe.\\n\\nEach Stripe Customer has a Customer ID; and also a Transaction ID. See %%txn_id%% for further details.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%amount%%</code> = The full Amount that you charged for Custom Capability access.</li>' . "\n";
     echo '<li><code>%%first_name%%</code> = The First Name of the Customer who completed the purchase.</li>' . "\n";
     echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who completed the purchase.</li>' . "\n";
     echo '<li><code>%%full_name%%</code> = The Full Name (First &amp; Last) of the Customer who completed the purchase.</li>' . "\n";
     echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who completed the purchase.</li>' . "\n";
     echo '<li><code>%%item_number%%</code> = The Item Number (colon separated <code><em>*:custom_capabilities</em></code>); where <code>custom_capabilities</code> is a comma-delimited list of the Custom Capabilities they purchased.</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 Stripe.</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 Stripe.</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 Stripe.</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 Stripe.</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 email:</strong>' . "\n";
     echo '<ul class="ws-menu-page-li-margins">' . "\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 class="ws-menu-page-li-margins">' . "\n";
     echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
     echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER['HTTP_HOST']) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
     echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
     echo '<code>custom="' . esc_html($_SERVER['HTTP_HOST']) . '|christmas-promo"</code>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<div class="ws-menu-page-hr"></div>' . "\n" . '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$stripe</code> variable is the most important one. It contains all of the <code>$_POST</code> variables received from your Pro Form integration (related to the transaction itself); which are then translated into a format that OptimizeMember\'s Core Gateway Processor can understand (e.g. <code>$stripe["item_number"]</code>, <code>$stripe["item_name"]</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>' . "\n" : '';
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     echo '<div class="ws-menu-page-group" title="Specific Post/Page Confirmation Email">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-sp-confirmation-email-section">' . "\n";
     echo '<h3>Specific Post/Page Confirmation Email (required, but the default works fine)<br />— specifically for OptimizeMember Pro Form integrations</h3>' . "\n";
     echo '<p>This email is sent to new Customers after they successfully complete a Stripe "Pro Form" submission on your site, 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 a receipt, 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-bright-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 Pro Forms.\'); 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-pro-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_pro_sp_email_recipients" id="ws-plugin--optimizemember-pro-sp-email-recipients" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_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-pro-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_pro_sp_email_subject" id="ws-plugin--optimizemember-pro-sp-email-subject" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_sp_email_subject']) . '" /><br />' . "\n";
     echo 'Subject Line used in the email sent to a Customer after a successful purchase has occurred through a Stripe Pro Form, for Specific Post/Page Access.' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-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_pro_sp_email_message" id="ws-plugin--optimizemember-pro-sp-email-message" rows="10">' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_sp_email_message']) . '</textarea><br />' . "\n";
     echo 'Message Body used in the email sent to a Customer after a successful purchase has occurred through a Stripe Pro Form, 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 class="ws-menu-page-li-margins">' . "\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 Stripe Transaction ID. Stripe assigns a unique identifier for every purchase.</li>' . "\n";
     echo '<li><code>%%txn_cid%%</code> = Applicable only with Stripe integration. This is the Customer\'s ID in Stripe. Each Stripe Customer has this Customer ID; and also a Transaction ID associated with their purchase of a Specific Post/Page [ <a href="#" onclick="alert(\'Applicable only when you integrate OptimizeMember with Stripe. In all other cases, the %%txn_cid%% is simply set to the %%txn_id%% value; i.e. it is a duplicate of %%txn_id%% when running anything other than Stripe.\\n\\nEach Stripe Customer has a Customer ID; and also a Transaction ID. See %%txn_id%% for further details.\'); return false;">?</a> ]</li>' . "\n";
     echo '<li><code>%%amount%%</code> = The full Amount that you charged for Specific Post/Page Access.</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 class="ws-menu-page-li-margins">' . "\n";
     echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
     echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER['HTTP_HOST']) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
     echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
     echo '<code>custom="' . esc_html($_SERVER['HTTP_HOST']) . '|christmas-promo"</code>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<div class="ws-menu-page-hr"></div>' . "\n" . '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$stripe</code> variable is the most important one. It contains all of the <code>$_POST</code> variables received from your Pro Form integration (related to the transaction itself); which are then translated into a format that OptimizeMember\'s Core Gateway Processor can understand (e.g. <code>$stripe["item_number"]</code>, <code>$stripe["item_name"]</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>' . "\n" : '';
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     echo '<div class="ws-menu-page-group" title="Tax Rate Calculations (Pro Form)">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-tax-rates-section">' . "\n";
     echo '<h3>Tax Rate Calculations for Stripe Pro Forms (optional)<br />— specifically for OptimizeMember Pro Form integrations</h3>' . "\n";
     echo '<p>With Stripe, your software (OptimizeMember Pro) is solely responsible for calculating Tax Rates. In the fields below, you can set a Global Default Tax Rate, and/or a "Custom Tax Configuration File"; which can be applied to specific countries, specific states, provinces, and even to specific zip code ranges. * Tax Rate calculations are fully compatible with international currencies and locations.</p>' . "\n";
     echo '<p>When you create a Stripe Pro Form with OptimizeMember, you\'ll be asked to supply a <em>Charge Amount</em>. Then, during checkout... OptimizeMember calculates Tax. The calculated Tax Rate is added to the <em>Charge Amount</em> in your Stripe Pro Form Shortcode. The Tax Rate will be displayed to a Customer during checkout, <strong>after</strong> they\'ve supplied a Billing Address. For example, if you create a Stripe Pro Form that charges a Customer <strong>$24.95</strong>, and the Tax Rate is configured as 7.0%; OptimizeMember will automatically calculate the Tax as $1.75. A Customer will pay the Total Amount (<em>Charge</em> + Tax = <strong>$26.70</strong>).</p>' . "\n";
     echo '<p><em><strong>*Quick Tip*</strong> If you configure Tax, it\'s good to include a note somewhere in the <code>desc=""</code> attribute of your Shortcode. Something like <code>desc="$x.xx (plus tax)"</code>.</em></p>' . "\n";
     echo '<p><em class="ws-menu-page-bright-hilite">* This tax 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 taxes here; but please remember that this configuration is applied universally (i.e. SHARED) among all Payment Gateways integrated with OptimizeMember Pro Forms.\'); 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-pro-default-tax">' . "\n";
     echo 'Global Default Tax Rate:' . "\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_default_tax" id="ws-plugin--optimizemember-pro-default-tax" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_default_tax']) . '" /><br />' . "\n";
     echo 'This can be a flat tax <code>(1.75)</code>, or a percentage <code>( 7.0% )</code>.' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-tax-rates">' . "\n";
     echo 'Custom Tax Configuration File (one rate per line)<br />' . "\n";
     echo 'Apply different Tax Rates by country, state/province, or zip code range:' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<td>' . "\n";
     echo '<textarea name="ws_plugin__optimizemember_pro_tax_rates" id="ws-plugin--optimizemember-pro-tax-rates" rows="10" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['pro_tax_rates']) . '</textarea><br />' . "\n";
     echo 'Please use one of the following formats (<a href="#" onclick="alert(\'US=7.0%\\nCA=12.0%\\nHK=0.0%\\nFLORIDA/US=7.5%\\nIDAHO/US=6.0%\\nALBERTA/CA=5.0%\\nBRITISH COLUMBIA/CA=12.0%\\n32000-34999/US=7.5%\\n83200-83999/US=6.0%\\n32601/US=6.5%\'); return false;">click for examples</a>)<br /><br />' . "\n";
     echo '<code>2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — low precedence<br />' . "\n";
     echo '<code>STATE OR PROVINCE/2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — higher precedence<br />' . "\n";
     echo '<code>ZIP CODE-ZIP CODE/2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — higher precedence (zip code range)<br />' . "\n";
     echo '<code>ZIP CODE/2-CHARACTER COUNTRY CODE = Flat rate or percentage.</code> — highest precedence (specific zip 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>Stripe 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) or is cancelled. 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. There are also a few other configurable options here, so please read carefully. These options are all very important.</p>' . "\n";
     echo '<p>Your Stripe Webhook (aka: IPN) integration will assist in notifying OptimizeMember whenever a Subscription expires. For example, if a Customer cancels their own Subscription; or if you cancel/delete a Customer\'s Subscription through Stripe, OptimizeMember will eventually be notified. 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-bright-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 '</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-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-eots-remove-ccaps">' . "\n";
     echo 'Membership EOTs also Remove all Custom Capabilities?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<td>' . "\n";
     echo '<select name="ws_plugin__optimizemember_eots_remove_ccaps" id="ws-plugin--optimizemember-eots-remove-ccaps">' . "\n";
     echo '<option value="1"' . ($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['eots_remove_ccaps'] ? ' selected="selected"' : '') . '>Yes (an EOT also results in the loss of any Custom Capabilities a User/Member may have)</option>' . "\n";
     echo '<option value="0"' . (!$GLOBALS['WS_PLUGIN__']['optimizemember']['o']['eots_remove_ccaps'] ? ' selected="selected"' : '') . '>No (an EOT has no impact on any Custom Capabilities a User/Member may have)</option>' . "\n";
     echo '</select>' . "\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-eot-grace-time">' . "\n";
     echo 'EOT Grace Time (in seconds):' . "\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_grace_time" id="ws-plugin--optimizemember-eot-grace-time" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['eot_grace_time']) . '" /><br />' . "\n";
     echo '<em>This is represented in seconds. For example, a value of: <code>86400</code> = 1 day. Your EOT Grace Time; is the amount of time you will offer as a grace period (if any). Most site owners will give customers an additional 24 hours of access; just to help avoid any negativity that may result from a customer losing access sooner than they might expect. You can disable EOT Grace Time by setting this to: <code>0</code>.</em>' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-triggers-immediate-eot">' . "\n";
     echo 'Refunds/Partial 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"' : '') . '>None (I\'ll review these events manually)</option>' . "\n";
     echo '<option value="refunds"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["triggers_immediate_eot"] === "refunds" ? ' selected="selected"' : '') . '>Full Refunds (full refunds only; 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 only; 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"' : '') . '>Full Refunds, Reversals (these ALWAYS trigger an Immediate EOT action)</option>' . "\n";
     echo '<option value="refunds,partial_refunds,reversals"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["triggers_immediate_eot"] === "refunds,partial_refunds,reversals" ? ' selected="selected"' : '') . '>Full Refunds, Partial Refunds, Reversals (these ALWAYS trigger an Immediate EOT action)</option>' . "\n";
     echo '</select><br />' . "\n";
     echo '<em><strong>Note:</strong> OptimizeMember is not equipped to detect partial refunds against multi-payment Subscriptions reliably. Therefore, all refunds processed against Subscriptions (of any kind) are considered <strong>Partial</strong> Refunds. Full refunds (in the eyes of OptimizeMember) occur only against Buy Now transactions where it is easy for OptimizeMember to see that the refund amount is &gt;= the original Buy Now purchase price (i.e. a Full Refund). <strong>Also Note:</strong> This setting (no matter what you choose) will NOT impact OptimizeMember\'s internal API Notifications for Refund/Reversal events. <a href="#" onclick="alert(\'A Full or Partial Refund; and/or a Reversal Notification will ALWAYS be processed internally by OptimizeMember, even if no action is taken by OptimizeMember in accordance with your configuration here.\\n\\nIn this way, you\\\'ll have the full ability to listen for these events on your own (via API Notifications); if you prefer (optional). For more information, check your Dashboard under: `OptimizeMember -› API Notifications -› Refunds/Reversals`.\'); return false;">Click here for details</a>.</em>' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\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 '<em>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. For example, if I buy one year of access, and then I buy another year of access (before my first year is totally used up); I end up with everything I paid you for (now over 1 year of access) if this is set to <code>Yes</code>. If this was set to <code>No</code>, the EOT Time would be reset when I make the second purchase; leaving me with only 1 year of access, starting the date of my second purchase.</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-hr"></div>' . "\n";
     echo '<p class="submit"><input class="op-pb-button green" type="submit" value="Save All Changes" /></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
示例#12
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>PayPal 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_paypal_ops_page_before_left_sections", get_defined_vars());
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_display_paypal_account_details", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_before_paypal_account_details", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="PayPal Account Details">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-paypal-account-details-section">' . "\n";
         echo '<a href="http://www.optimizepress.com/paypal" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/paypal-logo.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
         echo '<h3>PayPal Account Details ( required, if using PayPal )</h3>' . "\n";
         echo '<p>This plugin works in conjunction with <a href="http://www.optimizepress.com/paypal" target="_blank" rel="external">PayPal Website Payments Standard</a>, for businesses. You do NOT need a PayPal Pro account. You just need to upgrade your Personal PayPal account to a Business status, which is free. A PayPal account can be <a href="http://pages.ebay.com/help/buy/questions/upgrade-paypal-account.html" target="_blank" rel="external">upgraded</a> from a Personal account to a Business account, simply by going to the `Profile` button under the `My Account` tab, selecting the `Personal Business Information` button, and then clicking the `Upgrade Your Account` button. </p>' . "\n";
         echo '<p><em><strong>*PayPal API Credentials*</strong> Once you have a PayPal Business 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 account, and navigate to <code>Profile -> API Access (or Request API Credentials)</code>. You\'ll choose <code>( PayPal / Request API Signature )</code>.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_account_details", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-business">' . "\n";
         echo 'Your PayPal EMail 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_paypal_business" id="ws-plugin--optimizemember-paypal-business" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_business"]) . '" /><br />' . "\n";
         echo 'Enter the email address you\'ve associated with your PayPal Business account.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-api-username">' . "\n";
         echo 'Your PayPal API Username:'******'</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_paypal_api_username" id="ws-plugin--optimizemember-paypal-api-username" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_api_username"]) . '" /><br />' . "\n";
         echo 'At PayPal, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-api-password">' . "\n";
         echo 'Your PayPal API Password:'******'</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="password" autocomplete="off" name="ws_plugin__optimizemember_paypal_api_password" id="ws-plugin--optimizemember-paypal-api-password" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_api_password"]) . '" /><br />' . "\n";
         echo 'At PayPal, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-api-signature">' . "\n";
         echo 'Your PayPal API Signature:' . "\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_paypal_api_signature" id="ws-plugin--optimizemember-paypal-api-signature" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_api_signature"]) . '" /><br />' . "\n";
         echo 'At PayPal, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_account_detail_rows", get_defined_vars());
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<table class="form-table" style="margin:0;">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th style="padding-top:0;">' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-sandbox">' . "\n";
         echo 'Developer/Sandbox Testing?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="radio" name="ws_plugin__optimizemember_paypal_sandbox" id="ws-plugin--optimizemember-paypal-sandbox-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-paypal-sandbox-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__optimizemember_paypal_sandbox" id="ws-plugin--optimizemember-paypal-sandbox-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-paypal-sandbox-1">Yes, enable support for Sandbox testing.</label><br />' . "\n";
         echo '<em>Only enable this if you\'ve provided Sandbox credentials above.<br />This puts the API, IPN, PDT and Form/Button Generators all into Sandbox mode.<br />See: <a href="http://www.optimizepress.com/paypal-developers" target="_blank" rel="external">PayPal Developers</a></em>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-btn-encryption">' . "\n";
         echo 'Enable Button Encryption?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="radio" name="ws_plugin__optimizemember_paypal_btn_encryption" id="ws-plugin--optimizemember-paypal-btn-encryption-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_btn_encryption"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-paypal-btn-encryption-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__optimizemember_paypal_btn_encryption" id="ws-plugin--optimizemember-paypal-btn-encryption-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_btn_encryption"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-paypal-btn-encryption-1">Yes, enable PayPal Button encryption.</label><br />' . "\n";
         echo '<em>If enabled, all of your PayPal Button Shortcodes will produce *encrypted* PayPal Buttons. This improves security against fraudulent transactions. For extra security, you should update your PayPal account too, under: <code>My Profile -> Website Payment Preferences</code>. You\'ll want to block all non-encrypted payments. <strong>*Note*</strong> this will NOT work until you\'ve supplied optimizeMember with your PayPal Email Address, and also with your API Username/Password/Signature.</em>' . "\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?' . "\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 class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><em><strong>*Sandbox Tip*</strong> If you\'re testing your site through a PayPal Sandbox account, please remember that Email Confirmations from optimizeMember will NOT be received after a test purchase. optimizeMember sends its Confirmation Emails to the PayPal Email Address of the Customer. Since PayPal Sandbox addresses are usually bogus ( for testing ), you will have to run live transactions before Email Confirmations from optimizeMember are received. That being said, all other optimizeMember functionality CAN be tested through a PayPal Sandbox account. Email Confirmations are the only hang-up.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_account_details_after_sandbox_tip", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_after_paypal_account_details", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_display_paypal_payflow_account_details", c_ws_plugin__optimizemember_utils_conds::pro_is_installed(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_before_paypal_payflow_account_details", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Payflow™ Account Details">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-paypal-payflow-account-details-section">' . "\n";
         echo '<a href="http://www.optimizepress.com/paypal" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/paypal-logo.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
         echo '<h3>Payflow Account Details ( required, if using Payflow )</h3>' . "\n";
         echo '<p>Newer PayPal Pro accounts come with the Payflow API for Recurring Billing service. If you have a newer PayPal Pro account, and you wish to integrate PayPal\'s Recurring Billing service with optimizeMember Pro Forms, you will need to fill in the details here. Providing Payflow API Credentials here, automatically puts optimizeMember\'s Recurring Billing integration through Pro Forms, into Payflow mode. Just fill in the details below, and you\'re ready to generate Pro Forms that charge customers on a recurring basis. optimizeMember will use the Payflow API instead of the standard PayPal Pro API, which is being slowly phased out in favor of Payflow.</p>' . "\n";
         echo '<p><em><strong>*Payflow API Credentials*</strong> 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">Payflow API Credentials</a>. Log into your PayPal account, and navigate to <code>Profile -> API Access (or Request API Credentials)</code>. You\'ll choose <code>( Payflow / API Access )</code>.</em></p>' . "\n";
         echo '<p><em><strong>*Important Note*</strong> optimizeMember always uses the PayPal Pro API. It can also use the Payflow API (if details are supplied here). But please note... supplying Payflow API Credentials here, does NOT mean you can bypass other sections. Please supply optimizeMember with ALL of your PayPal account details.</em></p>' . "\n";
         //echo '<p><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/paypal-pro-payflow-edition/" target="_blank" rel="external">PayPal Pro (PayFlow Edition)</a>.</p>'."\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_payflow_account_details", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-payflow-api-username">' . "\n";
         echo 'Your Payflow API Username:'******'</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_paypal_payflow_api_username" id="ws-plugin--optimizemember-paypal-payflow-api-username" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_payflow_api_username"]) . '" /><br />' . "\n";
         echo 'At PayPal, see: <code>Profile -> API Access (or Request API Credentials) -> Payflow API Access</code>.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-payflow-api-password">' . "\n";
         echo 'Your Payflow API Password:'******'</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="password" autocomplete="off" name="ws_plugin__optimizemember_paypal_payflow_api_password" id="ws-plugin--optimizemember-paypal-payflow-api-password" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_payflow_api_password"]) . '" /><br />' . "\n";
         echo 'At PayPal, see: <code>Profile -> API Access (or Request API Credentials) -> Payflow API Access</code>.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-payflow-api-partner">' . "\n";
         echo 'Your Payflow API Partner:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="text" name="ws_plugin__optimizemember_paypal_payflow_api_partner" id="ws-plugin--optimizemember-paypal-payflow-api-partner" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_payflow_api_partner"]) . '" /><br />' . "\n";
         echo 'At PayPal, see: <code>Profile -> API Access (or Request API Credentials) -> Payflow API Access</code>.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-payflow-api-vendor">' . "\n";
         echo 'Your Payflow API Vendor:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<input type="text" name="ws_plugin__optimizemember_paypal_payflow_api_vendor" id="ws-plugin--optimizemember-paypal-payflow-api-vendor" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_payflow_api_vendor"]) . '" /><br />' . "\n";
         echo 'At PayPal, see: <code>Profile -> API Access (or Request API Credentials) -> Payflow API Access</code>.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_payflow_account_detail_rows", get_defined_vars());
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_after_paypal_payflow_account_details", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_display_paypal_ipn", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_before_paypal_ipn", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="PayPal IPN Integration">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-paypal-ipn-section">' . "\n";
         echo '<h3>PayPal IPN / Instant Payment Notifications ( required, please enable )</h3>' . "\n";
         echo '<p>Log into your PayPal account and navigate to this section:<br /><code>Account Profile -> Instant Payment Notification Preferences</code></p>' . "\n";
         echo '<p>Edit your IPN settings &amp; turn IPN Notifications: <strong><code>On</code></strong></p>' . "\n";
         echo '<p>You\'ll need your IPN URL, which is:<br /><code>' . esc_html(site_url("/?optimizemember_paypal_notify=1")) . '</code></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_ipn", get_defined_vars());
         /**/
         echo '<h3>More Information ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-paypal-ipn-details\').toggle(); return false;" class="ws-dotted-link">click here</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-paypal-ipn-details" style="display:none;">' . "\n";
         echo '<p><em><strong>*Quick Tip*</strong> In addition to the <a href="http://www.optimizepress.com/paypal-ipn-setup" target="_blank" rel="external">default IPN settings inside your PayPal account</a>, the IPN URL is also set on a per-transaction basis by the special PayPal Button Code that optimizeMember provides you with. In other words, if you have multiple sites operating on one PayPal account, that\'s OK. optimizeMember dynamically sets the IPN URL for each transaction. The result is that the IPN URL configured from within your PayPal account, becomes the default, which is then overwritten on a per-transaction basis. In fact, PayPal recently updated their system to support IPN URL preservation. One PayPal account can handle multiple sites, all using different IPN URLs.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_ipn_after_quick_tip", get_defined_vars());
         echo '<p><em><strong>*IPN Communications*</strong> You\'ll be happy to know that optimizeMember handles cancellations, expirations, failed payments, terminations ( e.g. refunds &amp; chargebacks ) for you automatically. If you log into your PayPal account and cancel a Member\'s Subscription, or, if the Member logs into their PayPal account and cancels their own Subscription, optimizeMember will be notified of these important changes and react accordingly through the PayPal IPN service that runs silently behind-the-scene. The PayPal IPN service will notify optimizeMember whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. If you issue a refund to an unhappy Customer through PayPal, optimizeMember will be notified, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically ( based on your configuration ). The communication from PayPal -> optimizeMember is seamless.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>IPN w/ Proxy Key ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-paypal-ipn-proxy-details\').toggle(); return false;" class="ws-dotted-link">optional, for 3rd-party integrations</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-paypal-ipn-proxy-details" style="display:none;">' . "\n";
         echo '<p>If you\'re using a 3rd-party application that needs to POST simulated IPN transactions to your optimizeMember installation, you can use this alternate IPN URL, which includes a Proxy Key. This encrypted Proxy Key verifies incoming data being received by optimizeMember\'s IPN processor. You can change <em>[proxy-gateway]</em> to whatever you like. The <em>[proxy-gateway]</em> value is required. It will be stored by optimizeMember as the Customer\'s Paid Subscr. Gateway. Your [proxy-gateway] value will also be reflected in optimizeMember\'s IPN log.</p>' . "\n";
         echo '<input type="text" autocomplete="off" value="' . format_to_edit(site_url("/?optimizemember_paypal_notify=1&optimizemember_paypal_proxy=[proxy-gateway]&optimizemember_paypal_proxy_verification=" . urlencode(c_ws_plugin__optimizemember_paypal_utilities::paypal_proxy_key_gen()))) . '" style="width:99%;" />' . "\n";
         echo '<p><em>Any 3rd-party application that is sending IPN transactions to your optimizeMember installation, must ALWAYS include the <code>custom</code> POST variable, and that variable must always start with your installation domain ( i.e. custom=<code>' . esc_html($_SERVER["HTTP_HOST"]) . '</code> ). In addition, the <code>item_number</code> variable, must always match a format that optimizeMember looks for. Generally speaking, the <code>item_number</code> should be <code>1, 2, 3, or 4</code>, indicating a specific optimizeMember Level #. However, optimizeMember also uses some advanced formats in this field. Just to be sure, we suggest creating a PayPal Button with the optimizeMember Button Generator, and then taking a look at the Full Button Code to see how optimizeMember expects <code>item_number</code> to be formatted. Other than the aforementioned exceptions; all other POST variables should follow PayPal standards. Please see: <a href="http://www.optimizepress.com/paypal-ipn-pdt-vars" target="_blank" rel="external">PayPal\'s IPN/PDT reference guide</a> for full documentation.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_ipn_after_proxy", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_after_paypal_ipn", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_display_paypal_pdt", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_before_paypal_pdt", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="PayPal PDT/Auto-Return Integration">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-paypal-pdt-section">' . "\n";
         echo '<h3>PayPal PDT Identity Token ( required, please enable )</h3>' . "\n";
         echo '<p>Log into your PayPal account and navigate to this section:<br /><code>Account Profile -> Website Payment Preferences</code></p>' . "\n";
         echo '<p>Turn the Auto-Return feature: <strong><code>On</code></strong></p>' . "\n";
         echo '<p>You\'ll need 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 URL</a>, which is:<br /><code>' . esc_html(site_url("/?optimizemember_paypal_return=1")) . '</code></p>' . "\n";
         echo '<p>You MUST also enable PDT ( Payment Data Transfer ): <strong><code>On</code></strong><br /><em>You\'ll be issued an Identity Token that you MUST enter below.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_pdt", get_defined_vars());
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-paypal-identity-token">' . "\n";
         echo 'PayPal PDT Identity Token:' . "\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_paypal_identity_token" id="ws-plugin--optimizemember-paypal-identity-token" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_identity_token"]) . '" /><br />' . "\n";
         echo 'Your PDT Identity Token will appear under <em>Profile -> Website Payment Preferences</em> in your PayPal account.' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>More Information ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-paypal-pdt-details\').toggle(); return false;" class="ws-dotted-link">click here</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-paypal-pdt-details" style="display:none;">' . "\n";
         echo '<p><em><strong>*Quick Tip*</strong> In addition to the <a href="http://www.optimizepress.com/paypal-pdt-setup" target="_blank" rel="external">default Auto-Return/PDT configuration inside your PayPal account</a>, the Auto-Return URL is also set on a per-transaction basis from within the special PayPal Button Code that optimizeMember provides you with. In other words, if you have multiple sites operating on one PayPal account, that\'s OK. optimizeMember dynamically sets the Auto-Return URL for each transaction. The result is that the Auto-Return URL configured from within your PayPal account, becomes the default, which is then overwritten on a per-transaction basis.</em></p>' . "\n";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_pdt_after_quick_tip", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_paypal_pdt_after_more_info", get_defined_vars());
         /**/
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_after_paypal_pdt", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_display_signup_confirmation_email", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_before_signup_confirmation_email", get_defined_vars());
         /**/
         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 PayPal. 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";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_signup_confirmation_email", 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-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 PayPal.' . "\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 PayPal.<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 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. 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>%%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>.</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>%%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>.</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";
         /**/
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_after_signup_confirmation_email", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_display_sp_confirmation_email", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_before_sp_confirmation_email", get_defined_vars());
         /**/
         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 PayPal, 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";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_sp_confirmation_email", 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-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 PayPal, 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 PayPal, 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 PayPal Transaction ID. PayPal 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";
         /**/
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_after_sp_confirmation_email", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_display_eot_behavior", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_before_eot_behavior", get_defined_vars());
         /**/
         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>PayPal 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 PayPal IPN service will notify optimizeMember whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. For example, if you issue a refund to an unhappy Customer through PayPal, optimizeMember will eventually be notified, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically ( based on your configuration ). The communication from PayPal -> optimizeMember is seamless.</p>' . "\n";
         echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through PayPal... but, 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 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";
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_during_eot_behavior", get_defined_vars());
         /**/
         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 '<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";
         /**/
         do_action("ws_plugin__optimizemember_during_paypal_ops_page_during_left_sections_after_eot_behavior", get_defined_vars());
     }
     /**/
     do_action("ws_plugin__optimizemember_during_paypal_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";
 }
示例#13
0
 /**
  * Handles Download Access permissions.
  *
  * @package optimizeMember\Files
  * @since 3.5
  *
  * @attaches-to ``add_action("init");``
  * @also-called-by API Function {@link optimizeMember\API_Functions\optimizemember_file_download_url()}, w/ ``$create_file_download_url`` param.
  *
  * @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
  * 	Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
  * @return null|str If called directly with ``$create_file_download_url``, returns a string with the URL, based on configuration.
  * 	Else, this function may exit script execution after serving a File Download.
  */
 public static function check_file_download_access($create_file_download_url = FALSE)
 {
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__optimizemember_before_file_download_access", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     $_g = !empty($_GET) ? $_GET : array();
     $_g = c_ws_plugin__optimizemember_utils_strings::trim_deep(stripslashes_deep($_g));
     /**/
     $creating = is_array($create = $create_file_download_url) ? true : false;
     $serving = !$creating ? true : false;
     $serving_range = $range = false;
     if ($serving) {
         $range = (string) @$_SERVER["HTTP_RANGE"];
         if (!$range && function_exists("apache_request_headers")) {
             /* Note: ``apache_request_headers()`` works in FastCGI too, starting w/ PHP v5.4. */
             foreach ((array) apache_request_headers() as $_header => $_value) {
                 if (is_string($_header) && strcasecmp($_header, "range") === 0) {
                     $range = $_value;
                 }
             }
         }
         if ($range) {
             $serving_range = true;
         }
         unset($_header, $_value);
     }
     /**/
     $req["file_download"] = $creating ? @$create["file_download"] : @$_g["optimizemember_file_download"];
     $req["file_download_key"] = $creating ? @$create["file_download_key"] : @$_g["optimizemember_file_download_key"];
     /**/
     $req["file_stream"] = $creating ? @$create["file_stream"] : @$_g["optimizemember_file_stream"];
     $req["file_inline"] = $creating ? @$create["file_inline"] : @$_g["optimizemember_file_inline"];
     $req["file_storage"] = $creating ? @$create["file_storage"] : @$_g["optimizemember_file_storage"];
     $req["file_remote"] = $creating ? @$create["file_remote"] : @$_g["optimizemember_file_remote"];
     $req["file_ssl"] = $creating ? @$create["file_ssl"] : @$_g["optimizemember_file_ssl"];
     /**/
     $req["file_rewrite"] = $creating ? @$create["file_rewrite"] : null;
     $req["file_rewrite_base"] = $creating ? @$create["file_rewrite_base"] : null;
     /**/
     $req["skip_confirmation"] = $creating ? @$create["skip_confirmation"] : null;
     $req["url_to_storage_source"] = $creating ? @$create["url_to_storage_source"] : null;
     $req["count_against_user"] = $creating ? @$create["count_against_user"] : null;
     $req["check_user"] = $creating ? @$create["check_user"] : null;
     /**/
     if ($req["file_download"] && is_string($req["file_download"]) && ($req["file_download"] = trim($req["file_download"], "/"))) {
         if (strpos($req["file_download"], "..") === false && strpos(basename($req["file_download"]), ".") !== 0) {
             $using_amazon_cf_storage = (!$req["file_storage"] || strcasecmp((string) $req["file_storage"], "cf") === 0) && c_ws_plugin__optimizemember_utils_conds::using_amazon_cf_storage() ? true : false;
             $using_amazon_s3_storage = (!$req["file_storage"] || strcasecmp((string) $req["file_storage"], "s3") === 0) && c_ws_plugin__optimizemember_utils_conds::using_amazon_s3_storage() ? true : false;
             $using_amazon_storage = $using_amazon_cf_storage || $using_amazon_s3_storage ? true : false;
             /**/
             $excluded = apply_filters("ws_plugin__optimizemember_check_file_download_access_excluded", false, get_defined_vars());
             $valid_file_download_key = $req["file_download_key"] && is_string($req["file_download_key"]) && $creating && (!isset($req["check_user"]) || !filter_var($req["check_user"], FILTER_VALIDATE_BOOLEAN)) && (!isset($req["count_against_user"]) || !filter_var($req["count_against_user"], FILTER_VALIDATE_BOOLEAN)) ? true : false;
             $valid_file_download_key = !$valid_file_download_key && $req["file_download_key"] && is_string($req["file_download_key"]) ? c_ws_plugin__optimizemember_files_in::check_file_download_key($req["file_download"], $req["file_download_key"]) : false;
             $checking_user = $excluded || $valid_file_download_key || $creating && (!isset($req["check_user"]) || !filter_var($req["check_user"], FILTER_VALIDATE_BOOLEAN)) && (!isset($req["count_against_user"]) || !filter_var($req["count_against_user"], FILTER_VALIDATE_BOOLEAN)) ? false : true;
             $updating_user_counter = $serving_range || !$checking_user || $creating && (!isset($req["count_against_user"]) || !filter_var($req["count_against_user"], FILTER_VALIDATE_BOOLEAN)) ? false : true;
             /**/
             if (($serving || $creating) && $checking_user) {
                 if (!$using_amazon_storage && !file_exists($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"] . "/" . $req["file_download"])) {
                     if ($serving) {
                         status_header(404) . header("Content-Type: text/html; charset=utf-8") . eval('while (@ob_end_clean ());') . exit(_x('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
                     } else {
                         /* Else return false. */
                         return false;
                     }
                 } else {
                     if ($req["file_download_key"] && is_string($req["file_download_key"]) && !$valid_file_download_key) {
                         if ($serving) {
                             status_header(503) . header("Content-Type: text/html; charset=utf-8") . eval('while (@ob_end_clean ());') . exit(_x('<strong>503 ( Invalid Key ):</strong> Sorry, your access to this file has expired. Please contact Support for assistance.', "s2member-front", "s2member"));
                         } else {
                             /* Else return false. */
                             return false;
                         }
                     } else {
                         if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["membership_options_page"] || ($file_downloads_enabled_by_site_owner = $min_level_4_downloads = c_ws_plugin__optimizemember_files::min_level_4_downloads()) === false) {
                             if ($serving) {
                                 if (!has_filter("ws_plugin__optimizemember_check_file_download_access_user", "c_ws_plugin__optimizemember_files_in::check_file_remote_authorization")) {
                                     add_filter("ws_plugin__optimizemember_check_file_download_access_user", "c_ws_plugin__optimizemember_files_in::check_file_remote_authorization", 10, 2);
                                 }
                             }
                             /**/
                             if ($creating) {
                                 if (has_filter("ws_plugin__optimizemember_check_file_download_access_user", "c_ws_plugin__optimizemember_files_in::check_file_remote_authorization")) {
                                     remove_filter("ws_plugin__optimizemember_check_file_download_access_user", "c_ws_plugin__optimizemember_files_in::check_file_remote_authorization", 10, 2);
                                 }
                             }
                             /**/
                             if (isset($file_downloads_enabled_by_site_owner, $min_level_4_downloads) && $file_downloads_enabled_by_site_owner === false || ($file_downloads_enabled_by_site_owner = $min_level_4_downloads = c_ws_plugin__optimizemember_files::min_level_4_downloads()) === false) {
                                 if ($serving) {
                                     status_header(503) . header("Content-Type: text/html; charset=utf-8") . eval('while (@ob_end_clean ());') . exit(_x('<strong>503: Basic File Downloads are NOT enabled yet.</strong> Please contact Support for assistance. If you are the site owner, please configure: <code>optimizeMember -> Download Options -> Basic Download Restrictions</code>.', "s2member-front", "s2member"));
                                 } else {
                                     /* Else return false. */
                                     return false;
                                 }
                             } else {
                                 if (!is_object($user = apply_filters("ws_plugin__optimizemember_check_file_download_access_user", is_user_logged_in() ? wp_get_current_user() : false, get_defined_vars())) || empty($user->ID) || !($user_id = $user->ID) || !is_array($user_file_downloads = c_ws_plugin__optimizemember_files::user_downloads($user)) || !$user->has_cap("administrator") && (!$user_file_downloads["allowed"] || !$user_file_downloads["allowed_days"])) {
                                     if (preg_match("/(?:^|\\/)access[_\\-]optimizemember[_\\-]level([0-9]+)\\//", $req["file_download"], $m) && strlen($req_level = $m[1]) && (!is_object($user) || empty($user->ID) || !$user->has_cap("access_optimizemember_level" . $req_level))) {
                                         if ($serving) {
                                             c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("file", $req["file_download"], "level", $req_level, $_SERVER["REQUEST_URI"]) . exit;
                                         } else {
                                             /* Else return false. */
                                             return false;
                                         }
                                     } else {
                                         if (preg_match("/(?:^|\\/)access[_\\-]optimizemember[_\\-]ccap[_\\-](.+?)\\//", $req["file_download"], $m) && strlen($req_ccap = preg_replace("/-/", "_", $m[1])) && (!is_object($user) || empty($user->ID) || !$user->has_cap("access_optimizemember_ccap_" . $req_ccap))) {
                                             if ($serving) {
                                                 c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("file", $req["file_download"], "ccap", $req_ccap, $_SERVER["REQUEST_URI"]) . exit;
                                             } else {
                                                 /* Else return false. */
                                                 return false;
                                             }
                                         } else {
                                             if ($serving) {
                                                 c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("file", $req["file_download"], "level", $min_level_4_downloads, $_SERVER["REQUEST_URI"]) . exit;
                                             } else {
                                                 /* Else return false. */
                                                 return false;
                                             }
                                         }
                                     }
                                 } else {
                                     if (preg_match("/(?:^|\\/)access[_\\-]optimizemember[_\\-]level([0-9]+)\\//", $req["file_download"], $m) && strlen($req_level = $m[1]) && !$user->has_cap("access_optimizemember_level" . $req_level)) {
                                         if ($serving) {
                                             c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("file", $req["file_download"], "level", $req_level, $_SERVER["REQUEST_URI"]) . exit;
                                         } else {
                                             /* Else return false. */
                                             return false;
                                         }
                                     } else {
                                         if (preg_match("/(?:^|\\/)access[_\\-]optimizemember[_\\-]ccap[_\\-](.+?)\\//", $req["file_download"], $m) && strlen($req_ccap = preg_replace("/-/", "_", $m[1])) && !$user->has_cap("access_optimizemember_ccap_" . $req_ccap)) {
                                             if ($serving) {
                                                 c_ws_plugin__optimizemember_mo_page::wp_redirect_w_mop_vars("file", $req["file_download"], "ccap", $req_ccap, $_SERVER["REQUEST_URI"]) . exit;
                                             } else {
                                                 /* Else return false. */
                                                 return false;
                                             }
                                         } else {
                                             if ($serving || $creating) {
                                                 $user_previous_file_downloads = 0;
                                                 $user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = false;
                                                 /**/
                                                 $user_file_download_access_log = is_array($user_file_download_access_log = get_user_option("optimizemember_file_download_access_log", $user_id)) ? $user_file_download_access_log : array();
                                                 $user_file_download_access_arc = is_array($user_file_download_access_arc = get_user_option("optimizemember_file_download_access_arc", $user_id)) ? $user_file_download_access_arc : array();
                                                 /**/
                                                 $streaming_file_extns = c_ws_plugin__optimizemember_utils_strings::preg_quote_deep($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["streaming_file_extns"], "/");
                                                 $streaming_variations = "/\\.(" . implode("|", $streaming_file_extns) . ")\$/i";
                                                 /**/
                                                 foreach ($user_file_download_access_log as $user_file_download_access_log_entry_key => $user_file_download_access_log_entry) {
                                                     if (isset($user_file_download_access_log_entry["date"], $user_file_download_access_log_entry["file"])) {
                                                         if (strtotime($user_file_download_access_log_entry["date"]) < strtotime("-" . $user_file_downloads["allowed_days"] . " days")) {
                                                             unset($user_file_download_access_log[$user_file_download_access_log_entry_key]);
                                                             $user_file_download_access_arc[] = $user_file_download_access_log_entry;
                                                         } else {
                                                             if (strtotime($user_file_download_access_log_entry["date"]) >= strtotime("-" . $user_file_downloads["allowed_days"] . " days")) {
                                                                 $user_previous_file_downloads++;
                                                                 /* Previous files always count against this User/Member. */
                                                                 /**/
                                                                 $_user_file_download_access_log_entry =& $user_file_download_access_log[$user_file_download_access_log_entry_key];
                                                                 $_user_already_downloaded_this_file = $_user_already_downloaded_a_streaming_variation_of_this_file = false;
                                                                 /**/
                                                                 if ($user_file_download_access_log_entry["file"] === $req["file_download"]) {
                                                                     $user_already_downloaded_this_file = $_user_already_downloaded_this_file = true;
                                                                 } else {
                                                                     if (preg_replace($streaming_variations, "", $user_file_download_access_log_entry["file"]) === preg_replace($streaming_variations, "", $req["file_download"])) {
                                                                         $user_already_downloaded_this_file = $_user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = $_user_already_downloaded_a_streaming_variation_of_this_file = true;
                                                                     }
                                                                 }
                                                                 /**/
                                                                 if ($updating_user_counter && ($_user_already_downloaded_this_file || $_user_already_downloaded_a_streaming_variation_of_this_file)) {
                                                                     $_user_file_download_access_log_entry["ltime"] = time();
                                                                     /**/
                                                                     if (!empty($user_file_download_access_log_entry["counter"])) {
                                                                         $_user_file_download_access_log_entry["counter"] = (int) $user_file_download_access_log_entry["counter"] + 1;
                                                                     } else {
                                                                         /* Backward compatiility here. Default value to `1`, if this is NOT even set yet. */
                                                                         $_user_file_download_access_log_entry["counter"] = 1 + 1;
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     } else {
                                                         /* Weed out empty log entries. Some older versions of optimizeMember may have corrupt/empty log entries. */
                                                         unset($user_file_download_access_log[$user_file_download_access_log_entry_key]);
                                                     }
                                                     /* Remove. */
                                                 }
                                                 if ($updating_user_counter && !$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file) {
                                                     $user_file_download_access_log[] = array("date" => date("Y-m-d"), "time" => time(), "ltime" => time(), "file" => $req["file_download"], "counter" => 1);
                                                 }
                                                 /**/
                                                 if ($user_previous_file_downloads >= $user_file_downloads["allowed"] && !$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file && !$user->has_cap("administrator")) {
                                                     if ($serving) {
                                                         wp_redirect(add_query_arg(urlencode_deep(array("_optimizemember_seeking" => array("type" => "file", "file" => $req["file_download"], "_uri" => base64_encode($_SERVER["REQUEST_URI"])), "optimizemember_seeking" => "file-" . $req["file_download"])), get_page_link($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["file_download_limit_exceeded_page"])), apply_filters("ws_plugin__optimizemember_content_redirect_status", 301, get_defined_vars())) . exit;
                                                     } else {
                                                         /* Else return false. */
                                                         return false;
                                                     }
                                                 } else {
                                                     if ($updating_user_counter) {
                                                         update_user_option($user_id, "optimizemember_file_download_access_log", c_ws_plugin__optimizemember_utils_arrays::array_unique($user_file_download_access_log)) . update_user_option($user_id, "optimizemember_file_download_access_arc", c_ws_plugin__optimizemember_utils_arrays::array_unique($user_file_download_access_arc));
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             } else {
                 if (!$using_amazon_storage && !file_exists($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"] . "/" . $req["file_download"])) {
                     if ($serving) {
                         status_header(404) . header("Content-Type: text/html; charset=utf-8") . eval('while (@ob_end_clean ());') . exit(_x('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
                     } else {
                         /* Else return false. */
                         return false;
                     }
                 }
             }
             /**/
             if ($serving || $creating) {
                 $basename = basename($req["file_download"]);
                 $mimetypes = parse_ini_file(dirname(dirname(dirname(__FILE__))) . "/includes/mime-types.ini");
                 $extension = strtolower(substr($req["file_download"], strrpos($req["file_download"], ".") + 1));
                 /**/
                 $key = $req["file_download_key"] && is_string($req["file_download_key"]) ? $req["file_download_key"] : false;
                 /**/
                 $stream = isset($req["file_stream"]) ? filter_var($req["file_stream"], FILTER_VALIDATE_BOOLEAN) : (in_array($extension, preg_split("/[\r\n\t\\s;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["file_download_stream_extensions"])) ? true : false);
                 $inline = !$stream && isset($req["file_inline"]) ? filter_var($req["file_inline"], FILTER_VALIDATE_BOOLEAN) : ($stream || in_array($extension, preg_split("/[\r\n\t\\s;,]+/", $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["file_download_inline_extensions"])) ? true : false);
                 $ssl = isset($req["file_ssl"]) ? filter_var($req["file_ssl"], FILTER_VALIDATE_BOOLEAN) : (is_ssl() ? true : false);
                 $storage = $req["file_storage"] && is_string($req["file_storage"]) ? strtolower($req["file_storage"]) : false;
                 $remote = isset($req["file_remote"]) ? filter_var($req["file_remote"], FILTER_VALIDATE_BOOLEAN) : false;
                 /**/
                 $_basename_dir_app_data = c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"]);
                 $rewrite_base_guess = is_dir(dirname($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir"]) . "/" . $_basename_dir_app_data) ? dirname($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . "/" . $_basename_dir_app_data : content_url("/" . $_basename_dir_app_data);
                 $rewrite_base = $req["file_rewrite_base"] && is_string($req["file_rewrite_base"]) ? $req["file_rewrite_base"] : false;
                 $rewrite = $rewriting = !$rewrite_base && isset($req["file_rewrite"]) ? filter_var($req["file_rewrite"], FILTER_VALIDATE_BOOLEAN) : ($rewrite_base ? true : false);
                 unset($_basename_dir_app_data);
                 /**/
                 $skip_confirmation = isset($req["skip_confirmation"]) ? filter_var($req["skip_confirmation"], FILTER_VALIDATE_BOOLEAN) : false;
                 $url_to_storage_source = isset($req["url_to_storage_source"]) ? filter_var($req["url_to_storage_source"], FILTER_VALIDATE_BOOLEAN) : false;
                 /**/
                 $pathinfo = !$using_amazon_storage ? pathinfo($file = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"] . "/" . $req["file_download"]) : array();
                 $mimetype = $mimetypes[$extension] ? $mimetypes[$extension] : "application/octet-stream";
                 $disposition = ($inline ? "inline" : "attachment") . "; filename=\"" . c_ws_plugin__optimizemember_utils_strings::esc_dq($basename) . "\"; filename*=UTF-8''" . rawurlencode($basename);
                 $length = !$using_amazon_storage && $file ? filesize($file) : -1;
                 /**/
                 eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
                 do_action("ws_plugin__optimizemember_during_file_download_access", get_defined_vars());
                 unset($__refs, $__v);
                 /* Unset defined __refs, __v. */
                 /**/
                 if ($using_amazon_storage && $using_amazon_cf_storage && ($serving || $creating && $url_to_storage_source)) {
                     if ($serving) {
                         wp_redirect(c_ws_plugin__optimizemember_files_in::amazon_cf_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)) . exit;
                     } else {
                         /* Else return File Download URL. */
                         return apply_filters("ws_plugin__optimizemember_file_download_access_url", c_ws_plugin__optimizemember_files_in::amazon_cf_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars());
                     }
                 } else {
                     if ($using_amazon_storage && $using_amazon_s3_storage && ($serving || $creating && $url_to_storage_source)) {
                         if ($serving) {
                             wp_redirect(c_ws_plugin__optimizemember_files_in::amazon_s3_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)) . exit;
                         } else {
                             /* Else return File Download URL. */
                             return apply_filters("ws_plugin__optimizemember_file_download_access_url", c_ws_plugin__optimizemember_files_in::amazon_s3_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars());
                         }
                     } else {
                         if ($creating && $rewriting) {
                             /* Note: we don't URL encode unreserved chars. Improves media player compatibility. */
                             $_url_e_key = $key ? c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($key)) : "";
                             $_url_e_storage = $storage ? c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($storage)) : "";
                             $_url_e_file = c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($req["file_download"]));
                             /**/
                             $url = $rewrite_base ? rtrim($rewrite_base, "/") : rtrim($rewrite_base_guess, "/");
                             $url .= isset($req["file_download_key"]) ? $key && $_url_e_key ? "/optimizemember-file-download-key-" . $_url_e_key : "" : "";
                             $url .= isset($req["file_stream"]) ? $stream ? "/optimizemember-file-stream" : "/optimizemember-file-stream-no" : "";
                             $url .= isset($req["file_inline"]) ? $inline ? "/optimizemember-file-inline" : "/optimizemember-file-inline-no" : "";
                             $url .= isset($req["file_storage"]) ? $storage && $_url_e_storage ? "/optimizemember-file-storage-" . $_url_e_storage : "" : "";
                             $url .= isset($req["file_remote"]) ? $remote ? "/optimizemember-file-remote" : "/optimizemember-file-remote-no" : "";
                             $url .= isset($req["skip_confirmation"]) ? $skip_confirmation ? "/s2member-skip-confirmation" : "/s2member-skip-confirmation-no" : "";
                             /**/
                             $url = $url . "/" . $_url_e_file;
                             $url = $ssl ? preg_replace("/^https?/", "https", $url) : preg_replace("/^https?/", "http", $url);
                             /**/
                             return apply_filters("ws_plugin__optimizemember_file_download_access_url", $url, get_defined_vars());
                         } else {
                             if ($creating) {
                                 /* Note: we don't URL encode unreserved chars. Improves media player compatibility. */
                                 $_url_e_key = $key ? c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($key)) : "";
                                 $_url_e_storage = $storage ? c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($storage)) : "";
                                 $_url_e_file = c_ws_plugin__optimizemember_utils_strings::urldecode_ur_chars_deep(urlencode($req["file_download"]));
                                 /**/
                                 $url = isset($req["file_download_key"]) ? $key && $_url_e_key ? "&optimizemember_file_download_key=" . $_url_e_key : "" : "";
                                 $url .= isset($req["file_stream"]) ? $stream ? "&optimizemember_file_stream=yes" : "&optimizemember_file_stream=no" : "";
                                 $url .= isset($req["file_inline"]) ? $inline ? "&optimizemember_file_inline=yes" : "&optimizemember_file_inline=no" : "";
                                 $url .= isset($req["file_storage"]) ? $storage && $_url_e_storage ? "&optimizemember_file_storage=" . $_url_e_storage : "" : "";
                                 $url .= isset($req["file_remote"]) ? $remote ? "&optimizemember_file_remote=yes" : "&optimizemember_file_remote=no" : "";
                                 $url .= isset($req["skip_confirmation"]) ? $skip_confirmation ? "&optimizemember_skip_confirmation=yes" : "&optimizemember_skip_confirmation=no" : "";
                                 /**/
                                 $url = site_url("/?" . ltrim($url . "&optimizemember_file_download=/" . $_url_e_file, "&"));
                                 $url = $ssl ? preg_replace("/^https?/", "https", $url) : preg_replace("/^https?/", "http", $url);
                                 /**/
                                 return apply_filters("ws_plugin__optimizemember_file_download_access_url", $url, get_defined_vars());
                             } else {
                                 if ($serving) {
                                     @set_time_limit(0);
                                     /**/
                                     @ini_set("zlib.output_compression", 0);
                                     if (function_exists("apache_setenv")) {
                                         @apache_setenv("no-gzip", "1");
                                     }
                                     while (@ob_end_clean()) {
                                     }
                                     /**/
                                     if ($range) {
                                         if (strpos($range, "=") === FALSE) {
                                             status_header(416);
                                             nocache_headers();
                                             header("Content-Encoding:");
                                             header("Accept-Ranges: bytes");
                                             header("Content-Type: " . $mimetype);
                                             header("Content-Length: " . $length);
                                             header("Content-Disposition: " . $disposition);
                                             exit;
                                         }
                                         list($range_type, $byte_range) = preg_split("/\\s*\\=\\s*/", $range, 2);
                                         /**/
                                         $range_type = strtolower(trim($range_type));
                                         $byte_range = trim($byte_range);
                                         /**/
                                         if ($range_type !== "bytes") {
                                             status_header(416);
                                             nocache_headers();
                                             header("Content-Encoding:");
                                             header("Accept-Ranges: bytes");
                                             header("Content-Type: " . $mimetype);
                                             header("Content-Length: " . $length);
                                             header("Content-Disposition: " . $disposition);
                                             exit;
                                         }
                                         $byte_ranges = preg_split("/\\s*,\\s*/", $byte_range);
                                         /**/
                                         if (strpos($byte_ranges[0], "-") === FALSE) {
                                             status_header(416);
                                             nocache_headers();
                                             header("Content-Encoding:");
                                             header("Accept-Ranges: bytes");
                                             header("Content-Type: " . $mimetype);
                                             header("Content-Length: " . $length);
                                             header("Content-Disposition: " . $disposition);
                                             exit;
                                         }
                                         /* Only dealing with the first byte range. Others are simply ignored here. */
                                         list($byte_range_start, $byte_range_stops) = preg_split("/\\s*\\-\\s*/", $byte_ranges[0], 2);
                                         /**/
                                         $byte_range_start = trim($byte_range_start);
                                         $byte_range_stops = trim($byte_range_stops);
                                         /**/
                                         $byte_range_start = $byte_range_start === "" ? NULL : (int) $byte_range_start;
                                         $byte_range_stops = $byte_range_stops === "" ? NULL : (int) $byte_range_stops;
                                         /**/
                                         if (!isset($byte_range_start) && $byte_range_stops > 0 && $byte_range_stops <= $length) {
                                             $byte_range_start = $length - $byte_range_stops;
                                             $byte_range_stops = $length - 1;
                                         } else {
                                             if (!isset($byte_range_stops) && $byte_range_start >= 0 && $byte_range_start < $length - 1) {
                                                 $byte_range_stops = $length - 1;
                                             } else {
                                                 if (isset($byte_range_start, $byte_range_stops) && $byte_range_start >= 0 && $byte_range_start < $length - 1 && $byte_range_stops > $byte_range_start && $byte_range_stops <= $length - 1) {
                                                     /* Nothing to do in this case, starts/stops already defined properly. */
                                                 } else {
                                                     status_header(416);
                                                     nocache_headers();
                                                     header("Content-Encoding:");
                                                     header("Accept-Ranges: bytes");
                                                     header("Content-Type: " . $mimetype);
                                                     header("Content-Length: " . $length);
                                                     header("Content-Disposition: " . $disposition);
                                                     exit;
                                                 }
                                             }
                                         }
                                         /* Range. */
                                         status_header(206);
                                         nocache_headers();
                                         header("Content-Encoding:");
                                         header("Accept-Ranges: bytes");
                                         header("Content-Type: " . $mimetype);
                                         header("Content-Range: bytes " . $byte_range_start . "-" . $byte_range_stops . "/" . $length);
                                         $byte_range_size = $byte_range_stops - $byte_range_start + 1;
                                         header("Content-Length: " . $byte_range_size);
                                         header("Content-Disposition: " . $disposition);
                                     } else {
                                         status_header(200);
                                         nocache_headers();
                                         header("Content-Encoding:");
                                         header("Accept-Ranges: bytes");
                                         header("Content-Type: " . $mimetype);
                                         header("Content-Length: " . $length);
                                         header("Content-Disposition: " . $disposition);
                                     }
                                     if (is_resource($resource = fopen($file, "rb"))) {
                                         if ($range) {
                                             $_bytes_to_read = $byte_range_size;
                                             fseek($resource, $byte_range_start);
                                         } else {
                                             /* Entire file. */
                                             $_bytes_to_read = $length;
                                         }
                                         /**/
                                         $chunk_size = apply_filters("ws_plugin__optimizemember_file_downloads_chunk_size", 2097152, get_defined_vars());
                                         /**/
                                         while ($_bytes_to_read) {
                                             $_bytes_to_read -= $_reading = $_bytes_to_read > $chunk_size ? $chunk_size : $_bytes_to_read;
                                             echo fread($resource, $_reading);
                                             flush();
                                         }
                                         fclose($resource);
                                         unset($_bytes_to_read, $_reading);
                                     }
                                     exit;
                                 }
                             }
                         }
                     }
                 }
             }
         } else {
             if ($serving && $req["file_download"]) {
                 status_header(503) . header("Content-Type: text/html; charset=utf-8") . eval('while (@ob_end_clean ());') . exit(_x('<strong>503: Access denied.</strong> Invalid File Download specs.', "s2member-front", "s2member"));
             } else {
                 if ($creating) {
                     return false;
                 }
             }
         }
     }
     /**/
     do_action("ws_plugin__optimizemember_after_file_download_access", get_defined_vars());
     /**/
     return $creating ? false : null;
 }
示例#14
0
 /**
  * Builds the options panel for this Payment Gateway.
  *
  * @package optimizeMember\Menu_Pages
  * @since 1.5
  *
  * @return null
  */
 public static function ccbill_ops_page()
 {
     c_ws_plugin__optimizemember_menu_pages::update_all_options();
     /**/
     $logs_dir = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["logs_dir"];
     /**/
     if (!is_dir($logs_dir) && is_writable(dirname(c_ws_plugin__optimizemember_utils_dirs::strip_dir_app_data($logs_dir)))) {
         mkdir($logs_dir, 0777, true) . clearstatcache();
     }
     /**/
     $htaccess = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["logs_dir"] . "/.htaccess";
     $htaccess_contents = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["logs_dir_htaccess"])));
     /**/
     if (is_dir($logs_dir) && is_writable($logs_dir) && !file_exists($htaccess)) {
         file_put_contents($htaccess, $htaccess_contents) . clearstatcache();
     }
     /**/
     if ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["gateway_debug_logs"]) {
         if (!is_dir($logs_dir)) {
             /* If the security-enabled logs directory does not exist yet. */
             c_ws_plugin__optimizemember_admin_notices::display_admin_notice('The security-enabled logs directory ( <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($logs_dir)) . '</code> ) does not exist. Please create this directory manually &amp; make it writable ( chmod 777 ).', true);
         } else {
             if (!is_writable($logs_dir)) {
                 /* If the logs directory is not writable yet. */
                 c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Permissions error. The security-enabled logs directory ( <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($logs_dir)) . '</code> ) is not writable. Please make this directory writable ( chmod 777 ).', true);
             }
         }
         /**/
         if (!file_exists($htaccess)) {
             /* If the .htaccess file has not been created yet. */
             c_ws_plugin__optimizemember_admin_notices::display_admin_notice('The .htaccess protection file ( <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($htaccess)) . '</code> ) does not exist. Please create this file manually. Inside your .htaccess file, add this:<br /><pre>' . esc_html($htaccess_contents) . '</pre>', true);
         } else {
             if (!preg_match("/deny from all/i", file_get_contents($htaccess))) {
                 /* Else if the .htaccess file does not offer the required protection. */
                 c_ws_plugin__optimizemember_admin_notices::display_admin_notice('Unprotected. The .htaccess protection file ( <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($htaccess)) . '</code> ) does not contain <code>deny from all</code>. Inside your .htaccess file, add this:<br /><pre>' . esc_html($htaccess_contents) . '</pre>', true);
             }
         }
     }
     /**/
     include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/menu-pages/ccbill-ops.inc.php";
     /**/
     return;
     /* Return for uniformity. */
 }
示例#15
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>Log Files</h2>' . "\n";
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     do_action("ws_plugin__optimizemember_during_logs_page_before_left_sections", get_defined_vars());
     /*if (apply_filters("ws_plugin__optimizemember_during_logs_page_during_left_sections_display_help", true, get_defined_vars ()))
     						{
     							do_action("ws_plugin__optimizemember_during_logs_page_during_left_sections_before_help", get_defined_vars ());
     
     							echo '<div class="ws-menu-page-group" title="Getting Help">' . "\n";
     
     							echo '<div class="ws-menu-page-section ws-plugin--optimizemember-help">' . "\n";
     							echo '<h3>Getting Help w/ optimizeMember (Troubleshooting)</h3>' . "\n";
     							echo '<p>optimizeMember is pretty easy to setup and install initially. Most of the official documentation is right here in your Dashboard (i.e. there is a lot of inline documentation built into the software). That being said, it CAN take some time to master everything there is to know about optimizeMember\'s advanced features. If you need assistance with optimizeMember, please search the <a href="http://www.s2member.com/kb/" target="_blank" rel="external">optimizeMember Knowledge Base</a>, <a href="http://www.s2member.com/videos/" target="_blank" rel="external">Video Tutorials</a>, <a href="http://www.s2member.com/forums/" target="_blank" rel="external">Forums</a> and <a href="http://www.s2member.com/codex/" target="_blank" rel="external">Codex</a>. If you are planning to do something creative with optimizeMember, you might want to <a href="http://jobs.wordpress.net" target="_blank" rel="external">hire a freelance developer</a> to assist you.</p>' . "\n";
     							echo '<p><strong>See also:</strong> <a href="http://www.s2member.com/kb/common-troubleshooting-tips/" target="_blank" rel="external">optimizeMember Troubleshooting Guide</a> (please read this first if you\'re having trouble).</p>'."\n";
     
     							echo '<div class="ws-menu-page-hr"></div>' . "\n";
     
     							echo '<h3>Testing Server Compatibility</h3>'."\n";
     							echo '<p>Please download the <a href="http://www.s2member.com/r/server-check-tool/">optimizeMember Server Scanner</a>. Unzip, upload via FTP; then open in a browser for a full report.</p>'."\n";
     
     							echo '<div class="ws-menu-page-hr"></div>' . "\n";
     
     							echo '<h3>Troubleshooting Payment Gateway Integrations</h3>'."\n";
     							echo '<p>Please use the optimizeMember Log Viewer (below). Log files can be very helpful.</p>'."\n";
     
     							echo '<div class="ws-menu-page-hr"></div>' . "\n";
     
     							echo '<h3>Search optimizeMember KB Articles, Forums, Codex and more<em>!</em></h3>'."\n";
     							echo '<form method="get" action="http://www.s2member.com/quick-s.php" target="_blank" onsubmit="if(this.q.value === \'enter search terms...\') this.q.value = \'\';">'."\n";
     							echo '<p><input type="text" name="q" value="enter search terms..." style="width:60%;" onfocus="if(this.value === \'enter search terms...\') this.value = \'\';" onblur="if(this.value === \'\') this.value = \'enter search terms...\';" /> <input type="submit" value="Search" style="font-size:120%; font-weight:normal;" /></p>'."\n";
     							echo '</form>'."\n";
     
     							do_action("ws_plugin__optimizemember_during_logs_page_during_left_sections_during_help", get_defined_vars ());
     							echo '</div>' . "\n";
     							echo '</div>' . "\n";
     
     							do_action("ws_plugin__optimizemember_during_logs_page_during_left_sections_after_help", get_defined_vars ());
     						}*/
     if (apply_filters("ws_plugin__optimizemember_during_logs_page_during_left_sections_display_log_settings", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_logs_page_during_left_sections_before_log_settings", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Logging Configuration">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-log-settings-section">' . "\n";
         echo '<h3>Logging Configuration</h3>' . "\n";
         echo '<div class="info">' . "\n";
         echo '<p style="font-size:110%; margin-top:0;"><span>We HIGHLY recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems that occur during processing. Enable logging here, and then view your log files below; in the optimizeMember Log Viewer.</span></p>' . "\n";
         echo '<p style="font-size:110%; margin-bottom:0;"><span class="ws-menu-page-error">However, it is VERY IMPORTANT to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, secret API credentials, passwords and/or other sensitive information. We STRONGLY suggest that logging be disabled on a live site (for security reasons).</span></p>' . "\n";
         echo '</div>' . "\n";
         //								echo '<div class="notice" style="margin-bottom:0;">'."\n";
         //								echo '<p style="font-size:110%; margin-bottom:0;"><span>Regarding optimizeMember Security Badges. If debug logging is enabled, your site will NOT qualify for an optimizeMember Security Badge until you disable logging (and you must ALSO download, and then delete any existing log files). For further details, please see KB Article: <a href="http://www.s2member.com/kb/security-badges/" target="_blank" rel="external">optimizeMember Security Badges</a>.</span></p>'."\n";
         //								echo '</div>'."\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         do_action("ws_plugin__optimizemember_during_logs_page_during_left_sections_during_log_settings", get_defined_vars());
         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 '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--optimizemember-gateway-debug-logs">' . "\n";
         echo 'Enable Logging Routines?' . "\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 w/ HTTP, API, IPN &amp; Return Page logging (and List Server API logs too).</label><br />' . "\n";
         echo '<em>This enables logging overall. Includes optimizeMember HTTP, API, IPN and Return Page logging. Also logs any List Server integrations.</em><br />' . "\n";
         echo '<em>* Use only for debugging. This should NEVER be enabled on a live site.<br />* The log files are stored here: <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 '<tr>' . "\n";
         
         								echo '<th>'."\n";
         								echo '<label for="ws-plugin--optimizemember-gateway-debug-logs-extensive">'."\n";
         								echo 'Enable Additional Logging Routines?'."\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_extensive" id="ws-plugin--optimizemember-gateway-debug-logs-extensive-0" value="0"'.((!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["gateway_debug_logs_extensive"]) ? ' checked="checked"' : '').' /> <label for="ws-plugin--optimizemember-gateway-debug-logs-extensive-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__optimizemember_gateway_debug_logs_extensive" id="ws-plugin--optimizemember-gateway-debug-logs-extensive-1" value="1"'.(($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["gateway_debug_logs_extensive"]) ? ' checked="checked"' : '').' /> <label for="ws-plugin--optimizemember-gateway-debug-logs-extensive-1">Yes, enable debugging w/ HTTP connection logging for ALL of WordPress.</label><br />'."\n";
         								echo '<em>This enables HTTP connection logging for ALL of WordPress (quite extensive).<br />* Use only for debugging. This should NEVER be enabled on a live site.<br />* Creates the additional log file: <code>wp-http-api-debug.log</code></em>'."\n";
         								echo '</td>'."\n";
         
         								echo '</tr>'."\n";*/
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<p class="submit" style="margin-top:20px;">' . "\n";
         echo '<input type="submit" value="Update Logging Configuration" />' . "\n";
         echo '</p>' . "\n";
         echo '</form>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__optimizemember_during_logs_page_during_left_sections_after_log_settings", get_defined_vars());
     }
     if (apply_filters("ws_plugin__optimizemember_during_logs_page_during_left_sections_display_logs", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_logs_page_during_left_sections_before_logs", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Logs Viewer" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-logs-section">' . "\n";
         echo '<h3>Debugging Tools/Tips &amp; Other Important Details (<a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-debugging-tips-details\').toggle(); return false;" class="ws-dotted-link">click here to toggle</a>)</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-debugging-tips-details" style="display:none;">' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /*echo '<form method="post" onsubmit="if(!confirm(\'Archive all existing log files?\n\nAll of your current log files will be archived (e.g. they will simply be renamed with an ARCHIVED tag &amp; date in their file name); and new log files will be created automatically the next time optimizeMember logs something on your installation.\n\nPlease click OK to confirm this action.\')) return false;">'."\n";
         							echo '<input type="hidden" name="ws_plugin__optimizemember_logs_archive_start_fresh" value="'.esc_attr(wp_create_nonce ("ws-plugin--optimizemember-logs-archive-start-fresh")).'" />'."\n";
         							echo '<input type="submit" value="Archive All Current Log Files" class="ws-menu-page-right ws-plugin--optimizemember-archive-logs-start-fresh-button" style="font-size:110%; font-weight:normal; clear:right; min-width:200px;" />'."\n";
         							echo '</form>'."\n";
         
         							echo '<form method="post" onsubmit="if(!confirm(\'Delete all existing log files?\n\nThis will permanently delete ALL of your existing log files (including any archived log files).\n\nPlease click OK to confirm this action.\')) return false;">'."\n";
         							echo '<input type="hidden" name="ws_plugin__optimizemember_logs_delete_start_fresh" value="'.esc_attr(wp_create_nonce ("ws-plugin--optimizemember-logs-delete-start-fresh")).'" />'."\n";
         							echo '<input type="submit" value="Permanently Delete All Log Files" class="ws-menu-page-right ws-plugin--optimizemember-delete-logs-start-fresh-button" style="font-size:110%; font-weight:normal; clear:right; min-width:200px;" />'."\n";
         							echo '</form>'."\n";
         
         							echo '<form method="post">'."\n";
         							echo '<input type="hidden" name="ws_plugin__optimizemember_logs_download_zip" value="'.esc_attr(wp_create_nonce ("ws-plugin--optimizemember-logs-download-zip")).'" />'."\n";
         							echo '<input type="submit" value="Download All Log Files (Zip File)" class="ws-menu-page-right ws-plugin--optimizemember-logs-download-zip-button" style="font-size:110%; font-weight:normal; clear:right; min-width:200px;" />'."\n";
         							echo '</form>'."\n";*/
         echo '<p><strong>Debugging Tips:</strong> &nbsp;&nbsp; It is normal to see a few errors in your log files. This is because optimizeMember logs ALL of its communication with Payment Gateways. Everything — not just successes. With that in mind, there will be some failures that optimizeMember expects (to a certain extent); and optimizeMember deals with these gracefully. What you\'re looking for here, are things that jump right out at you as being a major issue (e.g. when optimizeMember makes a point of providing details to you in a log entry about problems that should be corrected on your installation). Please read carefully.</p>' . "\n";
         echo '<p><strong>Test Transaction Tips:</strong> &nbsp;&nbsp; Generally speaking, it is best to run test transactions for yourself. Be sure to run your final test transactions against a live Payment Gateway that is NOT in Sandbox/Test Mode (<a href="#" onclick="alert(\'While some Payment Gateways make it possible for you to run test transactions in Sandbox/Test Mode, these are NOT a reliable way to test optimizeMember.\\n\\nOften times (particularly with PayPal) Sandbox/Test mode behaves somewhat differently — often with buggy behavior. This can really create frustration for site owners. Therefore, it is always a good idea to run low dollar test transactions against a live Payment Gateway.\\n\\nAlso, please be sure that you are NOT logged in as an Administrator when running test transactions. For most test transactions, you will want to be completely logged out of your site before completing checkout (just a new Customer would be). If you are testing an upgrade or downgrade (where you DO need to be logged-in), please do NOT attempt this under an Administrative account. optimizeMember will NOT upgrade/downgrade Administrative accounts — for security purposes.\'); return false;">click here for details</a>). After running test transactions, please review the log file entries pertaining to your transaction. Does optimizeMember report any major issues? If so, please read through any details that optimizeMember provides in the log file.</p>' . "\n";
         echo '<p><strong>OPM Core Processors:</strong> &nbsp;&nbsp; It is normal to have a <code>paypay-ipn.log</code> and/or a <code>paypay-rtn.log</code> file at all times. Ultimately, all Payment Gateway integrations supported by optimizeMember pass through it\'s core PayPal processors; even if you\'ve integrated with another Payment Gateway. If you are having trouble, and you don\'t find any errors in your Payment Gateway log files, please check the <code>paypay-ipn.log</code> and <code>paypay-rtn.log</code> files too. Regarding optimizeMember Pro Forms... If you\'ve integrated optimizeMember Pro Forms, you will NOT have a <code>paypay-rtn.log</code> file, because that particular processor is not used with Pro Form integrations. However, you will have a <code>paypay-ipn.log</code> file, and you will need to make a point of inspecting this file to ensure there were no post-processing issues.</p>' . "\n";
         //echo '<p><strong>s2 HTTP API Logs:</strong> &nbsp;&nbsp; If optimizeMember is not behaving as expected, and you cannot find errors anywhere in your Payment Gateway log files (or with any core PayPal processors), please review your <code>s2-http-api-debug.log</code> file too. Look for any HTTP connections where optimizeMember is getting <code>403</code>, <code>404</code>, <code>503</code> errors from your server. This can sometimes happen due to <a href="http://www.s2member.com/kb/mod-security-random-503-403-errors/" target="_blank" rel="external">paranoid Mod Security configurations</a>, and it may require you to contact your hosting company for assistance.</p>'."\n";
         echo '<p style="font-style:italic;"><strong>Archived Log Files:</strong> &nbsp;&nbsp; All optimizeMember log files are stored here: <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["logs_dir"])) . '</code>. Any log files that contain the word <code>ARCHIVED</code> in their name, are files that reached a size of more than 2MB, so optimizeMember archived them automatically to prevent any single log file from becoming too large. Archived log file names will also contain the date/time they were archived by optimizeMember. These archived log files typically contain much older (and possibly outdated) log entries.</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3>optimizeMember Log File Descriptions (for ALL possible log file names)</h3>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<ul class="ws-menu-page-li-margins">' . "\n";
         foreach (c_ws_plugin__optimizemember_utils_logs::$log_file_descriptions as $_k => $_v) {
             echo '<li style="font-family:\'Georgia\', serif;"><code><strong>' . esc_html(preg_replace('/^\\/|\\/$/', '', $_k)) . '.log</strong></code> &nbsp;&nbsp; ' . esc_html($_v["long"]) . '</li>' . "\n";
         }
         unset($_k, $_v);
         // Housekeeping.
         echo '</ul>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__optimizemember_during_logs_page_during_left_sections_during_logs", get_defined_vars());
         $log_file_options = "";
         // Initialize to an empty string.
         $view_log_file = !empty($_POST["ws_plugin__optimizemember_log_file"]) ? esc_html($_POST["ws_plugin__optimizemember_log_file"]) : "";
         $logs_dir = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["logs_dir"];
         if (is_dir($logs_dir)) {
             $log_files = scandir($logs_dir);
             sort($log_files, SORT_STRING);
             $log_file_options .= '<optgroup label="Current Log Files">';
             foreach ($log_files as $_log_file) {
                 $_log_file_description = array("short" => "No description available.", "long" => "No description available.");
                 foreach (c_ws_plugin__optimizemember_utils_logs::$log_file_descriptions as $_k => $_v) {
                     if (preg_match($_k, $_log_file)) {
                         $_log_file_description = $_v;
                         break;
                         // Stop here.
                     }
                 }
                 unset($_k, $_v);
                 // Housekeeping.
                 if (preg_match("/\\.log\$/", $_log_file) && stripos($_log_file, "-ARCHIVED-") === FALSE) {
                     $log_file_options .= '<option data-type="current" title="' . esc_attr($_log_file_description["long"]) . '" value="' . esc_attr($_log_file) . '"' . ($view_log_file === $_log_file ? ' style="font-weight:bold;" selected="selected"' : '') . '>' . esc_html($_log_file) . ' — ' . esc_html($_log_file_description["short"]) . '</option>';
                 }
             }
             unset($_log_file_description, $_log_file);
             // Housekeeping.
             $log_file_options .= '</optgroup>';
             if (stripos($log_file_options, '<option data-type="current"') === FALSE) {
                 $log_file_options .= '<option value="" disabled="disabled">— No current log files yet. —</option>';
             }
             $log_file_options .= '<option value="" disabled="disabled"></option>';
             $log_file_options .= '<optgroup label="Archived Log Files">';
             foreach ($log_files as $_log_file) {
                 if (preg_match("/\\.log\$/", $_log_file) && stripos($_log_file, "-ARCHIVED-") !== FALSE) {
                     $log_file_options .= '<option data-type="archived" value="' . esc_attr($_log_file) . '"' . ($view_log_file === $_log_file ? ' style="font-weight:bold;" selected="selected"' : '') . '>' . esc_html($_log_file) . '</option>';
                 }
             }
             $log_file_options .= '</optgroup>';
             if (stripos($log_file_options, '<option data-type="archived"') === FALSE) {
                 $log_file_options .= '<option value="" disabled="disabled">— No log files archived yet. —</option>';
             }
         }
         $log_file_options = '<option value="">— Choose a Log File to View —</option>' . '<option value="" disabled="disabled"></option>' . $log_file_options;
         echo '<form method="post" name="ws_plugin__optimizemember_log_viewer" id="ws-plugin--optimizemember-log-viewer">' . "\n";
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<td style="width:80%;">' . "\n";
         echo '<select name="ws_plugin__optimizemember_log_file" id="ws-plugin--optimizemember-log-file">' . "\n";
         echo $log_file_options . "\n";
         echo '</select>' . "\n";
         echo '</td>' . "\n";
         echo '<td style="width:20%; padding-left:5px;">' . "\n";
         echo '<input type="submit" value="View" style="font-size:120%; font-weight:normal;" />' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         if ($view_log_file && file_exists($logs_dir . "/" . $view_log_file) && filesize($logs_dir . "/" . $view_log_file)) {
             $_log_file_description = array("short" => "", "long" => "");
             foreach (c_ws_plugin__optimizemember_utils_logs::$log_file_descriptions as $_k => $_v) {
                 if (preg_match($_k, $view_log_file)) {
                     $_log_file_description = $_v;
                     break;
                     // Stop here.
                 }
             }
             unset($_k, $_v);
             // Housekeeping.
             if (!empty($_log_file_description["long"])) {
                 // Do we have a description that we can display here?
                 echo '<p style="clear:both; width:80%; font-family:\'Georgia\', serif; font-style:italic;"><strong>Description for <a href="' . esc_attr(add_query_arg(array("ws_plugin__optimizemember_download_log_file" => $view_log_file, "ws_plugin__optimizemember_download_log_file_v" => wp_create_nonce("ws-plugin--optimizemember-download-log-file-v")))) . '">' . esc_html($view_log_file) . '</a></strong>: ' . esc_html($_log_file_description["long"]) . '</p>' . "\n";
             }
             unset($_log_file_description);
             // Just a little housekeeping here.
             echo '<p style="float:left; text-align:left;"><strong>Viewing:</strong> <a href="' . esc_attr(add_query_arg(array("ws_plugin__optimizemember_download_log_file" => $view_log_file, "ws_plugin__optimizemember_download_log_file_v" => wp_create_nonce("ws-plugin--optimizemember-download-log-file-v")))) . '">' . esc_html($view_log_file) . '</a> (log entries oldest to newest)</p>' . "\n";
             echo '<p style="float:right; text-align:right;">[ <a href="' . esc_attr(add_query_arg(array("ws_plugin__optimizemember_download_log_file" => $view_log_file, "ws_plugin__optimizemember_download_log_file_v" => wp_create_nonce("ws-plugin--optimizemember-download-log-file-v")))) . '"><strong>download file</strong></a> ]</p>' . "\n";
             echo '<p style="margin-right:10px; float:right; text-align:right;"><a href="#" class="ws-plugin--optimizemember-log-file-viewport-toggle" style="text-decoration:none;">&#8659; expand viewport &#8659;</a></p>' . "\n";
             echo '<textarea id="ws-plugin--optimizemember-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 5px rgba(0,0,0,0.5); background:#EEEEEE; color:#000000; overflow-y:scroll;" class="monospace">' . htmlspecialchars(file_get_contents($logs_dir . "/" . $view_log_file)) . '</textarea>' . "\n";
             echo '<p style="float:left; text-align:left;"><strong>Viewing:</strong> <a href="' . esc_attr(add_query_arg(array("ws_plugin__optimizemember_download_log_file" => $view_log_file, "ws_plugin__optimizemember_download_log_file_v" => wp_create_nonce("ws-plugin--optimizemember-download-log-file-v")))) . '">' . esc_html($view_log_file) . '</a> (log entries oldest to newest)</p>' . "\n";
             echo '<p style="float:right; text-align:right;">[ <a href="' . esc_attr(add_query_arg(array("ws_plugin__optimizemember_download_log_file" => $view_log_file, "ws_plugin__optimizemember_download_log_file_v" => wp_create_nonce("ws-plugin--optimizemember-download-log-file-v")))) . '"><strong>download file</strong></a> ]</p>' . "\n";
             echo '<p style="margin-right:10px; float:right; text-align:right;"><a href="#" class="ws-plugin--optimizemember-log-file-viewport-toggle" style="text-decoration:none;">&#8659; expand viewport &#8659;</a></p>' . "\n";
         } else {
             if ($view_log_file && file_exists($logs_dir . "/" . $view_log_file)) {
                 echo '<textarea id="ws-plugin--optimizemember-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 5px rgba(0,0,0,0.5); background:#EEEEEE; color:#000000; overflow-y:scroll; font-style:italic;" class="monospace">— Empty at this time —</textarea>' . "\n";
             } else {
                 if ($view_log_file && !file_exists($logs_dir . "/" . $view_log_file)) {
                     echo '<textarea id="ws-plugin--optimizemember-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 5px rgba(0,0,0,0.5); background:#EEEEEE; color:#000000; overflow-y:scroll; font-style:italic;" class="monospace">— File no longer exists —</textarea>' . "\n";
                 } else {
                     // Display an empty textarea in this default scenario.
                     echo '<textarea id="ws-plugin--optimizemember-log-file-viewer" rows="20" wrap="on" spellcheck="false" style="box-shadow:inset 0 0 5px rgba(0,0,0,0.5); background:#EEEEEE; color:#000000; overflow-y:scroll; font-style:italic;" class="monospace"></textarea>' . "\n";
                 }
             }
         }
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</form>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__optimizemember_during_logs_page_during_left_sections_after_logs", get_defined_vars());
     }
     do_action("ws_plugin__optimizemember_during_logs_page_after_left_sections", get_defined_vars());
     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";
 }
示例#16
0
 /**
  * shortcode parsing of membership file downloads element
  * @param array $atts
  * @param string $content
  * @return String
  */
 static function membership_download($atts, $content)
 {
     // Decode encoded chars
     $atts = op_urldecode($atts);
     extract(shortcode_atts(array('style' => 1), $atts));
     //</editor-fold>
     // some preliminary checks
     // creating member dir if it does not exist
     if (!is_dir($files_dir = $GLOBALS['WS_PLUGIN__']['optimizemember']['c']['files_dir'])) {
         if (is_writable(dirname(c_ws_plugin__optimizemember_utils_dirs::strip_dir_app_data($files_dir)))) {
             mkdir($files_dir, 0777, true);
         }
     }
     // creating .htaccess file if it does not exist!
     if (is_dir($files_dir) && is_writable($files_dir)) {
         if (!file_exists($htaccess = $files_dir . '/.htaccess') || !apply_filters('ws_plugin__s2member_preserve_files_dir_htaccess', false, get_defined_vars())) {
             file_put_contents($htaccess, trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents($GLOBALS['WS_PLUGIN__']['optimizemember']['c']['files_dir_htaccess']))));
         }
     }
     $content = do_shortcode(op_clean_shortcode_content($content));
     $content = op_process_asset_content($content);
     if (!empty($content)) {
         $html = '<ul class="downloadlist-' . $style . ' border">' . $content . '</ul>';
     } else {
         $html = '';
     }
     return $html;
 }
示例#17
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>ClickBank® 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="ClickBank® Account Details">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-clickbank-account-details-section">' . "\n";
     echo '<h3>ClickBank® Account Details (required)</h3>' . "\n";
     echo '<p><a href="http://www.optimizemember.com/clickbank" target="_blank" rel="external">ClickBank®</a> is a secure online retail outlet for more than 70,000 digital product vendors and 110,000 active affiliate marketers. ClickBank® makes a sale somewhere in the world every three seconds, safely processing more than 27,000 digital transactions a day. They serve more than 200 countries, and are consistently ranked as one of the most highly-trafficked sites on the web.</p>' . "\n";
     echo '<p>optimizeMember has been integrated with ClickBank® for Direct Payments and also for Recurring Billing. In order to take advantage of this integration, you will need to have a ClickBank® Merchant Account. Once you have an account, all of the details below can be generated from inside of your ClickBank® Merchant account. If you need assistance, please check their <a href="http://www.optimizemember.com/clickbank-help" target="_blank" rel="external">help section</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-clickbank-username">' . "\n";
     echo 'ClickBank® Account Username:'******'</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_clickbank_username" id="ws-plugin--optimizemember-pro-clickbank-username" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_clickbank_username"]) . '" /><br />' . "\n";
     echo 'This is provided by ClickBank®. Check your ClickBank® account for this information.' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-clickbank-clerk-key">' . "\n";
     echo 'ClickBank® Clerk/API Key (Read Access):' . "\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_clickbank_clerk_key" id="ws-plugin--optimizemember-pro-clickbank-clerk-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_clickbank_clerk_key"]) . '" /><br />' . "\n";
     echo 'This can be generated at ClickBank®. optimizeMember needs a Clerk Key with "Read Access".' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-clickbank-developer-key">' . "\n";
     echo 'ClickBank® Developer/API Key:' . "\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_clickbank_developer_key" id="ws-plugin--optimizemember-pro-clickbank-developer-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_clickbank_developer_key"]) . '" /><br />' . "\n";
     echo 'This can be generated at ClickBank®. Check your ClickBank® account for this Key.' . "\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: <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["logs_dir"])) . '</code></em><br />' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<div class="ws-menu-page-hilite" style="border-radius:3px; padding:5px;">' . "\n";
         echo '<p style="font-size:110%; margin-top:0;"><span>We HIGHLY recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems during payment processing.</span></p>' . "\n";
         echo '<p style="font-size:110%; margin-bottom:0;"><span class="ws-menu-page-error">However, it is VERY IMPORTANT to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, secret API credentials, passwords and/or other sensitive information. We STRONGLY suggest that logging be disabled on a live site (for security reasons).</span></p>' . "\n";
         echo '</div>' . "\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="ClickBank® IPN v2.1 Integration">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-clickbank-ipn-section">' . "\n";
     echo '<h3>ClickBank® IPN v2.1 / Instant Payment Notifications (required)</h3>' . "\n";
     echo '<p>Log into your ClickBank® account and navigate to this section:<br /><code>Account Settings -› My Site -› Advanced Tools</code></p>' . "\n";
     echo '<p>Edit your IPN settings &amp; generate a Secret Key.</strong></p>' . "\n";
     echo '<p>You\'ll need your IPN v2.1 URL, which is:<br /><code>' . esc_html(site_url("/?optimizemember_pro_clickbank_notify=1")) . '</code></p>' . "\n";
     echo '<p>Then provide optimizeMember with your Secret Key in the field below.</strong></p>' . "\n";
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-pro-clickbank-secret-key">' . "\n";
     echo 'ClickBank® IPN/Secret Key:' . "\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_clickbank_secret_key" id="ws-plugin--optimizemember-pro-clickbank-secret-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_clickbank_secret_key"]) . '" /><br />' . "\n";
     echo 'The Secret Key for IPN service that is configured in your ClickBank® account.' . "\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="ClickBank® Thank-You Page">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-clickbank-ipn-section">' . "\n";
     echo '<h3>ClickBank® Thank-You Page Integration (required)</h3>' . "\n";
     echo '<p>Whenever you create <strong>Products</strong> at ClickBank®, you\'ll be asked to supply a Thank-You Page. This is where a Customer lands after they complete checkout. optimizeMember handles this dynamically, so you can use the same Thank-You Page for all of your ClickBank® Products. As long as you follow the instructions provided under: <em>optimizeMember -› ClickBank® Buttons</em>, optimizeMember will be able to handle Thank-You Page and IPN (Instant Payment Notifications) for you automatically. The integration from ClickBank® -› optimizeMember is seamless.</p>' . "\n";
     echo '<p>You\'ll need the URL for your <a href="' . esc_attr(site_url("/?optimizemember_pro_clickbank_return&optimizemember_paypal_return=1&optimizemember_paypal_proxy=clickbank&optimizemember_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">Thank-You Page</a>, which is:<br /><code>' . esc_html(site_url("/?optimizemember_pro_clickbank_return=1")) . '</code></p>' . "\n";
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     echo '<h3>Thank-You Page Template (<a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-clickbank-return-page-template\').toggle(); return false;" class="ws-dotted-link">optional customizations</a>)</h3>' . "\n";
     echo '<div id="ws-plugin--optimizemember-pro-clickbank-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_pro_clickbank_return&optimizemember_paypal_return=1&optimizemember_paypal_proxy=clickbank&optimizemember_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">Thank-You Page Template</a>. Each of your Customers are returned back to your site immediately after they complete checkout at ClickBank®. Your Thank-You 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 Thank-You 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 Thank-You 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_clickbank_return&optimizemember_paypal_return=1&optimizemember_paypal_proxy=clickbank&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-clickbank-return-template-header">' . "\n";
     echo 'Thank-You 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_clickbank_return_template_header" id="ws-plugin--optimizemember-pro-clickbank-return-template-header" rows="5" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["pro_clickbank_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 Thank-You Page Template, if you prefer. If you feel the need to create your own Thank-You 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>/clickbank-return.php</code>. optimizeMember will automatically find your Thank-You 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_clickbank_return&optimizemember_paypal_return=1&optimizemember_paypal_proxy=clickbank&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 Thank-You Page all together, if you prefer. You can take optimizeMember\'s Thank-You Page URL <em>(shown above)</em>, and add <code>&optimizemember_pro_clickbank_return_success=http://...</code> where the value can be set to a custom Thank-You Page URL that you prefer. In other words, if you use the <code>&optimizemember_pro_clickbank_return_success=http://...</code> parameter in your Thank-You Page URL, the initial redirection back to optimizeMember\'s default handler MUST still occur. However, instead of optimizeMember displaying its Thank-You Page Template to the Customer, optimizeMember will silently redirect the Customer to the URL that you specified in the <code>&optimizemember_pro_clickbank_return_success=http://...</code> parameter, allowing you to take complete control over what happens next. Click for an [ <a href="#" onclick="alert(\'Basic Example (please remember to URL encode the value):\\n' . esc_attr(site_url("/?optimizemember_pro_clickbank_return=1&optimizemember_pro_clickbank_return_success=" . site_url("/thank-you/"))) . '\\n\\nProper Example (with the URL having been encoded properly):\\n' . esc_attr(site_url("/?optimizemember_pro_clickbank_return=1&optimizemember_pro_clickbank_return_success=" . rawurlencode(site_url("/thank-you/")))) . '\\n\\n* For help on URL encoding, please see:\\nhttp://www.w3schools.com/tags/ref_urlencode.asp\'); return false;">example</a> ].</p>' . "\n";
     echo '</div>' . "\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 ClickBank®. 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 ClickBank®.' . "\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 ClickBank®.<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> = A unique Transaction/Subscription ID (which is sometimes generated by optimizeMember). [ <a href="#" onclick="alert(\'If you are selling Lifetime or Fixed-Term (non-recurring) access, using Buy Now functionality with ClickBank®; the %%subscr_id%% is actually set to the (ClickBank-generated) Receipt # for the purchase, as opposed to an (optimizeMember-generated) Subscription ID.\\n\\nJust in case you\\\'re wondering, the reason optimizeMember generates a unique Subscription ID, is because the Receipt # ClickBank® generates is NOT dynamic enough to handle everything optimizeMember makes possible. ClickBank® Receipts (by themselves) do NOT allow site owners to track multiple payments with a common Subscription ID. So optimizeMember makes up for this minor deficiency.\\n\\nFor instance, with Recurring ClickBank® Products, optimizeMember\\\'s %%subscr_id%% will remain constant throughout all future payments; making things easier to keep track of (on the back-end management side of things).\'); 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.\'); 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. [ <a href="#" onclick="alert(\'* To Avoid Confusion *\\nThis is NOT the ClickBank® Product Item #. Instead, this is optimizeMember\\\'s Item #, which equates to colon separated (level:custom_capabilities:fixed term).\'); 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>%%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>%%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>.</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>%%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>.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
     echo '<ul>' . "\n";
     echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
     echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
     echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
     echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<div class="ws-menu-page-hr"></div>' . "\n" . '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$paypal</code> variable is the most important one. It contains all of the <code>$_POST</code> variables received from ClickBank\'s IPN service, which are then translated into a format that optimizeMember\'s Core PayPal® Processor can understand (e.g. <code>$paypal["item_number"]</code>, <code>$paypal["item_name"]</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>' . "\n" : '';
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     echo '<div 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 ClickBank®, 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 ClickBank®, 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 ClickBank®, 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> = A unique Transaction ID for this purchase ( i.e. a ClickBank® Receipt # ). [ <a href="#" onclick="alert(\'This is always the Receipt # generated by ClickBank®.\'); return false;">?</a> ]</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>). [ <a href="#" onclick="alert(\'* To Avoid Confusion *\\nThis is NOT the ClickBank® Product Item #. Instead, this is optimizeMember\\\'s Item #, which equates to colon separated (sp:comma-delimited IDs:expiration hours).\'); 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 '</ul>' . "\n";
     echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
     echo '<ul>' . "\n";
     echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
     echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
     echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
     echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<div class="ws-menu-page-hr"></div>' . "\n" . '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$paypal</code> variable is the most important one. It contains all of the <code>$_POST</code> variables received from ClickBank\'s IPN service, which are then translated into a format that optimizeMember\'s Core PayPal® Processor can understand (e.g. <code>$paypal["item_number"]</code>, <code>$paypal["item_name"]</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>' . "\n" : '';
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     echo '<div 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>ClickBank® 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. There are also a few other configurable options here, so please read carefully. These options are all very important.</p>' . "\n";
     echo '<p>The ClickBank® IPN service will notify optimizeMember whenever a refund or chargeback occurs. For example, if you issue a refund to an unhappy Customer through ClickBank®, optimizeMember will eventually be notified, 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-eots-remove-ccaps">' . "\n";
     echo 'Membership EOTs also Remove all Custom Capabilities?' . "\n";
     echo '</label>' . "\n";
     echo '</th>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<td>' . "\n";
     echo '<select name="ws_plugin__optimizemember_eots_remove_ccaps" id="ws-plugin--optimizemember-eots-remove-ccaps">' . "\n";
     echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["eots_remove_ccaps"] ? ' selected="selected"' : '') . '>Yes (an EOT also results in the loss of any Custom Capabilities a User/Member may have)</option>' . "\n";
     echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["eots_remove_ccaps"] ? ' selected="selected"' : '') . '>No (an EOT has no impact on any Custom Capabilities a User/Member may have)</option>' . "\n";
     echo '</select><br />' . "\n";
     echo '<em>NOTE: If Refunds/Reversals trigger an Immediate EOT (see setting below); Custom Capabilities will always be removed when/if a Refund or Reversal occurs. In other words, this setting is ignored for Refunds/Reversals (IF they trigger an Immediate EOT — based on your configuration below). If you prefer to review all Refunds/Reversals for yourself, please choose that option below.</em>' . "\n";
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     echo '<th>' . "\n";
     echo '<label for="ws-plugin--optimizemember-eot-grace-time">' . "\n";
     echo 'EOT Grace Time (in seconds):' . "\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_grace_time" id="ws-plugin--optimizemember-eot-grace-time" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["eot_grace_time"]) . '" /><br />' . "\n";
     echo '<em>This is represented in seconds. For example, a value of: <code>86400</code> = 1 day. Your EOT Grace Time; is the amount of time you will offer as a grace period (if any). Most site owners will give customers an additional 24 hours of access; just to help avoid any negativity that may result from a customer losing access sooner than they might expect. You can disable EOT Grace Time by setting this to: <code>0</code>. Note: there is NO Grace Time applied when/if a Refund or Reversal occurs. If Refunds/Reversals trigger an Immediate EOT (see setting below); there is never any Grace Time applied in that scenario.</em>' . "\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 '<em>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 impact</a> optimizeMember\'s internal API Notifications for Refund/Reversal events.</em>' . "\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 '<em>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. For example, if I buy one year of access, and then I buy another year of access (before my first year is totally used up); I end up with everything I paid you for (now over 1 year of access) if this is set to <code>Yes</code>. If this was set to <code>No</code>, the EOT Time would be reset when I make the second purchase; leaving me with only 1 year of access, starting the date of my second purchase.</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-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";
 }
示例#18
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";
 }
示例#19
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 / Scripting</h2>' . "\n";
     /**/
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     /**/
     do_action("ws_plugin__optimizemember_during_scripting_page_before_left_sections", get_defined_vars());
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_api_easy_way", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_api_easy_way", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="The Extremely Easy Way">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-easy-way-section">' . "\n";
         echo '<h3>The Extremely Easy Way ( no scripting required )</h3>' . "\n";
         echo '<p>From your optimizeMember Restriction Options panel, you may restrict access to certain Posts, Pages, Tags, Categories, and/or URIs based on a Member\'s Level. The optimizeMember Restriction Options panel makes it easy for you. All you do is type in the basics of what you want to restrict access to, and those sections of your site will be off limits to non-Members. That being said, there are times when you might need to have greater control over which portions of your site can be viewed by non-Members, or Members at different Levels; with different Capabilities. This is where API Scripting with Conditionals comes in.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_easy_way", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_api_easy_way", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_api_simple_way", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_api_simple_way", get_defined_vars());
         /**/
         if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site()) {
             echo '<div class="ws-menu-page-group" title="Simple/Shortcode Conditionals">' . "\n";
             /**/
             echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-simple-way-section">' . "\n";
             echo '<h3>Simple Conditionals ( via WordPress Shortcodes )</h3>' . "\n";
             echo '<p>In an effort to give you even more control over access restrictions, optimizeMember makes Simple Conditionals available to you from within WordPress, using Shortcodes that are fully compatible with both the Visual Editor, and also the HTML Tab in WordPress. In this section, we\'ll demonstrate several functions that are possible using Shortcodes: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>. To make use of these functions, please follow our code samples below. Using Shortcodes, it\'s easy to build Simple Conditionals within your content; based on a Member\'s Level, or even based on Custom Capabilities. optimizeMember\'s Shortcodes can be used inside a Post/Page, and also inside Text Widgets.</p>' . "\n";
             echo '<p><em>There are <strong>two different Shortcodes</strong> being demonstrated here:<br /><strong>1. <code>opmIf</code></strong> ( for testing simple conditional expressions ).<br /><strong>2. <code>opmGet</code></strong> ( to get an API Constant value, a Custom Field, or meta key ).</em></p>' . "\n";
             do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_simple_way_farm", get_defined_vars());
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #1:</strong> Full access for anyone that is logged in.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-is-user-logged-in-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #2:</strong> Full access for any Member with a Level >= 1.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-current-user-can-full-access-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #3:</strong> Specific content for each different Member Level.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-current-user-is-specific-content-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #4:</strong> Simple Conditionals w/ integrated use of [opmGet /].</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-1-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #5:</strong> Using multiple Conditionals together, and even nesting other Shortcodes.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-2-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #6:</strong> Using multiple Conditionals together, and even nesting Conditionals.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-3-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
             echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 &amp; 3.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 &amp; 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 &amp; 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
             echo '<p><em>* WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to optimizeMember. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><em><strong>optimizeMember supports many <a href="http://codex.wordpress.org/Conditional_Tags" target="_blank" rel="external">Conditional Tags</a> in WordPress.</strong> Including: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>, <strong><code>is_admin()</code></strong>, <strong><code>is_blog_admin()</code></strong>, <strong><code>is_user_admin()</code></strong>, <strong><code>is_network_admin()</code></strong>, <strong><code>is_404()</code></strong>, <strong><code>is_home()</code></strong>, <strong><code>is_front_page()</code></strong>, <strong><code>is_singular(ID|slug|{slug,ID})"</code></strong>, <strong><code>is_single(ID|slug|{slug,ID})</code></strong>, <strong><code>is_page(ID|slug|{slug,ID})</code></strong>, <strong><code>is_page_template(file.php)</code></strong>, <strong><code>is_attachment()</code></strong>, <strong><code>is_feed()</code></strong>, <strong><code>is_archive()</code></strong>, <strong><code>is_search()</code></strong>, <strong><code>is_category(ID|slug|{slug,ID})</code></strong>, <strong><code>is_tax(taxonomy,term)</code></strong>, <strong><code>is_tag(slug|{slug,slug})"</code></strong>, <strong><code>has_tag(slug|{slug,slug})"</code></strong>, <strong><code>is_author(ID|slug|{slug,ID})</code></strong>, <strong><code>is_date()</code></strong>, <strong><code>is_day()</code></strong>, <strong><code>is_month()</code></strong>, <strong><code>is_time()</code></strong>, <strong><code>is_year()</code></strong>, <strong><code>is_sticky(ID)</code></strong>, <strong><code>is_paged()</code></strong>, <strong><code>is_preview()</code></strong>, <strong><code>is_comments_popup()</code></strong>, <strong><code>in_the_loop()</code></strong>, <strong><code>comments_open()</code></strong>, <strong><code>pings_open()</code></strong>, <strong><code>has_excerpt(ID)</code></strong>, <strong><code>has_post_thumbnail(ID)</code></strong>.</em></p>' . "\n";
             /**/
             echo '<p><em><strong>Passing arguments into a Simple Conditional:</strong></em></p>' . "\n";
             echo '<p><em>1. True/false -> ex: <code>current_user_can()</code> / <code>!current_user_can()</code><br />2. False explicitly -> ex: <code>current_user_cannot()</code><br />3. Passing an ID -> ex: <code>is_page(24)</code><br />4. Passing a Slug -> ex: <code>is_page(my-cool-page)</code><br />5. Passing an Array -> ex: <code>is_page({my-cool-page,24,about,contact-form})</code></em></p>' . "\n";
             echo '<p><em>*Tip: do NOT use spaces inside Conditionals.<br /> <strong class="ws-menu-page-error-hilite">BAD</strong> <code>is_page(My Membership Options Page)</code><br />- use slugs or IDs instead, no spaces.</em></p>' . "\n";
             /**/
             echo '<p><em><strong>Implementing AND/OR Conditional expressions:</strong></em></p>' . "\n";
             echo '<p><em>*Tip: do NOT mix AND/OR expressions.<br /> <strong class="ws-menu-page-error-hilite">BAD</strong> <code>is_user_logged_in() AND is_page(1) OR is_page(2)</code><br />- use one or the other; do NOT mix AND/OR together.</em></p>' . "\n";
             echo '<p><em><strong class="ws-menu-page-hilite">If you need to have both types of logic, use nesting:</strong></em></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-nesting.x-php")) . '</p>' . "\n";
             echo '</div>' . "\n";
             /**/
             echo '</div>' . "\n";
         } else {
             echo '<div class="ws-menu-page-group" title="Simple/Shortcode Conditionals">' . "\n";
             /**/
             echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-simple-way-section">' . "\n";
             echo '<h3>Simple Conditionals ( via WordPress Shortcodes )</h3>' . "\n";
             echo '<p>In an effort to give you even more control over access restrictions, optimizeMember makes Simple Conditionals available to you from within WordPress, using Shortcodes that are fully compatible with both the Visual Editor, and also the HTML Tab in WordPress. In this section, we\'ll demonstrate several functions that are possible using Shortcodes: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>, <strong><code>current_user_is_for_blog(blog_id,role)</code></strong>, <strong><code>current_user_is_not_for_blog(blog_id,role)</code></strong>, <strong><code>current_user_can_for_blog(blog_id,capability)</code></strong>, <strong><code>current_user_cannot_for_blog(blog_id,capability)</code></strong>. To make use of these functions, please follow our code samples below. Using Shortcodes, it\'s easy to build Simple Conditionals within your content; based on a Member\'s Level, or even based on Custom Capabilities. optimizeMember\'s Shortcodes can be used inside a Post/Page, and also inside Text Widgets.</p>' . "\n";
             echo '<p><em>There are <strong>two different Shortcodes</strong> being demonstrated here:<br /><strong>1. <code>opmIf</code></strong> ( for testing simple conditional expressions ).<br /><strong>2. <code>opmGet</code></strong> ( to get an API Constant value, a Custom Field, or meta key ).</em></p>' . "\n";
             do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_simple_way", get_defined_vars());
             /**/
             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 class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #1:</strong> Full access for anyone that is logged in.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-is-user-logged-in.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #2:</strong> Full access for any Member with a Level >= 1.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-current-user-can-full-access.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #3:</strong> Specific content for each different Member Level.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-current-user-is-specific-content.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #4:</strong> Simple Conditionals w/ integrated use of [opmGet /].</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-1.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #5:</strong> Using multiple Conditionals together, and even nesting other Shortcodes.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-2.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #6:</strong> Using multiple Conditionals together, and even nesting Conditionals.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-3.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
             echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 &amp; 3.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 &amp; 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 &amp; 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
             echo '<p><em>* WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to optimizeMember. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><em><strong>optimizeMember supports ALL <a href="http://codex.wordpress.org/Conditional_Tags" target="_blank" rel="external">Conditional Tags</a> in WordPress.</strong> Including, but not limited to: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>, <strong><code>current_user_is_for_blog(blog_id,role)</code></strong>, <strong><code>current_user_is_not_for_blog(blog_id,role)</code></strong>, <strong><code>current_user_can_for_blog(blog_id,capability)</code></strong>, <strong><code>current_user_cannot_for_blog(blog_id,capability)</code></strong>, <strong><code>is_multisite()</code></strong>, <strong><code>is_main_site()</code></strong>, <strong><code>is_super_admin()</code></strong>, <strong><code>is_admin()</code></strong>, <strong><code>is_blog_admin()</code></strong>, <strong><code>is_user_admin()</code></strong>, <strong><code>is_network_admin()</code></strong>, <strong><code>is_404()</code></strong>, <strong><code>is_home()</code></strong>, <strong><code>is_front_page()</code></strong>, <strong><code>is_comments_popup()</code></strong>, <strong><code>is_singular(ID|slug|{slug,ID})"</code></strong>, <strong><code>is_single(ID|slug|{slug,ID})</code></strong>, <strong><code>is_page(ID|slug|{slug,ID})</code></strong>, <strong><code>is_page_template(file.php)</code></strong>, <strong><code>is_attachment()</code></strong>, <strong><code>is_feed()</code></strong>, <strong><code>is_trackback()</code></strong>, <strong><code>is_archive()</code></strong>, <strong><code>is_search()</code></strong>, <strong><code>is_category(ID|slug|{slug,ID})</code></strong>, <strong><code>is_tax(taxonomy,term)</code></strong>, <strong><code>is_tag(slug|{slug,slug})"</code></strong>, <strong><code>has_tag(slug|{slug,slug})"</code></strong>, <strong><code>is_author(ID|slug|{slug,ID})</code></strong>, <strong><code>is_date()</code></strong>, <strong><code>is_day()</code></strong>, <strong><code>is_month()</code></strong>, <strong><code>is_time()</code></strong>, <strong><code>is_year()</code></strong>, <strong><code>is_sticky(ID)</code></strong>, <strong><code>is_paged()</code></strong>, <strong><code>is_preview()</code></strong>, <strong><code>is_comments_popup()</code></strong>, <strong><code>in_the_loop()</code></strong>, <strong><code>comments_open()</code></strong>, <strong><code>pings_open()</code></strong>, <strong><code>has_excerpt(ID)</code></strong>, <strong><code>has_post_thumbnail(ID)</code></strong>, <strong><code>is_active_sidebar(ID|number)</code></strong>.</em></p>' . "\n";
             /**/
             echo '<p><em><strong>Passing arguments into a Simple Conditional:</strong></em></p>' . "\n";
             echo '<p><em>1. True/false -> ex: <code>current_user_can()</code> / <code>!current_user_can()</code><br />2. False explicitly -> ex: <code>current_user_cannot()</code><br />3. Passing an ID -> ex: <code>is_page(24)</code><br />4. Passing a Slug -> ex: <code>is_page(my-cool-page)</code><br />5. Passing an Array -> ex: <code>is_page({my-cool-page,24,about,contact-form})</code></em></p>' . "\n";
             echo '<p><em>*Tip: do NOT use spaces inside Conditionals.<br /> <strong class="ws-menu-page-error-hilite">BAD</strong> <code>is_page(My Membership Options Page)</code><br />- use slugs or IDs instead, no spaces.</em></p>' . "\n";
             /**/
             echo '<p><em><strong>Implementing AND/OR Conditional expressions:</strong></em></p>' . "\n";
             echo '<p><em>*Tip: do NOT mix AND/OR expressions.<br /> <strong class="ws-menu-page-error-hilite">BAD</strong> <code>is_user_logged_in() AND is_page(1) OR is_page(2)</code><br />- use one or the other; do NOT mix AND/OR together.</em></p>' . "\n";
             echo '<p><em><strong class="ws-menu-page-hilite">If you need to have both types of logic, use nesting:</strong></em></p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-nesting.x-php")) . '</p>' . "\n";
             echo '</div>' . "\n";
             /**/
             echo '</div>' . "\n";
         }
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_api_simple_way", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_api_advanced_way", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_api_advanced_way", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Advanced/PHP Conditionals">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-advanced-way-section">' . "\n";
         echo '<h3>The Advanced Way ( some PHP scripting required )</h3>' . "\n";
         echo '<p>In an effort to give you even more control over access restrictions, optimizeMember makes some PHP functions, and also some PHP Constants, available to you from within WordPress. In this section, we\'ll demonstrate several functions: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is("role")</code></strong>, <strong><code>current_user_is_not("role")</code></strong>, <strong><code>current_user_can("capability")</code></strong>, <strong><code>current_user_cannot("capability")</code></strong>, <strong><code>current_user_is_for_blog($blog_id,"role")</code></strong>, <strong><code>current_user_is_not_for_blog($blog_id,"role")</code></strong>, <strong><code>current_user_can_for_blog($blog_id,"capability")</code></strong>, &amp; <strong><code>current_user_cannot_for_blog($blog_id,"capability")</code></strong>. To make use of these functions, please follow our PHP code samples below. Using PHP, is a very powerful way to build Advanced Conditionals within your content; based on a Member\'s Level, Custom Capabilities, and/or other factors. In order to use PHP scripting inside your Posts/Pages, you\'ll need to install this handy plugin ( <a href="http://wordpress.org/extend/plugins/php-execution-plugin/" target="_blank" rel="external">PHP Execution</a> ).</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_advanced_way", get_defined_vars());
         /**/
         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 class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #1:</strong> Full access for anyone that is logged in.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/is-user-logged-in.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #2:</strong> Full access for any Member with a Level >= 1.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-can-full-access.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #3:</strong> Specific content for each different Member Level.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-is-specific-content.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #4:</strong> Using optimizeMember API Conditionals, supplementing WordPress core functions.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/s2-conditional-supplements-1.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #5:</strong> Using optimizeMember API Conditionals, supplementing WordPress core functions.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/s2-conditional-supplements-2.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #6:</strong> Using multiple Conditionals together, and even nesting Conditionals.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/s2-conditional-supplements-3.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #7:</strong> Using optimizeMember API Constants, instead of conditional functions.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-can-constants-1.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #8:</strong> Using optimizeMember API Constants, instead of conditional functions.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-can-constants-2.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
         echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 &amp; 3.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 &amp; 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 &amp; 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
         echo '<p><em>* WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to optimizeMember. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_api_advanced_way", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_api_queries", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_api_queries", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Advanced/PHP Query Conditionals">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-advanced-way-section">' . "\n";
         echo '<h3>Advanced Query Conditionals ( some PHP scripting required )</h3>' . "\n";
         echo '<p>optimizeMember provides several built-in API Functions that are tailored to meet the needs of developers integrating optimizeMember into their themes. Such as: <strong><code>is_protected_by_s2member($id, "[category,tag,post,page,singular,uri]")</code></strong>, <strong><code>is_permitted_by_s2member($id, "[category,tag,post,page,singular,uri]")</code></strong>, <strong><code>is_category_protected_by_s2member($cat_id)</code></strong>, <strong><code>is_category_permitted_by_s2member($cat_id)</code></strong>, <strong><code>is_tag_protected_by_s2member($tag_id [slug or tag name])</code></strong>, <strong><code>is_tag_permitted_by_s2member($tag_id [slug or tag name])</code></strong>, <strong><code>is_post_protected_by_s2member($post_id)</code></strong>, <strong><code>is_post_permitted_by_s2member($post_id)</code></strong>, <strong><code>is_page_protected_by_s2member($page_id)</code></strong>, <strong><code>is_page_permitted_by_s2member($page_id)</code></strong>, <strong><code>is_uri_protected_by_s2member($uri [or full url])</code></strong>, <strong><code>is_uri_permitted_by_s2member($uri [ or full url])</code></strong>.</p>' . "\n";
         echo '<p>In addition, there are two special functions that can be applied by theme authors before making custom queries: <strong><code>attach_optimizemember_query_filters()</code></strong>, <strong><code>detach_optimizemember_query_filters()</code></strong>. These can be used before and after a call to <strong><code>query_posts()</code></strong> for example. optimizeMember will automatically filter all protected content ( not available to the current User/Member ).</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_queries", get_defined_vars());
         /**/
         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 class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #1:</strong> Pre-filtering custom queries in WordPress.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/custom-queries.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #2:</strong> OR, instead of pre-filtering; check Access Restrictions in The Loop.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/custom-queries-loop.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #3:</strong> Checking Tag Restrictions.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/specific-tag-restrictions.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #4:</strong> Checking Category Restrictions.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/specific-category-restrictions.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #5:</strong> Checking Page Restrictions.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/specific-page-restrictions.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Example #6:</strong> Checking Post Restrictions, including Custom Post Types.</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/specific-post-restrictions.x-php")) . '</p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_api_queries", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_custom_capabilities", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_custom_capabilities", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Custom Capabilities ( Packages )">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-custom-capabilities-section">' . "\n";
         echo '<h3>Packaging Together Custom Capabilities w/ Membership</h3>' . "\n";
         echo '<p>Using one of optimizeMember\'s Payment Button and/or Form Generators, you can add Custom Capabilities in comma-delimited format. optimizeMember builds upon existing functionality offered by <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank" rel="external">WordPress Roles/Capabilities</a>. optimizeMember supports Free Subscribers <em>( at Level #0 )</em>, and several Primary Roles created by the optimizeMember plugin <em>( i.e. optimizeMember Levels 1-4, or up to the number of configured Levels )</em>. Each optimizeMember Level <em>( aka: optimizeMember Role )</em> provides the Capability <code>current_user_can("access_optimizemember_level0"), 1, 2, 3, 4</code>, where <code>access_optimizemember_level[0-4]</code> is the Capability associated with each Role; and Membership Levels provide incremental access <em>( i.e. Level #4 Members can also access content at Levels 0, 1, 2, and 3 beneath them )</em>. In short, these Level-based permissions are the default Capabilities that come with each Membership Level being sold on your site.</p>' . "\n";
         echo '<p>Now, if you\'d like to package together some variations of each Membership Level that you\'re selling, you can! All you do is add <strong>Custom Capabilities</strong> whenever you create your Payment Button and/or Form Shortcode ( <em>there is a field in the Button &amp; Form Generators where you can enter Custom Capabilities</em> ). You can sell Membership Packages that come with Custom Capabilities, and even with custom prices.</p>' . "\n";
         echo '<p>Custom Capabilities are an extension to a feature that already exists in WordPress. The <code>current_user_can()</code> function, can be used to test for these additional Capabilities that you allow. Whenever a Member completes the checkout process, after having purchased a Membership from you ( one that included Custom Capabilities ), optimizeMember will add those Custom Capabilities to the account for that specific Member.</p>' . "\n";
         echo '<p>Custom Capabilities are always prepended with <code>access_optimizemember_ccap_</code>. You fill in the last part, with ONLY lowercase alpha-numerics and/or underscores. For example, let\'s say you want to sell Membership Level #1, as is. But, you also want to sell a slight variation of Membership Level #1, that includes the ability to access the Music &amp; Video sections of your site. So, instead of selling this additional access under a whole new Membership Level, you could just sell a modified version of Membership Level #1. Add the the Custom Capabilities: <code>music,videos</code>. Once a Member has these Capabilities, you can test for these Capabilities using <code>current_user_can("access_optimizemember_ccap_music")</code> and <code>current_user_can("access_optimizemember_ccap_videos")</code>.</p>' . "\n";
         echo '<p>The important thing to realize, is that Custom Capabilities, are just that. They\'re custom. optimizeMember only deals with the default Capabilities that it uses. If you start using Custom Capabilities, you MUST use Simple or Advanced Conditionals ( <em>i.e. <code>current_user_can()</code> logic</em> ) to test for them. Either in your theme files with PHP, or in Posts/Pages using Simple Conditionals <em>( powered by Shortcodes )</em>.</p>' . "\n";
         echo '<p><strong>*New*</strong> In the latest versions of optimizeMember, you can automatically require certain Custom Capabilities on a per Post/Page basis. So now, optimizeMember <em>( if you prefer )</em> CAN handle Custom Capabilities for you automatically! Whenever you edit a Post/Page <em>( i.e. there is a Meta Box for optimizeMember in your Post/Page editing station )</em>... you can tell optimizeMember to require certain Custom Capabilities that you type in, using comma-delimited format. In other words, you will need to type in some of the trigger words that you used whenever you created your Payment Buttons/Forms. This way paying Members will have the Custom Capabilities to view different kinds of content that you offer.</p>' . "\n";
         echo '<p><strong>*New*</strong> By default, a Checkout Button or Form generated by optimizeMember is designed to (Add) Custom Capabilities to any that may or may not already exist for a particular User/Member. However, starting with optimizeMember v110815+, you can tell optimizeMember to (Remove All) Custom Capabilities, and then (Add) only the new ones that you specify. This is accomplished on a per Form/Button basis by preceding your comma-delimited list of Custom Capabilities with `-all`. For further details on this topic, click the <a href="#" onclick="alert(\'*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> icon next to the Custom Capabilities field in any Button/Form Generator supplied by optimizeMember.</p>' . "\n";
         echo '<p><strong>*New*</strong> Independent Custom Capabilities. You can now sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site <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. For further details, please check your Dashboard, under: <code>optimizeMember -> PayPal Buttons -> Capability (Buy Now) Buttons</code>.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_custom_capabilities", get_defined_vars());
         /**/
         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>.<br />' . "\n";
         echo '<strong>See Also:</strong> <a href="http://wordpress.org/extend/plugins/user-role-editor/" target="_blank" rel="external">Plugins -> User Role Editor</a> <em>( may come in handy for some )</em>.</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Custom Capabilities:</strong> ( music,videos ):</p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-can-ccaps-1.x-php")) . '</p>' . "\n";
         /**/
         echo '<p><strong>Custom Capabilities:</strong> ( ebooks,reports,tips ):</p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-can-ccaps-2.x-php")) . '</p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_custom_capabilities", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_custom_capability_files", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_custom_capability_files", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Custom Capability &amp; Member Level Files">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-custom-capability-files-section">' . "\n";
         echo '<h3>Restricting Files, Based On Custom Capabilities</h3>' . "\n";
         echo '<p>If you\'re NOT familiar with Custom Capabilities yet, please read the section above, titled: `Custom Capability Packages`, and also see: `optimizeMember -> Download Options`, both as primers; BEFORE you read this section. Once you understand the basic concept of Custom Capabilities &amp; Protected File Downloads, you\'ll see that ( by default ) optimizeMember does NOT handle File Download Protection with respect to Custom Capabilities. That\'s where Custom Capability Sub-directories come in.</p>' . "\n";
         echo '<p>You can create Custom Capability Sub-directories under: <code>' . esc_html(c_ws_plugin__optimizemember_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '</code>. For instance, if you have a Custom Capability <code>music</code>, you can place protected files that should ONLY be accessible to Members with <code>access_optimizemember_ccap_music</code>, inside: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-ccap-music/</code>. Some examples are provided below.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_custom_capability_files", get_defined_vars());
         /**/
         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 class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Custom Capabilities:</strong> ( music,videos )</p>' . "\n";
         echo '<p>Sub-Directory: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-ccap-music</code><br />Sub-Directory: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-ccap-videos</code></p>' . "\n";
         echo '<p>Protected File: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-ccap-music/file.mp3</code><br />Protected File: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-ccap-videos/file.avi</code></p>' . "\n";
         echo '<p>Now, here are some link examples, using Custom Capability Sub-directories:</p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/ccap-file-downloads.x-php")) . '</p>' . "\n";
         echo '<p><em>These links will ONLY work for Members who are logged-in, with the proper Capabilities.</em></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Membership Levels:</strong> ( this also works fine )</p>' . "\n";
         echo '<p>Sub-Directory: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level0</code><br />Sub-Directory: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level1</code><br />Sub-Directory: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level2</code><br />Sub-Directory: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level3</code><br />Sub-Directory: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level4</code></p>' . "\n";
         echo '<p>Protected File: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level0/tiger.doc</code><br />Protected File: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level1/zebra.pdf</code><br />Protected File: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level2/elephant.doc</code><br />Protected File: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level3/rhino.pdf</code><br />Protected File: <code>/' . esc_html(c_ws_plugin__optimizemember_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["files_dir"])) . '/access-optimizemember-level4/lion.doc</code></p>' . "\n";
         echo '<p>Now, here are some link examples, using Member Level Sub-directories:</p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/level-file-downloads.x-php")) . '</p>' . "\n";
         echo '<p><em>These links will ONLY work for Members who are logged-in, with an adequate Membership Level.</em></p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_custom_capability_files", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_api_advanced_dripping", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_api_advanced_dripping", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="optimizeMember Content Dripping">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-advanced-dripping-section">' . "\n";
         echo '<h3>Dripping Content ( some PHP scripting required )</h3>' . "\n";
         echo '<p>Content Dripping is the gradual, pre-scheduled release of premium website content to paying Members. This has become increasingly popular, because it allows older Members; those who have paid you more, due to recurring charges; to acquire access to more content progressively; based on their original paid registration time. It also gives you ( as the site owner ), the ability to launch multiple membership site portals, operating on autopilot, without any direct day-to-day involvement in a content release process. This requires some PHP scripting. In order to use PHP scripting inside your Posts/Pages, you\'ll need to install this handy plugin ( <a href="http://wordpress.org/extend/plugins/php-execution-plugin/" target="_blank" rel="external">PHP Execution</a> ).</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_advanced_dripping", get_defined_vars());
         /**/
         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 class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>To drip content using <code>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS</code>:</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-paid-registration-days-dripping.x-php")) . '</p>' . "\n";
         /**/
         echo '<p><em>There are more examples on this page, under the sub-section "optimizeMember PHP/API Constants". You\'ll see that optimizeMember provides you with access to several PHP/API Constants, which will assist you in dripping content. Some of the most relevant API Constants include: <code>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_TIME</code>, <code>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS</code>, <code>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_TIME</code>, <code>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_DAYS</code>; and there are many others.</em></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Very Advanced Content Dripping ( some PHP required )</h3>' . "\n";
         echo '<p>If you plan on dripping content in VERY advanced ways, you can tap into optimizeMember\'s recorded history of all Paid Registration Times. ( i.e. <code>' . esc_html('<?php $time = optimizemember_paid_registration_time("level1"); ?>') . '</code> ) will give you a timestamp at which a Member first paid for Level#1 access. If they\'ve never paid for Level#1 access, the function will return 0. optimizeMember keeps a recorded history of timestamps associated with each Level that a Member gains access to, throughout the lifetime of their account. * NOTE: This requires optimizeMember v3.3+. Previous versions of optimizeMember did NOT record this information. If you implement this functionality on an upgraded installation of optimizeMember, please remember that optimizeMember will have NO Paid Registration Time for any Member you acquired prior to installing optimizeMember v3.3+. <em>Check the forums for work-arounds.</em></p>' . "\n";
         echo '<p><strong>Here is the function documentation for PHP/WordPress developers:</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/s2member-paid-registration-time.x-php")) . '</p>' . "\n";
         echo '<p><strong>Here are some actual examples that should give you some ideas:</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/s2member-paid-registration-time-examples.x-php")) . '</p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_api_advanced_dripping", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_profile_modifications", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_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. See: <code>optimizeMember -> General Options -> Profile Modifications</code>.</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 ( as the site owner ), with a special Shortcode: <code>[optimizeMember-Profile /]</code> that you can place into your Login Welcome Page, or any Post/Page for that matter ( even into a Text Widget ). 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 ( with a bare-bones format ), 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";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_profile_modifications", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Shortcode:</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 / Code Sample</strong> ( standard link tag ):</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-1-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
         /**/
         echo '<p style="margin-top:20px;"><strong>Stand-Alone / Code Sample</strong> ( open the link in a 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 '<p style="margin-top:20px;"><strong>Stand-Alone / Code Sample</strong> ( embed the Form with an IFRAME tag ):</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-3-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_scripting_page_during_left_sections_after_profile_modifications", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_api_constants", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_api_constants", get_defined_vars());
         /**/
         if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site()) {
             echo '<div class="ws-menu-page-group" title="opmGet / optimizeMember API Constants">' . "\n";
             /**/
             echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-constants-section">' . "\n";
             echo '<h3>Using opmGet w/ optimizeMember API Constants</h3>' . "\n";
             echo '<p>A Constant, is an identifier ( a name ) for a simple value. Below is a comprehensive list that includes all of the defined Constants available to you. We recommend using some of these Constants in the creation of your Login Welcome Page; which is described in the optimizeMember General Options Panel. These are NOT required, but you can get pretty creative with your Login Welcome Page if you know how to use the <code>[opmGet constant="" /]</code> Shortcode for WordPress.</p>' . "\n";
             echo '<p>For example, you might use <code>[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LABEL" /]</code> to display the type of Membership a Customer has.</em></p>' . "\n";
             do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_constants_farm", get_defined_vars());
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_VERSION</strong><br />This will always be a (string) with the current optimizeMember version. Available since optimizeMember 3.0. Dated versions began with optimizeMember v110604.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_LOGIN_COUNTER</strong><br />This will always be (int) <code>-1</code> or higher <em>( representing the number of times a User/Member has logged into your site )</em>. <code>-1</code> if no User is logged in. <code>0</code> if the current User has NEVER logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_IS_LOGGED_IN</strong><br />This will always be (bool) true or false. True if a User/Member is currently logged in with an Access Level >= 0.</p>' . "\n";
             echo '<p><em>See: <code>OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LEVEL</code> below for a full explanation.</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER</strong><br />This will always be (bool) true or false. True if a Member is currently logged in with an Access Level >= 1.</p>' . "\n";
             echo '<p><em>See: <code>OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LEVEL</code> below for a full explanation.</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LEVEL</strong><br />This will always be (int) <code>-1</code> thru <code>4</code> <em>( or, up to the total number Membership Levels you\'ve configured )</em>. <code>-1</code> if not logged in. <code>0</code> if logged in as a Free Subscriber.</p>' . "\n";
             echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
             echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 &amp; 3.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 &amp; 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 &amp; 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
             echo '<p><em>* WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to optimizeMember. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LABEL</strong><br />This will always be a (string) containing the Membership Label associated with the current User\'s account. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_SUBSCR_ID</strong><br />This will always be a (string) containing the current User\'s Paid Subscr. ID. If they\'ve NOT paid yet, this will be an empty string. Also empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_SUBSCR_OR_WP_ID</strong><br />This will always be a (string) containing the current User\'s Paid Subscr. ID. If they\'ve NOT paid yet, this will be their WordPress User ID#. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_SUBSCR_GATEWAY</strong><br />This will always be a (string) containing the current User\'s Paid Subscr. Gateway. If they\'ve NOT paid yet, this will be empty. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_CUSTOM</strong><br />This will always be a (string) containing the current User\'s Custom String; associated with their optimizeMember Profile. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_TIME</strong><br />This will always be an (int); in the form of a Unix timestamp. 0 if not logged in. This holds the recorded time at which the User originally registered their Username for access to your site; for free or otherwise. <strong>* Note:</strong> this is NOT the same as <code>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_TIME</code>, which could be used as an alternative, depending on your intended usage.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_TIME</strong><br />This will always be an (int); in the form of a Unix timestamp. However, this will be 0 if they\'re not logged in; or if they\'ve never paid you at all <em>( i.e. if they\'re still a Free Subscriber )</em>. This holds the recorded time at which the Member originally registered their Username (or upgraded for) any type of "paid" access to your site. This value is preserved for the lifetime of their account, even if they upgrade, and even if they\'re demoted at some point. Once this value is recorded, it never changes under any circumstance. <strong>* Note:</strong> this is NOT the same as <code>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_TIME</code>, which could be used as an alternative, depending on your intended usage.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS</strong><br />This will always be an (int); in the form of a Unix timestamp. However, this will be 0 if they\'re not logged in; or if they\'ve never paid you at all <em>( i.e. if they\'re still a Free Subscriber )</em>. This is the number of days that have passed since the Member originally registered their Username (or upgraded for) any type of "paid" access to your site. The underlying timestamp behind this value is preserved for the lifetime of their account, even if they upgrade, and even if they\'re demoted at some point. Once the underlying timestamp behind this value is recorded, it never changes under any circumstance. <strong>* Note:</strong> this is NOT the same as <code>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_DAYS</code>, which could be used as an alternative, depending on your intended usage.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_DAYS</strong><br />This will always be an (int). 0 if not logged in. This is the number of days that have passed since the User originally registered their Username for access to your site; for free or otherwise. <strong>* Note:</strong> this is NOT the same as <code>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS</code>, which could be used as an alternative, depending on your intended usage.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DISPLAY_NAME</strong><br />This will always be a (string) containing the current User\'s Display Name. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_FIRST_NAME</strong><br />This will always be a (string) containing the current User\'s First Name. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_LAST_NAME</strong><br />This will always be a (string) containing the current User\'s Last Name. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_LOGIN</strong><br />This will always be a (string) containing the current User\'s Username. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_EMAIL</strong><br />This will always be a (string) containing the current User\'s Email Address. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_IP</strong><br />This will always be a (string) containing the current User\'s IP Address, even when/if NOT logged-in. Taken from <code>$_SERVER["REMOTE_ADDR"]</code>. Empty if browsing anonymously.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_IP</strong><br />This is a (string) containing the IP Address the current User had at the time they registered. Taken from <code>$_SERVER["REMOTE_ADDR"]</code>. Empty if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_ID</strong><br />This will always be an (int) containing the current User\'s ID# in WordPress. However, it will be 0 if not logged in.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             #echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_FIELDS</strong><br />This will always be a JSON encoded array, in (string) format. An empty JSON encoded array, in (string) format, if not logged in. This JSON encoded array will contain the following fields: <code>id, ip, reg_ip, email, login, first_name, last_name, display_name, subscr_id, subscr_or_wp_id, subscr_gateway, custom</code>. If you\'ve configured additional Custom Fields, those Custom Fields will also be added to this array. You can do <code>print_r(json_decode(OPTIMIZEMEMBER_CURRENT_USER_FIELDS, true));</code> to get a full list for testing.</p>' . "\n";
             /**/
             #echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DOWNLOADS_ALLOWED</strong><br />This will always be an (int) value >= 0. This indicates how many unique files they\'re allowed to download. 0 means no access.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED</strong><br />This will always be (bool) true or false. A value of true means their allowed downloads are >= 999999999, and false means it is not. This is useful if you are allowing unlimited ( 999999999 ) downloads on some Membership Levels. You can display `Unlimited` instead of a number.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY</strong><br />This will always be an (int) value >= 0. This indicates how many unique files they\'ve downloaded in the current period.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS</strong><br />This will always be an (int) value >= 0. This indicates how many total days make up the current period. 0 means no access.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL</strong><br />This is a Stand-Alone URL where a User can modify their Profile. In addition to this Stand-Alone version, optimizeMember also makes a Shortcode available which produces an Inline Profile Editing Form. Use <code>[optimizeMember-Profile /]</code> in any Post/Page, or even in a Text Widget if you like.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL</strong><br />This is the full URL to the Limit Exceeded Page ( informational ).</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID</strong><br />This is the Page ID that was used to generate the full URL.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_MEMBERSHIP_OPTIONS_PAGE_URL</strong><br />This is the full URL to the Membership Options Page ( the signup page ).</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_MEMBERSHIP_OPTIONS_PAGE_ID</strong><br />This is the Page ID that was used to generate the full URL.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LOGIN_WELCOME_PAGE_URL</strong><br />This is the full URL to the Login Welcome Page ( the User\'s account page ). * This could also be the full URL to a Special Redirection URL ( if you configured one ). See <code>optimizeMember -> General Options -> Login Welcome Page</code>.</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_LOGIN_WELCOME_PAGE_ID</strong><br />This is the Page ID that was used to generate the full URL. * In the case of a Special Redirection URL, this ID is not really applicable.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LOGIN_PAGE_URL</strong><br />This is the full URL to the Membership Login Page ( the WordPress login page ).</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LOGOUT_PAGE_URL</strong><br />This is the full URL to the Membership Logout Page ( the WordPress logout page ).</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LEVELn_LABEL</strong><br />This is the (string) Label that you configured for a particular Membership Level #. Replace <code>n</code> with a numeric Membership Level #.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED</strong><br />This is the (int) allowed downloads for a particular Membership Level #. Replace <code>n</code> with a numeric Membership Level #.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS</strong><br />This is the (int) allowed download days for a particular Membership Level #. Replace <code>n</code> with a numeric Membership Level #.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS</strong><br />This is the (string) list of extensions to display inline.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_REG_EMAIL_FROM_NAME</strong><br />This is the Name that outgoing email messages are sent by.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_REG_EMAIL_FROM_EMAIL</strong><br />This is the Email Address that outgoing messages are sent by.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_NOTIFY_URL</strong><br />This is the URL on your system that receives PayPal IPN responses.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_RETURN_URL</strong><br />This is the URL on your system that receives PayPal return variables.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_BUSINESS</strong><br />This is the Email Address that identifies your PayPal Business.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_ENDPOINT</strong><br />PayPal Endpoint Domain <em>( changes when Sandbox Mode is enabled )</em>.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_API_ENDPOINT</strong><br />PayPal API Endpoint Domain <em>( changes when Sandbox Mode is enabled )</em>.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_API_USERNAME</strong><br />This is the API Username associated with your PayPal Business.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_API_PASSWORD</strong><br />This is the API Password associated with your PayPal Business.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_API_SIGNATURE</strong><br />This is the API Signature associated with your PayPal Business.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_PDT_IDENTITY_TOKEN</strong><br />This is the PDT Identity Token associated with your PayPal Business.</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_list_of_api_constants_farm", get_defined_vars());
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_VALUE_FOR_PP_ON0</strong> ... This auto-fills the <code>on0</code> value in PayPal Button Codes. If a Button Code is presented to a logged-in Member, this will auto-fill the value for the <code>on0</code> input variable, with the string: <code>"Referencing Customer ID"</code>. Otherwise, it will be set to a default value of: <code>"Originating Domain"</code>.</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_VALUE_FOR_PP_OS0</strong> ... This auto-fills the <code>os0</code> value in PayPal Button Codes. If a Button Code is presented to a logged-in Member, this will auto-fill the value for the <code>os0</code> input variable, with the value of <code>OPTIMIZEMEMBER_CURRENT_USER_SUBSCR_OR_WP_ID</code>. Otherwise, it will be set to a default value of <code>$_SERVER["HTTP_HOST"]</code> <em>( the originating domain name )</em>.</p>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_VALUE_FOR_PP_ON1</strong> ... This auto-fills the <code>on1</code> value in PayPal Button Codes. This always contains the string: <code>"Customer IP Address"</code>.</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_VALUE_FOR_PP_OS1</strong> ... This auto-fills the <code>os1</code> value in PayPal Button Codes. This always contains the value of <code>$_SERVER["REMOTE_ADDR"]</code> <em>( the Customer\'s IP address )</em>.</p>' . "\n";
             /**/
             echo '<p><em>These four Constants above are special. They\'re used by the PayPal Button Generator for optimizeMember. This is how optimizeMember identifies an existing Member ( and/or a Free Subscriber ), who is already logged in when they click a PayPal Modification Button that was generated for you by optimizeMember. Instead of forcing a Member ( and/or a Free Subscriber ) to re-register for a new account, optimizeMember can identify their existing account, and update it, according to the modified terms in your Button Code. Specifically, these three Button Code parameters: <code>on0, os0, modify</code>, work together in harmony. If you\'re using the Shortcode Format for PayPal Buttons, you won\'t even see these, because they\'re added internally by the Shortcode processor. Anyway, they\'re just documented here for clarity; you probably won\'t use these directly; the Button Generator pops them in.</em></p>' . "\n";
             /**/
             echo '</div>' . "\n";
             /**/
             echo '</div>' . "\n";
         } else {
             echo '<div class="ws-menu-page-group" title="optimizeMember PHP/API Constants">' . "\n";
             /**/
             echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-constants-section">' . "\n";
             echo '<h3>You Have Access To PHP Constants ( some PHP scripting required )</h3>' . "\n";
             echo '<p>A Constant, is an identifier <em>( i.e. a name )</em> for a simple value in PHP scripting. Below is a comprehensive list that includes all of the PHP defined Constants available to you. All of these Constants are also available through JavaScript as Global Variables. Example code has been provided in the documentation below. If you\'re a web developer, we suggest using some of these Constants in the creation of your Login Welcome Page; which is described in the optimizeMember General Options Panel. These are NOT required, but you can get pretty creative with the Login Welcome Page, if you know a little PHP.</p>' . "\n";
             echo '<p>If you don\'t know any PHP, you can use the <code>[opmGet constant="NAME_OF_CONSTANT" /]</code> Shortcode for WordPress. For example, you might use <code>[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LABEL" /]</code> to display the type of Membership a Customer has. The <code>[opmGet constant="" /]</code> Shortcode will work for any of the API Constants documented below.</p>' . "\n";
             do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_constants", get_defined_vars());
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p>Before you read any further, you should install this handy plugin: <a href="http://wordpress.org/extend/plugins/php-execution-plugin/" target="_blank" rel="external">PHP Execution</a>.<br />' . "\n";
             echo 'You\'ll need to have this plugin installed to use PHP code in Posts/Pages.</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 class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_VERSION</strong><br />This will always be a (string) with the current optimizeMember version. Available since optimizeMember 3.0. Dated versions began with optimizeMember v110604.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/version.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_LOGIN_COUNTER</strong><br />This will always be (int) <code>-1</code> or higher <em>( representing the number of times a User/Member has logged into your site )</em>. <code>-1</code> if no User is logged in. <code>0</code> if the current User has NEVER logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-login-counter.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_IS_LOGGED_IN</strong><br />This will always be (bool) true or false. True if a User/Member is currently logged in with an Access Level >= 0.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-is-logged-in.x-php")) . '</p>' . "\n";
             echo '<p><em>See: <code>OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LEVEL</code> below for a full explanation.</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER</strong><br />This will always be (bool) true or false. True if a Member is currently logged in with an Access Level >= 1.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-is-logged-in-as-member.x-php")) . '</p>' . "\n";
             echo '<p><em>See: <code>OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LEVEL</code> below for a full explanation.</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LEVEL</strong><br />This will always be (int) <code>-1</code> thru <code>4</code> <em>( or, up to the total number Membership Levels you\'ve configured )</em>. <code>-1</code> if not logged in. <code>0</code> if logged in as a Free Subscriber.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-access-level.x-php")) . '</p>' . "\n";
             echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
             echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 &amp; 3.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 &amp; 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 &amp; 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
             echo '<p><em>* WordPress Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to optimizeMember. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LABEL</strong><br />This will always be a (string) containing the Membership Label associated with the current User\'s account. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-access-label.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_SUBSCR_ID</strong><br />This will always be a (string) containing the current User\'s Paid Subscr. ID. If they\'ve NOT paid yet, this will be an empty string. Also empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-subscr-id.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_SUBSCR_OR_WP_ID</strong><br />This will always be a (string) containing the current User\'s Paid Subscr. ID. If they\'ve NOT paid yet, this will be their WordPress User ID#. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-subscr-or-wp-id.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_SUBSCR_GATEWAY</strong><br />This will always be a (string) containing the current User\'s Paid Subscr. Gateway. If they\'ve NOT paid yet, this will be empty. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-subscr-gateway.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_CUSTOM</strong><br />This will always be a (string) containing the current User\'s Custom String; associated with their optimizeMember Profile. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-custom.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_TIME</strong><br />This will always be an (int); in the form of a Unix timestamp. 0 if not logged in. This holds the recorded time at which the User originally registered their Username for access to your site; for free or otherwise. This is useful if you want to drip content over an extended period of time, based on how long someone has been registered (period); regardless of whether they are/were paying you. <strong>* Note:</strong> this is NOT the same as <code>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_TIME</code>, which could be used as an alternative, depending on your intended usage.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-registration-time.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_DAYS</strong><br />This will always be an (int). 0 if not logged in. This is the number of days that have passed since the User originally registered their Username for access to your site; for free or otherwise. This is useful if you want to drip content over an extended period of time, based on how long someone has been registered (period); regardless of whether they are/were paying you. <strong>* Note:</strong> this is NOT the same as <code>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS</code>, which could be used as an alternative, depending on your intended usage.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-registration-days.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_TIME</strong><br />This will always be an (int); in the form of a Unix timestamp. However, this will be 0 if they\'re not logged in; or if they\'ve never paid you at all <em>( i.e. if they\'re still a Free Subscriber )</em>. This holds the recorded time at which the Member originally registered their Username (or upgraded for) any type of "paid" access to your site. This value is preserved for the lifetime of their account, even if they upgrade, and even if they\'re demoted at some point. Once this value is recorded, it never changes under any circumstance. This is useful if you want to drip content over an extended period of time, based on how long someone has been a "paying" Member (period); regardless of their original or existing Membership Level. <strong>* Note:</strong> this is NOT the same as <code>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_TIME</code>, which could be used as an alternative, depending on your intended usage.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-paid-registration-time.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS</strong><br />This will always be an (int); in the form of a Unix timestamp. However, this will be 0 if they\'re not logged in; or if they\'ve never paid you at all <em>( i.e. if they\'re still a Free Subscriber )</em>. This is the number of days that have passed since the Member originally registered their Username (or upgraded for) any type of "paid" access to your site. The underlying timestamp behind this value is preserved for the lifetime of their account, even if they upgrade, and even if they\'re demoted at some point. Once the underlying timestamp behind this value is recorded, it never changes under any circumstance. This is useful if you want to drip content over an extended period of time, based on how long someone has been a "paying" Member (period); regardless of their original or existing Membership Level. <strong>* Note:</strong> this is NOT the same as <code>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_DAYS</code>, which could be used as an alternative, depending on your intended usage.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-paid-registration-days.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DISPLAY_NAME</strong><br />This will always be a (string) containing the current User\'s Display Name. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-display-name.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_FIRST_NAME</strong><br />This will always be a (string) containing the current User\'s First Name. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-first-name.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_LAST_NAME</strong><br />This will always be a (string) containing the current User\'s Last Name. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-last-name.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_LOGIN</strong><br />This will always be a (string) containing the current User\'s Username. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-login.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_EMAIL</strong><br />This will always be a (string) containing the current User\'s Email Address. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-email.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_IP</strong><br />This will always be a (string) containing the current User\'s IP Address, even when/if NOT logged in. Taken from <code>$_SERVER["REMOTE_ADDR"]</code>. Empty if browsing anonymously.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-ip.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_REGISTRATION_IP</strong><br />This will always be a (string) containing the current User\'s original IP Address during registration. Taken from <code>$_SERVER["REMOTE_ADDR"]</code>. Empty if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-registration-ip.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_ID</strong><br />This will always be an (int) containing the current User\'s ID# in WordPress. However, it will be 0 if not logged in.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-id.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_FIELDS</strong><br />This will always be a JSON encoded array, in (string) format. An empty JSON encoded array, in (string) format, if not logged in. This JSON encoded array will contain the following fields: <code>id, ip, reg_ip, email, login, first_name, last_name, display_name, subscr_id, subscr_or_wp_id, subscr_gateway, custom</code>. If you\'ve configured additional Custom Fields, those Custom Fields will also be added to this array. You can do <code>print_r(json_decode(OPTIMIZEMEMBER_CURRENT_USER_FIELDS, true));</code> to get a full list for testing.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-fields.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DOWNLOADS_ALLOWED</strong><br />This will always be an (int) value >= 0. This indicates how many unique files they\'re allowed to download. 0 means no access.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-downloads-allowed.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED</strong><br />This will always be (bool) true or false. A value of true means their allowed downloads are >= 999999999, and false means it is not. This is useful if you are allowing unlimited ( 999999999 ) downloads on some Membership Levels. You can display `Unlimited` instead of a number.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-downloads-allowed-is-unlimited.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY</strong><br />This will always be an (int) value >= 0. This indicates how many unique files they\'ve downloaded in the current period.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-downloads-currently.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS</strong><br />This will always be an (int) value >= 0. This indicates how many total days make up the current period. 0 means no access.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-downloads-allowed-days.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL</strong><br />This is a Stand-Alone URL where a User can modify their Profile. In addition to this Stand-Alone version, optimizeMember also makes a Shortcode available which produces an Inline Profile Editing Form. Use <code>[optimizeMember-Profile /]</code> in any Post/Page, or even in a Text Widget if you like.</p>' . "\n";
             echo '<p><strong>Code Sample #1</strong> ( standard link ):</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-profile-modification-page-url-1.x-php")) . '</p>' . "\n";
             echo '<p><strong>Code Sample #2</strong> ( open the link in a popup window ):</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-profile-modification-page-url-2.x-php")) . '</p>' . "\n";
             echo '<p><strong>Code Sample #3</strong> ( embed the form into a Post/Page using an IFRAME tag ):</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-profile-modification-page-url-3.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL</strong><br />This is the full URL to the Limit Exceeded Page ( informational ).</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID</strong><br />This is the Page ID that was used to generate the full URL.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/file-download-limit-exceeded-page-url.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_MEMBERSHIP_OPTIONS_PAGE_URL</strong><br />This is the full URL to the Membership Options Page ( the signup page ).</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_MEMBERSHIP_OPTIONS_PAGE_ID</strong><br />This is the Page ID that was used to generate the full URL.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/membership-options-page-url.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LOGIN_WELCOME_PAGE_URL</strong><br />This is the full URL to the Login Welcome Page ( the User\'s account page ). * This could also be the full URL to a Special Redirection URL ( if you configured one ). See <code>optimizeMember -> General Options -> Login Welcome Page</code>.</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_LOGIN_WELCOME_PAGE_ID</strong><br />This is the Page ID that was used to generate the full URL. * In the case of a Special Redirection URL, this ID is not really applicable.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/login-welcome-page-url.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LOGIN_PAGE_URL</strong><br />This is the full URL to the Membership Login Page ( the WordPress login page ).</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/login-page-url.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LOGOUT_PAGE_URL</strong><br />This is the full URL to the Membership Logout Page ( the WordPress logout page ).</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/logout-page-url.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LEVELn_LABEL</strong><br />This is the (string) Label that you created for a particular Membership Level #. Replace <code>n</code> with a numeric Membership Level #..</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/leveln-label.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED</strong><br />This is the (int) allowed downloads for a particular Membership Level #. Replace <code>n</code> with a numeric Membership Level #.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/leveln-file-downloads-allowed.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS</strong><br />This is the (int) allowed download days for a particular Membership Level #. Replace <code>n</code> with a numeric Membership Level #.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/leveln-file-downloads-allowed-days.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS</strong><br />This is the (string) list of extensions to display inline.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/file-download-inline-extensions.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_REG_EMAIL_FROM_NAME</strong><br />This is the Name that outgoing email messages are sent by.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/reg-email-from-name.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_REG_EMAIL_FROM_EMAIL</strong><br />This is the Email Address that outgoing messages are sent by.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/reg-email-from-email.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_NOTIFY_URL</strong><br />This is the URL on your system that receives PayPal IPN responses.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-notify-url.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_RETURN_URL</strong><br />This is the URL on your system that receives PayPal return variables.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-return-url.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_ENDPOINT</strong><br />This is the Endpoint Domain to the PayPal server <em>( changes when Sandbox Mode is enabled )</em>.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-endpoint.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_API_ENDPOINT</strong><br />This is the Endpoint Domain to the PayPal API server <em>( changes when Sandbox Mode is enabled )</em>.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-api-endpoint.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_BUSINESS</strong><br />This is the Email Address that identifies your PayPal Business.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-business.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_API_USERNAME</strong><br />This is the API Username associated with your PayPal Business.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-api-username.x-php")) . '</p>' . "\n";
             echo '<p><em>* For security purposes, this is NOT included in the JS/API (JavaSript API).</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_API_PASSWORD</strong><br />This is the API Password associated with your PayPal Business.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-api-password.x-php")) . '</p>' . "\n";
             echo '<p><em>* For security purposes, this is NOT included in the JS/API (JavaSript API).</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_API_SIGNATURE</strong><br />This is the API Signature associated with your PayPal Business.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-api-signature.x-php")) . '</p>' . "\n";
             echo '<p><em>* For security purposes, this is NOT included in the JS/API (JavaSript API).</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_PAYPAL_PDT_IDENTITY_TOKEN</strong><br />This is the PDT Identity Token associated with your PayPal Business.</p>' . "\n";
             echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-pdt-identity-token.x-php")) . '</p>' . "\n";
             echo '<p><em>* For security purposes, this is NOT included in the JS/API (JavaSript API).</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_list_of_api_constants", get_defined_vars());
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_VALUE_FOR_PP_ON0</strong> ... This auto-fills the <code>on0</code> value in PayPal Button Codes. If a Button Code is presented to a logged-in Member, this will auto-fill the value for the <code>on0</code> input variable, with the string: <code>"Referencing Customer ID"</code>. Otherwise, it will be set to a default value of: <code>"Originating Domain"</code>.</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_VALUE_FOR_PP_OS0</strong> ... This auto-fills the <code>os0</code> value in PayPal Button Codes. If a Button Code is presented to a logged-in Member, this will auto-fill the value for the <code>os0</code> input variable, with the value of <code>OPTIMIZEMEMBER_CURRENT_USER_SUBSCR_OR_WP_ID</code>. Otherwise, it will be set to a default value of <code>$_SERVER["HTTP_HOST"]</code> <em>( the originating domain name )</em>.</p>' . "\n";
             /**/
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_VALUE_FOR_PP_ON1</strong> ... This auto-fills the <code>on1</code> value in PayPal Button Codes. This always contains the string: <code>"Customer IP Address"</code>.</p>' . "\n";
             echo '<p><strong>OPTIMIZEMEMBER_CURRENT_USER_VALUE_FOR_PP_OS1</strong> ... This auto-fills the <code>os1</code> value in PayPal Button Codes. This always contains the value of <code>$_SERVER["REMOTE_ADDR"]</code> <em>( the Customer\'s IP address )</em>.</p>' . "\n";
             /**/
             echo '<p><em>These four Constants are special. They are used by the PayPal Button Generator for optimizeMember. This is how optimizeMember identifies an existing Member ( and/or a Free Subscriber ), who is already logged in when they click a PayPal Modification Button that was generated for you by optimizeMember. Instead of forcing a Member ( and/or a Free Subscriber ) to re-register for a new account, optimizeMember can identify their existing account, and update it, according to the modified terms in your Button Code. Specifically, these three Button Code parameters: <code>on0, os0, modify</code>, work together in harmony. If you\'re using the Shortcode Format for PayPal Buttons, you won\'t even see these, because they\'re added internally by the Shortcode processor. Anyway, they\'re just documented here for clarity; you probably won\'t use these directly; the Button Generator pops them in.</em></p>' . "\n";
             /**/
             echo '<p><em>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/current-user-value-for-pp-on0-os0-on1-os1.x-php")) . '</em></p>' . "\n";
             /**/
             echo '</div>' . "\n";
             /**/
             echo '</div>' . "\n";
         }
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_api_constants", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_api_js_globals", true, get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_api_js_globals", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="optimizeMember JS/API Globals">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-js-globals-section">' . "\n";
         echo '<h3>You Also Have Access To JS Globals ( some JavaScript knowledge required )</h3>' . "\n";
         echo '<p>Unless noted otherwise, all of the PHP Constants, are also available through JavaScript, as Global Variables <em>( with the exact same names/types as their PHP counterparts )</em>. optimizeMember automatically loads it\'s compressed JavaScript API into your theme for WordPress. optimizeMember is very intelligent about the way it loads <em>( and maintains )</em> it\'s JavaScript API. You can rely on the JavaScript Globals, the same way you rely on PHP Constants. The only exceptions are related to security. Variables that include private server-side details, like Identity Tokens and other API service credentials, will be excluded automatically.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_js_globals", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_api_js_globals", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_api_mop_vars", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_api_mop_vars", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Membership Options Page / Variables">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-mop-vars-section">' . "\n";
         echo '<h3>Membership Options Page Variables ( some scripting required )</h3>' . "\n";
         echo '<p>At the core of optimizeMember, is it\'s ability to protect content <em>( i.e. Posts, Pages, Tags, Categories, URI word fragments, etc )</em>. Whenever a public User, or even an existing Member attempts to access an area of your site that is unavailable to them; either because they are not logged-in, not a paying Member at all; or maybe they are logged-in, but they don\'t have access to content you\'ve protected at a higher Membership Level; optimizeMember will always redirect these unauthenticated requests to your Membership Options Page.</p>' . "\n";
         echo '<p>So your Membership Options Page is a key element of your site. It serves as the focal point of your optimizeMember installation. Understanding this, you can see it becomes important for optimizeMember to provide information about what the User/Member was attempting to access <em>( e.g. before they were redirected to the Membership Options Page )</em>. This is where optimizeMember\'s MOP Vars come in <em>( i.e. Membership Options Page Variables )</em>. Whenever optimizeMember redirects a User/Member to your Membership Options Page, it will include these important MOP Variables in the query string of the URL. These Variables can be used to provide more informative messages; or even to provide a different set of Membership Options <em>( i.e. Payment Buttons )</em>, based on what a User/Member was attempting to access.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_mop_vars", get_defined_vars());
         /**/
         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 class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/api-mop-vars.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Code Samples:</strong> This may give you some ideas [ <a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-api-mop-vars-code-samples\').toggle(); return false;" class="ws-dotted-link">click here</a> ].</p>' . "\n";
         echo '<p id="ws-plugin--optimizemember-api-mop-vars-code-samples" style="display:none;">' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/api-mop-vars-e.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>Backward compatibility:</strong> The structure of optimizeMember\'s MOP Vars changed a bit in Nov, 2011. However, optimizeMember still provides the same MOP Vars that it used in previous versions, for backward compatibility. These <a href="#" onclick="jQuery(\'p#ws-plugin--optimizemember-old-api-mop-vars-details\').toggle(); return false;" class="ws-dotted-link">old MOP Variables</a> were more difficult to use; they are now deprecated <em>( i.e. they WILL eventually be removed )</em>. Going foward, please go by the new documentation above.</p>' . "\n";
         echo '<p id="ws-plugin--optimizemember-old-api-mop-vars-details" style="display:none;">' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/api-mop-vars-o.x-php")) . '</p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_api_mop_vars", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__optimizemember_during_scripting_page_during_left_sections_display_api_hooks", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_before_api_hooks", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="Hooks/Filters ( For Developers )">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-api-hooks-section">' . "\n";
         echo '<h3>WP Hooks For Theme/Plugin Developers ( scripting required )</h3>' . "\n";
         echo '<p>In addition to its API Constants, optimizeMember also makes several Hooks/Filters available throughout its framework. This makes it possible to build onto <em>( or even modify )</em> optimizeMember in lots of different ways. If you need to add custom processing routines, modify the behavior of existing processing routines, or tinker with things otherwise; you should use API Hooks/Filters. API Hooks &amp; Filters, give you the ability to "hook into", and/or "filter" processing routines, with files/functions of your own; instead of editing the optimizeMember plugin files directly. If you don\'t use a Hook/Filter, and instead, you edit the plugin files for optimizeMember, you\'ll have to merge all of your changes every time a new version of optimizeMember is released. If you create custom processing routines, you could place those routines into a PHP file here: <code>/wp-content/mu-plugins/s2-hacks.php</code>. If you don\'t have an <code>/mu-plugins/</code> directory, please create one. These are <em>(mu)</em> <a href="http://codex.wordpress.org/Must_Use_Plugins" target="_blank" rel="external">MUST USE plugins</a>, which are loaded into WordPress automatically; that\'s what you want!</p>' . "\n";
         echo '<p><strong>Attn Developers:</strong> There are simply too many Hooks/Filters spread throughout optimizeMember\'s framework <em>( over 1000 total )</em>. Rather than documenting each Hook/Filter, it is easier to browse through the files inside: <code>/s2member/includes/classes/</code>. Inspecting Hooks/Filters in this way, also leads you to a better understanding of how they work. One way to save time, is to run a search for <code>do_action</code> and/or <code>apply_filters</code>. If you\'re new to the concept of Hooks/Filters for WordPress/optimizeMember, we suggest <a href="http://www.optimizepress.com/codex/#src_doc_overview_description" target="_blank" rel="external">this article</a> as a primer.</p>' . "\n";
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_during_api_hooks", get_defined_vars());
         /**/
         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";
         /**/
         do_action("ws_plugin__optimizemember_during_scripting_page_during_left_sections_after_api_hooks", get_defined_vars());
     }
     /**/
     do_action("ws_plugin__optimizemember_during_scripting_page_after_left_sections", get_defined_vars());
     /**/
     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";
 }