Esempio n. 1
0
 /**
  *
  * Shortcode parsing method for Membership page listings
  * @param array $atts
  * @return string|void
  */
 function membership_page_listings($atts)
 {
     extract(shortcode_atts(array('style' => '', 'columns' => 1, 'product' => 0, 'category' => 0, 'subcategory' => 0, 'comments' => 0, 'drip_content' => 0, 'resize_thumb_height' => 0, 'show_children' => '', 'order' => '', 'hide_description' => 'N'), $atts));
     $product = intval($product);
     $category = intval($category);
     $subcategory = intval($subcategory);
     $parentId = 0;
     $page_id = defined('OP_PAGEBUILDER_ID') ? OP_PAGEBUILDER_ID : $post->ID;
     $title_font = op_asset_font_style($atts);
     if (!empty($title_font)) {
         $title_style = "style='" . $title_font . "'";
     } else {
         $title_style = '';
     }
     $content_font = op_asset_font_style($atts, 'content_font_');
     if (!empty($content_font)) {
         $content_style = "style='" . $content_font . "'";
     } else {
         $content_style = '';
     }
     // which children should we take?
     if (!empty($show_children)) {
         $parentId = $page_id;
     } else {
         if (!empty($product) && empty($category) && empty($subcategory)) {
             $parentId = $product;
         } else {
             if (!empty($product) && !empty($category) && empty($subcategory)) {
                 $parentId = $category;
             } else {
                 if (!empty($product) && !empty($category) && !empty($subcategory)) {
                     $parentId = $subcategory;
                 }
             }
         }
     }
     if (!empty($order)) {
         $temp = explode('|', $order);
         $order_column = $temp[0];
         $order_direction = $temp[1];
     } else {
         $order_column = 'post_title';
         $order_direction = 'asc';
     }
     $args = array('posts_per_page' => -1, 'sort_column' => $order_column, 'sort_order' => $order_direction, 'parent' => $parentId, 'hierarchical' => 0, 'post_status' => 'publish');
     $pages = get_pages($args);
     if ($order_column == 'post_title') {
         if ($order_direction == 'asc') {
             usort($pages, array("OptimizePress_LiveEditor_Assets", "sortNaturalAsc"));
         } else {
             usort($pages, array("OptimizePress_LiveEditor_Assets", "sortNaturalDesc"));
         }
     }
     if (!empty($resize_thumb_height)) {
         $img_class = ' thumb_resize ';
     } else {
         $img_class = '';
     }
     if (empty($pages) || $parentId == 0) {
         if (is_admin()) {
             return __('No child membership pages found! Note: Pages will only show in this once they are Published in Wordpress. Draft pages will not show', OP_SN);
         }
     }
     $html = '';
     switch ($columns) {
         case 1:
             $class = 'page-listing one-col';
             break;
         case 2:
             $class = 'page-listing two-col';
             break;
         case 3:
             $class = 'page-listing three-col';
             break;
         case 4:
             $class = 'page-listing four-col';
             break;
     }
     foreach ($pages as $page) {
         /*if (defined("WS_PLUGIN__OPTIMIZEMEMBER_VERSION")) {
               if (!is_permitted_by_optimizemember($page->ID, "page")) {
                   continue;
               }
           }*/
         // drip content
         $dripContentHtml = '';
         if (defined("WS_PLUGIN__OPTIMIZEMEMBER_VERSION")) {
             global $current_user;
             $hideContent = false;
             if (isset($GLOBALS['WS_PLUGIN__']['optimizemember']['o']['filter_wp_query']) && 'all' === $GLOBALS['WS_PLUGIN__']['optimizemember']['o']['filter_wp_query'][0]) {
                 $hideContent = true;
             }
             if (!is_permitted_by_optimizemember($page->ID, "page") && true === $hideContent) {
                 continue;
             }
             $unavailableContent = c_ws_plugin__optimizemember_utils_gets::get_unavailable_singular_ids_with_dripped_content($current_user);
             // getting content drip days setting
             $drip_days = get_post_meta($page->ID, "optimizemember_drip_days", true);
             if ($drip_days) {
                 // if hide links is disabled in OPM general settings, content by this ID is not available to current user and show drip content timer is checked on
                 // membership page listings element
                 if (false === $hideContent && in_array($page->ID, $unavailableContent) && !empty($drip_content) && !current_user_can('level_10')) {
                     //if ($array = is_page_protected_by_optimizemember($page->ID)) { // is it protected?
                     $time = optimizemember_paid_registration_time();
                     if (!empty($time) && $time > strtotime("-" . $drip_days . " days")) {
                         $daysTo = intval(($time + $drip_days * 86400 - time()) / 86400);
                         if (0 === $daysTo) {
                             $dripContentHtml = '<p class="pagelisting-drip-content">' . __('Less than a day left to be able to access this content', OP_SN) . '</p>';
                         } else {
                             $dripContentHtml = '<p class="pagelisting-drip-content">' . sprintf(_n('%d day left to be able to access this content', '%d days left to be able to access this content', $daysTo, OP_SN), $daysTo) . '</p>';
                         }
                     }
                     //}
                 }
                 // if hide links is enabled in OPM general settings, content by this ID is not available to current user and show drip content timer is disabled on
                 // membership page listings element - hide content completely
                 if (true === $hideContent && in_array($page->ID, $unavailableContent) && !current_user_can('level_10')) {
                     continue;
                 }
                 // if user is not logged in
                 if (true === $hideContent && !is_user_logged_in()) {
                     continue;
                 }
             }
         }
         $meta = get_post_meta($page->ID);
         if (!empty($meta['_' . OP_SN . '_page_thumbnail'])) {
             $image = $meta['_' . OP_SN . '_page_thumbnail'][0];
             $alt = $page->post_title;
         }
         if (!empty($comments)) {
             $comments = wp_count_comments($page->ID);
             $commentCount = $comments->approved;
             $commentHtml = '<p class="pagelisting-comment">' . sprintf(__('%d comments', OP_SN), $commentCount) . '</p>';
         } else {
             $commentHtml = '';
         }
         $meta = $meta['_' . OP_SN . '_membership'][0];
         $meta = unserialize(unserialize($meta));
         $html .= '<div class="' . $class . '">';
         $html .= '
             <a href="' . get_permalink($page->ID) . '" class="pagelisting-style-' . $style . ' border">
                 <div class="thumb">';
         if ($image != '') {
             $html .= '<img src="' . $image . '" alt="' . $alt . '" class="scale-with-grid ' . $img_class . '" />';
         } else {
             $html .= '<img src="' . OP_IMG . 'default-page-listings.png" alt="' . $alt . '" class="scale-with-grid ' . $img_class . '" />';
         }
         $html .= '</div>
                 <div class="content">
                     <h3 ' . $title_style . '>' . $page->post_title . '</h3>' . $commentHtml . $dripContentHtml;
         if ($hide_description !== 'Y') {
             $description = stripslashes(base64_decode($meta['description']));
             if (strlen($description) > 140) {
                 $html .= '<p ' . $content_style . '>' . substr($description, 0, 140) . '...</p>';
             } else {
                 $html .= '<p ' . $content_style . '>' . $description . '</p>';
             }
         }
         $html .= '</div>
             </a>
         ';
         $html .= '</div>';
     }
     $html .= '<script type="text/javascript">(function($){function resizeWindow(){if($(window).width()>=767)$(".container").each(function(){var e=0;var t=$(this).find("[class*=\'pagelisting-style-\']");t.css({height:"auto"});t.each(function(){var t=$(this).height();if(t>e)e=t});t.height(e)})}$(document).ready(function(){$(window).bind("resize",resizeWindow);$(window).bind("load",resizeWindow)})})(opjq);</script>' . "\n";
     return $html;
 }
Esempio n. 2
0
 public function __construct()
 {
     echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
     /**/
     echo '<div class="op-bsw-header">';
     echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
     echo '</div>';
     echo '<div class="op-bsw-main-content inline-input-fields">';
     echo '<h2>OptimizeMember Pro / PayPal Pro Forms</h2>' . "\n";
     /**/
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="Quick-Start Guide For PayPal Pro">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-forms-guide-section">' . "\n";
     echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/large-icon.png" title="optimizeMember ( a Membership management system for WordPress )" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n";
     echo '<h3>Quick-Start Guide For PayPal Pro Integration</h3>' . "\n";
     //echo '<p style="margin-bottom:0;"><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/pro-forms/" target="_blank" rel="external">optimizeMember Pro Forms</a>.</p>'."\n";
     //echo '<p style="margin-top:0;"><strong>See also:</strong> This KB article: <a href="http://www.optimizepress.com/kb/paypal-account-types/" target="_blank" rel="external">PayPal Compatibility (Account Types)</a>.</p>'."\n";
     echo '<p>The optimizeMember Pro Module makes it possible for optimizeMember to use PayPal Pro Forms ( instead of standard PayPal Buttons ). PayPal Pro Forms integrate seamlessly with WordPress Shortcodes. This allows you to keep Customers on your site at all times, and it consolidates the Checkout / Registration steps into a single form that you can dress up just the way you like. If you would like to take advantage of PayPal Pro integration, please supply your PayPal API Username, Password, and Signature. See <code>optimizeMember -> PayPal Options</code>.</p>' . "\n";
     echo '<p><em><strong>*PayPal Pro Integration*</strong> You will need a <a href="http://www.optimizepress.com/paypal" target="_blank" rel="external">PayPal Business Account, w/Pro Service</a>. PayPal Pro accounts require a formal application, along with a small monthly fee. Once you have a PayPal Pro account, you\'ll need access to your <a href="http://www.optimizepress.com/paypal-profile-api-access" target="_blank" rel="external">PayPal API Credentials</a>. Log into your PayPal Pro account, and navigate to <code>Profile -> API Access (or Request API Credentials)</code>. You\'ll choose <code>( Request API Signature )</code>.</em></p>' . "\n";
     echo '<p><em><strong>*Recurring Billing*</strong> If you plan to use any of the ( `Subscription` ) options in the Form Generators below, you will ALSO need <a href="http://www.optimizepress.com/paypal-pro-recurring-payments-faqs" target="_blank" rel="external">Recurring Billing</a> enabled for your PayPal Pro account. PayPal\'s Recurring Billing service for Pro accounts is <strong>required</strong> for all types of ( `Subscriptions` ), whether you intend for them to be recurring or not. However, it is NOT required for ( `Buy Now` ) functionality. The drop-down menus, in the sections below, have been marked ( `Subscription` ) and ( `Buy Now` ) just for this reason. This way you can see which options will require the use of PayPal\'s Recurring Billing service. PayPal will charge you a small monthly fee for their Recurring Billing service; which is an add-on for PayPal Pro accounts.</em></p>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*Secure Server*</strong> In order to comply with PayPal and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your PayPal Pro Forms on an SSL enabled site. Please check with your hosting provider to ask about obtaining an SSL certificate for your domain. Please note... when you create PayPal Pro Forms with optimizeMember; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with ( <code>https://</code> ). &mdash; You can skip the SSL certificate during Sandbox testing. SSL is not required until you officially go live. Once you\'re live, you can add the Custom Field <code>optimizemember_force_ssl = yes</code> to any Post/Page.</em></p>' . "\n" : '<p><em><strong>*Secure Server*</strong> In order to comply with PayPal and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your PayPal Pro Forms on an SSL enabled page. When you create PayPal Pro Forms with optimizeMember; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with ( <code>https://</code> ). You can add the Custom Field <code>optimizemember_force_ssl = yes</code> to any Post/Page that contains a Pro Form Shortcode. This tells optimizeMember to force those special Posts/Pages to be viewed over SSL at all times; no matter what.</em></p>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*SSL Compatibility*</strong> All themes available at <a href="http://www.optimizepress.com/" target="_blank" rel="external">optimizePress.com</a> include full support for SSL, as does WordPress itself. However, there are many themes/plugins that do NOT support SSL enabled Posts/Pages like they should. For this reason, you should be very careful when choosing a WordPress theme to use with optimizeMember Pro. Otherwise, your visitors could see the famous "Secure/Insecure" warnings in Internet Explorer browsers. With optimizeMember installed, you can add the Custom Field <code>optimizemember_force_ssl = yes</code> to any Post/Page. optimizeMember will buffer output on those special Posts/Pages, converting everything over to <code>https://</code> for you automatically, and forcing those specific Posts/Pages to be viewed over a secure SSL connection; so long as your server supports the https protocol.</em></p>' . "\n" : '';
     echo '<p><em><strong>*PayPal Pro is NOT Absolutely Required*</strong> optimizeMember is very flexible. It is now possible to integrate Pro Forms without a PayPal Pro account, whereby the enhanced Form Shortcodes that optimizeMember provides can be integrated ONLY with PayPal Express Checkout. In other words, if you get declined for PayPal Pro service, you can still use optimizeMember Pro Forms. Ask PayPal to activate Express Checkout for you. ( it\'s free ). Once Express Checkout is enabled, you will have access to your <a href="http://www.optimizepress.com/paypal-profile-api-access" target="_blank" rel="external">PayPal API Credentials</a>. Log into your PayPal account, and navigate to <code>Profile -> API Access (or Request API Credentials)</code>. You\'ll choose <code>( Request API Signature )</code>. Now ... here is the tricky part; whenever you generate a Pro Form Shortcode with optimizeMember, be sure to change  <code>accept="paypal,visa,mastercard,amex,discover,maestro,solo"</code> to just <code>accept="paypal"</code>; thereby excluding the on-site credit card processing functionality; which is available only with PayPal Pro.</em></p>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Pro / Free Registration Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-registration-forms-section">' . "\n";
     echo '<h3>One Form Does It All For Free Registrations ( copy/paste )</h3>' . "\n";
     echo '<p>Whenever a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0.</p>' . "\n";
     echo '<p><em><strong>*Note*</strong> the use of this particular Form will override your Open Registration configuration. In other words, making this Form available is the same as turning Open Registration <code>(on)</code>. One of the benefits to this functionality, is that it makes it possible for you to integrate this Free Registration Form in creative ways ( i.e. making it available ONLY under certain circumstances ); while still leaving Open Registration <code>(off)</code> throughout the rest of the site.</em></p>' . "\n";
     echo '<p><em><strong>*Tip ( optional )*</strong> It is also possible to change the <code>level="0"</code> Attribute to something other than the default Level #0 ( Free Subscriber ). For example, if you need to, you can change it to <code>level="1"</code>, attach Custom Capabilities with the <code>ccaps=""</code> Attribute, and even limit this access to a certain timeframe with <code>tp="30" tt="D"</code> ( i.e. 30 Days ). So this Form is very flexible. It can be used to allow free access to just about any aspect of your service. For more information on Attributes, please see the section below: Shortcode Attributes ( Explained ).</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-registration-form-shortcode.php")));
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr("0")), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level0_label"])), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-registration-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
         $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
         echo '<div class="ws-menu-page-group" title="PayPal Pro Forms For Level ' . $labelText . ' Access">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-level' . $n . '-forms-section">' . "\n";
         echo '<h3>Pro Form Generator For Level ' . $labelText . ' Access</h3>' . "\n";
         echo '<p>Very simple. All you do is customize the form fields provided, for each Membership Level that you plan to offer. Then press (Generate Form Code). These special PayPal Forms are customized to work with optimizeMember seamlessly. Member accounts will be activated instantly, in an automated fashion. When you, or a Member, cancels their Membership, or fails to make payments on time, optimizeMember will automatically terminate their Membership privileges. optimizeMember makes extensive use of the PayPal IPN service. optimizeMember receives updates from PayPal behind-the-scene.</p>' . "\n";
         echo '<p><em>* Forms are NOT saved here. This is only a Form Generator. Once you\'ve generated your Form, copy/paste it into any Post/Page you like. You\'ll want to provide your visitors with a link to the Post/Page where this Form is located. We suggest placing a link to this Form on your Membership Options Page. That way your visitors can get registered &amp; checkout!</em></p>' . "\n";
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form onsubmit="return false;">' . "\n";
         echo '<p id="ws-plugin--optimizemember-pro-level' . $n . '-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-trial-period" value="0" size="6" /> <select id="ws-plugin--optimizemember-pro-level' . $n . '-trial-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-trial-amount" value="0.00" size="4" /></p>' . "\n";
         echo '<p><span id="ws-plugin--optimizemember-pro-level' . $n . '-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-level' . $n . '-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/" . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_payflow_api_username"] ? "payflow" : "paypal") . "-membership-regular-terms.php"))) . '</select></p>' . "\n";
         echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-desc" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="68" /></p>' . "\n";
         echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nWith PayPal Pro integration, this is only applied to PayPal Express Checkout pages; when/if a Customer chooses PayPal as the Payment Method.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-page-style" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-pro-level' . $n . '-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Form Code" onclick="ws_plugin__optimizemember_pro_paypalFormGenerate(\'level' . $n . '\');" class="button-primary" /></p>' . "\n";
         echo '<p' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-ccaps" size="40" /></p>' . "\n";
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form onsubmit="return false;">' . "\n";
         echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
         $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-checkout-form-shortcode.php")));
         $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($n)), $ws_plugin__optimizemember_pro_temp_s);
         $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"])), $ws_plugin__optimizemember_pro_temp_s);
         $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
         echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Pro Billing Modification Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-modification-forms-section">' . "\n";
     echo '<h3>Pro Form Generator For Billing Modifications</h3>' . "\n";
     echo '<p>If you\'d like to give your Members ( and/or your Free Subscribers ) the ability to change ( modify ) their billing plan; you can generate a new PayPal Modification Form here. Configure the updated Level, pricing, terms, etc. Then, make that new Modification Form available to Members who are logged into their existing account with you. For example, you might want to insert a "Level #2" Upgrade link into your Login Welcome Page, which would up-sell existing Level #1 Members to a more expensive plan that you offer.</p>' . "\n";
     echo '<p><em><strong>*Modification Process*</strong> Very simple. A Member clicks a link to a special Post/Page, which contains a Modification Form you\'ve generated. The Member fills in their billing information. After a successful form submission, optimizeMember will update the status of their account to the Level, pricing, and terms that you configure below. If the Member already has an existing paid Subscription with you, that paid Subscription will be cancelled automatically behind-the-scene, and a new paid Subscription will be created to replace the old one. Again, the new paid Subscription is based on the Level, pricing, and terms that you specify below. If you need to give Customers some sort of grace period when/if they upgrade to a more expensive plan, please feel free to handle this through the application of free days, or with special pricing configured below.</em></p>' . "\n";
     echo '<p><em><strong>*Integrating Conditionals*</strong> Since each Modification Form is configured for a specific Level, you may want to create multiple Modification Forms, one for each combination you intend to make available. optimizeMember\'s API Conditionals can help you display the proper Form to each Customer, based on the status of their existing account. For further details, see: <code>optimizeMember -> API Scripting</code>.</em></p>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*Independent Custom Capabilities*</strong> If you just want to sell an existing Member new Custom Capabilities, without affecting their paid Subscription in any way, please see the next Form Generator: <code>Capability (Buy Now) Forms</code>. Independent Capability Forms facilitate Buy Now functionality, specifically for Custom Capabilities, without affecting the Customer\'s primary Subscription and Membership Level Access.</em></p>' . "\n" : '';
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     /**/
     echo '<p>Modification: <select id="ws-plugin--optimizemember-pro-modification-level">' . "\n";
     /**/
     for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
         $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
         echo '<optgroup label="Level ' . $labelText . '">' . "\n";
         echo '<option value="upgrade:' . $n . '">&uarr; Upgrade To Level ' . $labelText . '</option>' . "\n";
         echo $n < $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? '<option value="downgrade:' . $n . '">&darr; Downgrade To Level ' . $labelText . '</option>' . "\n" : '';
         echo '</optgroup>' . "\n";
         /**/
         echo $n < $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? '<option disabled="disabled"></option>' . "\n" : '';
     }
     /**/
     echo '</select></p>' . "\n";
     /**/
     echo '<p id="ws-plugin--optimizemember-pro-modification-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-trial-period" value="0" size="6" /> <select id="ws-plugin--optimizemember-pro-modification-trial-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-trial-amount" value="0.00" size="4" /></p>' . "\n";
     echo '<p><span id="ws-plugin--optimizemember-pro-modification-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-modification-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/" . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_payflow_api_username"] ? "payflow" : "paypal") . "-membership-regular-terms.php"))) . '</select></p>' . "\n";
     echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
     echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nWith PayPal Pro integration, this is only applied to PayPal Express Checkout pages; when/if a Customer chooses PayPal as the Payment Method.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-page-style" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-pro-modification-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Form Code" onclick="ws_plugin__optimizemember_pro_paypalFormGenerate(\'modification\');" class="button-primary" /></p>' . "\n";
     echo '<p' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-ccaps" size="40" /></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-checkout-form-shortcode.php")));
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr("1")), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level1_label"])), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/\\/]\$/", 'modify="1" /]', $ws_plugin__optimizemember_pro_temp_s);
     /* Adds modify="1" to the end of the Shortcode. */
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-modification-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-group" title="PayPal Pro Capability (Buy Now) Forms">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-ccap-forms-section">' . "\n";
         echo '<h3>Pro Form Generator For Independent Custom Capabilities</h3>' . "\n";
         echo '<p>This is VERY advanced. For further details, please check your Dashboard: <code>optimizeMember -> API Scripting -> Custom Capabiities</code>.</p>' . "\n";
         echo '<p>With optimizeMember, you can sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site <em>( i.e. you could even sell Independent Custom Capabilities to Users at Membership Level #0, normally referred to as Free Subscribers, if you like )</em>. So this is quite flexible. Independent Custom Capabilities do NOT rely on any specific Membership Level. That\'s why optimizeMember refers to these as `Independent` Custom Capabilities, because you can sell Capabilities this way, through Buy Now functionality, and the Customer\'s Membership Level Access, along with any existing paid Subscription they may already have with you, will remain completely unaffected. That being said, if you intend to charge a recurring fee for Custom Capabilities, please use a <code>Billing Modification Form</code> instead; because Independent Custom Capabilities can only be sold through Buy Now functionality.</p>' . "\n";
         echo '<p>Independent Custom Capabilities are added to a Customer\'s account immediately after checkout, and the Customer will have the Custom Capabilities for as long as their Membership lasts, based on their primary Subscription with your site, and/or forever, if they have a Lifetime account with you. In other words, Independent Custom Capabilities will exist on the Customer\'s account forever, or until an EOT <em>( End Of Term )</em> occurs on their primary Subscription with you; in which case optimizeMember would demote or delete the Customer\'s account <em>( based on your EOT configuration )</em>, and all Custom Capabilities are removed as well.</p>' . "\n";
         echo '<p>Very simple. All you do is customize the form fields provided, for each set of Custom Capabilities that you plan to sell. Then press (Generate Form Code). These special PayPal Forms are customized to work with optimizeMember seamlessly. The Customer will be granted additional access to one or more Custom Capabilities that you specify; while the Customer\'s Membership Level Access and any existing paid Subscription they may already have with you, will remain completely unaffected.</p>' . "\n";
         /**/
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form onsubmit="return false;">' . "\n";
         /**/
         echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-ccap-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-ccap-terms.php"))) . '</select></p>' . "\n";
         echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
         echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nWith PayPal Pro integration, this is only applied to PayPal Express Checkout pages; when/if a Customer chooses PayPal as the Payment Method.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-page-style" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-pro-ccap-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Form Code" onclick="ws_plugin__optimizemember_pro_paypalCcapFormGenerate();" class="button-primary" /></p>' . "\n";
         echo '<p>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-ccaps" size="40" /></p>' . "\n";
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         /**/
         echo '<td>' . "\n";
         echo '<form onsubmit="return false;">' . "\n";
         echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
         $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-ccaps-checkout-form-shortcode.php")));
         $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
         echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
         echo '</form>' . "\n";
         echo '</td>' . "\n";
         /**/
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Pro Billing Update Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-update-forms-section">' . "\n";
     echo '<h3>One Form Does It All For Billing Updates ( copy/paste )</h3>' . "\n";
     echo '<p>An Update Form can be provided to existing Members, as a way for them to update their billing information; without modifying their existing paid Subscription in any way. For instance, a Customer may need to update their billing information, because their credit card is expiring, or because they moved their bank account.</p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-update-form-shortcode.php")));
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-update-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Pro Billing Cancellation Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-cancellation-forms-section">' . "\n";
     echo '<h3>One Form Does It All For Cancellations ( copy/paste )</h3>' . "\n";
     echo '<p>According to PayPal\'s policy on recurring billing, you MUST provide each and every Customer with an easy to way to cancel future charges. Generating a Cancellation Form here, and making that Form available to all Customers is our recommendation. For further details and legalities, please visit the <a href="https://www.x.com/" target="_blank" rel="external">PayPal Developer Network</a>.</p>' . "\n";
     echo '<p><em><strong>*Cancellation Process*</strong> Very simple. A Member clicks a link to a Post/Page that contains a Cancellation Form you\'ve generated. The Member clicks the Submit button to confirm the cancellation. optimizeMember is notified silently behind-the-scene, and will immediately cancel all future billing. optimizeMember will later terminate their account access, at the correct point in time. This works in conjunction with the optimizeMember Auto-EOT System. For further details, see: <code>optimizeMember -> PayPal Options -> EOT Behavior</code>.</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-cancellation-form-shortcode.php")));
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-cancellation-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Member Registration Access Links">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-reg-links-section">' . "\n";
     echo '<h3>Registration Access Link Generator ( for Customer Service )</h3>' . "\n";
     echo '<p>optimizeMember Pro Forms consolidate the Registration/Checkout process into a single-step solution, so it is unlikely that you will ever need this tool. That being said, if you DO need to deal with a Customer Service issue that requires a simple paid Registration Access Link to be created manually, you can use this tool for that. Alternatively, you can create their account yourself/manually by going to <code>optimizeMember -> Add A Member</code>. Either of these methods will work fine.</p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<p>Paid Membership Level#: <select id="ws-plugin--optimizemember-pro-reg-link-level">' . "\n";
     for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
         $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
         echo '<option value="' . $n . '">optimizeMember Level ' . $labelText . '</option>' . "\n";
     }
     echo '</select></p>' . "\n";
     echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID ( aka: Recurring Profile ID, Transaction ID ) must be unique. This value can be obtained from inside your PayPal account in the History tab. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, optimizeMember will be unable to maintain future communication with the PayPal IPN ( i.e. Notification ) service if this value does not reflect a real Paid Subscr. ID that exists in your PayPal History log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-custom" value="' . esc_attr($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__optimizemember_pro_paypalRegLinkGenerate();" class="button-primary" /> <img id="ws-plugin--optimizemember-pro-reg-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
     echo '<p' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
     echo '<p>Fixed Term Length ( for Buy Now transactions ): <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction ( i.e. there is no Initial/Trial Period and no recurring charges for ongoing access ), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is revoked by optimizeMember at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D ( this means 1 Day )\\n1 W ( this means 1 Week )\\n1 M ( this means 1 Month )\\n1 Y ( this means 1 Year )\\n1 L ( this means 1 Lifetime )\'); return false;">[?]</a></p>' . "\n";
     echo '<p id="ws-plugin--optimizemember-pro-reg-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Specific Post/Page (Buy Now) Forms">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-sp-forms-section">' . "\n";
     echo '<h3>Pro Form Generator For Specific Post/Page Forms</h3>' . "\n";
     echo '<p>optimizeMember now supports an additional layer of functionality ( very powerful ), which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" functionality. Your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
     echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. optimizeMember will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link ( see: <code>optimizeMember -> PayPal Options -> Specific Post/Page Email</code> ). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
     echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress. A Specific Post/Page that is protected by optimizeMember, might contain a download link for your eBook, access to file &amp; music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress Post/Page that you\'ve created. To protect Specific Posts/Pages, please see: <code>optimizeMember -> Restriction Options -> Specific Post/Page Access</code>. Once you\'ve configured your Specific Post/Page Restrictions, those Posts/Pages will be available in the menus below.</p>' . "\n";
     echo '<p>Very simple. All you do is customize the form fields provided, for each Post/Page that you plan to sell. Then press (Generate Form Code). These special PayPal Forms are customized to work with optimizeMember seamlessly. You can even Package Additional Posts/Pages together into one transaction.</p>' . "\n";
     echo '<p><em>* Forms are NOT saved here. This is only a Form Generator. Once you\'ve generated your Form, copy/paste it into any Post/Page you like. You\'ll want to provide your visitors with a link to the Post/Page where this Form is located.</em></p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-leading-id">' . "\n";
     echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
     /**/
     $ws_plugin__optimizemember_pro_temp_a_singulars = c_ws_plugin__optimizemember_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
     /**/
     foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
         echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
     }
     /**/
     echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\\n\\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-additional-ids" multiple="multiple" style="height:100px;">' . "\n";
     echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
     /**/
     foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
         echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
     }
     /**/
     echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and optimizeMember generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* optimizeMember sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     /**/
     echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-sp-hours">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select></p>' . "\n";
     echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
     echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nWith PayPal Pro integration, this is only applied to PayPal Express Checkout pages; when/if a Customer chooses PayPal as the Payment Method.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-page-style" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-pro-sp-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Form Code" onclick="ws_plugin__optimizemember_pro_paypalSpFormGenerate();" class="button-primary" /></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
     $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-sp-checkout-form-shortcode.php")));
     $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
     echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '<div class="ws-menu-page-group" title="PayPal Specific Post/Page Access Links">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-sp-links-section">' . "\n";
     echo '<h3>Specific Post/Page Link Generator ( for Customer Service )</h3>' . "\n";
     echo '<p>optimizeMember automatically generates Specific Post/Page Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Specific Post/Page Link to be created manually, you can use this tool for that.</p>' . "\n";
     /**/
     echo '<table class="form-table">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr>' . "\n";
     /**/
     echo '<td>' . "\n";
     echo '<form onsubmit="return false;">' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-link-leading-id">' . "\n";
     echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
     /**/
     $ws_plugin__optimizemember_pro_temp_a_singulars = c_ws_plugin__optimizemember_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
     /**/
     foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
         echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
     }
     /**/
     echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\\n\\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-link-additional-ids" multiple="multiple" style="height:100px; min-width:450px;">' . "\n";
     echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
     /**/
     foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
         echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
     }
     /**/
     echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and optimizeMember generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* optimizeMember sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
     /**/
     echo '<p><select id="ws-plugin--optimizemember-pro-sp-link-hours">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select> <input type="button" value="Generate Access Link" onclick="ws_plugin__optimizemember_pro_paypalSpLinkGenerate();" class="button-primary" /> <img id="ws-plugin--optimizemember-pro-sp-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
     echo '<p id="ws-plugin--optimizemember-pro-sp-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
     echo '</form>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-group" title="Custom Return URLs Upon Success">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-forms-success-section">' . "\n";
         echo '<h3>Custom Return URLs Upon Success ( optional, for developers )</h3>' . "\n";
         echo '<p>optimizeMember Pro opens the door for Custom Return URLs upon success. You can add a special attribute to any Form Shortcode ( <code>success="/my-thank-you-page/"</code> ). This makes it possible to integrate PayPal Pro Forms in very creative ways; and even receive/verify Replacement Code variables, as needed. For example, ( <code>success="/my-thank-you-page/?subscr_id=%%subscr_id%%"</code> ).</p>' . "\n";
         echo '<p><em>A Custom Return URL is 100% optional. In fact, if you only need to obtain details for the purpose of tracking sales, you should just use the simpler API Tracking methods provided by optimizeMember, under: <code>optimizeMember -> API / Tracking</code>. In other words, if you don\'t use the <code>success=""</code> attribute in your Shortcode, optimizeMember will handle things gracefully, all on its own. So using a Custom Return URL is only necessary when you need advanced customization for one reason or another.</em></p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Free Registration Forms ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-free-registration\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-free-registration" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%role%%</code> = The Role ID <code>( subscriber, optimizemember_level[0-9]+, administrator, editor, author, contributor )</code>.</li>' . "\n";
         echo '<li><code>%%level%%</code> = The Level number <code>( 0, 1, 2, 3, 4 )</code>. ( <em>deprecated, no longer recommended; use <code>%%role%%</code></em> )</li>' . "\n";
         echo '<li><code>%%ccaps%%</code> = Custom Capabilities. Ex: <code>music,videos,free_gift</code> ( <em>in comma-delimited format</em> ).</li>' . "\n";
         echo '<li><code>%%auto_eot_time%%</code> = Auto-EOT Time ( if applicable ). Ex: <code>1299925670</code> ( <em>unix timestamp</em> ).</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name ( First &amp; Last ) of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n";
         echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The User\'s IP Address, via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID generated during registration.</li>' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use <a href="http://www.optimizepress.com/codex/stable/s2member/api_functions/package-functions/#src_doc_optimizemember_decrypt()" target="_blank" rel="external">optimizemember_decrypt()</a>.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported here:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
         echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
         echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
         echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> optimizeMember -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Membership Sales / Signups &amp; Modifications ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-sales\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-sales" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%subscr_id%%</code> = The PayPal Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term ( non-recurring ) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase. PayPal does not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring ( i.e. there is only ONE payment ), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. Even if that amount is 0.\\n\\nIf a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0. So be careful using %%initial%% when you offer a 100% Free Trial Period, because a $0.00 sale amount could cause havoc with affiliate programs.\\n\\nIf you\\\'re offering a 100% Free Trial Period, and you need to track sales through affiliate programs, you can either hard-code an amount; or use `optimizeMember -> API Notifications -> Payment Notifications` instead.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. This value is <code>always > 0</code>, no matter what. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. The %%regular%% rate is always > 0. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) for the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D ( this means 1 Day )\\n%%initial_term%% = 1 W ( this means 1 Week )\\n%%initial_term%% = 1 M ( this means 1 Month )\\n%%initial_term%% = 1 Y ( this means 1 Year )\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D ( this means 1 Day )\\n%%regular_term%% = 1 W ( this means 1 Week )\\n%%regular_term%% = 1 M ( this means 1 Month )\\n%%regular_term%% = 1 Y ( this means 1 Year )\\n%%regular_term%% = 1 L ( this means 1 Lifetime )\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period ( or duration ) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%modification%%</code> = <code>1</code> if/when a Billing Modification has just taken place; otherwise <code>0</code> indicates a new Customer.</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use optimizemember_decrypt().</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported here:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
         echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
         echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
         echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> optimizeMember -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Independent Custom Capability Sales ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-ccaps\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-ccaps" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%txn_id%%</code> = The Payment Transaction ID, which is always unique for each payment received.</li>' . "\n";
         echo '<li><code>%%amount%%</code> = The Amount of the payment. Most affiliate programs calculate commissions from this.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Independent Custom Capabilities.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>*level:custom_capabilities:fixed term</em></code> ) that the payment is for. [ <a href="#" onclick="alert(\'With Independent Custom Capabilities, the `level` portion of this string will be an asterisk ( `*` ), since the Membership Level is irrelevant, and remains `as it was`.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%user_first_name%%</code> = The First Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_last_name%%</code> = The Last Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_full_name%%</code> = The Full Name listed on their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_email%%</code> = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.</li>' . "\n";
         echo '<li><code>%%user_login%%</code> = The Username associated with their account. The Customer created this during registration.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s original IP Address, during checkout/registration via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%user_id%%</code> = A unique WordPress User ID that references this account in the WordPress database.</li>' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, it might contain a link to the login page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use optimizemember_decrypt().</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Registration/Profile Fields are also supported here:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
         echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
         echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
         echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> optimizeMember -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Specific Post/Page Transactions ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-sp-sales\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-sp-sales" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%sp_access_url%%</code> = The full URL ( generated by optimizeMember ) where the Customer can gain access.</li>' . "\n";
         echo '<li><code>%%sp_access_exp%%</code> = Human readable expiration for <code>%%sp_access_url%%</code>. Ex: <em>( link expires in <code>%%sp_access_exp%%</code> )</em>.</li>' . "\n";
         echo '<li><code>%%txn_id%%</code> = The PayPal Transaction ID. PayPal assigns a unique identifier for every purchase.</li>' . "\n";
         echo '<li><code>%%amount%%</code> = The full Amount of the sale. Most affiliate programs calculate commissions from this.</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name ( First &amp; Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link to the Specific Post/Page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link to the Specific Post/Page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use optimizemember_decrypt().</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Cancellations &amp; Billing Updates ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-cancellations-updates\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-cancellations-updates" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link back to their account page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link back to their account page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use optimizemember_decrypt().</li>' . "\n";
         echo '</ul>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Verify The Integrity Of Replacement Codes ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-pro-forms-success-verification\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--optimizemember-pro-forms-success-verification" style="display:none;">' . "\n";
         echo '<p>If you know a little PHP, you can verify the integrity of the Replacement Codes returned by optimizeMember. This is important, because in this particular situation, Replacement Codes are passed publicly in the query string of your Custom Return URL. In other words, a Customer could manually change one of the values; like the dollar amounts. For this reason, you should always verify the integrity of the details being returned to any processing routines that receive this information. In the PHP code for your Custom Return URL, you can use this optimizeMember API Function: <code>optimizemember_pro_paypal_s2p_v_query_ok()</code>.</p>' . "\n";
         echo '<p>Here are some examples:</p>' . "\n";
         echo '<p>1. <strong>Shortcode attribute:</strong> <code>success="/thank-you/?subscr_id=%%subscr_id%%&amp;initial=%%initial%%&amp;regular=%%regular%%"</code></p>' . "\n";
         echo '<p>2. <strong>optimizeMember returns Customer to:</strong> <code>/thank-you/?subscr_id=123&amp;initial=0.00&amp;regular=24.95&amp;s2p-v=234098234-23409sdfs234sd234209sdf</code></p>' . "\n";
         echo '<p>3. <strong>Now, in your Custom Return Page, you will need to do this before trusting anything:</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-s2p-v-query-ok-1.x-php")) . '</p>' . "\n";
         echo '<p>optimizeMember will only verify a query string for up to 10 seconds. After 10 seconds, <code>optimizemember_pro_paypal_s2p_v_query_ok()</code> will always return <code>false</code>, even if the integrity of the query string is valid. This prevents a Customer from bookmarking your Return URL; thereby causing duplicate commissions; in case you\'re using it for tracking purposes.</p>' . "\n";
         echo '<p>Again, if you only need to obtain details for the purpose of tracking sales, you should just use the simpler API Tracking methods provided by optimizeMember, under: <code>optimizeMember -> API / Tracking</code>. The API Tracking methods are specifically designed for tracking sales, exactly ONE time for each Customer.</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><em>If it is your intention to allow Customers to bookmark your Custom Return URL, you can still do that. Just be aware that <code>optimizemember_pro_paypal_s2p_v_query_ok()</code> will return <code>false</code> after the first 10 seconds. If you want to verify after 10 seconds, you can pass a second argument to the function, like this:</em></p>' . "\n";
         echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-s2p-v-query-ok-2.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Could a Customer change the timestamp in the URL?</h3>' . "\n";
         echo '<p>Based on the structure of the URL, it would appear possible; however, it\'s NOT. optimizeMember uses an advanced checksum.</p>' . "\n";
         echo '<h3>Can I get rid of the <code>s2p-v</code> variable?</h3>' . "\n";
         echo '<p>No, this variable is always passed to your Custom Return URL, it\'s for important verification purposes.</p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     echo '<div class="ws-menu-page-group" title="Shortcode Attributes ( Explained )">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-shortcode-attrs-section">' . "\n";
     echo '<h3>Shortcode Attributes ( Explained In Full Detail )</h3>' . "\n";
     echo '<p>When you generate a Form, optimizeMember will make a <a href="http://codex.wordpress.org/Shortcode_API#Overview" target="_blank" rel="external">Shortcode</a> available to you. Like most Shortcodes for WordPress, optimizeMember reads Attributes in your Shortcode. These Attributes will be pre-configured by one of optimizeMember\'s Form Generators automatically; so there really is nothing more you need to do. However, many site owners like to know exactly how these Shortcode Attributes work. Below, is a brief overview of each possible Shortcode Attribute.</p>' . "\n";
     /**/
     echo '<table class="form-table" style="margin-top:0;">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr style="padding-top:0;">' . "\n";
     /**/
     echo '<td style="padding-top:0;">' . "\n";
     echo '<ul>' . "\n";
     echo '<li><code>accept="paypal,visa,mastercard,amex,discover,maestro,solo"</code> Accepted Billing Methods. A comma-delimited list of Billing Methods you want to accept. Due to a PayPal policy, you may NOT exclude PayPal from this list; optimizeMember won\'t let you. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>accept_via_paypal="paypal"</code> Accepted Billing via PayPal. A comma-delimited list of Billing Methods you want to accept through PayPal, as opposed to processing them on-site. Due to a PayPal policy, you may NOT exclude PayPal from this list; optimizeMember won\'t let you. <strong>Tip:</strong> If you don\'t have a PayPal Pro account, you can set <code>accept="paypal"</code>, or set <code>accept_via_paypal="paypal,visa,mastercard,amex,discover,maestro,solo"</code>. With one or both of these configurations, all you need is a PayPal Standard account with Express Checkout <em>( which is free )</em>. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>accept_coupons="1"</code> Accept Coupons? Possible values: <code>0</code> = do NOT accept Coupons on this particular Form; <code>1</code> = DO accept Coupon Codes on this particular Form.</li>' . "\n";
     echo '<li><code>cancel="0"</code> Cancellation Form. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Cancellation Form, <code>1</code> = this IS a Cancellation Form.</li>' . "\n";
     echo '<li><code>captcha="clean"</code> When you set this Attribute, visitors must prove they\'re human by typing a <a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank" rel="external">captcha/security code</a>. Possible values: <code>0</code> = do NOT require a captcha code on this Form; <code>clean</code> = DO require a captcha code on this Form; using the <code>clean</code> theme style. Possible theme styles include: <code>red</code>, <code>white</code>, <code>clean</code>, and <code>blackglass</code>. This service is powered by Google\'s reCaptcha system.</li>' . "\n";
     echo '<li><code>cc="USD"</code> 3 character Currency Code. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<li><code>ccaps="music,videos"</code> A comma-delimited list of Custom Capabilities. Only valid w/ Membership Level Access and/or Independent Custom Capabilities.</li>' . "\n" : '';
     echo '<li><code>coupon="SAVE-10"</code> Default/pre-filled Coupon Code. This is optional, and the Coupon Code ( if supplied ) must exist in your Coupon Code configuration.</li>' . "\n";
     echo '<li><code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '"</code> must start with your domain. Additional values can be piped in ( ex: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3|etc"</code> ). Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>default_country_code="US"</code> If you set this 2-character value, it will pre-configure the default Country that is selected in the drop-down menu for Checkout and Billing Update Forms. This MUST be an uppercase country code, following the <a href="http://www.iso.org/iso/english_country_names_and_code_elements" target="_blank" rel="external">ISO-3166-1 specification</a>. If this is empty ( i.e. <code>""</code> ) optimizeMember will set the default country code automatically; based on currency. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>desc="Gold Membership @ $29/mo"</code> A brief purchase Description. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>dg="0"</code> The Digital Goods directive. optimizeMember will eventually be integrated with <a href="http://www.optimizepress.com/paypal-express-co-digitals" target="_blank" rel="external">Digital Goods</a> for inline Express Checkout. But for now, this should always be <code>0</code>.</li>' . "\n";
     echo '<li><code>exp="72"</code> Access Expires ( in hours ). Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
     echo '<li><code>ids="14"</code> A Post/Page ID#, or a comma-delimited list of IDs. Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
     echo '<li><code>lc=""</code> Optional 2 character Locale Code <em>( i.e. Country Code )</em>. This controls the interface language used if/when a Customer chooses PayPal Express Checkout as their payment method. If unspecified, the language is determined by PayPal Express Checkout when possible, defaulting to <code>US</code> <em>english</em> when not possible. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>level="1"</code> Membership Level [1-4] <em>( or, up to the number of configured Levels )</em>. Only valid for Forms providing Membership Level Access, which includes Free Registration Forms too. Free Registration Forms allow a value of <code>level="0"</code> whenever <code>register="1"</code> for Free Registration. In addition, Free Registration Forms will also allow visitors to register for free, even at higher Levels if you wish. Free Registration Forms will accept any value [0-4] <em>( or, up to the number of configured Levels )</em>.' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' With Independent Custom Capabilities this MUST be set to <code>level="*"</code>, and <code>ccaps=""</code> must NOT be empty <em>( i.e. <code>level="*" ccaps="music,videos"</code> )</em>.') . '</li>' . "\n";
     echo '<li><code>modify="0"</code> Modification directive. Only valid w/ Membership Level Access. Possible values: <code>0</code> = allows Customers to modify their current Subscription or sign up for a new one, <code>1</code> = allows Customers to only modify their current Subscription. When <code>modify="1"</code>, optimizeMember will force a Customer to be logged-in before they can fill out the Form ( very handy ). This is slightly different than PayPal "Button" Codes; there is no "2" option for "Forms"; only <code>0</code> &amp; <code>1</code> are valid values.</li>' . "\n";
     echo '<li><code>ns="1"</code> The <em>no_shipping</em> directive. Possible values: <code>0</code> = prompt for an address, but do not require one, <code>1</code> = do not prompt for a shipping address, <code>2</code> = prompt for an address, and require one. Applies only to PayPal Express Checkout; because Pro Forms do not ask for a Shipping Address. However, you may request a Shipping Address by creating Custom Fields under: <em>optimizeMember -> General Options -> Registration/Profile Fields</em>. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>ps="paypal"</code> PayPal checkout Page Style. Applies only to PayPal Express Checkout. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>register="0"</code> Free Registration Form. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Free Registration Form, <code>1</code> = this IS a Free Registration Form.</li>' . "\n";
     echo '<li><code>ra="0.01"</code> Regular, Buy Now, and/or Recurring Amount. Must be &gt;= <code>0.01</code>. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>rp="1"</code> Regular Period. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Must be &gt;= <code>1</code> ( ex: <code>1</code> Week, <code>2</code> Months, <code>1</code> Month, <code>3</code> Days ).</li>' . "\n";
     echo '<li><code>rt="M"</code> Regular Term. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Possible values: <code>D</code> = Days, <code>W</code> = Weeks, <code>M</code> = Months, <code>Y</code> = Years, <code>L</code> = Lifetime. — <strong>NOTICE (regarding Payflow):</strong> Please be aware that <code>D</code> = Days is NOT possible under PayPal Pro (Payflow Edition). If you are operating a PayPal Pro account, with the Payflow Edition, please take note. Payflow supports ONLY a specific set of recurring intervals. Pro Forms integrated with the Payflow API, can be configured to charge: weekly, bi-weekly, monthly, quarterly, every six months, or yearly.</li>' . "\n";
     echo '<li><code>rr="1"</code> Recurring directive. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Possible values: <code>0</code> = non-recurring "Subscription" with possible Trial Period for free, or at a different Trial Amount; <code>1</code> = recurring "Subscription" with possible Trial Period for free, or at a different Trial Amount; <code>BN</code> = non-recurring "Buy Now" functionality, no Trial Period possible.</li>' . "\n";
     echo '<li><code>rrt=""</code> Recurring Times <em>( i.e. a fixed number of installments )</em>. Only valid w/ Membership Level Access. When unspecified, any recurring charges will remain ongoing until cancelled, or until payments start failing. If this is set to <code>1 or higher</code> the regular recurring charges will only continue for X billing cycles, depending on what you specify. This is only valid when <code>rr="1"</code> for recurring "Subscriptions". Please note that a fixed number of installments, also means a fixed period of access. If a Customer\'s billing is monthly, and you set <code>rrt="3"</code>, billing will continue for only 3 monthly installments. After that, billing would stop, and their access to the site would be revoked as well <em>( based on your EOT Behavior setting under: optimizeMember -> PayPal Options )</em>.</li>' . "\n";
     echo '<li><code>rra="2"</code> Reattempt failed payments? Possible values: <code>0</code> = do NOT reattempt billing when/if a recurring payment fails; <code>1 or higher</code> = yes, DO reattempt billing when/if a recurring payment fails. With PayPal Pro integration, PayPal will retry a maximum of 2 times whenever <code>rra="2"</code>; after that, a Subscription would be terminated due to Max Failed Payments having been reached. With PayPal Pro integration, the value of this attribute also configures Max Failed Payments. So a setting of <code>rra="2"</code> means that you allow a maximum of 2 failed payments.</li>' . "\n";
     echo '<li><code>sp="0"</code> Specific Post/Page Form. Possible values: <code>0</code> = this is NOT a Specific Post/Page Access Form, <code>1</code> = this IS a Specific Post/Page Access Form.</li>' . "\n";
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<li><code>success=""</code> 100% optional. This can be used to create a Custom Return URL on success. Please see the sub-section above titled: <em>Custom Return URLs on Success</em>.</li>' . "\n" : '';
     echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<li><code>template=""</code> 100% optional. This can be a custom template file that exists inside your WordPress theme directory. For example: <code>template="checkout.php"</code>.</li>' . "\n" : '';
     echo '<li><code>ta="0.00"</code> Trial Amount. Only valid w/ Membership Level Access. Must be <code>0</code> when <code>rt="L"</code> or when <code>rr="BN"</code>.</li>' . "\n";
     echo '<li><code>tp="0"</code> Trial Period. Only valid w/ Membership Level Access. Must be <code>0</code> when <code>rt="L"</code> or when <code>rr="BN"</code>.</li>' . "\n";
     echo '<li><code>tt="D"</code> Trial Term. Only valid w/ Membership Level Access. Possible values: <code>D</code> = Days, <code>W</code> = Weeks, <code>M</code> = Months, <code>Y</code> = Years.</li>' . "\n";
     echo '<li><code>update="0"</code> Billing Update Form. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Billing Update Form, <code>1</code> = this IS a Billing Update Form.</li>' . "\n";
     echo '</ul>' . "\n";
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
     /**/
     echo '</div>' . "\n";
     /**/
     echo '</td>' . "\n";
     /**/
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__optimizemember_menu_pages_rs::display();
     echo '</td>' . "\n";
     /**/
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     /**/
     echo '</div>' . "\n";
     echo '</div>' . "\n";
 }
Esempio n. 3
0
 /**
  * Retrieves a unique array of all published Singulars, protected with Specific Post/Page Access.
  *
  * @package optimizeMember\Utilities
  * @since 111101
  *
  * @uses {@link http://codex.wordpress.org/Function_Reference/get_posts get_posts()}
  *
  * @param bool $exclude_conflicts Optional. Defaults to false. If true, return ONLY those which are NOT in conflict with any other Restriction Types.
  * 	The ``$exclude_conflicts`` argument should be used whenever we introduce a list of option values to a site owner. Helping them avoid mishaps.
  * 	Please note, the ``$exclude_conflicts`` argument implements a resource-intensive processing routine.
  * @return array Unique array of all Singulars *(i.e. Posts/Pages )* protected with Specific Post/Page Access.
  * 	Includes Custom Post Types also, as specified by site owner's Specific Post/Page Restrictions.
  */
 public static function get_all_singulars_with_sp($exclude_conflicts = FALSE)
 {
     $singulars = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["specific_ids"] && is_array($singulars = get_posts("post_status=publish&post_type=any&include=" . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["specific_ids"])) ? $singulars : array();
     /**/
     if (!empty($singulars) && is_array($singulars) && $exclude_conflicts) {
         $all_singular_ids_not_conflicting = c_ws_plugin__optimizemember_utils_gets::get_all_singular_ids_with_sp("exclude-conflicts");
         foreach ($singulars as $s => $singular) {
             if (!in_array($singular->ID, $all_singular_ids_not_conflicting)) {
                 unset($singulars[$s]);
             }
         }
     }
     return !empty($singulars) && is_array($singulars) ? c_ws_plugin__optimizemember_utils_arrays::array_unique($singulars) : array();
 }
Esempio n. 4
0
 /**
  * Filters ``$cwhere`` query portion.
  *
  * @package optimizeMember\Queries
  * @since 110912
  *
  * @attaches-to ``add_filter("comment_feed_where");``
  *
  * @param str $cwhere Expects the SQL `WHERE` portion to be passed through by the Filter.
  * @param obj $wp_query Expects ``$wp_query`` by reference, from the Filter.
  * @return str The revised ``$cwhere`` string.
  */
 public static function _query_level_access_coms($cwhere = FALSE, &$wp_query = FALSE)
 {
     global $wpdb;
     /* Need this global DB object reference here. */
     /**/
     if (is_string($cwhere) && is_object($wpdb) && is_object($wp_query) && !$wp_query->get("suppress_filters")) {
         $x_terms = array_merge((array) $wp_query->get("category__not_in"), (array) $wp_query->get("tag__not_in"));
         $x_terms = array_unique(c_ws_plugin__optimizemember_utils_arrays::force_integers($x_terms));
         $x_singulars = c_ws_plugin__optimizemember_utils_gets::get_singular_ids_in_terms($x_terms);
         /**/
         $cwhere .= " AND `" . $wpdb->comments . "`.`comment_post_ID` NOT IN('" . implode("','", (array) $wp_query->get("post__not_in")) . "')";
         $cwhere .= " AND `" . $wpdb->comments . "`.`comment_post_ID` NOT IN('" . implode("','", $x_singulars) . "')";
     }
     remove_filter("comment_feed_where", "c_ws_plugin__optimizemember_querys::_query_level_access_coms", 100, 2);
     return apply_filters("_ws_plugin__optimizemember_query_level_access_coms", $cwhere, get_defined_vars());
 }
Esempio n. 5
0
 /**
  * wp_list_pages filter for excluding protected pages
  * @param array $exclude
  * @return array
  */
 public static function excludePages($exclude)
 {
     if (is_array($_drips = c_ws_plugin__optimizemember_utils_gets::get_unavailable_singular_ids_with_dripped_content($user)) && !empty($_drips)) {
         $exclude = array_merge($exclude, $_drips);
     }
     return $exclude;
 }
Esempio n. 6
0
        public function __construct()
        {
            echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
            /**/
            echo '<div class="op-bsw-header">';
            echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
            echo '</div>';
            echo '<div class="op-bsw-main-content inline-input-fields">';
            echo '<h2>Google Checkout Buttons</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";
            /**/
            for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
                $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
                echo '<div class="ws-menu-page-group" title="Google Checkout For Level ' . $labelText . ' Access">' . "\n";
                /**/
                echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-level' . $n . '-buttons-section">' . "\n";
                echo '<h3>Button Code Generator For Level ' . $labelText . ' Access</h3>' . "\n";
                echo '<p>Very simple. All you do is customize the form fields provided, for each Membership Level that you plan to offer. Then press (Generate Button Code). These Google Checkout Buttons are customized to work with optimizeMember seamlessly. Member accounts will be activated instantly, in an automated fashion. When you, or a Member, cancels their Membership, or fails to make payments on time, optimizeMember will automatically terminate their Membership privileges. optimizeMember makes extensive use of the Google API Callback service. optimizeMember receives updates from Google behind-the-scene. <em>* Buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your Membership Options Page. If you lose your Button Code, you\'ll need to come back &amp; re-generate a new one.</em></p>' . "\n";
                /**/
                echo '<table class="form-table">' . "\n";
                echo '<tbody>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<th class="ws-menu-page-th-side">' . "\n";
                echo '<label for="ws-plugin--optimizemember-pro-level' . $n . '-shortcode">' . "\n";
                echo 'Button Code<br />For Level ' . $labelText . ':<br /><br />' . "\n";
                echo '<div id="ws-plugin--optimizemember-pro-level' . $n . '-button-prev"></div>' . "\n";
                echo '</label>' . "\n";
                echo '</th>' . "\n";
                /**/
                echo '<td>' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                echo '<p id="ws-plugin--optimizemember-pro-level' . $n . '-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-trial-period" value="0" size="6" /> <select id="ws-plugin--optimizemember-pro-level' . $n . '-trial-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/google-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-trial-amount" value="0.00" size="4" /></p>' . "\n";
                echo '<p><span id="ws-plugin--optimizemember-pro-level' . $n . '-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-level' . $n . '-term" class="google-checkout-buttons-subscription-select">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/google-membership-regular-terms.php"))) . '</select></p>' . "\n";
                echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-desc" class="google-checkout-buttons-description-input" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="73" /></p>' . "\n";
                //echo '<p' . ((is_multisite () && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-ccaps" size="40" /></p>' . "\n";
                echo 'Packages: ';
                if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) {
                    foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) {
                        echo '<input type="checkbox" onchange="showSelectedValues(\'ccpchk_' . $n . '\', \'ccaps\', ' . $n . ');" name="ws_plugin__optimizemember_ccpchk_' . $n . '" value="' . $val . '" /> ' . $val . "\n";
                    }
                } else {
                    echo 'To use packages, enter some first in <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--optimizemember-gen-ops")) . '">Define membership levels and packages section.</a>';
                }
                echo '<input type="hidden" autocomplete="off" name="ws_plugin__optimizemember_security_meta_box_ccaps" id="ws-plugin--optimizemember-pro-level' . $n . '-ccaps" value="" />' . "\n";
                echo '<p>Currency: <select id="ws-plugin--optimizemember-pro-level' . $n . '-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/google-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__optimizemember_pro_googleButtonGenerate(\'level' . $n . '\');" class="button-primary" /></p>' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<td colspan="2">' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
                $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/google-checkout-button-shortcode.php")));
                $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($n)), $ws_plugin__optimizemember_pro_temp_s);
                $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"])), $ws_plugin__optimizemember_pro_temp_s);
                $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
                echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-level' . $n . '-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '</tbody>' . "\n";
                echo '</table>' . "\n";
                echo '</div>' . "\n";
                /**/
                echo '</div>' . "\n";
            }
            /**/
            ?>
							<script type="text/javascript">
							window.showSelectedValues = function(param, elemId, n) {
									var text = jQuery("input[name=ws_plugin__optimizemember_"+param+"]:checked").map(
									     function () {return this.value;}).get().join(",");
									jQuery("#ws-plugin--optimizemember-pro-level"+n+"-" + elemId).val(text);


								}
							window.showSingleSelectedValues = function(param, elemId, n) {
								var text = jQuery("input[name=ws_plugin__optimizemember_"+param+"]:checked").map(
								     function () {return this.value;}).get().join(",");
								jQuery("#ws-plugin--optimizemember-pro-" + elemId + "-ccaps").val(text);


							}
								/**/
							</script>
							<?php 
            echo '<div class="ws-menu-page-group" title="Google Modification/Cancellation Buttons">' . "\n";
            /**/
            echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-cancellation-buttons-section">' . "\n";
            echo '<h3>One Button Does It All For Modifications/Cancellations ( copy/paste )</h3>' . "\n";
            echo '<p>Every Google Recurring Subscription can be modified by the Customer, or even cancelled by the Customer through Google Checkout. It\'s very simple. A Member clicks a Modification/Cancellation Button. This brings the Customer to a "Purchase History" screen inside their Google Checkout account. Here they\'ll have easy access to make any changes they like. When important changes occur ( such as a cancellation ), information regarding this event will be relayed back to optimizeMember through Google\'s API Callback service. optimizeMember will react appropriately at that time.</p>' . "\n";
            echo '<p><em><strong>*Understanding Cancellations*</strong> It\'s important to realize that a Cancellation is not an EOT ( End Of Term ). All that happens during a Cancellation event, is that billing is stopped, and it\'s understood that the Customer is going to lose access, at some point in the future. This does NOT mean, that access will be revoked immediately. A separate EOT event will automatically handle a (demotion or deletion) later, at the appropriate time; which could be several days, or even a year after the Cancellation took place.</em></p>' . "\n";
            echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through Google Checkout... but, optimizeMember continues allowing the User access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. optimizeMember will only remove the User\'s Membership privileges when an EOT ( End Of Term ) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by optimizeMember.</em></p>' . "\n";
            echo '<p><em>optimizeMember will not process an EOT ( End Of Term ) until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, optimizeMember will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). optimizeMember also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
            /**/
            echo '<table class="form-table">' . "\n";
            echo '<tbody>' . "\n";
            echo '<tr>' . "\n";
            /**/
            echo '<th class="ws-menu-page-th-side">' . "\n";
            echo '<label for="ws-plugin--optimizemember-pro-cancellation-shortcode">' . "\n";
            echo 'Button Code<br />For Cancellations:<br /><br />' . "\n";
            echo '<div id="ws-plugin--optimizemember-pro-cancellation-button-prev">' . "\n";
            $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/buttons/google-cancellation-button.php")));
            $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%images%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember_pro"]["c"]["dir_url"] . "/images")), $ws_plugin__optimizemember_pro_temp_s);
            $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%wpurl%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url())), $ws_plugin__optimizemember_pro_temp_s);
            $ws_plugin__optimizemember_pro_temp_s = preg_replace("/&amp;/", "&", $ws_plugin__optimizemember_pro_temp_s);
            /* Match this with the JavaScript generator. */
            echo preg_replace("/\\<a/", '<a target="_blank"', $ws_plugin__optimizemember_pro_temp_s);
            echo '</div>' . "\n";
            echo '</label>' . "\n";
            echo '</th>' . "\n";
            /**/
            echo '<td class="align-top">' . "\n";
            echo '<form onsubmit="return false;">' . "\n";
            echo '<p>No configuration necessary.</p>' . "\n";
            echo '</form>' . "\n";
            echo '</td>' . "\n";
            /**/
            echo '</tr>' . "\n";
            echo '<tr>' . "\n";
            /**/
            echo '<td colspan="2">' . "\n";
            echo '<form onsubmit="return false;">' . "\n";
            echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
            $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/google-cancellation-button-shortcode.php")));
            echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-cancellation-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
            echo '</form>' . "\n";
            echo '</td>' . "\n";
            /**/
            echo '</tr>' . "\n";
            echo '</tbody>' . "\n";
            echo '</table>' . "\n";
            echo '</div>' . "\n";
            /**/
            echo '</div>' . "\n";
            /**/
            if (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site()) {
                echo '<div class="ws-menu-page-group" title="Google Capability (Buy Now) Buttons">' . "\n";
                /**/
                echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-ccap-buttons-section">' . "\n";
                echo '<h3>Button Code Generator For Independent Custom Capabilities</h3>' . "\n";
                echo '<p>This is VERY advanced. For further details, please check your Dashboard: <code>optimizeMember -> API Scripting -> Custom Capabiities</code>.</p>' . "\n";
                echo '<p>With optimizeMember, you can sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site <em>( i.e. you could even sell Independent Custom Capabilities to Users at Membership Level #0, normally referred to as Free Subscribers, if you like )</em>. So this is quite flexible. Independent Custom Capabilities do NOT rely on any specific Membership Level. That\'s why optimizeMember refers to these as `Independent` Custom Capabilities, because you can sell Capabilities this way, through Buy Now functionality, and the Customer\'s Membership Level Access, along with any existing paid Subscription they may already have with you, will remain completely unaffected. That being said, if you intend to charge a recurring fee for Custom Capabilities, please use a <code>Membership Level# Button</code> instead; because Independent Custom Capabilities can only be sold through Buy Now functionality.</p>' . "\n";
                echo '<p>Independent Custom Capabilities are added to a Customer\'s account immediately after checkout, and the Customer will have the Custom Capabilities for as long as their Membership lasts, based on their primary Subscription with your site, and/or forever, if they have a Lifetime account with you. In other words, Independent Custom Capabilities will exist on the Customer\'s account forever, or until an EOT <em>( End Of Term )</em> occurs on their primary Subscription with you; in which case optimizeMember would demote or delete the Customer\'s account <em>( based on your EOT configuration )</em>, and all Custom Capabilities are removed as well.</p>' . "\n";
                echo '<p>Very simple. All you do is customize the form fields provided, for each set of Custom Capabilities that you plan to sell. Then press (Generate Button Code). These Google Checkout Buttons are customized to work with optimizeMember seamlessly. The Customer will be granted additional access to one or more Custom Capabilities that you specify; while the Customer\'s Membership Level Access and any existing paid Subscription they may already have with you, will remain completely unaffected.</p>' . "\n";
                echo '<p><em><strong>*Important Note*</strong> Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button. Otherwise, post-processing of their transaction will fail to recognize the Customer\'s existing account within WordPress. Please display this Button only to Users/Members that are already logged into their account ( perhaps in your Login Welcome Page for optimizeMember ), or in another location where you can be absolutely sure that a User/Member is logged in. optimizeMember\'s Simple Conditionals could also be used to ensure a User/Member is logged in, by wrapping your Shortcode within a Conditional test. For further details, please see: <code>optimizeMember -> API Scripting -> Simple Conditionals</code>.</em></p>' . "\n";
                echo '<p><em>* Buttons are NOT saved here. This is only a Button Generator. If you lose your Button Code, you\'ll need to come back &amp; re-generate a new one.</em></p>' . "\n";
                /**/
                echo '<table class="form-table">' . "\n";
                echo '<tbody>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<th class="ws-menu-page-th-side">' . "\n";
                echo '<label for="ws-plugin--optimizemember-pro-ccap-shortcode">' . "\n";
                echo 'Button Code<br />For Capabilities:<br /><br />' . "\n";
                echo '<div id="ws-plugin--optimizemember-pro-ccap-button-prev"></div>' . "\n";
                echo '</label>' . "\n";
                echo '</th>' . "\n";
                /**/
                echo '<td>' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-ccap-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/google-membership-ccap-terms.php"))) . '</select></p>' . "\n";
                echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-desc" class="google-checkout-buttons-description-input" value="Description and pricing details here." size="73" /></p>' . "\n";
                //echo '<p>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-ccaps" size="40" /></p>' . "\n";
                echo 'Packages: ';
                $n = 1;
                if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) {
                    foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) {
                        echo '<input type="checkbox" onchange="showSingleSelectedValues(\'ccpchkccaps_' . $n . '\', \'ccap\', ' . $n . ');" name="ws_plugin__optimizemember_ccpchkccaps_' . $n . '" value="' . $val . '" /> ' . $val . "\n";
                    }
                } else {
                    echo 'To use packages, enter some first in <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--optimizemember-gen-ops")) . '">Define membership levels and packages section.</a>';
                }
                echo '<input type="hidden" autocomplete="off" name="ws_plugin__optimizemember_security_meta_box_ccaps" id="ws-plugin--optimizemember-pro-ccap-ccaps" value="" />' . "\n";
                echo '<p>Currency: <select id="ws-plugin--optimizemember-pro-ccap-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/google-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__optimizemember_pro_googleCcapButtonGenerate();" class="button-primary" /></p>' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<td colspan="2">' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
                $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/google-ccaps-checkout-button-shortcode.php")));
                $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
                echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-ccap-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '</tbody>' . "\n";
                echo '</table>' . "\n";
                echo '</div>' . "\n";
                /**/
                echo '</div>' . "\n";
            }
            /**/
            echo '<div class="ws-menu-page-group" title="Google Member Registration Access Links">' . "\n";
            /**/
            echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-reg-links-section">' . "\n";
            echo '<h3>Registration Access Link Generator ( for Customer Service )</h3>' . "\n";
            echo '<p>optimizeMember automatically generates Registration Access Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Registration Access Link to be created manually, you can use this tool for that. Alternatively, you can create their account yourself/manually by going to <code>optimizeMember -> Add A Member</code>. Either of these methods will work fine.</p>' . "\n";
            /**/
            echo '<table class="form-table">' . "\n";
            echo '<tbody>' . "\n";
            echo '<tr>' . "\n";
            /**/
            echo '<td>' . "\n";
            echo '<form onsubmit="return false;">' . "\n";
            echo '<p>Paid Membership Level#: <select id="ws-plugin--optimizemember-pro-reg-link-level">' . "\n";
            for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
                $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
                echo '<option value="' . $n . '">optimizeMember Level ' . $labelText . '</option>' . "\n";
            }
            echo '</select></p>' . "\n";
            echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID ( aka: Google TID/SID with an `s2-` prefix ) must be unique. This value can be obtained from inside your Google Checkout account in the transaction Description field. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, optimizeMember will be unable to maintain future communication with the Google IPN ( i.e. Notification/Callback ) service if this value does not reflect a real Paid Subscr. ID that exists in your Google Checkout transaction log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
            echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-custom" value="' . esc_attr($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__optimizemember_pro_googleRegLinkGenerate();" class="button-primary" /> <img id="ws-plugin--optimizemember-pro-reg-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
            //echo '<p' . ((is_multisite () && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
            echo 'Packages: ';
            $n = 1;
            if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) {
                foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) {
                    echo '<input type="checkbox" onchange="showSingleSelectedValues(\'ccpchkreg_' . $n . '\', \'reg-link\', ' . $n . ');" name="ws_plugin__optimizemember_ccpchkreg_' . $n . '" value="' . $val . '" /> ' . $val . "\n";
                }
            } else {
                echo 'To use packages, enter some first in <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--optimizemember-gen-ops")) . '">Define membership levels and packages section.</a>';
            }
            echo '<input type="hidden" autocomplete="off" name="ws_plugin__optimizemember_security_meta_box_ccaps" id="ws-plugin--optimizemember-pro-reg-link-ccaps" value="" />' . "\n";
            echo '<p>Fixed Term Length ( for Buy Now transactions ): <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction ( i.e. there is no Initial/Trial Period and no recurring charges for ongoing access ), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is revoked by optimizeMember at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D ( this means 1 Day )\\n1 W ( this means 1 Week )\\n1 M ( this means 1 Month )\\n1 Y ( this means 1 Year )\\n1 L ( this means 1 Lifetime )\'); return false;">[?]</a></p>' . "\n";
            echo '<p id="ws-plugin--optimizemember-pro-reg-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
            echo '</form>' . "\n";
            echo '</td>' . "\n";
            /**/
            echo '</tr>' . "\n";
            echo '</tbody>' . "\n";
            echo '</table>' . "\n";
            echo '</div>' . "\n";
            /**/
            echo '</div>' . "\n";
            /**/
            echo '<div class="ws-menu-page-group" title="Google Specific Post/Page (Buy Now) Buttons">' . "\n";
            /**/
            echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-sp-buttons-section">' . "\n";
            echo '<h3>Button Code Generator For Specific Post/Page Buttons</h3>' . "\n";
            echo '<p>optimizeMember now supports an additional layer of functionality ( very powerful ), which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" Buttons, and your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
            echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. optimizeMember will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link ( see: <code>optimizeMember -> Google Options -> Specific Post/Page Email</code> ). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
            echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress. A Specific Post/Page that is protected by optimizeMember, might contain a download link for your eBook, access to file &amp; music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress Post/Page that you\'ve created. To protect Specific Posts/Pages, please see: <code>optimizeMember -> Restriction Options -> Specific Post/Page Access</code>. Once you\'ve configured your Specific Post/Page Restrictions, those Posts/Pages will be available in the menus below.</p>' . "\n";
            echo '<p>Very simple. All you do is customize the form fields provided, for each Post/Page that you plan to sell. Then press (Generate Button Code). These Google Checkout Buttons are customized to work with optimizeMember seamlessly. You can even Package Additional Posts/Pages together into one transaction. <em>* Buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your WordPress Editor, wherever you feel it would be most appropriate. If you lose your Button Code, you\'ll need to come back &amp; re-generate a new one.</em></p>' . "\n";
            /**/
            echo '<table class="form-table">' . "\n";
            echo '<tbody>' . "\n";
            echo '<tr>' . "\n";
            /**/
            echo '<th class="ws-menu-page-th-side">' . "\n";
            echo '<label for="ws-plugin--optimizemember-pro-sp-shortcode">' . "\n";
            echo 'Button Code<br />Specific Posts/Pages:<br /><br />' . "\n";
            echo '<div id="ws-plugin--optimizemember-pro-sp-button-prev"></div>' . "\n";
            echo '</label>' . "\n";
            echo '</th>' . "\n";
            /**/
            echo '<td>' . "\n";
            echo '<form onsubmit="return false;">' . "\n";
            /**/
            echo '<p><select id="ws-plugin--optimizemember-pro-sp-leading-id">' . "\n";
            echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
            /**/
            $ws_plugin__optimizemember_pro_temp_a_singulars = c_ws_plugin__optimizemember_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
            /**/
            foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
                echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
            }
            /**/
            echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\\n\\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
            /**/
            echo '<p><select id="ws-plugin--optimizemember-pro-sp-additional-ids" multiple="multiple" style="height:100px;">' . "\n";
            echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
            /**/
            foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
                echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
            }
            /**/
            echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and optimizeMember generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* optimizeMember sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
            /**/
            echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-pro-sp-hours" class="google-checkout-buttons-subscription-select">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/google-sp-hours.php"))) . '</select></p>' . "\n";
            echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
            echo '<p>Currency: <select id="ws-plugin--optimizemember-pro-sp-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/google-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__optimizemember_pro_googleSpButtonGenerate();" class="button-primary" /></p>' . "\n";
            echo '</form>' . "\n";
            echo '</td>' . "\n";
            /**/
            echo '</tr>' . "\n";
            echo '<tr>' . "\n";
            /**/
            echo '<td colspan="2">' . "\n";
            echo '<form onsubmit="return false;">' . "\n";
            echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
            $ws_plugin__optimizemember_pro_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/google-sp-checkout-button-shortcode.php")));
            $ws_plugin__optimizemember_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_pro_temp_s);
            echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-pro-sp-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
            echo '</form>' . "\n";
            echo '</td>' . "\n";
            /**/
            echo '</tr>' . "\n";
            echo '</tbody>' . "\n";
            echo '</table>' . "\n";
            echo '</div>' . "\n";
            /**/
            echo '</div>' . "\n";
            /**/
            echo '<div class="ws-menu-page-group" title="Google Specific Post/Page Access Links">' . "\n";
            /**/
            echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-sp-links-section">' . "\n";
            echo '<h3>Specific Post/Page Link Generator ( for Customer Service )</h3>' . "\n";
            echo '<p>optimizeMember automatically generates Specific Post/Page Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Specific Post/Page Link to be created manually, you can use this tool for that.</p>' . "\n";
            /**/
            echo '<table class="form-table">' . "\n";
            echo '<tbody>' . "\n";
            echo '<tr>' . "\n";
            /**/
            echo '<td>' . "\n";
            echo '<form onsubmit="return false;">' . "\n";
            /**/
            echo '<p><select id="ws-plugin--optimizemember-pro-sp-link-leading-id">' . "\n";
            echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
            /**/
            $ws_plugin__optimizemember_pro_temp_a_singulars = c_ws_plugin__optimizemember_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
            /**/
            foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
                echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
            }
            /**/
            echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\\n\\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
            /**/
            echo '<p><select id="ws-plugin--optimizemember-pro-sp-link-additional-ids" multiple="multiple" style="height:100px; min-width:450px;">' . "\n";
            echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
            /**/
            foreach ($ws_plugin__optimizemember_pro_temp_a_singulars as $ws_plugin__optimizemember_pro_temp_o) {
                echo '<option value="' . esc_attr($ws_plugin__optimizemember_pro_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_pro_temp_o->post_title) . '</option>' . "\n";
            }
            /**/
            echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and optimizeMember generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* optimizeMember sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
            /**/
            echo '<p><select id="ws-plugin--optimizemember-pro-sp-link-hours">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/google-sp-hours.php"))) . '</select> <input type="button" value="Generate Access Link" onclick="ws_plugin__optimizemember_pro_googleSpLinkGenerate();" class="button-primary" /> <img id="ws-plugin--optimizemember-pro-sp-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
            echo '<p id="ws-plugin--optimizemember-pro-sp-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
            echo '</form>' . "\n";
            echo '</td>' . "\n";
            /**/
            echo '</tr>' . "\n";
            echo '</tbody>' . "\n";
            echo '</table>' . "\n";
            echo '</div>' . "\n";
            /**/
            echo '</div>' . "\n";
            /**/
            echo '<div class="ws-menu-page-group" title="Shortcode Attributes ( Explained )">' . "\n";
            /**/
            echo '<div class="ws-menu-page-section ws-plugin--optimizemember-pro-shortcode-attrs-section">' . "\n";
            echo '<h3>Shortcode Attributes ( Explained In Full Detail )</h3>' . "\n";
            echo '<p>When you generate a Button Code, optimizeMember will make a <a href="http://codex.wordpress.org/Shortcode_API#Overview" target="_blank" rel="external">Shortcode</a> available to you. Like most Shortcodes for WordPress, optimizeMember reads Attributes in your Shortcode. These Attributes will be pre-configured by one of optimizeMember\'s Button Generators automatically; so there really is nothing more you need to do. However, many site owners like to know exactly how these Shortcode Attributes work. Below, is a brief overview of each possible Shortcode Attribute.</p>' . "\n";
            /**/
            echo '<table class="form-table" style="margin-top:0;">' . "\n";
            echo '<tbody>' . "\n";
            echo '<tr style="padding-top:0;">' . "\n";
            /**/
            echo '<td style="padding-top:0;">' . "\n";
            echo '<ul>' . "\n";
            echo '<li><code>cancel="0"</code> Cancellation Button. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Cancellation Button, <code>1</code> = this IS a Cancellation Button.</li>' . "\n";
            echo '<li><code>cc="USD"</code> 3 character Currency Code. Not valid when <code>modify|cancel="1"</code>.</li>' . "\n";
            echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<li><code>ccaps="music,videos"</code> A comma-delimited list of Custom Capabilities. Only valid w/ Membership Level Access and/or Independent Custom Capabilities.</li>' . "\n" : '';
            echo '<li><code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '"</code> must start with your domain. Additional values can be piped in ( ex: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3|etc"</code> ). Not valid when <code>modify|cancel="1"</code>.</li>' . "\n";
            echo '<li><code>desc="Gold Membership"</code> A brief purchase Description. Not valid when <code>modify|cancel="1"</code>.</li>' . "\n";
            echo '<li><code>exp="72"</code> Access Expires ( in hours ). Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
            echo '<li><code>ids="14"</code> A Post/Page ID#, or a comma-delimited list of IDs. Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
            echo '<li><code>image="default"</code> Button Image Location. Possible values: <code>default</code> = use the default Google Checkout Button, <code>http://...</code> = location of your custom Image.</li>' . "\n";
            echo '<li><code>level="1"</code> Membership Level [1-4] <em>( or, up to the number of configured Levels )</em>. Only valid for Buttons providing paid Membership Level Access.' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' Or, with Independent Custom Capabilities this MUST be set to <code>level="*"</code>, and <code>ccaps=""</code> must NOT be empty <em>( i.e. <code>level="*" ccaps="music,videos"</code> )</em>.') . '</li>' . "\n";
            echo '<li><code>modify="0"</code> Modification Button. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Modification Button, <code>1</code> = this IS a Modification Button.</li>' . "\n";
            echo '<li><code>output="anchor"</code> Output Type. Possible values: <code>anchor</code> = Google Checkout Button (  &lt;a&gt; anchor tag ) URL w/ ?query string, <code>url</code> = raw URL w/ ?query string.</li>' . "\n";
            echo '<li><code>ra="0.01"</code> Regular, Buy Now, and/or Recurring Amount. Must be &gt;= <code>0.01</code>. Not valid when <code>modify|cancel="1"</code>.</li>' . "\n";
            echo '<li><code>rp="1"</code> Regular Period. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Must be &gt;= <code>1</code> ( ex: <code>1</code> Week, <code>2</code> Months, <code>1</code> Month, <code>3</code> Days ).</li>' . "\n";
            echo '<li><code>rt="M"</code> Regular Term. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Possible values: <code>D</code> = Days, <code>W</code> = Weeks, <code>M</code> = Months, <code>Y</code> = Years, <code>L</code> = Lifetime.</li>' . "\n";
            echo '<li><code>rr="1"</code> Recurring directive. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Possible values: <code>0</code> = non-recurring "Subscription" with possible Trial Period for free, or at a different Trial Amount; <code>1</code> = recurring "Subscription" with possible Trial Period for free, or at a different Trial Amount; <code>BN</code> = non-recurring "Buy Now" functionality, no Trial Period possible.</li>' . "\n";
            echo '<li><code>sp="0"</code> Specific Post/Page Button. Possible values: <code>0</code> = this is NOT a Specific Post/Page Access Button, <code>1</code> = this IS a Specific Post/Page Access Button.</li>' . "\n";
            echo '<li><code>ta="0.00"</code> Trial Amount. Only valid w/ Membership Level Access. Must be <code>0</code> when <code>rt="L"</code> or when <code>rr="BN"</code>.</li>' . "\n";
            echo '<li><code>tp="0"</code> Trial Period. Only valid w/ Membership Level Access. Must be <code>0</code> when <code>rt="L"</code> or when <code>rr="BN"</code>.</li>' . "\n";
            echo '<li><code>tt="D"</code> Trial Term. Only valid w/ Membership Level Access. Possible values: <code>D</code> = Days, <code>W</code> = Weeks, <code>M</code> = Months, <code>Y</code> = Years.</li>' . "\n";
            echo '</ul>' . "\n";
            echo '</td>' . "\n";
            /**/
            echo '</tr>' . "\n";
            echo '</tbody>' . "\n";
            echo '</table>' . "\n";
            echo '</div>' . "\n";
            /**/
            echo '</div>' . "\n";
            /**/
            echo '</td>' . "\n";
            /**/
            echo '<td class="ws-menu-page-table-r">' . "\n";
            c_ws_plugin__optimizemember_menu_pages_rs::display();
            echo '</td>' . "\n";
            /**/
            echo '</tr>' . "\n";
            echo '</tbody>' . "\n";
            echo '</table>' . "\n";
            /**/
            echo '</div>' . "\n";
            echo '</div>' . "\n";
        }
Esempio n. 7
0
        public function __construct()
        {
            echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n";
            /**/
            echo '<div class="op-bsw-header">';
            echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>';
            echo '</div>';
            echo '<div class="op-bsw-main-content inline-input-fields">';
            echo '<h2>PayPal Buttons</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_paypal_buttons_page_before_left_sections", get_defined_vars());
            /**/
            for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
                $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
                if (($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_levelN_buttons = "ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_level" . $n . "_buttons") && apply_filters($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_levelN_buttons, true, get_defined_vars())) {
                    if ($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_levelN_buttons = "ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_level" . $n . "_buttons") {
                        do_action($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_levelN_buttons, get_defined_vars());
                    }
                    /**/
                    echo '<div class="ws-menu-page-group" title="PayPal Buttons For Level ' . $labelText . ' Access">' . "\n";
                    /**/
                    echo '<div class="ws-menu-page-section ws-plugin--optimizemember-level' . $n . '-buttons-section">' . "\n";
                    echo '<h3>Button Code Generator For Level ' . $labelText . ' Access</h3>' . "\n";
                    echo '<p>Very simple. All you do is customize the form fields provided, for each Membership Level that you plan to offer. Then press (Generate Button Code). These special PayPal Buttons are customized to work with optimizeMember seamlessly. Member accounts will be activated instantly, in an automated fashion. When you, or a Member, cancels their Membership, or fails to make payments on time, optimizeMember will automatically terminate their Membership privileges. optimizeMember makes extensive use of the PayPal IPN service. optimizeMember receives updates from PayPal behind-the-scene.</p>' . "\n";
                    echo '<p><em>* Buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your Membership Options Page. If you lose your Button Code, you\'ll need to come back &amp; re-generate a new one. If you\'re in Sandbox Test-Mode, and you\'re NOT using the Shortcode Format, please remember to come back and re-generate your Buttons before you go live.</em></p>' . "\n";
                    /**/
                    if ($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_levelN_buttons = "ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_level" . $n . "_buttons") {
                        do_action($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_levelN_buttons, get_defined_vars());
                    }
                    /**/
                    echo '<table class="form-table">' . "\n";
                    echo '<tbody>' . "\n";
                    echo '<tr>' . "\n";
                    /**/
                    echo '<th class="ws-menu-page-th-side">' . "\n";
                    echo '<label for="ws-plugin--optimizemember-level' . $n . '-shortcode">' . "\n";
                    echo 'Button Code<br />For Level ' . $labelText . ':<br /><br />' . "\n";
                    echo '<div id="ws-plugin--optimizemember-level' . $n . '-button-prev"></div>' . "\n";
                    echo '</label>' . "\n";
                    echo '</th>' . "\n";
                    /**/
                    echo '<td>' . "\n";
                    echo '<form onsubmit="return false;">' . "\n";
                    echo '<p id="ws-plugin--optimizemember-level' . $n . '-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--optimizemember-level' . $n . '-trial-period" value="0" size="6" /> <select id="ws-plugin--optimizemember-level' . $n . '-trial-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-level' . $n . '-trial-amount" value="0.00" size="4" /></p>' . "\n";
                    echo '<p><span id="ws-plugin--optimizemember-level' . $n . '-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-level' . $n . '-term" class="paypal-buttons-subscription-select">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select></p>' . "\n";
                    echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by optimizeMember; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-level' . $n . '-page-style" value="paypal" size="18" class="paypal-buttons-checkout-page-style-input" /> <select id="ws-plugin--optimizemember-level' . $n . '-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__optimizemember_paypalButtonGenerate(\'level' . $n . '\');" class="button-primary" /></p>' . "\n";
                    echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-level' . $n . '-desc" class="paypal-buttons-description-input" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="73" /></p>' . "\n";
                    //echo '<p' . ((is_multisite () && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-level' . $n . '-ccaps" size="40" /></p>' . "\n";
                    echo 'Packages: ';
                    if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) {
                        foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) {
                            echo '<input type="checkbox" onchange="showSelectedValues(\'ccpchk_' . $n . '\', \'ccaps\', ' . $n . ');" name="ws_plugin__optimizemember_ccpchk_' . $n . '" value="' . $val . '" /> ' . $val . "\n";
                        }
                    } else {
                        echo 'To use packages, enter some first in <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--optimizemember-gen-ops")) . '">Define membership levels and packages section.</a>';
                    }
                    echo '<input type="hidden" autocomplete="off" name="ws_plugin__optimizemember_security_meta_box_ccaps" id="ws-plugin--optimizemember-level' . $n . '-ccaps" value="" />' . "\n";
                    ?>

										<?php 
                    echo '</form>' . "\n";
                    echo '</td>' . "\n";
                    /**/
                    echo '</tr>' . "\n";
                    echo '<tr>' . "\n";
                    /**/
                    echo '<td colspan="2">' . "\n";
                    echo '<form onsubmit="return false;">' . "\n";
                    /**/
                    if ($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_levelN_buttons_before_shortcode = "ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_level" . $n . "_buttons_before_shortcode") {
                        do_action($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_levelN_buttons_before_shortcode, get_defined_vars());
                    }
                    /**/
                    echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
                    $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-checkout-button-shortcode.php")));
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($n)), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"])), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_temp_s);
                    echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-level' . $n . '-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
                    /**/
                    echo '<div' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '><br />' . "\n";
                    echo '<strong>Resulting PayPal Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
                    echo '<textarea id="ws-plugin--optimizemember-level' . $n . '-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
                    $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/buttons/paypal-checkout-button.php")));
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%endpoint%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%paypal_business%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_business"])), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($n)), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"])), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%cancel_return%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(home_url("/"))), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%notify_url%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url("/?optimizemember_paypal_notify=1"))), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%return%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url("/?optimizemember_paypal_return=1"))), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%images%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images")), $ws_plugin__optimizemember_temp_s);
                    $ws_plugin__optimizemember_temp_s = preg_replace("/%%wpurl%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url())), $ws_plugin__optimizemember_temp_s);
                    echo format_to_edit($ws_plugin__optimizemember_temp_s);
                    echo '</textarea><br />' . "\n";
                    echo '&uarr; <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
                    echo '</div>' . "\n";
                    /**/
                    echo '</form>' . "\n";
                    echo '</td>' . "\n";
                    /**/
                    echo '</tr>' . "\n";
                    echo '</tbody>' . "\n";
                    echo '</table>' . "\n";
                    echo '</div>' . "\n";
                    /**/
                    echo '</div>' . "\n";
                    /**/
                    if ($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_after_levelN_buttons = "ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_after_level" . $n . "_buttons") {
                        do_action($ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_after_levelN_buttons, get_defined_vars());
                    }
                }
            }
            ?>
							<script type="text/javascript">
							window.showSelectedValues = function(param, elemId, n) {
									var text = jQuery("input[name=ws_plugin__optimizemember_"+param+"]:checked").map(
									     function () {return this.value;}).get().join(",");
									jQuery("#ws-plugin--optimizemember-level"+n+"-" + elemId).val(text);


								}
							window.showSingleSelectedValues = function(param, elemId, n) {
								var text = jQuery("input[name=ws_plugin__optimizemember_"+param+"]:checked").map(
								     function () {return this.value;}).get().join(",");
								jQuery("#ws-plugin--optimizemember-" + elemId + "-ccaps").val(text);


							}
								/**/
							</script>
							<?php 
            /**/
            if (apply_filters("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_modification_buttons", true, get_defined_vars())) {
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_modification_buttons", get_defined_vars());
                /**/
                echo '<div class="ws-menu-page-group" title="PayPal Subscr Modification Buttons">' . "\n";
                /**/
                echo '<div class="ws-menu-page-section ws-plugin--optimizemember-modification-buttons-section">' . "\n";
                echo '<h3>Button Code Generator For Subscription Modifications</h3>' . "\n";
                echo '<p>If you\'d like to give your Members <em>( and/or your Free Subscribers )</em> the ability to modify their billing plan, by switching to a more expensive option, or a less expensive option; generate a new PayPal Modification Button here. Configure the updated Level, pricing, terms, etc. Then, make that new Modification Button available to Members who are logged into their existing account with you. For example, you might want to insert a "Level #2" Upgrade Button into your Login Welcome Page, which would up-sell existing Level #1 Members to a more expensive plan that you offer.</p>' . "\n";
                echo '<p><em><strong>*Important Note*</strong> Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button. Otherwise, post-processing of their transaction will fail to recognize the Customer\'s existing account within WordPress. Please display this Button only to Users/Members that are already logged into their account ( perhaps in your Login Welcome Page for optimizeMember ), or in another location where you can be absolutely sure that a User/Member is logged in. optimizeMember\'s Simple Conditionals could also be used to ensure a User/Member is logged in, by wrapping your Shortcode within a Conditional test. For further details, please see: <code>optimizeMember -> API Scripting -> Simple Conditionals</code>.</em></p>' . "\n";
                echo '<p><em><strong>*Modification Process*</strong> When you send a Member to PayPal using a Subscription Modification Button, PayPal will ask them to login. Once they\'re logged in, instead of being able to signup for a new Membership, PayPal will provide them with the ability to upgrade and/or downgrade their existing Membership with you, by allowing them to switch to the Membership Plan that was specified in the Subscription Modification Button. PayPal handles this nicely, and you\'ll be happy to know that optimizeMember has been pre-configured to deal with this scenario as well, so that everything remains automated. Their Membership Access Level will either be promoted, or demoted, based on the actions they took at PayPal during the modification process. Once an existing Member completes their Subscription Modification at PayPal, they\'ll be brought back to their Login Welcome Page, instead of to the registration screen.</em></p>' . "\n";
                echo '<p><em><strong>*Also Works For Free Subscribers*</strong> Although a Free Subscriber does not have an existing PayPal Subscription, optimizeMember is capable of adapting to this scenario gracefully. Just make sure that your existing Free Subscribers <em>( the ones who wish to upgrade )</em> pay for their Membership through a Modification Button generated by optimizeMember. That will allow them to continue using their existing account with you. In other words, they can keep their existing Username <em>( and anything already associated with that Username )</em>, rather than being forced to re-register after checkout.</em></p>' . "\n";
                echo '<p><em><strong>*Make It More User-Friendly*</strong> You can make the Subscription Modification Process, more user-friendly, by setting up a <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can tell optimizeMember to use that Page Style whenever you generate your Button Code.\'); return false;">Custom Page Style at PayPal</a>, specifically for Subscription Modification Buttons. Use a custom header image, with a brief explanation to the Customer. Something like, "Log into PayPal", "You can Modify your Subscription!".</em></p>' . "\n";
                echo '<p><em><strong>*Integrating Conditionals*</strong> Since each Modification Button is configured for a specific Level, you may want to create multiple Modification Buttons, one for each combination you intend to make available. optimizeMember\'s API Conditionals can help you display the proper Button to each Customer, based on the status of their existing account. For further details, see: <code>optimizeMember -> API Scripting</code>.</em></p>' . "\n";
                echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>*Independent Custom Capabilities*</strong> If you just want to sell an existing Member new Custom Capabilities, without affecting their paid Subscription in any way, please see the next Button Generator: <code>Capability (Buy Now) Buttons</code>. Independent Capability Buttons facilitate Buy Now functionality, specifically for Custom Capabilities, without affecting the Customer\'s primary Subscription and Membership Level Access.</em></p>' . "\n" : '';
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_modification_buttons", get_defined_vars());
                /**/
                echo '<table class="form-table">' . "\n";
                echo '<tbody>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<th class="ws-menu-page-th-side">' . "\n";
                echo '<label for="ws-plugin--optimizemember-modification-shortcode">' . "\n";
                echo 'Button Code<br />For Modifications:<br /><br />' . "\n";
                echo '<div id="ws-plugin--optimizemember-modification-button-prev"></div>' . "\n";
                echo '</label>' . "\n";
                echo '</th>' . "\n";
                /**/
                echo '<td>' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                /**/
                echo '<p>Modification: <select id="ws-plugin--optimizemember-modification-level">' . "\n";
                /**/
                for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
                    $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
                    echo '<optgroup label="Level ' . $labelText . '">' . "\n";
                    echo '<option value="upgrade:' . $n . '">&uarr; Upgrade To Level ' . $labelText . '</option>' . "\n";
                    echo $n < $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? '<option value="downgrade:' . $n . '">&darr; Downgrade To Level ' . $labelText . '</option>' . "\n" : '';
                    echo '</optgroup>' . "\n";
                    /**/
                    echo $n < $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"] ? '<option disabled="disabled"></option>' . "\n" : '';
                }
                /**/
                echo '</select></p>' . "\n";
                /**/
                echo '<p id="ws-plugin--optimizemember-modification-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--optimizemember-modification-trial-period" value="0" size="6" /> <select id="ws-plugin--optimizemember-modification-trial-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-modification-trial-amount" value="0.00" size="4" /></p>' . "\n";
                echo '<p><span id="ws-plugin--optimizemember-modification-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-modification-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-modification-term" class="paypal-buttons-subscription-select">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select><span id="ws-plugin--optimizemember-modification-20p-rule"><br /><small>* Watch out for <a href="https://www.x.com/thread/41748" target="_blank" rel="external">the 20% rule</a>. Additional details are <a href="http://www.optimizepress.com/paypal-20p-rule" target="_blank" rel="external">documented here</a>.<br />* <strong>Tip</strong> <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember Pro Forms</a> are NOT subjected to this ridiculous 20% rule.</small></span></p>' . "\n";
                echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by optimizeMember; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-modification-page-style" value="paypal" size="18" class="paypal-buttons-checkout-page-style-input" /> <select id="ws-plugin--optimizemember-modification-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__optimizemember_paypalButtonGenerate(\'modification\');" class="button-primary" /></p>' . "\n";
                echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-modification-desc" class="paypal-buttons-description-input" value="Description and pricing details here." size="73" /></p>' . "\n";
                //echo '<p' . ((is_multisite () && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-modification-ccaps" size="40" /></p>' . "\n";
                //echo '<p' . ((is_multisite () && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-level' . $n . '-ccaps" size="40" /></p>' . "\n";
                echo 'Packages: ';
                $n = 1;
                if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) {
                    foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) {
                        echo '<input type="checkbox" onchange="showSingleSelectedValues(\'ccpchksub_' . $n . '\', \'modification\', ' . $n . ');" name="ws_plugin__optimizemember_ccpchksub_' . $n . '" value="' . $val . '" /> ' . $val . "\n";
                    }
                } else {
                    echo 'To use packages, enter some first in <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--optimizemember-gen-ops")) . '">Define membership levels and packages section.</a>';
                }
                echo '<input type="hidden" autocomplete="off" name="ws_plugin__optimizemember_security_meta_box_ccaps" id="ws-plugin--optimizemember-modification-ccaps" value="" />' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<td colspan="2">' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_modification_buttons_before_shortcode", get_defined_vars());
                echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
                $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-checkout-button-shortcode.php")));
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr("1")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%level_label%% /", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level1_label"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/\\/]\$/", 'modify="1" /]', $ws_plugin__optimizemember_temp_s);
                /* Adds modify="1" to the end of the Shortcode. */
                echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-modification-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
                /**/
                echo '<div' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '><br />' . "\n";
                echo '<strong>Resulting PayPal Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
                echo '<textarea id="ws-plugin--optimizemember-modification-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
                $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/buttons/paypal-checkout-button.php")));
                $ws_plugin__optimizemember_temp_s = preg_replace('/name\\="modify" value\\="(.*?)"/', 'name="modify" value="1"', $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%endpoint%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%paypal_business%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_business"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%level%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr("1")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%level_label%% /", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level1_label"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%cancel_return%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(home_url("/"))), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%notify_url%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url("/?optimizemember_paypal_notify=1"))), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%return%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url("/?optimizemember_paypal_return=1"))), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%images%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%wpurl%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url())), $ws_plugin__optimizemember_temp_s);
                echo format_to_edit($ws_plugin__optimizemember_temp_s);
                echo '</textarea><br />' . "\n";
                echo '&uarr; <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
                echo '</div>' . "\n";
                /**/
                echo '</form>' . "\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_buttons_page_during_left_sections_after_modification_buttons", get_defined_vars());
            }
            /**/
            if (apply_filters("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_ccap_buttons", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_ccap_buttons", get_defined_vars());
                /**/
                echo '<div class="ws-menu-page-group" title="PayPal Capability (Buy Now) Buttons">' . "\n";
                /**/
                echo '<div class="ws-menu-page-section ws-plugin--optimizemember-ccap-buttons-section">' . "\n";
                echo '<h3>Button Code Generator For Independent Custom Capabilities</h3>' . "\n";
                echo '<p>This is VERY advanced. For further details, please check your Dashboard: <code>optimizeMember -> API Scripting -> Custom Capabiities</code>.</p>' . "\n";
                echo '<p>With optimizeMember, you can sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site <em>( i.e. you could even sell Independent Custom Capabilities to Users at Membership Level #0, normally referred to as Free Subscribers, if you like )</em>. So this is quite flexible. Independent Custom Capabilities do NOT rely on any specific Membership Level. That\'s why optimizeMember refers to these as `Independent` Custom Capabilities, because you can sell Capabilities this way, through Buy Now functionality, and the Customer\'s Membership Level Access, along with any existing paid Subscription they may already have with you, will remain completely unaffected. That being said, if you intend to charge a recurring fee for Custom Capabilities, please use a <code>Subscr. Modification Button</code> instead; because Independent Custom Capabilities can only be sold through Buy Now functionality.</p>' . "\n";
                echo '<p>Independent Custom Capabilities are added to a Customer\'s account immediately after checkout, and the Customer will have the Custom Capabilities for as long as their Membership lasts, based on their primary Subscription with your site, and/or forever, if they have a Lifetime account with you. In other words, Independent Custom Capabilities will exist on the Customer\'s account forever, or until an EOT <em>( End Of Term )</em> occurs on their primary Subscription with you; in which case optimizeMember would demote or delete the Customer\'s account <em>( based on your EOT configuration )</em>, and all Custom Capabilities are removed as well.</p>' . "\n";
                echo '<p>Very simple. All you do is customize the form fields provided, for each set of Custom Capabilities that you plan to sell. Then press (Generate Button Code). These special PayPal Buttons are customized to work with optimizeMember seamlessly. The Customer will be granted additional access to one or more Custom Capabilities that you specify; while the Customer\'s Membership Level Access and any existing paid Subscription they may already have with you, will remain completely unaffected.</p>' . "\n";
                echo '<p><em><strong>*Important Note*</strong> Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button. Otherwise, post-processing of their transaction will fail to recognize the Customer\'s existing account within WordPress. Please display this Button only to Users/Members that are already logged into their account ( perhaps in your Login Welcome Page for optimizeMember ), or in another location where you can be absolutely sure that a User/Member is logged in. optimizeMember\'s Simple Conditionals could also be used to ensure a User/Member is logged in, by wrapping your Shortcode within a Conditional test. For further details, please see: <code>optimizeMember -> API Scripting -> Simple Conditionals</code>.</em></p>' . "\n";
                echo '<p><em>* Buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your WordPress Editor. If you lose your Button Code, you\'ll need to come back &amp; re-generate a new one. If you\'re in Sandbox Test-Mode, and you\'re NOT using the Shortcode Format, please remember to come back and re-generate your Buttons before you go live.</em></p>' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_ccap_buttons", get_defined_vars());
                /**/
                echo '<table class="form-table">' . "\n";
                echo '<tbody>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<th class="ws-menu-page-th-side">' . "\n";
                echo '<label for="ws-plugin--optimizemember-ccap-shortcode">' . "\n";
                echo 'Button Code<br />For Capabilities:<br /><br />' . "\n";
                echo '<div id="ws-plugin--optimizemember-ccap-button-prev"></div>' . "\n";
                echo '</label>' . "\n";
                echo '</th>' . "\n";
                /**/
                echo '<td>' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-ccap-term">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-membership-ccap-terms.php"))) . '</select></p>' . "\n";
                echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by optimizeMember; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-ccap-page-style" class="paypal-buttons-checkout-page-style-input" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-ccap-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__optimizemember_paypalCcapButtonGenerate();" class="button-primary" /></p>' . "\n";
                echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-ccap-desc" class="paypal-buttons-description-input" value="Description and pricing details here." size="73" /></p>' . "\n";
                //echo '<p>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell optimizeMember to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-ccap-ccaps" size="40" /></p>' . "\n";
                echo 'Packages: ';
                $n = 1;
                if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) {
                    foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) {
                        echo '<input type="checkbox" onchange="showSingleSelectedValues(\'ccpchkccaps_' . $n . '\', \'ccap\', ' . $n . ');" name="ws_plugin__optimizemember_ccpchkccaps_' . $n . '" value="' . $val . '" /> ' . $val . "\n";
                    }
                } else {
                    echo 'To use packages, enter some first in <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--optimizemember-gen-ops")) . '">Define membership levels and packages section.</a>';
                }
                echo '<input type="hidden" autocomplete="off" name="ws_plugin__optimizemember_security_meta_box_ccaps" id="ws-plugin--optimizemember-ccap-ccaps" value="" />' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<td colspan="2">' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_ccap_buttons_before_shortcode", get_defined_vars());
                echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
                $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.php")));
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_temp_s);
                echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-ccap-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
                /**/
                echo '<div' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '><br />' . "\n";
                echo '<strong>Resulting PayPal Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
                echo '<textarea id="ws-plugin--optimizemember-ccap-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
                $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/buttons/paypal-ccaps-checkout-button.php")));
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%endpoint%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%paypal_business%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_business"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%cancel_return%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(home_url("/"))), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%notify_url%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url("/?optimizemember_paypal_notify=1"))), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%return%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url("/?optimizemember_paypal_return=1"))), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%images%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%wpurl%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url())), $ws_plugin__optimizemember_temp_s);
                echo format_to_edit($ws_plugin__optimizemember_temp_s);
                echo '</textarea><br />' . "\n";
                echo '&uarr; <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
                echo '</div>' . "\n";
                /**/
                echo '</form>' . "\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_buttons_page_during_left_sections_after_ccap_buttons", get_defined_vars());
            }
            /**/
            if (apply_filters("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_cancellation_buttons", true, get_defined_vars())) {
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_cancellation_buttons", get_defined_vars());
                /**/
                echo '<div class="ws-menu-page-group" title="PayPal Subscr Cancellation Buttons">' . "\n";
                /**/
                echo '<div class="ws-menu-page-section ws-plugin--optimizemember-cancellation-buttons-section">' . "\n";
                echo '<h3>One Button Does It All For Cancellations ( copy/paste )</h3>' . "\n";
                echo '<p>Since all recurring charges are associated with a PayPal Subscription; and every PayPal Subscription is associated with a PayPal Account; your Members will always have a PayPal Account of their own, which is tied to their Membership with you. So... a Member can simply log into their own PayPal account and cancel their Subscription(s) with you at anytime, all on their own. However, some Customers do not realize this. So, if you would like to make it clearer ( easier ) for Members to cancel their own Subscription(s), you can provide this Cancellation Button for them on your Login Welcome Page, or somewhere in the support section of your website. Note... you don\'t have to use this Cancellation Button at all, if you don\'t want to. It\'s completely optional.</p>' . "\n";
                echo '<p><em><strong>*Cancellation Process*</strong> Very simple. A Member clicks the Cancellation Button. PayPal asks them to log into their PayPal account. Once they\'re logged in, PayPal will display a list of all active Subscriptions they have with you. They choose which ones they want to cancel, and optimizeMember is notified silently behind-the-scene, through the PayPal IPN service.</em></p>' . "\n";
                echo '<p><em><strong>*Understanding Cancellations*</strong> It\'s important to realize that a Cancellation is not an EOT ( End Of Term ). All that happens during a Cancellation event, is that billing is stopped, and it\'s understood that the Customer is going to lose access, at some point in the future. This does NOT mean, that access will be revoked immediately. A separate EOT event will automatically handle a (demotion or deletion) later, at the appropriate time; which could be several days, or even a year after the Cancellation took place.</em></p>' . "\n";
                echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through 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 ( End Of Term ) until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, optimizeMember will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). optimizeMember also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_cancellation_buttons", get_defined_vars());
                /**/
                echo '<table class="form-table">' . "\n";
                echo '<tbody>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<th class="ws-menu-page-th-side">' . "\n";
                echo '<label for="ws-plugin--optimizemember-cancellation-shortcode">' . "\n";
                echo 'Button Code<br />For Cancellations:<br /><br />' . "\n";
                echo '<div id="ws-plugin--optimizemember-cancellation-button-prev">' . "\n";
                $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/buttons/paypal-cancellation-button.php")));
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%endpoint%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%paypal_business%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_business"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%images%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%wpurl%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url())), $ws_plugin__optimizemember_temp_s);
                echo preg_replace("/\\<a/", '<a target="_blank"', $ws_plugin__optimizemember_temp_s);
                echo '</div>' . "\n";
                echo '</label>' . "\n";
                echo '</th>' . "\n";
                /**/
                echo '<td class="align-top">' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                echo '<p>No configuration necessary.</p>' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<td colspan="2">' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_cancellation_buttons_before_shortcode", get_defined_vars());
                echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
                $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-cancellation-button-shortcode.php")));
                echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-cancellation-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
                /**/
                echo '<div' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '><br />' . "\n";
                echo '<strong>Resulting PayPal Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
                echo '<textarea id="ws-plugin--optimizemember-cancellation-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
                $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/buttons/paypal-cancellation-button.php")));
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%endpoint%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%paypal_business%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_business"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%images%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%wpurl%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url())), $ws_plugin__optimizemember_temp_s);
                echo format_to_edit($ws_plugin__optimizemember_temp_s);
                echo '</textarea><br />' . "\n";
                echo '&uarr; <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
                echo '</div>' . "\n";
                /**/
                echo '</form>' . "\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_buttons_page_during_left_sections_after_cancellation_buttons", get_defined_vars());
            }
            /**/
            if (apply_filters("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_reg_links", true, get_defined_vars())) {
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_reg_links", get_defined_vars());
                /**/
                echo '<div class="ws-menu-page-group" title="PayPal Member Registration Access Links">' . "\n";
                /**/
                echo '<div class="ws-menu-page-section ws-plugin--optimizemember-reg-links-section">' . "\n";
                echo '<h3>Registration Access Link Generator ( for Customer Service )</h3>' . "\n";
                echo '<p>optimizeMember automatically generates Registration Access Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Registration Access Link to be created manually, you can use this tool for that. Alternatively, you can create their account yourself/manually by going to <code>optimizeMember -> Add A Member</code>. Either of these methods will work fine.</p>' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_reg_links", get_defined_vars());
                /**/
                echo '<table class="form-table">' . "\n";
                echo '<tbody>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<td>' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                echo '<p>Paid Membership Level#: <select id="ws-plugin--optimizemember-reg-link-level" style="min-width:200px;">' . "\n";
                for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) {
                    $labelText = ws_plugin__optimizemember_getMembershipLabel($n);
                    echo '<option value="' . $n . '">optimizeMember Level ' . $labelText . '</option>' . "\n";
                }
                echo '</select></p>' . "\n";
                echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID ( aka: Recurring Profile ID, Transaction ID ) must be unique. This value can be obtained from inside your PayPal account under the History tab. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, optimizeMember will be unable to maintain future communication with the PayPal IPN ( i.e. Notification ) service if this value does not reflect a real Paid Subscr. ID that exists in your PayPal History log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
                echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-reg-link-custom" value="' . esc_attr($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__optimizemember_paypalRegLinkGenerate();" class="button-primary" /> <img id="ws-plugin--optimizemember-reg-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
                //echo '<p' . ((is_multisite () && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: optimizeMember -> API Scripting -> Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--optimizemember-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
                echo 'Packages: ';
                $n = 1;
                if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) {
                    foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) {
                        echo '<input type="checkbox" onchange="showSingleSelectedValues(\'ccpchkreg_' . $n . '\', \'reg-link\', ' . $n . ');" name="ws_plugin__optimizemember_ccpchkreg_' . $n . '" value="' . $val . '" /> ' . $val . "\n";
                    }
                } else {
                    echo 'To use packages, enter some first in <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--optimizemember-gen-ops")) . '">Define membership levels and packages section.</a>';
                }
                echo '<input type="hidden" autocomplete="off" name="ws_plugin__optimizemember_security_meta_box_ccaps" id="ws-plugin--optimizemember-reg-link-ccaps" value="" />' . "\n";
                echo '<p>Fixed Term Length ( for Buy Now transactions ): <input type="text" autocomplete="off" id="ws-plugin--optimizemember-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction ( i.e. there is no Initial/Trial Period and no recurring charges for ongoing access ), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is automatically revoked by optimizeMember at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D ( this means 1 Day )\\n1 W ( this means 1 Week )\\n1 M ( this means 1 Month )\\n1 Y ( this means 1 Year )\\n1 L ( this means 1 Lifetime )\'); return false;">[?]</a></p>' . "\n";
                echo '<p id="ws-plugin--optimizemember-reg-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '</tbody>' . "\n";
                echo '</table>' . "\n";
                echo '</div>' . "\n";
                /**/
                echo '</div>' . "\n";
                /**/
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_after_reg_links", get_defined_vars());
            }
            /**/
            if (apply_filters("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_sp_buttons", true, get_defined_vars())) {
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_sp_buttons", get_defined_vars());
                /**/
                echo '<div class="ws-menu-page-group" title="PayPal Specific Post/Page (Buy Now) Buttons">' . "\n";
                /**/
                echo '<div class="ws-menu-page-section ws-plugin--optimizemember-sp-buttons-section">' . "\n";
                echo '<h3>Button Code Generator For Specific Post/Page Buttons</h3>' . "\n";
                echo '<p>optimizeMember now supports an additional layer of functionality ( very powerful ), which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" Buttons, and your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
                echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. optimizeMember will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link ( see: <code>optimizeMember -> PayPal Options -> Specific Post/Page Email</code> ). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
                echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress. A Specific Post/Page that is protected by optimizeMember, might contain a download link for your eBook, access to file &amp; music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress Post/Page that you\'ve created. To protect Specific Posts/Pages, please see: <code>optimizeMember -> Restriction Options -> Specific Post/Page Access</code>. Once you\'ve configured your Specific Post/Page Restrictions, those Posts/Pages will be available in the menus below.</p>' . "\n";
                echo '<p>Very simple. All you do is customize the form fields provided, for each Post/Page that you plan to sell. Then press (Generate Button Code). These special PayPal Buttons are customized to work with optimizeMember seamlessly. You can even Package Additional Posts/Pages together into one transaction.</p>' . "\n";
                echo '<p><em>* Buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your WordPress Editor. If you lose your Button Code, you\'ll need to come back &amp; re-generate a new one. If you\'re in Sandbox Test-Mode, and you\'re NOT using the Shortcode Format, please remember to come back and re-generate your Buttons before you go live.</em></p>' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_sp_buttons", get_defined_vars());
                /**/
                echo '<table class="form-table">' . "\n";
                echo '<tbody>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<th class="ws-menu-page-th-side">' . "\n";
                echo '<label for="ws-plugin--optimizemember-sp-shortcode">' . "\n";
                echo 'Button Code<br />Specific Posts/Pages:<br /><br />' . "\n";
                echo '<div id="ws-plugin--optimizemember-sp-button-prev"></div>' . "\n";
                echo '</label>' . "\n";
                echo '</th>' . "\n";
                /**/
                echo '<td>' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                /**/
                echo '<p><select id="ws-plugin--optimizemember-sp-leading-id">' . "\n";
                echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
                /**/
                $ws_plugin__optimizemember_temp_a_singulars = c_ws_plugin__optimizemember_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
                /**/
                foreach ($ws_plugin__optimizemember_temp_a_singulars as $ws_plugin__optimizemember_temp_o) {
                    echo '<option value="' . esc_attr($ws_plugin__optimizemember_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_temp_o->post_title) . '</option>' . "\n";
                }
                /**/
                echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\\n\\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
                /**/
                echo '<p><select id="ws-plugin--optimizemember-sp-additional-ids" multiple="multiple" style="height:100px;">' . "\n";
                echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
                /**/
                foreach ($ws_plugin__optimizemember_temp_a_singulars as $ws_plugin__optimizemember_temp_o) {
                    echo '<option value="' . esc_attr($ws_plugin__optimizemember_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_temp_o->post_title) . '</option>' . "\n";
                }
                /**/
                echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and optimizeMember generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* optimizeMember sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
                /**/
                echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--optimizemember-sp-amount" value="0.01" size="4" /> / <select id="ws-plugin--optimizemember-sp-hours" class="paypal-buttons-subscription-select">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select></p>' . "\n";
                echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-sp-desc" class="paypal-buttons-description-input" value="Description and pricing details here." size="68" /></p>' . "\n";
                echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by optimizeMember; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--optimizemember-sp-page-style" class="paypal-buttons-checkout-page-style-input" value="paypal" size="18" /> <select id="ws-plugin--optimizemember-sp-currency">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__optimizemember_paypalSpButtonGenerate();" class="button-primary" /></p>' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<td colspan="2">' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_sp_buttons_before_shortcode", get_defined_vars());
                echo '<strong>WordPress Shortcode:</strong> ( recommended for both the WordPress Visual &amp; HTML Editors )<br />' . "\n";
                $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/paypal-sp-checkout-button-shortcode.php")));
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_temp_s);
                echo '<input type="text" autocomplete="off" id="ws-plugin--optimizemember-sp-shortcode" value="' . format_to_edit($ws_plugin__optimizemember_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
                /**/
                echo '<div' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '><br />' . "\n";
                echo '<strong>Resulting PayPal Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
                echo '<textarea id="ws-plugin--optimizemember-sp-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
                $ws_plugin__optimizemember_temp_s = trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.php")));
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%endpoint%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_sandbox"] ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%paypal_business%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["paypal_business"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%cancel_return%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(home_url("/"))), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%notify_url%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url("/?optimizemember_paypal_notify=1"))), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%return%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url("/?optimizemember_paypal_return=1"))), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%images%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images")), $ws_plugin__optimizemember_temp_s);
                $ws_plugin__optimizemember_temp_s = preg_replace("/%%wpurl%%/", c_ws_plugin__optimizemember_utils_strings::esc_ds(esc_attr(site_url())), $ws_plugin__optimizemember_temp_s);
                echo format_to_edit($ws_plugin__optimizemember_temp_s);
                echo '</textarea><br />' . "\n";
                echo '&uarr; <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
                echo '</div>' . "\n";
                /**/
                echo '</form>' . "\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_buttons_page_during_left_sections_after_sp_buttons", get_defined_vars());
            }
            /**/
            if (apply_filters("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_sp_links", true, get_defined_vars())) {
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_sp_links", get_defined_vars());
                /**/
                echo '<div class="ws-menu-page-group" title="PayPal Specific Post/Page Access Links">' . "\n";
                /**/
                echo '<div class="ws-menu-page-section ws-plugin--optimizemember-sp-links-section">' . "\n";
                echo '<h3>Specific Post/Page Link Generator ( for Customer Service )</h3>' . "\n";
                echo '<p>optimizeMember automatically generates Specific Post/Page Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Specific Post/Page Link to be created manually, you can use this tool for that.</p>' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_sp_links", get_defined_vars());
                /**/
                echo '<table class="form-table">' . "\n";
                echo '<tbody>' . "\n";
                echo '<tr>' . "\n";
                /**/
                echo '<td>' . "\n";
                echo '<form onsubmit="return false;">' . "\n";
                /**/
                echo '<p><select id="ws-plugin--optimizemember-sp-link-leading-id">' . "\n";
                echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
                /**/
                $ws_plugin__optimizemember_temp_a_singulars = c_ws_plugin__optimizemember_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
                /**/
                foreach ($ws_plugin__optimizemember_temp_a_singulars as $ws_plugin__optimizemember_temp_o) {
                    echo '<option value="' . esc_attr($ws_plugin__optimizemember_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_temp_o->post_title) . '</option>' . "\n";
                }
                /**/
                echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\\n\\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
                /**/
                echo '<p><select id="ws-plugin--optimizemember-sp-link-additional-ids" multiple="multiple" style="height:100px; min-width:450px;">' . "\n";
                echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
                /**/
                foreach ($ws_plugin__optimizemember_temp_a_singulars as $ws_plugin__optimizemember_temp_o) {
                    echo '<option value="' . esc_attr($ws_plugin__optimizemember_temp_o->ID) . '">' . esc_html($ws_plugin__optimizemember_temp_o->post_title) . '</option>' . "\n";
                }
                /**/
                echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and optimizeMember generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* optimizeMember sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured optimizeMember for Specific Post/Page Access yet. See: optimizeMember -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
                /**/
                echo '<p><select id="ws-plugin--optimizemember-sp-link-hours">' . trim(c_ws_plugin__optimizemember_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select> <input type="button" value="Generate Access Link" onclick="ws_plugin__optimizemember_paypalSpLinkGenerate();" class="button-primary" /> <img id="ws-plugin--optimizemember-sp-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
                echo '<p id="ws-plugin--optimizemember-sp-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
                echo '</form>' . "\n";
                echo '</td>' . "\n";
                /**/
                echo '</tr>' . "\n";
                echo '</tbody>' . "\n";
                echo '</table>' . "\n";
                echo '</div>' . "\n";
                /**/
                echo '</div>' . "\n";
                /**/
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_after_sp_links", get_defined_vars());
            }
            /**/
            if (apply_filters("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_display_shortcode_attrs", true, get_defined_vars())) {
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_before_shortcode_attrs", get_defined_vars());
                /**/
                echo '<div class="ws-menu-page-group" title="Shortcode Attributes ( Explained )">' . "\n";
                /**/
                echo '<div class="ws-menu-page-section ws-plugin--optimizemember-shortcode-attrs-section">' . "\n";
                echo '<h3>Shortcode Attributes ( Explained In Full Detail )</h3>' . "\n";
                echo '<p>When you generate a Button Code, optimizeMember will make a <a href="http://codex.wordpress.org/Shortcode_API#Overview" target="_blank" rel="external">Shortcode</a> available to you. Like most Shortcodes for WordPress, optimizeMember reads Attributes in your Shortcode. These Attributes will be pre-configured by one of optimizeMember\'s Button Generators automatically; so there really is nothing more you need to do. However, many site owners like to know exactly how these Shortcode Attributes work. Below, is a brief overview of each possible Shortcode Attribute.</p>' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_shortcode_attrs", get_defined_vars());
                /**/
                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>cancel="0"</code> Cancellation Button. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Cancellation Button, <code>1</code> = this IS a Cancellation Button.</li>' . "\n";
                echo '<li><code>cc="USD"</code> 3 character Currency Code. Not valid when <code>cancel="1"</code>.</li>' . "\n";
                echo !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '<li><code>ccaps="music,videos"</code> A comma-delimited list of Custom Capabilities. Only valid w/ Membership Level Access and/or Independent Custom Capabilities.</li>' . "\n" : '';
                echo '<li><code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '"</code> must start with your domain. Additional values can be piped in ( ex: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3|etc"</code> ). Not valid when <code>cancel="1"</code>.</li>' . "\n";
                echo '<li><code>desc="Gold Membership"</code> A brief purchase Description. Not valid when <code>cancel="1"</code>.</li>' . "\n";
                echo '<li><code>dg="0"</code> The Digital Goods directive. optimizeMember will eventually be integrated with <a href="http://www.optimizepress.com/paypal-express-co-digitals" target="_blank" rel="external">Digital Goods</a> for inline Express Checkout. But for now, this should always be <code>0</code>.</li>' . "\n";
                echo '<li><code>exp="72"</code> Access Expires ( in hours ). Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
                echo '<li><code>ids="14"</code> A Post/Page ID#, or a comma-delimited list of IDs. Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
                echo '<li><code>image="default"</code> Button Image Location. Possible values: <code>default</code> = use the default PayPal Button, <code>http://...</code> = location of your custom Image.</li>' . "\n";
                echo '<li><code>lc=""</code> Optional 2 character Locale Code <em>( i.e. Country Code )</em>. This controls the interface language used at PayPal during checkout. If unspecified, the language is determined by PayPal when possible, defaulting to <code>US</code> <em>english</em> when not possible. Not valid when <code>cancel="1"</code>.</li>' . "\n";
                echo '<li><code>level="1"</code> Membership Level [1-4] <em>( or, up to the number of configured Levels )</em>. Only valid for Buttons providing paid Membership Level Access.' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' Or, with Independent Custom Capabilities this MUST be set to <code>level="*"</code>, and <code>ccaps=""</code> must NOT be empty <em>( i.e. <code>level="*" ccaps="music,videos"</code> )</em>.') . '</li>' . "\n";
                echo '<li><code>modify="0"</code> Modification directive. Only valid w/ Membership Level Access. Possible values: <code>0</code> = allows Customers to only create a new Subscription, <code>1</code> = allows Customers to modify their current Subscription or sign up for a new one, <code>2</code> = allows Customers to only modify their current Subscription.</li>' . "\n";
                echo '<li><code>ns="1"</code> The <em>no_shipping</em> directive. Possible values: <code>0</code> = prompt for an address, but do not require one, <code>1</code> = do not prompt for a shipping address, <code>2</code> = prompt for an address, and require one. Not valid when <code>cancel="1"</code>.</li>' . "\n";
                echo '<li><code>output="button"</code> Output Type. Possible values: <code>button</code> = PayPal Button w/hidden inputs, <code>anchor</code> = PayPal Button (  &lt;a&gt; anchor tag ) URL w/ ?query string, <code>url</code> = raw URL w/ ?query string.</li>' . "\n";
                echo '<li><code>ps="paypal"</code> PayPal checkout Page Style. Not valid when <code>cancel="1"</code>.</li>' . "\n";
                echo '<li><code>ra="0.01"</code> Regular, Buy Now, and/or Recurring Amount. Must be &gt;= <code>0.01</code>. Not valid when <code>cancel="1"</code>.</li>' . "\n";
                echo '<li><code>rp="1"</code> Regular Period. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Must be &gt;= <code>1</code> ( ex: <code>1</code> Week, <code>2</code> Months, <code>1</code> Month, <code>3</code> Days ).</li>' . "\n";
                echo '<li><code>rt="M"</code> Regular Term. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Possible values: <code>D</code> = Days, <code>W</code> = Weeks, <code>M</code> = Months, <code>Y</code> = Years, <code>L</code> = Lifetime.</li>' . "\n";
                echo '<li><code>rr="1"</code> Recurring directive. Only valid w/ Membership Level Access' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' and/or Independent Custom Capabilities') . '. Possible values: <code>0</code> = non-recurring "Subscription" with possible Trial Period for free, or at a different Trial Amount; <code>1</code> = recurring "Subscription" with possible Trial Period for free, or at a different Trial Amount; <code>BN</code> = non-recurring "Buy Now" functionality, no Trial Period possible.</li>' . "\n";
                echo '<li><code>rrt=""</code> Recurring Times <em>( i.e. a fixed number of installments )</em>. Only valid w/ Membership Level Access. When unspecified, any recurring charges will remain ongoing until cancelled, or until payments start failing. If this is set to <code>1 or higher</code> the regular recurring charges will only continue for X billing cycles, depending on what you specify. This is only valid when <code>rr="1"</code> for recurring "Subscriptions". Please note that a fixed number of installments, also means a fixed period of access. If a Customer\'s billing is monthly, and you set <code>rrt="3"</code>, billing will continue for only 3 monthly installments. After that, billing would stop, and their access to the site would be revoked as well <em>( based on your EOT Behavior setting under: optimizeMember -> PayPal Options )</em>.</li>' . "\n";
                echo '<li><code>rra="1"</code> Reattempt failed payments? Possible values: <code>0</code> = do NOT reattempt billing when/if a recurring payment fails; <code>1</code> = yes, DO reattempt billing when/if a recurring payment fails. With PayPal Standard integration, PayPal will retry a maximum of 2 times when you set <code>rra="1"</code>; after that, a Subscription would be terminated due to Max Failed Payments having been reached. PayPal Standard integration does NOT make it possible to configure Max Failed Payments, it simply defaults to a value of <code>2</code> whenever <code>rra="1"</code>, indicating that you DO want to retry failed payments.</li>' . "\n";
                echo '<li><code>sp="0"</code> Specific Post/Page Button. Possible values: <code>0</code> = this is NOT a Specific Post/Page Access Button, <code>1</code> = this IS a Specific Post/Page Access Button.</li>' . "\n";
                echo '<li><code>ta="0.00"</code> Trial Amount. Only valid w/ Membership Level Access. Must be <code>0</code> when <code>rt="L"</code> or when <code>rr="BN"</code>.</li>' . "\n";
                echo '<li><code>tp="0"</code> Trial Period. Only valid w/ Membership Level Access. Must be <code>0</code> when <code>rt="L"</code> or when <code>rr="BN"</code>.</li>' . "\n";
                echo '<li><code>tt="D"</code> Trial Term. Only valid w/ Membership Level Access. Possible values: <code>D</code> = Days, <code>W</code> = Weeks, <code>M</code> = Months, <code>Y</code> = Years.</li>' . "\n";
                do_action("ws_plugin__optimizemember_during_paypal_buttons_page_during_left_sections_during_shortcode_attrs_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_paypal_buttons_page_during_left_sections_after_shortcode_attrs", get_defined_vars());
            }
            /**/
            do_action("ws_plugin__optimizemember_during_paypal_buttons_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";
        }