/** * Handles Registration Links. * * @package optimizeMember\Registrations * @since 3.5 * * @attaches-to ``add_action("init");`` * * @return null Or exits script execution after redirection. */ public static function register() { do_action("ws_plugin__optimizemember_before_register", get_defined_vars()); /**/ if (!empty($_GET["optimizemember_register"])) { eval('while (@ob_end_clean ());'); /* First we end/clean any output buffers that may exist already. */ /**/ $msg_503 = _x('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member"); /**/ if (is_array($register = preg_split("/\\:\\.\\:\\|\\:\\.\\:/", c_ws_plugin__optimizemember_utils_encryption::decrypt(trim(stripslashes((string) $_GET["optimizemember_register"])))))) { if (count($register) === 6 && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time") { if (is_numeric($register[5]) && $register[5] <= strtotime("now") && $register[5] >= strtotime("-" . apply_filters("ws_plugin__optimizemember_register_link_exp_time", "2 days", get_defined_vars()))) { $_COOKIE["optimizemember_subscr_gateway"] = c_ws_plugin__optimizemember_utils_encryption::encrypt($register[1]); $_COOKIE["optimizemember_subscr_id"] = c_ws_plugin__optimizemember_utils_encryption::encrypt($register[2]); $_COOKIE["optimizemember_custom"] = c_ws_plugin__optimizemember_utils_encryption::encrypt($register[3]); $_COOKIE["optimizemember_item_number"] = c_ws_plugin__optimizemember_utils_encryption::encrypt($register[4]); /**/ if (($reg_cookies = c_ws_plugin__optimizemember_register_access::reg_cookies_ok()) && extract($reg_cookies)) { status_header(200); /* Send a 200 OK status header. */ header("Content-Type: text/html; charset=utf-8"); /* Content-Type with UTF-8. */ /**/ setcookie("optimizemember_subscr_gateway", $_COOKIE["optimizemember_subscr_gateway"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_subscr_gateway", $_COOKIE["optimizemember_subscr_gateway"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN); setcookie("optimizemember_subscr_id", $_COOKIE["optimizemember_subscr_id"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_subscr_id", $_COOKIE["optimizemember_subscr_id"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN); setcookie("optimizemember_custom", $_COOKIE["optimizemember_custom"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_custom", $_COOKIE["optimizemember_custom"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN); setcookie("optimizemember_item_number", $_COOKIE["optimizemember_item_number"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_item_number", $_COOKIE["optimizemember_item_number"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN); /**/ do_action("ws_plugin__optimizemember_during_register", get_defined_vars()); /**/ if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site() && ($location = c_ws_plugin__optimizemember_utils_urls::wp_signup_url())) { echo '<script type="text/javascript">' . "\n"; echo "window.location = '" . c_ws_plugin__optimizemember_utils_strings::esc_js_sq($location) . "';"; echo '</script>' . "\n"; } else { if ($location = c_ws_plugin__optimizemember_utils_urls::wp_register_url()) { echo '<script type="text/javascript">' . "\n"; echo "window.location = '" . c_ws_plugin__optimizemember_utils_strings::esc_js_sq($location) . "';"; echo '</script>' . "\n"; } } exit; /* Clean exit. The browser will now be redirected to ``$location``. */ } else { status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503); } } else { status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503); } } else { status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503); } } else { status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503); } } /**/ do_action("ws_plugin__optimizemember_after_register", get_defined_vars()); }
public function __construct() { echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n"; /**/ echo '<div class="op-bsw-header">'; echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>'; echo '</div>'; echo '<div class="op-bsw-main-content">'; echo '<h2>General Options</h2>' . "\n"; /**/ echo '<table class="ws-menu-page-table">' . "\n"; echo '<tbody class="ws-menu-page-table-tbody">' . "\n"; echo '<tr class="ws-menu-page-table-tr">' . "\n"; echo '<td class="ws-menu-page-table-l">' . "\n"; /**/ echo '<form method="post" name="ws_plugin__optimizemember_options_form" id="ws-plugin--optimizemember-options-form">' . "\n"; echo '<input type="hidden" name="ws_plugin__optimizemember_options_save" id="ws-plugin--optimizemember-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-options-save")) . '" />' . "\n"; echo '<input type="hidden" name="ws_plugin__optimizemember_configured" id="ws-plugin--optimizemember-configured" value="1" />' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_before_left_sections", get_defined_vars()); if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_membership_levels", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_membership_levels", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Define Membership Levels And Packages">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-membership-levels-section">' . "\n"; echo '<h3>Membership Levels and Packages ( required, please customize these )</h3>' . "\n"; echo '<p>The default Membership Levels are labeled generically; feel free to modify them as needed. optimizeMember supports Free Subscribers <em>( at Level #0 )</em>, along with several Primary Roles for paid Membership <em>( i.e. Levels 1-10 )</em>, created by the OptimizeMember plugin. OptimizeMember also supports unlimited Custom Capability Packages <em>( see <code>optimizeMember -> API Scripting -> Custom Capabilities</code> )</em>. That being said, you don\'t have to use all of the Membership Levels if you don\'t want to. To use only 1 or 2 of these Levels, just design your Membership Options / Redirect Page, so it only includes Payment Buttons for the Levels being used.</p>' . "\n"; /**do_action ("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_membership_levels", get_defined_vars ());**/ /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; /**/ for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) { $labelText = ws_plugin__optimizemember_getMembershipLabel($n); echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-level' . $n . '-label">' . "\n"; echo $n === 0 ? 'Level #' . $n . ' <em>( Free Subscribers )</em>:' . "\n" : 'Level #' . $n . ' Members:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_level' . $n . '_label" id="ws-plugin--optimizemember-level' . $n . '-label" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_label"]) . '" /><br />' . "\n"; echo 'This is the Label for Level #' . $n . ($n === 0 ? ' ( Free Subscribers )' : ' Members') . '.<br />' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; } /**/ echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-membership-levels-section">' . "\n"; echo '<h3>Packages</h3>' . "\n"; echo '<p>Packages are a great way to protect individual products or content. You can protect any content to a particular package by using the admin options on the page and this will ensure only users with that package added to their account will be given access</p>' . "\n"; echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th style="padding-top:0;">' . "\n"; echo '<label for="ws-plugin--optimizemember-ccp">' . "\n"; echo 'Add new package:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<input type="hidden" name="ws_plugin__optimizemember_ccp[]" value="update-signal" />' . "\n"; echo '<td>' . "\n"; echo '<input type="text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" name="ws_plugin__optimizemember_ccp[]" id="ws-plugin--optimizemember-ccp" value="" />'; if (count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"]) > 0) { echo '<h3>Available packages</h3>' . "\n"; foreach ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["ccp"] as $key => $val) { if (!empty($val)) { echo '<input type="hidden" name="ws_plugin__optimizemember_ccp[]" value="' . $val . '" />' . "\n"; echo $val . '<br />' . "\n"; } } } //echo 'This affects your administrative Dashboard only <em>( i.e. your list of Users )</em>.<br />optimizeMember can force WordPress to use your Labels instead of referencing Roles by `optimizeMember Level #`. If this is your first installation of optimizeMember, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with optimizeMember\'s functionality. In fact, many site owners choose to leave this off, because they find it less confusing when Roles are referred to by their optimizeMember Level #.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; /**/ echo '<table class="form-table" style="margin-top:0;display:none;">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th style="padding-top:0;">' . "\n"; echo '<label for="ws-plugin--optimizemember-apply-label-translations">' . "\n"; echo 'Force WordPress to use your Labels?' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="radio" name="ws_plugin__optimizemember_apply_label_translations" id="ws-plugin--optimizemember-apply-label-translations-" value="1" checked="checked" />'; //echo '<input type="radio" name="ws_plugin__optimizemember_apply_label_translations" id="ws-plugin--optimizemember-apply-label-translations-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-apply-label-translations-0">No</label> <input type="radio" name="ws_plugin__optimizemember_apply_label_translations" id="ws-plugin--optimizemember-apply-label-translations-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-apply-label-translations-1">Yes, force WordPress to use my Labels.</label><br />' . "\n"; echo 'This affects your administrative Dashboard only <em>( i.e. your list of Users )</em>.<br />optimizeMember can force WordPress to use your Labels instead of referencing Roles by `optimizeMember Level #`. If this is your first installation of optimizeMember, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with optimizeMember\'s functionality. In fact, many site owners choose to leave this off, because they find it less confusing when Roles are referred to by their optimizeMember Level #.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-filter-wp-query">' . "\n"; echo 'Hide links?' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; //echo '<div class="ws-menu-page-scrollbox" style="height:105px;">' . "\n"; echo '<input type="hidden" name="ws_plugin__optimizemember_filter_wp_query[]" value="update-signal" />' . "\n"; foreach (array("all" => "<strong>Hide links to protected content for non-members</strong>") as $ws_plugin__optimizemember_temp_s_value => $ws_plugin__optimizemember_temp_s_label) { echo '<input type="checkbox" name="ws_plugin__optimizemember_filter_wp_query[]" id="ws-plugin--optimizemember-filter-wp-query-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '" value="' . esc_attr($ws_plugin__optimizemember_temp_s_value) . '"' . (in_array($ws_plugin__optimizemember_temp_s_value, $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["filter_wp_query"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--optimizemember-filter-wp-query-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '">' . $ws_plugin__optimizemember_temp_s_label . '</label><br />' . "\n"; break; } echo 'This option will hide links to any protected content for members who do not have access to that content<br />' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<input type="button" value="Reset Roles/Capabilities" class="ws-menu-page-right ws-plugin--optimizemember-reset-roles-button button" style="min-width:175px;" />' . "\n"; echo '<p>The button to the right, is a nifty tool, which allows you to reset optimizeMember\'s internal Roles and Capabilities that integrate with WordPress. If you, or a developer working with you, has made attempts to alter the default <em>internal</em> Role/Capability sets that come with optimizeMember, and you need to reset them back to the way optimizeMember expects them to be, please use this tool. <em>Attn Developers: it is also possible lock-in your modified Roles/Capabilities with an optimizeMember Filter. Please see <a href="http://www.optimizepress.com/forums/viewtopic.php?f=36&t=15420&p=45162#p45162" target="_blank" rel="external">this thread for details</a>.</em></p>' . "\n"; /**/ // echo '<p class="submit"><input id="opmNewSave" type="submit" class="op-pb-button green" value="Save Changes" /></p>' . "\n"; // echo '<p id="msg"><p>'; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_membership_levels", get_defined_vars()); } if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_list_server_integration", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_list_server_integration", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Define Mailing List/Autoresponder Configurations">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-list-server-integration-section">' . "\n"; echo '<h3>Mailing List/Autoresponder Configurations</h3>' . "\n"; echo '<p>To enable and configure email marketing service go to <a href="' . admin_url() . 'admin.php?page=optimizepress#email_marketing_services">OP theme/plugin Dashboard settings</a></p>' . "\n"; echo '<p>Note: Lists/follow upsequences can take up to 1 minute to be retrieved from your provider.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_list_server_integration", get_defined_vars()); /**/ $providers = op_assets_provider_list(); $providersDetails = array(); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; /**/ for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) { $labelText = ws_plugin__optimizemember_getMembershipLabel($n); $provider = format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_provider"]); echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<h4>' . ($n === 0 ? 'Level #' . $n . ' <em>(Free Subscribers)</em>' . "\n" : 'Level #' . $n . ' Members') . '</h4>' . "\n"; echo '</th>' . "\n"; echo '</tr>' . "\n"; /**/ echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws_plugin__optimizemember_level' . $n . '_provider" id="ws_plugin__optimizemember_level' . $n . '_provider_label">' . "\n"; echo 'List Provider:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; echo '<th>' . "\n"; echo '<label for="ws_plugin__optimizemember_level' . $n . '_list" id="ws_plugin__optimizemember_level' . $n . '_list_label">' . "\n"; if ($provider === 'infusionsoft') { echo 'Follow up sequence:' . "\n"; } else { echo 'List:' . "\n"; } echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select data-level="' . $n . '" name="ws_plugin__optimizemember_level' . $n . '_provider" id="ws_plugin__optimizemember_level' . $n . '_provider" class="ws_plugin__optimizemember_level_provider">' . "\n"; echo '<option value="0">Select provider</option>' . "\n"; if (count($providers) > 0) { foreach ($providers as $providerId => $providerName) { /* * Subscribing is happening on their URL and can't be done in background */ if ($providerId === 'oneshoppingcart') { continue; } echo '<option value="' . $providerId . '"' . selected($providerId, $provider, false) . '>' . $providerName . '</option>' . "\n"; } } echo '</select><br />' . "\n"; echo '</td>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select data-level="' . $n . '" name="ws_plugin__optimizemember_level' . $n . '_list" id="ws_plugin__optimizemember_level' . $n . '_list" class="ws_plugin__optimizemember_level_list">' . "\n"; $provider = format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_provider"]); if (!empty($provider)) { $list = format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["level" . $n . "_list"]); if (isset($providersDetails[$provider])) { $details = $providersDetails[$provider]; } else { $details = op_assets_provider_items($provider, true); if (count($details) > 0) { $details = $details['lists']; $providersDetails[$provider] = $details; } } foreach ($details as $listId => $item) { echo '<option value="' . $listId . '"' . selected($list, $listId, false) . '>' . $item['name'] . '</option>' . "\n"; } } else { echo '<option value="0">Select provider first</option>' . "\n"; } echo '</select><br />' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; } /**/ echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ // echo '<p class="submit"><input id="opmNewSave" type="submit" class="op-pb-button green" value="Save Changes" /></p>' . "\n"; // echo '<p class="save_info"><p>'; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_list_server_integration", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_membership_options_page", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_membership_options_page", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Membership Options / Redirect Page">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-membership-options-page-section">' . "\n"; echo '<h3>Membership Options / Redirect Page ( required, please customize this )</h3>' . "\n"; echo '<p>This is where visitors who do not have access to your restricted membership content will be redirected to. We recommend using this page either as a login page, or as a page where you offer promote your membership or product.</p>' . "\n"; echo '<p>If you want to add a login form on your page, use the "Membership Login Form" element in the Liveeditor to add a login form for your visitors to login</p>' . "\n"; //echo '<p><em><strong>*Tip*</strong> If you allow Open Registration ( i.e. Free Subscribers ), you might want to place a link on your Membership Options / Redirect Page, which points directly to your Registration Form, instead of routing a Customer through your Payment Gateway first. For further details, please check the section above: <code>optimizeMember -> General Options -> Open Registration</code>.</em></p>' . "\n"; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> Even with BuddyPress, optimizeMember still needs a Membership Options / Redirect Page. This is where your Payment Button(s) will go, giving people the ability to pay you. And again, this is also the Page that anyone could be redirected to <em>( by optimizeMember )</em>, should they attempt to access an area of your site, which may require access to something they are currenty NOT allowed to view.' . (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? ' For more on this advanced topic, please check your Dashboard here: <code>optimizeMember -> API Scripting -> Membership Options / Redirect Page / Variables</code>.' : '') . '</em></p>' . "\n" : ''; echo '<p><em><strong>*Tip*</strong> optimizeMember will NEVER allow this Page to be protected from public access.</em></p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_membership_options_page", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-membership-options-page">' . "\n"; echo 'Membership Options / Redirect Page:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_membership_options_page" id="ws-plugin--optimizemember-membership-options-page">' . "\n"; echo '<option value="">— Select —</option>' . "\n"; foreach ($ws_plugin__optimizemember_temp_a = array_merge((array) get_pages()) as $ws_plugin__optimizemember_temp_o) { echo '<option value="' . esc_attr($ws_plugin__optimizemember_temp_o->ID) . '"' . ($ws_plugin__optimizemember_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["membership_options_page"] ? ' selected="selected"' : '') . '>' . esc_html($ws_plugin__optimizemember_temp_o->post_title) . '</option>' . "\n"; } echo '</select><br />' . "\n"; echo 'Select a page which your users will be redirected to when they try to access content they\'re not currently allowed to view. We recommend having a login form on this page or details of your membership or product' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_membership_options_page", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_login_welcome_page", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_login_welcome_page", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Members Home Page / Login Welcome Page">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-login-welcome-page-section">' . "\n"; echo '<h3>Members Home Page / Login Welcome Page ( required, please customize this )</h3>' . "\n"; echo '<p>Please create and/or choose an existing Page to use as the first page Members will see after logging in.</p>' . "\n"; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> optimizeMember integrates with BuddyPress. Your Login Welcome Page affects BuddyPress too.</em></p>' . "\n" : ''; echo '<p><em><strong>*Tip*</strong> This special Page will be protected from public access ( automatically ) by optimizeMember.</em></p>' . "\n"; //echo '<p><strong>See also:</strong> This KB article: <a href="http://help.optimizepress.com/customer/portal/articles/1281577-customizing-your-login-welcome-page" target="_blank" rel="external">Customizing Your Login Welcome Page</a>.</p>'."\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_login_welcome_page", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-welcome-page">' . "\n"; echo 'Members Home Page / Login Welcome Page:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_login_welcome_page" id="ws-plugin--optimizemember-login-welcome-page">' . "\n"; echo '<option value="">— Select —</option>' . "\n"; foreach ($ws_plugin__optimizemember_temp_a = array_merge((array) get_pages()) as $ws_plugin__optimizemember_temp_o) { echo '<option value="' . esc_attr($ws_plugin__optimizemember_temp_o->ID) . '"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_redirection_override"] && $ws_plugin__optimizemember_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_welcome_page"] ? ' selected="selected"' : '') . '>' . esc_html($ws_plugin__optimizemember_temp_o->post_title) . '</option>' . "\n"; } echo '</select><br />' . "\n"; echo 'Please choose a Page to be used as the first page Members will see after logging in. This Page can contain anything you like. We recommend the following title: <code>Welcome To Our Members Area</code>.<br /><br />' . "\n"; echo '↓ Or, you may configure a Special Redirection URL, if you prefer. You\'ll need to type in the full URL, starting with: <code>http://</code>. <em>A few <a href="#" onclick="alert(\'Replacement Codes:\\n\\n%%current_user_login%% = The current User\\\'s Username, lowercase.\\n%%current_user_id%% = The current User\\\'s ID.\\n%%current_user_level%% = The current User\\\'s optimizeMember Level.\\n%%current_user_role%% = The current User\\\'s WordPress Role.' . (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? '\\n%%current_user_ccaps%% = The current User\\\'s Custom Capabilities.' : '') . '\\n%%current_user_logins%% = Number of times the current User has logged in.\\n\\nFor example, if you\\\'re using BuddyPress, and you want to redirect Members to their BuddyPress Profile page after logging in, you would setup a Special Redirection URL, like this: ' . site_url("/members/%%current_user_login%%/profile/") . '\\n\\nOr ... using %%current_user_level%%, you could have a separate Login Welcome Page for each Membership Level that you plan to offer. BuddyPress not required.\'); return false;">Replacement Codes</a> are also supported here.</em>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_redirection_override" id="ws-plugin--optimizemember-login-redirection-override" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_redirection_override"]) . '" /><br />' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_login_welcome_page", get_defined_vars()); } if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_email_config", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_email_config", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Email Configuration">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-email-section">' . "\n"; echo '<h3 style="margin:0;">Email From: ' . esc_html('"Name" <address>') . '</h3>' . "\n"; echo '<p style="margin:0;">This is the name/address that will appear in outgoing email notifications sent by the optimizeMember plugin.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_email_from_name_config", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-reg-email-from-name">' . "\n"; echo 'Email From Name:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_reg_email_from_name" id="ws-plugin--optimizemember-reg-email-from-name" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["reg_email_from_name"]) . '" /><br />' . "\n"; echo 'We recommend that you use the name of your site here.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-reg-email-from-email">' . "\n"; echo 'Email From Address:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_reg_email_from_email" id="ws-plugin--optimizemember-reg-email-from-email" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["reg_email_from_email"]) . '" /><br />' . "\n"; echo 'Example: support@your-domain.com. <em class="ws-menu-page-hilite">Please read <a href="#" onclick="alert(\'Running WordPress with an SMTP mail plugin?\\n\\nPlease be advised. If you run an SMTP mail plugin with WordPress, be sure to configure optimizeMember with a valid `From:` address ( i.e. one matching your SMTP configuration perhaps ). Most free SMTP servers, such as Gmail and Yahoo, require that your `From:` header match the email address associated with your account. Please check with your SMTP service provider before attempting to configure plugins like optimizeMember to use a different `From:` address when sending email messages.\'); return false;">this IMPORTANT note</a></em>.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-reg-email-support-link">' . "\n"; echo 'Email Support/Contact Link:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_reg_email_support_link" id="ws-plugin--optimizemember-reg-email-support-link" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["reg_email_support_link"]) . '" /><br />' . "\n"; echo 'Ex: <code>mailto:support@your-domain.com</code> ( <em>mailto link</em> ).<br />' . "\n"; echo 'Or: <code>' . esc_html(site_url("/contact-us/")) . '</code>.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<h3 style="margin:0;">New User Email Configuration</h3>' . "\n"; echo '<input type="hidden" id="ws-plugin--optimizemember-pluggables-wp-new-user-notification" value="' . esc_attr(empty($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["pluggables"]["wp_new_user_notification"]) ? '0' : '1') . '" />' . "\n"; echo empty($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["pluggables"]["wp_new_user_notification"]) ? '<p class="ws-menu-page-error" style="margin:0;"><em><strong>Conflict warning:</strong> You have another theme or plugin installed that is preventing optimizeMember from controlling this aspect of your installation. When the pluggable function <code><a href="http://codex.wordpress.org/Function_Reference/wp_new_user_notification" target="_blank" rel="external">wp_new_user_notification()</a></code> is handled by another plugin, it\'s not possible for optimizeMember to allow customization of New User Emails. This is NOT a major issue. In fact, in some cases, it might be desirable. That being said, if you DO want to use optimizeMember\'s customization of New User Emails, you will need to deactivate one plugin at a time until this conflict warning goes away.</em></p>' . "\n" : ''; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_new_user_emails", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_new_user_emails_enabled" id="ws-plugin--optimizemember-new-user-emails-enabled">' . "\n"; echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["new_user_emails_enabled"] ? ' selected="selected"' : '') . '>No ( default, use WordPress defaults )</option>' . "\n"; echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["new_user_emails_enabled"] ? ' selected="selected"' : '') . '>Yes ( customize New User Emails with optimizeMember )</option>' . "\n"; echo '</select>' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div id="ws-plugin--optimizemember-new-user-emails">' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<h3 style="margin:0;">New User Email Message ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-new-user-email-details\').toggle(); return false;" class="ws-dotted-link">click to customize</a> )</h3>' . "\n"; echo '<p style="margin:0;">This email is sent to all new Users/Members. It should always contain their Username/Password. In addition to this email, optimizeMember will also send new paying Customers a Signup Confirmation Email, which you can customize from your Dashboard, under: <code>optimizeMember -> PayPal Options</code>. You may wish to customize these emails further, by providing details that are specifically geared to your site.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_new_user_email", get_defined_vars()); /**/ echo '<div id="ws-plugin--optimizemember-new-user-email-details" style="display:none;">' . "\n"; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> please note that BuddyPress does NOT send this email to Users that register through the BuddyPress registration system. This is because BuddyPress sends each User an activation link; eliminating the need for this email all together. However, you CAN still customize optimizeMember\'s separate email to paying Members. See: <code>optimizeMember -> PayPal Options -> Signup Confirmation Email</code>.</em></p>' . "\n" : ''; echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-new-user-email-subject">' . "\n"; echo 'New User Email Subject:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_new_user_email_subject" id="ws-plugin--optimizemember-new-user-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["new_user_email_subject"]) . '" /><br />' . "\n"; echo 'Subject Line used in the email sent to new Users/Members.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-new-user-email-message">' . "\n"; echo 'New User Email Message:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<textarea name="ws_plugin__optimizemember_new_user_email_message" id="ws-plugin--optimizemember-new-user-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["new_user_email_message"]) . '</textarea><br />' . "\n"; echo 'Message Body used in the email sent to new Users/Members.<br /><br />' . "\n"; echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n"; echo '<ul>' . "\n"; echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n"; echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n"; echo '<li><code>%%user_full_name%%</code> = The Full Name ( First & Last ) of the Member who registered their Username.</li>' . "\n"; echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n"; echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n"; echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n"; echo '<li><code>%%user_ip%%</code> = The User\'s IP Address, detected via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n"; echo '<li><code>%%user_id%%</code> = A unique WordPress User ID generated during registration.</li>' . "\n"; echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n"; echo '</ul>' . "\n"; /**/ echo '<strong>Custom Registration/Profile Fields are also supported in this email:</strong>' . "\n"; echo '<ul>' . "\n"; echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n"; echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n"; echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n"; echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> optimizeMember -> General Options -> Registration/Profile Fields</em>.</li>' . "\n"; echo '</ul>' . "\n"; /**/ echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n"; echo '<ul>' . "\n"; echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n"; echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n"; echo '</ul>' . "\n"; echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n"; echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n"; echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n"; /**/ echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<h3 style="margin:0;">Administrative: New User Notification ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-new-user-admin-email-details\').toggle(); return false;" class="ws-dotted-link">click to customize</a> )</h3>' . "\n"; echo '<p style="margin:0;">This email notification is sent to you, each time a new User/Member registers.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_new_user_admin_email", get_defined_vars()); /**/ echo '<div id="ws-plugin--optimizemember-new-user-admin-email-details" style="display:none;">' . "\n"; echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-new-user-admin-email-recipients">' . "\n"; echo 'New User Notification Recipients:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_new_user_admin_email_recipients" id="ws-plugin--optimizemember-new-user-admin-email-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["new_user_admin_email_recipients"]) . '" /><br />' . "\n"; echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n"; echo '<code>"Name" <user@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-new-user-admin-email-subject">' . "\n"; echo 'New User Notification Subject:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_new_user_admin_email_subject" id="ws-plugin--optimizemember-new-user-admin-email-subject" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["new_user_admin_email_subject"]) . '" /><br />' . "\n"; echo 'Subject Line used in the email notification sent to Administrator.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-new-user-admin-email-message">' . "\n"; echo 'New User Notification Message:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<textarea name="ws_plugin__optimizemember_new_user_admin_email_message" id="ws-plugin--optimizemember-new-user-admin-email-message" rows="10">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["new_user_admin_email_message"]) . '</textarea><br />' . "\n"; echo 'Message Body used in the email notification sent to Administrator.<br /><br />' . "\n"; echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n"; echo '<ul>' . "\n"; echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n"; echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n"; echo '<li><code>%%user_full_name%%</code> = The Full Name ( First & Last ) of the Member who registered their Username.</li>' . "\n"; echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n"; echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n"; echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n"; echo '<li><code>%%user_ip%%</code> = The User\'s IP Address, detected via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n"; echo '<li><code>%%user_id%%</code> = A unique WordPress User ID generated during registration.</li>' . "\n"; echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n"; echo '</ul>' . "\n"; /**/ echo '<strong>Custom Registration/Profile Fields are also supported in this email:</strong>' . "\n"; echo '<ul>' . "\n"; echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n"; echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n"; echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n"; echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> optimizeMember -> General Options -> Registration/Profile Fields</em>.</li>' . "\n"; echo '</ul>' . "\n"; /**/ echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n"; echo '<ul>' . "\n"; echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n"; echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n"; echo '</ul>' . "\n"; echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n"; echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n"; echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n"; /**/ echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_email_config", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_open_registration", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_open_registration", get_defined_vars()); /**/ if (is_multisite() && is_main_site()) { echo '<div class="ws-menu-page-group" title="Open Registration">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-open-registration-section">' . "\n"; echo '<h3>Open Registration / Free Subscribers ( optional )</h3>' . "\n"; echo '<p>On the Main Site of a Multisite Network, the settings for Open Registration are consolidated into the <code>optimizeMember -> Multisite (Config)</code> panel.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_open_registration", get_defined_vars()); echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; } else { echo '<div class="ws-menu-page-group" title="Open Registration">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-open-registration-section">' . "\n"; echo '<h3>Open Registration / Free Subscribers ( optional )</h3>' . "\n"; echo '<p>optimizeMember supports Free Subscribers ( at Level #0 ), along with four Primary Levels [1-10] of paid Membership. If you want your visitors to be capable of registering absolutely free, you will want to "allow" Open Registration. Whenever a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_open_registration", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-allow-subscribers-in">' . "\n"; echo 'Allow Open Registration? ( Free Subscribers )' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_allow_subscribers_in" id="ws-plugin--optimizemember-allow-subscribers-in">' . "\n"; echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>No ( do NOT allow Open Registration )</option>' . "\n"; echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>Yes ( allow Open Registration; Free Subscribers at Level #0 )</option>' . "\n"; echo '</select><br />' . "\n"; echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Standard Registration Form.\\n* optimizeMember makes this form available to logged-in Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">/wp-login.php?action=register</a>. When a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0. The optimizeMember software reserves Level #0; to be used ONLY for Free Subscribers. All other Membership Levels [1-4] require payment.' . "\n"; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<br /><br /><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">here</a>.<br />optimizeMember integrates with BuddyPress, and the above setting will control Open Regisration for BuddyPress too.</em>' . "\n" : ''; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; } /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_open_registration", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_login_registration", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_login_registration", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Login Page & Registration Form Design">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-login-registration-section">' . "\n"; echo '<h3>Login/Registration Page Customization ( required )</h3>' . "\n"; echo '<p>These settings customize your Standard Login/Registration Pages:<br />( <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Standard Registration Form.\\n* optimizeMember makes this form available to logged-in Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '</a> )</p>' . "\n"; echo is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site() ? '<p><em>The Main Site of a Multisite Blog Farm uses this Form instead, powered by your theme.<br />( <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Multisite Registration Form.\\n* optimizeMember makes this form available to logged-in Super Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::wp_signup_url()) . '</a> )</em></p>' . "\n" : ''; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form, powered by your theme.<br />( <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . '</a> )</em></p>' . "\n" : ''; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_login_registration", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<h3 style="margin:0;">Overall Font/Size Configuration</h3>' . "\n"; echo '<p style="margin:0;">These settings are all focused on your Login/Registration Fonts.</p>' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-font-size">' . "\n"; echo 'Overall Font Size:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_font_size" id="ws-plugin--optimizemember-login-reg-font-size" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_font_size"]) . '" /><br />' . "\n"; echo 'Set this to a numeric value, calculated in pixels.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-font-family">' . "\n"; echo 'Overall Font Family:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_font_family" id="ws-plugin--optimizemember-login-reg-font-family" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_font_family"]) . '" /><br />' . "\n"; echo 'Set this to a web-safe font family.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-font-field-size">' . "\n"; echo 'Form Field Font Size:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_font_field_size" id="ws-plugin--optimizemember-login-reg-font-field-size" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_font_field_size"]) . '" /><br />' . "\n"; echo 'Set this to a numeric value, calculated in pixels.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<table class="form-table" style="margin-top:0;">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<h3 style="margin:0;">Background Configuration</h3>' . "\n"; echo '<p style="margin:0;">These settings are all focused on your Login/Registration Background.</p>' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-background-color">' . "\n"; echo 'Background Color:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_background_color" id="ws-plugin--optimizemember-login-reg-background-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_color"]) . '" /><br />' . "\n"; echo 'Set this to a 6-digit hex color code.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-background-image">' . "\n"; echo 'Background Image:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_background_image" id="ws-plugin--optimizemember-login-reg-background-image" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_image"]) . '" /><br />' . "\n"; echo '<input type="button" id="ws-plugin--optimizemember-login-reg-background-image-media-btn" value="Open Media Library" class="ws-menu-page-media-btn button" rel="ws-plugin--optimizemember-login-reg-background-image" />' . "\n"; echo 'Set this to the URL of your Background Image. ( this is optional )<br />'; echo 'If supplied, your Background Image will be tiled.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-background-image-repeat">' . "\n"; echo 'Background Image Tile:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_login_reg_background_image_repeat" id="ws-plugin--optimizemember-login-reg-background-image-repeat">' . "\n"; echo '<option value="repeat"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_image_repeat"] === "repeat" ? ' selected="selected"' : '') . '>Seamless Tile ( background-repeat: repeat; )</option>' . "\n"; echo '<option value="repeat-x"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_image_repeat"] === "repeat-x" ? ' selected="selected"' : '') . '>Tile Horizontally ( background-repeat: repeat-x; )</option>' . "\n"; echo '<option value="repeat-y"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_image_repeat"] === "repeat-y" ? ' selected="selected"' : '') . '>Tile Vertically ( background-repeat: repeat-y; )</option>' . "\n"; echo '<option value="no-repeat"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_image_repeat"] === "no-repeat" ? ' selected="selected"' : '') . '>No Tiles ( background-repeat: no-repeat; )</option>' . "\n"; echo '</select><br />' . "\n"; echo 'This controls the way your Background Image is styled with CSS. [ <a href="http://www.w3schools.com/css/pr_background-repeat.asp" target="_blank" rel="external">learn more</a> ]' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-background-text-color">' . "\n"; echo 'Color of Text on top of your Background:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_background_text_color" id="ws-plugin--optimizemember-login-reg-background-text-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_text_color"]) . '" /><br />' . "\n"; echo 'Set this to a 6-digit hex color code.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-background-text-shadow-color">' . "\n"; echo 'Shadow Color for Text on top of your Background:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_background_text_shadow_color" id="ws-plugin--optimizemember-login-reg-background-text-shadow-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_text_shadow_color"]) . '" /><br />' . "\n"; echo 'Set this to a 6-digit hex color code.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-background-box-shadow-color">' . "\n"; echo 'Shadow Color for Boxes on top of your Background:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_background_box_shadow_color" id="ws-plugin--optimizemember-login-reg-background-box-shadow-color" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_background_box_shadow_color"]) . '" /><br />' . "\n"; echo 'Set this to a 6-digit hex color code.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<table class="form-table" style="margin-top:0;">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<h3 style="margin:0;">Logo Image Configuration</h3>' . "\n"; echo '<p style="margin:0;">These settings are all focused on your Login/Registration Logo.</p>' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-logo-src">' . "\n"; echo 'Logo Image Location:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_logo_src" id="ws-plugin--optimizemember-login-reg-logo-src" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_logo_src"]) . '" /><br />' . "\n"; echo '<input type="button" id="ws-plugin--optimizemember-login-reg-logo-src-media-btn" value="Open Media Library" class="ws-menu-page-media-btn button" rel="ws-plugin--optimizemember-login-reg-logo-src" />' . "\n"; echo 'Set this to the URL of your Logo Image.<br />' . "\n"; echo 'Suggested size is around 500 x 100.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-logo-src-width">' . "\n"; echo 'Logo Image Width:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_logo_src_width" id="ws-plugin--optimizemember-login-reg-logo-src-width" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_logo_src_width"]) . '" /><br />' . "\n"; echo 'The pixel Width of your Logo Image. <em>* This ALSO affects the overall width of your Login/Registration forms. If you want wider form fields, use a wider Logo.</em>' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-logo-src-height">' . "\n"; echo 'Logo Image Height:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_logo_src_height" id="ws-plugin--optimizemember-login-reg-logo-src-height" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_logo_src_height"]) . '" /><br />' . "\n"; echo 'The pixel Height of your Logo Image.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-logo-url">' . "\n"; echo 'Logo Image Click URL:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_logo_url" id="ws-plugin--optimizemember-login-reg-logo-url" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_logo_url"]) . '" /><br />' . "\n"; echo 'Set this to the Click URL for your Logo Image.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-logo-title">' . "\n"; echo 'Logo Image Title Attribute:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_login_reg_logo_title" id="ws-plugin--optimizemember-login-reg-logo-title" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_logo_title"]) . '" /><br />' . "\n"; echo 'Used as the <code>title=""</code> attribute for your Logo Image.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<table class="form-table" style="margin-top:0;">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<h3 style="margin:0;">Footer Design ( i.e. Bottom )</h3>' . "\n"; echo '<p style="margin:0;">This field accepts raw HTML' . (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? ' ( and/or PHP )' : '') . ' code.</p>' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-login-reg-footer-design">' . "\n"; echo 'Login/Registration Footer Design ( optional ):' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<textarea name="ws_plugin__optimizemember_login_reg_footer_design" id="ws-plugin--optimizemember-login-reg-footer-design" rows="3" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_reg_footer_design"]) . '</textarea><br />' . "\n"; echo 'This optional HTML' . (!is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() ? ' ( and/or PHP )' : '') . ' code will appear at the very bottom of your Login/Registration Forms.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_login_registration", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_custom_reg_fields", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_custom_reg_fields", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Registration/Profile Fields & Options">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-custom-reg-fields-section">' . "\n"; echo '<h3>Custom Registration/Profile Fields ( optional, for further customization )</h3>' . "\n"; echo '<p>Some fields are already built-in by default. The defaults are: <code>*Username*, *Email*, *First Name*, *Last Name*</code>.</p>' . "\n"; /**/ echo '<p>Custom Fields will appear in your Standard Registration Form, and in User/Member Profiles:<br />( <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Standard Registration Form.\\n* optimizeMember makes this form available to logged-in Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '</a> )</p>' . "\n"; echo is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site() ? '<p><em>The Main Site of a Multisite Blog Farm uses this Form. optimizeMember supports Custom Fields here too.<br />( <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Multisite Registration Form.\\n* optimizeMember makes this form available to logged-in Super Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::wp_signup_url()) . '</a> )</em></p>' . "\n" : ''; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">here</a>.<br />optimizeMember can integrate your Custom Fields with BuddyPress too, please see options below.</em></p>' . "\n" : ''; echo '<p><strong>Regarding registration...</strong> Custom Fields do NOT appear during repeat registration and/or checkout attempts (e.g. they do NOT appear for any user that is currently logged into the site). Please make sure that you test registration and/or checkout forms while NOT logged in (e.g. please test as a first-time customer). Existing users/members/customers may update Custom Fields by editing their Profile.</p>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_custom_reg_fields", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label>' . "\n"; echo 'Custom Registration/Profile Fields:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="hidden" name="ws_plugin__optimizemember_custom_reg_fields" id="ws-plugin--optimizemember-custom-reg-fields" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_fields"]) . '" />' . "\n"; echo '<div id="ws-plugin--optimizemember-custom-reg-field-configuration"></div>' . "\n"; /* This is filled by JavaScript routines. */ echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-custom-reg-names">' . "\n"; echo 'Collect First/Last Names during Registration?' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_custom_reg_names" id="ws-plugin--optimizemember-custom-reg-names">' . "\n"; echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>Yes ( always collect First/Last Names during registration )</option>' . "\n"; echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_names"] ? ' selected="selected"' : '') . '>No ( do NOT collect First/Last Names during registration )</option>' . "\n"; echo '</select><br />' . "\n"; echo 'Recommended setting ( <code>Yes</code> ). It\'s usually a good idea to leave this on.' . "\n"; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<br /><em>* Has NO affect on BuddyPress registration form (BuddyPress always collects a full <code>Name</code> field).</em>' . "\n" : ''; echo c_ws_plugin__optimizemember_utils_conds::pro_is_installed() ? '<br /><em>* optimizeMember Pro (Checkout) Forms always require a First/Last Name for billing.</em>' . "\n" : ''; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-custom-reg-display-name">' . "\n"; echo 'Set "Display Name" during Registration?' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_custom_reg_display_name" id="ws-plugin--optimizemember-custom-reg-display-name">' . "\n"; echo '<option value="full"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_display_name"] === "full" ? ' selected="selected"' : '') . '>Yes ( set Display Name to User\'s Full Name )</option>' . "\n"; echo '<option value="first"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_display_name"] === "first" ? ' selected="selected"' : '') . '>Yes ( set Display Name to User\'s First Name )</option>' . "\n"; echo '<option value="last"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_display_name"] === "last" ? ' selected="selected"' : '') . '>Yes ( set Display Name to User\'s Last Name )</option>' . "\n"; echo '<option value="login"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_display_name"] === "login" ? ' selected="selected"' : '') . '>Yes ( set Display Name to User\'s Username )</option>' . "\n"; echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_display_name"] ? ' selected="selected"' : '') . '>No ( leave Display Name at default WordPress value )</option>' . "\n"; echo '</select>' . "\n"; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<br /><em>* Has NO affect on BuddyPress registration form (BuddyPress always uses its full <code>Name</code> field).</em>' . "\n" : ''; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-custom-reg-password">' . "\n"; echo 'Allow Custom Passwords during Registration?' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_custom_reg_password" id="ws-plugin--optimizemember-custom-reg-password"' . (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site() && !c_ws_plugin__optimizemember_utils_conds::pro_is_installed() ? ' disabled="disabled"' : '') . '>' . "\n"; echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>No ( send auto-generated passwords via email; after registration )</option>' . "\n"; echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>Yes ( allow members to create their own password during registration )</option>' . "\n"; echo '</select><br />' . "\n"; echo 'Auto-generated Passwords are recommended for best security; because, this also serves as a form of email confirmation.' . "\n"; echo is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site() ? '<br /><em>* For security purposes, Custom Passwords are NOT possible on the Main Site of a Blog Farm. <a href="#" onclick="alert(\'For security purposes, Custom Passwords are NOT possible on the Main Site of a Blog Farm. A User MUST wait for the activation/confirmation email; where a randomly generated Password will be assigned. Please note, this limitation only affects your Main Site, via `/wp-signup.php`. In other words, your Customers ( i.e. other Blog Owners ) will still have the ability to allow Custom Passwords with optimizeMember. YOU are affected by this limitation, NOT them.\\n\\n* NOTE: optimizeMember (Pro) removes this limitation.\\nIf you install the optimizeMember Pro Module, you WILL be able to allow Custom Passwords through optimizeMember Pro Forms; even on a Multisite Blog Farm.\'); return false;" tabindex="-1">[?]</a></em>' . "\n" : ''; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<br /><em>* Does NOT affect BuddyPress registration form (always <code>yes</code> with BuddyPress registration).</em>' . "\n" : ''; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-custom-reg-force-personal-emails">' . "\n"; echo 'Force Personal Emails during Registration?' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_custom_reg_force_personal_emails" id="ws-plugin--optimizemember-custom-reg-force-personal-emails" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_force_personal_emails"]) . '" /><br />' . "\n"; echo 'To force personal email addresses, provide a comma-delimited list of email users to reject. <a href="#" onclick="alert(\'optimizeMember will reject [user]@ ( based on your configuration here ). A JavaScript alert message will be issued, asking the User to, `please use a personal email address`.\'); return false;" tabindex="-1">[?]</a><br />' . "\n"; echo 'Ex: <code>info,help,admin,webmaster,hostmaster,sales,support,spam</code><br />' . "\n"; echo 'See: <a href="http://kb.mailchimp.com/article/what-role-addresses-does-mailchimp-specifically-block-from-bulk-importing/" target="_blank" rel="external">this article</a> for a more complete list.' . "\n"; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<br /><em>* Affects BuddyPress registration form too.</em>' . "\n" : ''; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-custom-reg-fields-4bp">' . "\n"; echo 'Integrate Custom Registration/Profile Fields with BuddyPress?' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<div class="ws-menu-page-scrollbox" style="height:65px;">' . "\n"; echo '<input type="hidden" name="ws_plugin__optimizemember_custom_reg_fields_4bp[]" value="update-signal"' . (!c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? ' disabled="disabled"' : '') . ' />' . "\n"; foreach (array("profile-view" => "Yes, integrate with BuddyPress Public Profiles.", "registration" => "Yes, integrate with BuddyPress Registration Form.", "profile" => "Yes, integrate with BuddyPress Profile Editing Panel.") as $ws_plugin__optimizemember_temp_s_value => $ws_plugin__optimizemember_temp_s_label) { echo '<input type="checkbox" name="ws_plugin__optimizemember_custom_reg_fields_4bp[]" id="ws-plugin--optimizemember-custom-reg-fields-4bp-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '" value="' . esc_attr($ws_plugin__optimizemember_temp_s_value) . '"' . (in_array($ws_plugin__optimizemember_temp_s_value, $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["custom_reg_fields_4bp"]) ? ' checked="checked"' : '') . (!c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? ' disabled="disabled"' : '') . ' /> <label for="ws-plugin--optimizemember-custom-reg-fields-4bp-' . esc_attr(preg_replace("/[^a-z0-9_\\-]/", "-", $ws_plugin__optimizemember_temp_s_value)) . '">' . $ws_plugin__optimizemember_temp_s_label . '</label><br />' . "\n"; } echo '</div>' . "\n"; echo !c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<em>* BuddyPress is NOT installed; which is perfectly OK. BuddyPress is NOT a requirement.</em>' . "\n" : '<em>* The options above, make it possible to integrate Custom Registration/Profile Fields ( i.e. those configured with optimizeMember ) into BuddyPress as well. However, if you configure Profile Fields with BuddyPress, those will NOT be integrated with optimizeMember. Therefore, if you need Custom Registration/Profile Fields to work with both optimizeMember and with BuddyPress, please configure them with optimizeMember.</em>'; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_custom_reg_fields", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_profile_modifications", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_profile_modifications", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Member Profile Modifications">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-profile-modifications-section">' . "\n"; echo '<h3>Giving Members The Ability To Modify Their Profile</h3>' . "\n"; echo '<p>optimizeMember can be configured to redirect Members away from the <a href="' . esc_attr(admin_url("/profile.php")) . '" target="_blank" rel="external">default Profile Editing Panel</a> that is built into WordPress. When/if a Member attempts to access the default Profile Editing Panel, they\'ll instead, be redirected to the Login Welcome Page that you\'ve configured through optimizeMember. <strong>Why would I redirect?</strong> Unless you\'ve made some drastic modifications to your WordPress installation, the default Profile Editing Panel that ships with WordPress, is NOT really suited for public access, even by a Member.</p>' . "\n"; echo '<p>So instead of using this default Profile Editing Panel; optimizeMember creates an added layer of functionality, on top of WordPress. It does this by providing you <em>( as the site owner )</em>, with a special Shortcode: <code>[optimizeMember-Profile /]</code> that you can place into your Login Welcome Page, or any Post/Page for that matter <em>( even into a Text Widget )</em>. This Shortcode produces an Inline Profile Editing Form that supports all aspects of optimizeMember, including Password changes; and any Custom Registration/Profile Fields that you\'ve configured with optimizeMember.</p>' . "\n"; echo '<p>Alternatively, optimizeMember also gives you the ability to send your Members to a <a href="' . esc_attr(site_url("/?optimizemember_profile=1")) . '" target="_blank" rel="external">special Stand-Alone version</a>. This Stand-Alone version has been designed <em>( with a bare-bones format )</em>, intentionally. This makes it possible for you to <a href="#" onclick="if(!window.open(\'' . site_url("/?optimizemember_profile=1") . '\', \'_popup\', \'width=600,height=400,left=100,screenX=100,top=100,screenY=100,location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1\')) alert(\'Please disable popup blockers and try again!\'); return false;" rel="external">open it up in a popup window</a>, or embed it into your Login Welcome Page using an IFRAME. Code samples are provided below.</p>' . "\n"; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress already provides Users/Members with a Profile Editing Panel, powered by your theme. If you\'ve configured Custom Registration/Profile Fields with optimizeMember, you can also enable optimizeMember\'s Profile Field integration with BuddyPress ( recommended ). For further details, see: <code>optimizeMember -> General Options -> Registration/Profile Fields</code>.</em></p>' . "\n" : ''; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_profile_modifications", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-force-admin-lockouts">' . "\n"; echo 'Redirect Members away from the Default Profile Panel?' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_force_admin_lockouts" id="ws-plugin--optimizemember-force-admin-lockouts">' . "\n"; echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["force_admin_lockouts"] ? ' selected="selected"' : '') . '>No ( I want to use the WordPress default methodologies )</option>' . "\n"; echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["force_admin_lockouts"] ? ' selected="selected"' : '') . '>Yes ( redirect to Login Welcome Page; locking all /wp-admin/ areas )</option>' . "\n"; echo '</select><br />' . "\n"; echo 'Recommended setting ( <code>Yes</code> ). <em><strong>*Note*</strong> When this is set to ( <code>Yes</code> ), optimizeMember will take an initiative to further safeguard ALL <code>/wp-admin/</code> areas of your installation; not just the Default Profile Panel.</em>' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<p><strong>Shortcode ( copy/paste )</strong>, for an Inline Profile Modification Form:<br />' . "\n"; echo '<p><input type="text" autocomplete="off" value="' . format_to_edit('[optimizeMember-Profile /]') . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n"; /**/ echo '<p style="margin-top:20px;"><strong>Stand-Alone ( copy/paste )</strong>, for popup window:</p>' . "\n"; echo '<p><input type="text" autocomplete="off" value="' . format_to_edit(preg_replace("/\\<\\?php echo OPTIMIZEMEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \\?\\>/", c_ws_plugin__optimizemember_utils_strings::esc_ds(site_url("/?optimizemember_profile=1")), file_get_contents(dirname(__FILE__) . "/code-samples/current-user-profile-modification-page-url-2-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_profile_modifications", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_display_other_membership_options_header", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_before_other_membership_options_header", get_defined_vars()); /**/ echo '<div style="border-bottom:1px solid #DFDFDF; margin:-20px 0 9px 0; padding:0;"> </div>' . "\n"; // echo '<div id="icon-tools" class="icon32" style="margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0;"><br /></div>' . "\n"; echo '<h2 style="margin-top:30px;">Other Membership Options</h2>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_trk_ops_page_during_left_sections_after_other_membership_options_header", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_url_shortening", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_url_shortening", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="URL Shortening Service Preference">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-url-shortening-section">' . "\n"; echo '<h3>URL Shortening Service API ( Preference )</h3>' . "\n"; echo '<p>In a few special cases, long URLs generated by optimizeMember, containing encrypted authentication details, will be shortened; using one of the URL Shortening APIs <em>( listed below )</em>. A shortened URL prevents issues with VERY long links becoming corrupted by a Customer\'s email application. For instance, the Signup Confirmation Email that optimizeMember sends out to a new paying Customer, may contain a link which is shortened to prevent corruption by email applications. By default, optimizeMember uses the tinyURL API, which has proven itself to be the most reliable. However, in cases where an API service call fails, optimizeMember will automatically use one or more of its other APIs as a backup. The option below, allows you to configure which URL Shortening API optimizeMember should try first <em>( i.e. the one you prefer )</em>.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_url_shortening", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-default-url-shortener">' . "\n"; echo 'URL Shortening Service API ( Preference ):' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_default_url_shortener" id="ws-plugin--optimizemember-default-url-shortener">' . "\n"; echo '<option value="tiny_url"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["default_url_shortener"] === "tiny_url" ? ' selected="selected"' : '') . '>tinyurl.com ( free tinyURLâ„¢ API service )</option>' . "\n"; echo '<option value="goo_gl"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["default_url_shortener"] === "goo_gl" ? ' selected="selected"' : '') . '>goo.gl ( free Google URL Shortening API service )</option>' . "\n"; echo '</select>' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-default-custom-str-url-shortener">' . "\n"; echo 'Custom URL Shortening Service API ( Optional/Advanced ):' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_default_custom_str_url_shortener" id="ws-plugin--optimizemember-default-custom-str-url-shortener" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["default_custom_str_url_shortener"]) . '" /><br />' . "\n"; echo 'Your own custom URL <code>( i.e. GET request )</code>, with <code>%%s2_long_url%%</code> Replacement Code. [ <a href="#" onclick="alert(\'optimizeMember makes it possible for advanced site owners to use a custom URL shortening service they prefer, over the ones currently pre-integrated with optimizeMember. In order for this to work, your URL shortening service MUST support basic GET requests through its API ( sometimes referred to as a REST or NVP API ). In addition, your URL shortening service MUST be capable of returning a simple URL in the response that optimizeMember receives, as a result of optimizeMember processing the GET request you formulate. See example below.\\n\\nBitly example GET request with format=txt:\\nhttp://api.bitly.com/v3/shorten?login=demo&apiKey=2d71bf07&format=txt&longUrl=%%s2_long_url%%\\n( optimizeMember expects a shortened URL in the response from Bitly )\\n\\n* If you configure optimizeMember to use your own custom URL shortening service, optimizeMember will try your configuration first, and if anything fails, it will fall back on its own pre-integrated backups. When configuring your URL for the GET request, optimizeMember makes two Replacement Codes available:\\n\\n%%s2_long_url%% = The full URL that needs to be shortened ( raw URL-encoded ).\\n%%s2_long_url_md5%% = An MD5 hash of the full URL ( might be useful in some APIs ).\\n\\n* If you have any trouble getting your URL shortening service integrated with optimizeMember in this way, you might take a look at this WordPress Filter ( `ws_plugin__optimizemember_url_shorten` ), which optimizeMember makes available for advanced circumstances. Search optimizeMember\\\'s source code for `ws_plugin__optimizemember_url_shorten`.\'); return false;" tabindex="-1">click for details</a> ]<br />' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_url_shortening", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_deactivation", !is_multisite() || !c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() || is_main_site() || is_super_admin(), get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_deactivation", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Deactivation Safeguards"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["run_deactivation_routines"] ? ' default-state="open"' : '') . '>' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-deactivation-section">' . "\n"; echo '<h3>Deactivation Safeguards ( highly recommended )</h3>' . "\n"; echo is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site() && is_super_admin() ? '<p><em class="ws-menu-page-hilite">On a Multisite Blog Farm, this panel is ONLY visible to YOU, as a Super Administrator. optimizeMember automatically Safeguards everything on a Multisite Blog Farm. However, as the Super Administrator, you may turn this off; on a per-Blog basis. For example, if you\'re going to de-activate optimizeMember on this particular Blog, you can turn OFF the Safeguards below, so that optimizeMember will completely erase itself.</em></p>' . "\n" : '<p>By default, optimizeMember will retain all of it\'s Roles, Capabilities, and your Configuration Options when/if you deactivate optimizeMember from the Plugins Menu in WordPress. However, if you would like for optimizeMember to erase itself completely, please choose: <code>No ( upon deactivation, erase all data/options )</code>.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_deactivation", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-run-deactivation-routines">' . "\n"; echo 'Safeguard optimizeMember Data/Options?' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_run_deactivation_routines" id="ws-plugin--optimizemember-run-deactivation-routines">' . "\n"; echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["run_deactivation_routines"] ? ' selected="selected"' : '') . '>Yes ( safeguard all data/options )</option>' . "\n"; echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["run_deactivation_routines"] ? ' selected="selected"' : '') . '>No ( upon deactivation, erase all data/options )</option>' . "\n"; echo '</select><br />' . "\n"; echo 'Recommended setting: ( <code>Yes, safeguard all data/options</code> )' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_deactivation", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_display_security", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_before_security", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Security Encryption Key">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-security-section">' . "\n"; echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/large-icon.png" title="optimizeMember ( a Membership management system for WordPress )" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n"; echo '<h3>Security Encryption Key ( optional, for tighter security )</h3>' . "\n"; echo '<p>Just like WordPress, optimizeMember is open-source software. Which is wonderful. However, this also makes it possible for anyone to grab a copy of the software, and try to learn their way around its security measures. In order to keep your installation of optimizeMember unique/secure, you should configure a Security Encryption Key. optimizeMember will use your Security Encryption Key to protect itself against hackers. It does this by encrypting all sensitive information with your Key. A Security Encryption Key is unique to your installation.</p>' . "\n"; echo '<p>Once you configure this, you do NOT want to change it; not ever. In fact, it is a VERY good idea to keep this backed up in a safe place, just in case you need to move your site, or re-install optimizeMember in the future. Some of the sensitive data that optimizeMember stores, will be encrypted with this Key. If you change it, that data can no longer be read, even by optimizeMember itself. In other words, don\'t use optimizeMember for six months, then decide to change your Key. That would break your installation.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_during_security", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-sec-encryption-key">' . "\n"; echo 'Security Encryption Key ( at least 60 chars )' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key"] ? ' <a href="#" onclick="ws_plugin__optimizemember_enableSecurityKey(); return false;" title="( not recommended )">edit key</a>' : ' <a href="#" onclick="ws_plugin__optimizemember_generateSecurityKey(); return false;" title="Insert an auto-generated Key. ( recommended )">auto-generate</a>') . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" maxlength="256" autocomplete="off" name="ws_plugin__optimizemember_sec_encryption_key" id="ws-plugin--optimizemember-sec-encryption-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key"]) . '"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key"] ? ' disabled="disabled"' : '') . ' />' . "\n"; echo !$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key"] ? '<br />This may contain letters, numbers, spaces; even punctuation. Up to 256 characters.<br /><em>Ex: <code>' . esc_html(strtoupper(c_ws_plugin__optimizemember_utils_strings::random_str_gen(64))) . '</code></em>' . "\n" : ''; echo count($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key_history"]) > 1 ? '<br /><a href="#" onclick="ws_plugin__optimizemember_securityKeyHistory(); return false;">Click here</a> for a history of your last 10 Encryption Keys.<div id="ws-plugin--optimizemember-sec-encryption-key-history" style="display:none;"><code>' . implode('</code><br /><code>', $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["sec_encryption_key_history"]) . '</code></div>' . "\n" : ''; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; echo '<div class="ws-menu-page-hr"></div>' . "\n"; echo '<h3>Additional Details Regarding this Key:</h3>' . "\n"; echo '<p>Your Security Encryption Key is used throughout OptimizeMember\'s source code for many different things. However, MOST (not all, but most) uses of this Key are related to transactional processing within a particular session; so changing the Key won\'t really impact these scenarios in any significant way. Your Security Encryption Key is simply there to enhance security of data that is being transmitted in these cases.</p>' . "\n"; echo '<p>That said, there are a few scenarios where use of your Security Encryption Key is more long-term. These include: Specific Post/Page Access Links, Registration Access Links, and it can also have a long-term impact on IPN communication because some data analyzed by OptimizeMember includes a checksum that depends on your Key. If the Key changes, it could cause future IPN data (i.e. data from your payment gateway) to fail validation.</p>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_during_left_sections_after_security", get_defined_vars()); } /**/ do_action("ws_plugin__optimizemember_during_gen_ops_page_after_left_sections", get_defined_vars()); /**/ //echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<p class="submit"><input type="submit" class="op-pb-button green" value="Save All Changes" /></p>' . "\n"; /**/ echo '</form>' . "\n"; /**/ echo '</td>' . "\n"; /**/ echo '<td class="ws-menu-page-table-r">' . "\n"; c_ws_plugin__optimizemember_menu_pages_rs::display(); echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '</div>' . "\n"; echo '</div>' . "\n"; }
/** * optimizeMember's PayPal Auto-Return/PDT handler ( inner processing routine ). * * @package optimizeMember\PayPal * @since 110720 * * @param array $vars Required. An array of defined variables passed by {@link optimizeMember\PayPal\c_ws_plugin__optimizemember_paypal_return_in::paypal_return()}. * @return array|bool The original ``$paypal`` array passed in ( extracted ) from ``$vars``, or false when conditions do NOT apply. * * @todo Optimize with ``empty()`` and ``isset()``. */ public static function cp($vars = array()) { extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__optimizemember_paypal_notify_in::paypal_notify()``. */ /**/ if (!empty($paypal["txn_type"]) && preg_match("/^(web_accept|subscr_signup|subscr_payment)\$/i", $paypal["txn_type"]) && (!empty($paypal["item_number"]) && preg_match($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"])) && (!empty($paypal["subscr_id"]) || !empty($paypal["txn_id"]) && ($paypal["subscr_id"] = $paypal["txn_id"])) && (empty($paypal["payment_status"]) || empty($payment_status_issues) || !preg_match($payment_status_issues, $paypal["payment_status"]))) { eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_during_paypal_return_before_subscr_signup", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ if (!get_transient($transient_rtn = "s2m_rtn_" . md5("optimizemember_transient_" . $_paypal_s)) && set_transient($transient_rtn, time(), 31556926 * 10)) { $paypal["optimizemember_log"][] = "optimizeMember `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` )."; /**/ list($paypal["level"], $paypal["ccaps"], $paypal["eotper"]) = preg_split("/\\:/", $paypal["item_number"], 3); /**/ $paypal["ip"] = preg_match("/ip address/i", $paypal["option_name2"]) && $paypal["option_selection2"] ? $paypal["option_selection2"] : ""; $paypal["ip"] = !$paypal["ip"] && preg_match("/^[a-z0-9]+~[0-9\\.]+\$/i", $paypal["invoice"]) ? preg_replace("/^[a-z0-9]+~/i", "", $paypal["invoice"]) : $paypal["ip"]; $paypal["ip"] = !$paypal["ip"] && $_SERVER["REMOTE_ADDR"] ? $_SERVER["REMOTE_ADDR"] : $paypal["ip"]; /**/ if (preg_match("/^subscr_payment\$/i", $paypal["txn_type"]) && !empty($_GET["optimizemember_paypal_return_tra"]) && (($tra = c_ws_plugin__optimizemember_utils_encryption::decrypt(trim(stripslashes($_GET["optimizemember_paypal_return_tra"])))) && is_array($tra = maybe_unserialize($tra))) && (count($tra) === 11 && isset($tra["ta"], $tra["tp"], $tra["tt"], $tra["ra"], $tra["rp"], $tra["rt"], $tra["rr"], $tra["rrt"], $tra["rra"], $tra["invoice"], $tra["checksum"])) && $tra["invoice"] === $paypal["invoice"] && $tra["checksum"] === md5($paypal["invoice"] . $paypal["ip"] . $paypal["item_number"])) { $tracking_properties = true; /* Yes, these tracking properties ARE being set here. */ /**/ $paypal["period1"] = $tra["rr"] !== "BN" && $tra["tp"] ? $tra["tp"] . " " . $tra["tt"] : "0 D"; $paypal["mc_amount1"] = $tra["rr"] !== "BN" && $tra["tp"] ? number_format($tra["ta"], 2, ".", "") : "0.00"; /**/ $paypal["period3"] = $tra["rp"] . " " . $tra["rt"]; $paypal["mc_amount3"] = $tra["ra"]; /**/ $paypal["recurring"] = $tra["rr"] === "1" ? "1" : "0"; /**/ $paypal["initial_term"] = preg_match("/^[1-9]/", $paypal["period1"]) ? $paypal["period1"] : "0 D"; /* Defaults to "0 D" ( zero days ). */ $paypal["initial"] = strlen($paypal["mc_amount1"]) && preg_match("/^[1-9]/", $paypal["period1"]) ? $paypal["mc_amount1"] : $paypal["mc_amount3"]; $paypal["regular"] = $paypal["mc_amount3"]; /* This is the Regular Payment Amount that is charged to the Customer. Always required by PayPal. */ $paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */ $paypal["recurring"] = $paypal["recurring"] ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */ /**/ eval('$ipn_signup_vars = $paypal; unset($ipn_signup_vars["optimizemember_log"]);'); /* Create array of wouldbe IPN signup vars w/o optimizemember_log. */ } else { if (preg_match("/^(web_accept|subscr_signup)\$/i", $paypal["txn_type"])) { $tracking_properties = true; /* Yes, these tracking properties ARE being set here. */ /**/ $paypal["period1"] = preg_match("/^[1-9]/", $paypal["period1"]) ? $paypal["period1"] : "0 D"; /* Defaults to "0 D" ( zero days ). */ $paypal["mc_amount1"] = strlen($paypal["mc_amount1"]) && $paypal["mc_amount1"] > 0 ? $paypal["mc_amount1"] : "0.00"; /* "0.00". */ /**/ if (preg_match("/^web_accept\$/i", $paypal["txn_type"])) { $paypal["period3"] = $paypal["eotper"] ? $paypal["eotper"] : "1 L"; /* 1 Lifetime. */ $paypal["mc_amount3"] = $paypal["mc_gross"]; /* The "Buy Now" amount is the full gross. */ } /**/ $paypal["initial_term"] = preg_match("/^[1-9]/", $paypal["period1"]) ? $paypal["period1"] : "0 D"; /* Defaults to "0 D" ( zero days ). */ $paypal["initial"] = strlen($paypal["mc_amount1"]) && preg_match("/^[1-9]/", $paypal["period1"]) ? $paypal["mc_amount1"] : $paypal["mc_amount3"]; $paypal["regular"] = $paypal["mc_amount3"]; /* This is the Regular Payment Amount that is charged to the Customer. Always required by PayPal. */ $paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */ $paypal["recurring"] = $paypal["recurring"] ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */ /**/ eval('$ipn_signup_vars = $paypal; unset($ipn_signup_vars["optimizemember_log"]);'); /* Create array of wouldbe IPN signup vars w/o optimizemember_log. */ } } /* New Subscription with advanced update vars ( option_name1, option_selection1 )? Used in Subscr. Modifications. */ if (preg_match("/(referenc|associat|updat|upgrad)/i", $paypal["option_name1"]) && $paypal["option_selection1"]) { eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_during_paypal_return_before_subscr_signup_w_update_vars", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ $paypal["optimizemember_log"][] = "optimizeMember `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ) w/ update vars."; /**/ /* Check for both the old & new subscr_id's, just in case the IPN routine already changed it. */ if (($user_id = c_ws_plugin__optimizemember_utils_users::get_user_id_with($paypal["subscr_id"], $paypal["option_selection1"])) && is_object($user = new WP_User($user_id)) && $user->ID) { if (!$user->has_cap("administrator")) { $processing = $modifying = $during = true; /* Yes, we ARE processing this. */ /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_during_paypal_return_during_before_subscr_signup_w_update_vars", get_defined_vars()); do_action("ws_plugin__optimizemember_during_collective_mods", $user_id, get_defined_vars(), "rtn-upgrade-downgrade", "modification", "optimizemember_level" . $paypal["level"]); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ $fields = get_user_option("optimizemember_custom_fields", $user_id); /* These will be needed in the routines below. */ $user_reg_ip = get_user_option("optimizemember_registration_ip", $user_id); /* Original IP during Registration. */ $user_reg_ip = $paypal["ip"] = $user_reg_ip ? $user_reg_ip : $paypal["ip"]; /* Now merge conditionally. */ /**/ if (is_multisite() && !is_user_member_of_blog($user_id)) { add_existing_user_to_blog(array("user_id" => $user_id, "role" => "optimizemember_level" . $paypal["level"])); $user = new WP_User($user_id); } /**/ $current_role = c_ws_plugin__optimizemember_user_access::user_access_role($user); /**/ if ($current_role !== "optimizemember_level" . $paypal["level"]) { /* Only if we need to. */ $user->set_role("optimizemember_level" . $paypal["level"]); } /* (upgrade/downgrade) */ /**/ if ($paypal["ccaps"] && preg_match("/^-all/", str_replace("+", "", $paypal["ccaps"]))) { foreach ($user->allcaps as $cap => $cap_enabled) { if (preg_match("/^access_optimizemember_ccap_/", $cap)) { $user->remove_cap($ccap = $cap); } } } /**/ if ($paypal["ccaps"] && preg_replace("/^-all[\r\n\t\\s;,]*/", "", str_replace("+", "", $paypal["ccaps"]))) { foreach (preg_split("/[\r\n\t\\s;,]+/", preg_replace("/^-all[\r\n\t\\s;,]*/", "", str_replace("+", "", $paypal["ccaps"]))) as $ccap) { if (strlen($ccap = trim(strtolower(preg_replace("/[^a-z_0-9]/i", "", $ccap))))) { $user->add_cap("access_optimizemember_ccap_" . $ccap); } } } /**/ update_user_option($user_id, "optimizemember_subscr_gateway", $paypal["subscr_gateway"]); update_user_option($user_id, "optimizemember_subscr_id", $paypal["subscr_id"]); update_user_option($user_id, "optimizemember_custom", $paypal["custom"]); /**/ if (!get_user_option("optimizemember_registration_ip", $user_id)) { update_user_option($user_id, "optimizemember_registration_ip", $paypal["ip"]); } /**/ if (!empty($ipn_signup_vars)) { update_user_option($user_id, "optimizemember_ipn_signup_vars", $ipn_signup_vars); } /**/ delete_user_option($user_id, "optimizemember_file_download_access_log"); /**/ if (preg_match("/^web_accept\$/i", $paypal["txn_type"]) && $paypal["eotper"]) { /* Don't update this in the return routine. Leave this for the IPN routine. */ /* EOT Times might be extended, and we don't want the IPN routine to extend an already-extended EOT Time. */ $eot_time = c_ws_plugin__optimizemember_utils_time::auto_eot_time("", "", "", $paypal["eotper"], "", get_user_option("optimizemember_auto_eot_time", $user_id)); $paypal["optimizemember_log"][] = "Automatic EOT ( End Of Term ) Time will be set to: " . date("D M j, Y g:i:s a T", $eot_time) . "."; } else { /* Otherwise, we need to clear the Auto-EOT Time. */ delete_user_option($user_id, "optimizemember_auto_eot_time"); } /**/ $pr_times = get_user_option("optimizemember_paid_registration_times", $user_id); $pr_times["level"] = !$pr_times["level"] ? time() : $pr_times["level"]; /* Preserves existing. */ $pr_times["level" . $paypal["level"]] = !$pr_times["level" . $paypal["level"]] ? time() : $pr_times["level" . $paypal["level"]]; update_user_option($user_id, "optimizemember_paid_registration_times", $pr_times); /* Update now. */ /**/ c_ws_plugin__optimizemember_user_notes::clear_user_note_lines($user_id, "/^Demoted by optimizeMember\\:/"); /**/ $paypal["optimizemember_log"][] = "optimizeMember Level/Capabilities updated w/ advanced update routines."; /**/ setcookie("optimizemember_tracking", $optimizemember_tracking = c_ws_plugin__optimizemember_utils_encryption::encrypt($paypal["subscr_id"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_tracking", $optimizemember_tracking, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["optimizemember_tracking"] = $optimizemember_tracking); /**/ $paypal["optimizemember_log"][] = "Transient Tracking Cookie set on ( `web_accept|subscr_signup|subscr_payment` ) w/ update vars."; /**/ if ($processing && $tracking_properties && ($code = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["modification_tracking_codes"]) && is_array($cv = preg_split("/\\|/", $paypal["custom"]))) { if (($code = preg_replace("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $code)) && ($code = preg_replace("/%%subscr_id%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["subscr_id"]), $code))) { if (($code = preg_replace("/%%initial%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["initial"]), $code)) && ($code = preg_replace("/%%regular%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["regular"]), $code)) && ($code = preg_replace("/%%recurring%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["recurring"]), $code))) { if (($code = preg_replace("/%%initial_term%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["initial_term"]), $code)) && ($code = preg_replace("/%%regular_term%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["regular_term"]), $code))) { if (($code = preg_replace("/%%item_number%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["item_number"]), $code)) && ($code = preg_replace("/%%item_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["item_name"]), $code))) { if (($code = preg_replace("/%%first_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["first_name"]), $code)) && ($code = preg_replace("/%%last_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["last_name"]), $code))) { if ($code = preg_replace("/%%full_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(trim($paypal["first_name"] . " " . $paypal["last_name"])), $code)) { if ($code = preg_replace("/%%payer_email%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["payer_email"]), $code)) { if (($code = preg_replace("/%%user_first_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($user->first_name), $code)) && ($code = preg_replace("/%%user_last_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($user->last_name), $code))) { if ($code = preg_replace("/%%user_full_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(trim($user->first_name . " " . $user->last_name)), $code)) { if ($code = preg_replace("/%%user_email%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($user->user_email), $code)) { if ($code = preg_replace("/%%user_login%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($user->user_login), $code)) { if ($code = preg_replace("/%%user_ip%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($user_reg_ip), $code)) { if ($code = preg_replace("/%%user_id%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($user_id), $code)) { if (is_array($fields) && !empty($fields)) { foreach ($fields as $var => $val) { /* Custom Registration/Profile Fields. */ if (!($code = preg_replace("/%%" . preg_quote($var, "/") . "%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(maybe_serialize($val)), $code))) { break; } } } /**/ if ($code = trim(preg_replace("/%%(.+?)%%/i", "", $code))) { $paypal["optimizemember_log"][] = "Storing Modification Tracking Codes into a Transient Queue. These will be processed on-site."; set_transient("s2m_" . md5("optimizemember_transient_modification_tracking_codes_" . $paypal["subscr_id"]), $code, 43200); } } } } } } } } } } } } } } } /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_during_paypal_return_during_subscr_signup_w_update_vars", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ if ($redirection_url_after_modification = apply_filters("ws_plugin__optimizemember_redirection_url_after_modification", false, get_defined_vars())) { $paypal["optimizemember_log"][] = "Redirecting Customer to a custom URL after modification: " . $redirection_url_after_modification; /**/ wp_redirect($redirection_url_after_modification); } else { $paypal["optimizemember_log"][] = "Redirecting Customer to the Login Page. They need to log back in."; /**/ echo c_ws_plugin__optimizemember_return_templates::return_template($paypal["subscr_gateway"], '<strong>' . _x("Thank you! You've been updated to:", "s2member-front", "s2member") . '<br /><em>' . esc_html($paypal["item_name"]) . '</em></strong>', _x("Please Log Back In ( Click Here )", "s2member-front", "s2member"), wp_login_url()); } } else { $paypal["optimizemember_log"][] = "Unable to modify Subscription. The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing."; /**/ $paypal["optimizemember_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred."; /**/ echo c_ws_plugin__optimizemember_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing.', "s2member-front", "s2member"), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/")); } } else { $paypal["optimizemember_log"][] = "Unable to modify Subscription. Could not get the existing User ID from the DB."; /**/ $paypal["optimizemember_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred."; /**/ echo c_ws_plugin__optimizemember_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB.', "s2member-front", "s2member"), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/")); } /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_during_paypal_return_after_subscr_signup_w_update_vars", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ } else { eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_during_paypal_return_before_subscr_signup_wo_update_vars", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ $processing = $during = true; /* Yes, we ARE processing this new Subscription request. */ /**/ $paypal["optimizemember_log"][] = "optimizeMember `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars."; /**/ setcookie("optimizemember_subscr_gateway", $optimizemember_subscr_gateway = c_ws_plugin__optimizemember_utils_encryption::encrypt($paypal["subscr_gateway"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_subscr_gateway", $optimizemember_subscr_gateway, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["optimizemember_subscr_gateway"] = $optimizemember_subscr_gateway); setcookie("optimizemember_subscr_id", $optimizemember_subscr_id = c_ws_plugin__optimizemember_utils_encryption::encrypt($paypal["subscr_id"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_subscr_id", $optimizemember_subscr_id, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["optimizemember_subscr_id"] = $optimizemember_subscr_id); setcookie("optimizemember_custom", $optimizemember_custom = c_ws_plugin__optimizemember_utils_encryption::encrypt($paypal["custom"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_custom", $optimizemember_custom, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["optimizemember_custom"] = $optimizemember_custom); setcookie("optimizemember_item_number", $optimizemember_item_number = c_ws_plugin__optimizemember_utils_encryption::encrypt($paypal["item_number"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_item_number", $optimizemember_item_number, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["optimizemember_item_number"] = $optimizemember_item_number); /**/ $paypal["optimizemember_log"][] = "Registration Cookies set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars."; /**/ setcookie("optimizemember_tracking", $optimizemember_tracking = c_ws_plugin__optimizemember_utils_encryption::encrypt($paypal["subscr_id"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("optimizemember_tracking", $optimizemember_tracking, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["optimizemember_tracking"] = $optimizemember_tracking); /**/ $paypal["optimizemember_log"][] = "Transient Tracking Cookie set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars."; /**/ if ($processing && $tracking_properties && ($code = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["signup_tracking_codes"]) && is_array($cv = preg_split("/\\|/", $paypal["custom"]))) { if (($code = preg_replace("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $code)) && ($code = preg_replace("/%%subscr_id%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["subscr_id"]), $code))) { if (($code = preg_replace("/%%initial%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["initial"]), $code)) && ($code = preg_replace("/%%regular%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["regular"]), $code)) && ($code = preg_replace("/%%recurring%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["recurring"]), $code))) { if (($code = preg_replace("/%%initial_term%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["initial_term"]), $code)) && ($code = preg_replace("/%%regular_term%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["regular_term"]), $code))) { if (($code = preg_replace("/%%item_number%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["item_number"]), $code)) && ($code = preg_replace("/%%item_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["item_name"]), $code))) { if (($code = preg_replace("/%%first_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["first_name"]), $code)) && ($code = preg_replace("/%%last_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["last_name"]), $code))) { if ($code = preg_replace("/%%full_name%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds(trim($paypal["first_name"] . " " . $paypal["last_name"])), $code)) { if ($code = preg_replace("/%%payer_email%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["payer_email"]), $code)) { if ($code = preg_replace("/%%user_ip%%/i", c_ws_plugin__optimizemember_utils_strings::esc_ds($paypal["ip"]), $code)) { /**/ if ($code = trim(preg_replace("/%%(.+?)%%/i", "", $code))) { $paypal["optimizemember_log"][] = "Storing Signup Tracking Codes into a Transient Queue. These will be processed on-site."; set_transient("s2m_" . md5("optimizemember_transient_signup_tracking_codes_" . $paypal["subscr_id"]), $code, 43200); } } } } } } } } } } /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_during_paypal_return_during_subscr_signup_wo_update_vars", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site()) { if ($redirection_url_after_mms_farm_signup = apply_filters("ws_plugin__optimizemember_redirection_url_after_mms_farm_signup", false, get_defined_vars())) { $paypal["optimizemember_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_mms_farm_signup; /**/ wp_redirect($redirection_url_after_mms_farm_signup); } else { if ($custom_success_redirection) { $paypal["optimizemember_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection; /**/ wp_redirect($custom_success_redirection); } else { $paypal["optimizemember_log"][] = "Redirecting Customer to Signup Page. They need to Signup/Register now."; /**/ echo c_ws_plugin__optimizemember_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>', "s2member-front", "s2member"), _x("Please Register Now ( Click Here )", "s2member-front", "s2member"), c_ws_plugin__optimizemember_utils_urls::wp_signup_url()); } } } else { if ($redirection_url_after_signup = apply_filters("ws_plugin__optimizemember_redirection_url_after_signup", false, get_defined_vars())) { $paypal["optimizemember_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_signup; /**/ wp_redirect($redirection_url_after_signup); } else { if ($custom_success_redirection) { $paypal["optimizemember_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection; /**/ wp_redirect($custom_success_redirection); } else { $paypal["optimizemember_log"][] = "Redirecting Customer to Registration Page. They need to Register now."; /**/ echo c_ws_plugin__optimizemember_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>', "s2member-front", "s2member"), _x("Please Register Now ( Click Here )", "s2member-front", "s2member"), c_ws_plugin__optimizemember_utils_urls::wp_register_url()); } } } /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_during_paypal_return_after_subscr_signup_wo_update_vars", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ } } else { $paypal["optimizemember_log"][] = "Page Expired. Duplicate Return-Data."; $paypal["optimizemember_log"][] = "optimizeMember `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` )."; $paypal["optimizemember_log"][] = "Page Expired. Redirecting Customer to the Home Page."; /**/ echo c_ws_plugin__optimizemember_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.', "s2member-front", "s2member"), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/")); } /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_during_paypal_return_after_subscr_signup", get_defined_vars()); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ return apply_filters("c_ws_plugin__optimizemember_paypal_return_in_subscr_or_wa_w_level", $paypal, get_defined_vars()); } else { return apply_filters("c_ws_plugin__optimizemember_paypal_return_in_subscr_or_wa_w_level", false, get_defined_vars()); } }
public function __construct() { echo '<div class="wrap ws-menu-page op-bsw-wizard op-bsw-content">' . "\n"; /**/ echo '<div class="op-bsw-header">'; echo '<div class="op-logo"><img src="' . $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"] . "/images/" . 'logo-optimizepress.png" alt="OptimizePress" height="50" class="animated flipInY"></div>'; echo '</div>'; echo '<div class="op-bsw-main-content">'; echo '<h2>Multisite (Configuration)</h2>' . "\n"; /**/ echo '<table class="ws-menu-page-table">' . "\n"; echo '<tbody class="ws-menu-page-table-tbody">' . "\n"; echo '<tr class="ws-menu-page-table-tr">' . "\n"; echo '<td class="ws-menu-page-table-l">' . "\n"; /**/ if (is_multisite() && is_main_site()) { echo '<form method="post" name="ws_plugin__optimizemember_options_form" id="ws-plugin--optimizemember-options-form">' . "\n"; echo '<input type="hidden" name="ws_plugin__optimizemember_options_save" id="ws-plugin--optimizemember-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--optimizemember-options-save")) . '" />' . "\n"; echo '<input type="hidden" name="ws_plugin__optimizemember_configured" id="ws-plugin--optimizemember-configured" value="1" />' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_mms_ops_page_before_left_sections", get_defined_vars()); /**/ if (apply_filters("ws_plugin__optimizemember_during_mms_ops_page_during_left_sections_display_mms_patches", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_mms_ops_page_during_left_sections_before_mms_patches", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Multisite WordPress Patches" default-state="open">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-mms-patches-section">' . "\n"; echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["dir_url"]) . '/images/small-icon.png" title="optimizeMember ( a Membership management system for WordPress )" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n"; echo '<h3>Multisite WordPress Patches ( required for compatiblity )</h3>' . "\n"; echo '<p>In order for optimizeMember to function properly in a Multisite environment, you MUST implement four patches. One goes into your <code>/wp-login.php</code> file, one into <code>/wp-includes/load.php</code>, one into <code>/wp-includes/ms-functions.php</code>, and another into <code>/wp-admin/user-new.php</code>. Please use the automatic patcher below. All you do is check the box & click Save.</p>' . "\n"; do_action("ws_plugin__optimizemember_during_mms_ops_page_during_left_sections_during_mms_patches", get_defined_vars()); /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-mms-auto-patch">' . "\n"; echo 'Patch Automatically? ( the easiest way )' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; /**/ if (defined("DISALLOW_FILE_MODS") && DISALLOW_FILE_MODS) { echo '<select name="ws_plugin__optimizemember_mms_auto_patch" id="ws-plugin--optimizemember-mms-auto-patch" disabled="disabled">' . "\n"; echo '<option value="0" selected="selected">No ( I\'ll patch WordPress myself )</option>' . "\n"; echo '</select><br />' . "\n"; echo '<em class="ws-menu-page-hilite">This is now locked. Your <code>/wp-config.php</code> file says: <code>DISALLOW_FILE_MODS = true</code></em>.' . "\n"; } else { echo '<select name="ws_plugin__optimizemember_mms_auto_patch" id="ws-plugin--optimizemember-mms-auto-patch">' . "\n"; echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["mms_auto_patch"] ? ' selected="selected"' : '') . '>Yes ( automatically patch WordPress )</option>' . "\n"; echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["mms_auto_patch"] ? ' selected="selected"' : '') . '>No ( I\'ll patch WordPress myself )</option>' . "\n"; echo '</select><br />' . "\n"; echo '<em class="ws-menu-page-hilite">These files MUST be patched, each time you upgrade the WordPress core. If you set this option to <code>Yes ( Patch Automatically )</code>, optimizeMember will patch your installation now, and also in the future, should you upgrade to newer version. That way, you won\'t need to patch manually each time WordPress is upgraded.</em>' . "\n"; } /**/ echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<div id="ws-plugin--optimizemember-mms-patches-details-wrapper">' . "\n"; echo '<h3>Rather Do It Yourself? ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-mms-patches-details\').toggle(); return false;" class="ws-dotted-link">manual instructions</a> )</h3>' . "\n"; echo '<div id="ws-plugin--optimizemember-mms-patches-details" style="display:none;">' . "\n"; echo '<p><strong>Patch #1</strong> ( /wp-login.php )</p>' . "\n"; echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/mms-patch-wp-login.x-php")) . '</p>' . "\n"; echo '<p><strong>Patch #2</strong> ( /wp-includes/load.php )</p>' . "\n"; echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/mms-patch-load.x-php")) . '</p>' . "\n"; echo '<p><strong>Patch #3</strong> ( /wp-admin/user-new.php )</p>' . "\n"; echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/mms-patch-user-new.x-php")) . '</p>' . "\n"; echo '<p><strong>Patch #4</strong> ( /wp-includes/ms-functions.php )</p>' . "\n"; echo '<p>' . c_ws_plugin__optimizemember_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/mms-patch-ms-functions.x-php")) . '</p>' . "\n"; echo '<p><em class="ws-menu-page-hilite">Don\'t forget to patch these files again, each time you upgrade the WordPress core.</em></p>' . "\n"; echo '</div>' . "\n"; echo '</div>' . "\n"; echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ do_action("ws_plugin__optimizemember_during_mms_ops_page_during_left_sections_after_mms_patches", get_defined_vars()); } /**/ if (apply_filters("ws_plugin__optimizemember_during_mms_ops_page_during_left_sections_display_mms_registration", true, get_defined_vars())) { do_action("ws_plugin__optimizemember_during_mms_ops_page_during_left_sections_before_mms_registration", get_defined_vars()); /**/ echo '<div class="ws-menu-page-group" title="Multisite Registration Configuration" default-state="open">' . "\n"; /**/ echo '<div class="ws-menu-page-section ws-plugin--optimizemember-mms-registration-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>Multisite Registration ( Main Site Configuration )</h3>' . "\n"; echo '<p>optimizeMember supports Free Subscribers <em>( at Level #0 )</em>, and several Primary Roles created by the optimizeMember plugin (<em> i.e. optimizeMember Levels 1-4, or up to the number of configured Levels )</em>. If you want your visitors to be capable of registering absolutely free, you will want to "allow" Open Registration. Whenever a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0.</p>' . "\n"; echo '<p><strong>Running A Multisite Blog Farm?</strong> With Multisite Networking enabled, your Main Site could ALSO offer a Customer access to create a Blog of their own <em>( optional )</em>, where a Customer becomes a "Member" of your Main Site, and also a Blog Owner/Administrator of at least one other Blog on your Network. With optimizeMember installed <em>( Network wide )</em>, each of your Blog Owners could offer Membership too, using a single copy of the optimizeMember plugin, which is a great selling point<em>!</em> We refer to this type of installation as a Multisite Blog Farm.</p>' . "\n"; echo '<p>Multisite Networking makes a new Registration Form available <em>( driven by your theme )</em>; which we refer to as: <code>/wp-signup.php</code>. If, and only if, you\'re planning to offer Blogs, you MUST use <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Multisite Registration Form.\\n* optimizeMember makes this form available to logged-in Super Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">/wp-signup.php</a>, instead of using the Standard Login/Registration Form. In a Multisite installation, we refer to the Standard Login/Registration Form, as: <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Standard Registration Form.\\n* optimizeMember makes this form available to logged-in Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">/wp-login.php?action=register</a>. If you\'re planning to offer Membership Access only, and NOT Blogs, you can simply use the <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Standard Registration Form.\\n* optimizeMember makes this form available to logged-in Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">Standard Login/Registration Form</a>, which is easily customized through <code>optimizeMember -> General Options -> Login/Registration Design</code>.</p>' . "\n"; echo '<p>In either case, optimizeMember Pro Forms are possible too. If you\'ve purchased optimizeMember Pro, you could use Pro Forms instead of these WordPress defaults. That being said, even with optimizeMember Pro Forms, if you are offering Blogs, you will still need to facilitate the actual creation of each Blog through <code>/wp-signup.php</code>. In other words, Customers can register through optimizeMember Pro Forms, and even checkout. But when it comes time to setup a new Blog, you will need to redirect your Customer to <code>/wp-signup.php</code>, while they are logged-in. This will allow them to create a new Blog on your Network. That is, if they are allowed to <em>( based on your configuration below )</em>.</p>' . "\n"; echo c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form, powered by your theme.<br />( BuddyPress can handle both Membership and Blog creation in its integration )<br />( <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">' . esc_html(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . '</a> )</em></p>' . "\n" : ''; do_action("ws_plugin__optimizemember_during_mms_ops_page_during_left_sections_during_mms_registration", get_defined_vars()); /**/ echo '<div id="ws-plugin--optimizemember-mms-registration-support-package-details-wrapper">' . "\n"; echo '<h4 style="margin-bottom:0;">Running a Multisite Blog Farm? ( <a href="#" onclick="jQuery(\'div#ws-plugin--optimizemember-mms-registration-support-package-details\').toggle(); return false;" class="ws-dotted-link">click here / please read</a> )</h4>' . "\n"; echo '<div id="ws-plugin--optimizemember-mms-registration-support-package-details" style="display:none;">' . "\n"; echo '<p>The most important thing to do when setting up a Blog Farm with optimizeMember, is to add this line to your <code>/wp-config.php</code> file: <code><span style="color:#0000BB;">define</span><span style="color:#007700;">(</span><span style="color:#DD0000;">"MULTISITE_FARM"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>. This will add a default layer of security, to all Blogs within your Network, with respect to optimizeMember. <strong>But, before you go live</strong>, please contact <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">optimizeMember.com</a> for full documentation. There is some additional functionality that can be enabled for security on a Blog Farm installation; and also some menus/documentation/functionality that can be disabled. You will be asked to purchase our <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">Network Support Package</a> when you need assistance in this regard.</p>' . "\n"; echo '<p>Multisite Blog Farms require a site owner that fully understands the potential security risks associated with Blog Farming. optimizeMember\'s <a href="' . esc_attr(c_ws_plugin__optimizemember_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">Network Support Package</a> provides you with the information you need, and priority support for anything about optimizeMember that you don\'t understand. In addition, our Network Support Package includes a lengthy PDF file that details a list of things affected by <code><span style="color:#0000BB;">define</span><span style="color:#007700;">(</span><span style="color:#DD0000;">"MULTISITE_FARM"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>, best practices, and other supplemental documentation focused on Blog Farms.</p>' . "\n"; echo '<p><em><strong>Definition of a Multisite Blog Farm:</strong> If your Network is making it possible for "Members" of your Main Site, to create and/or manage Blogs (in any way), optimizeMember will consider your installation to be a Multisite Blog Farm. That being said, some site owners run a Multisite Network for the purpose of maintaining their own sites. The term Multisite Blog Farm does NOT apply to a Network that hosts multiple Child Blogs, all of which are operated by a single site owner and/or a single company. Again, a Multisite Blog Farm ( in the eyes of optimizeMember ), is any Network that is making it possible for "Members" of its Main Site, to create and/or manage Blogs; where one or more of these Child Blogs is being administered by a Customer ( e.g. if you offer both Membership and Blog creation, as configured below ).</em></p>' . "\n"; echo '<p><em><strong>When NOT to run a Multisite Blog Farm:</strong> If you run a Multisite Network for the purpose of maintaining your own sites. You should NOT run a Multisite Blog Farm. You can still activate optimizeMember Network-wide, if you like ( optional ), but the advanced security considerations offered through optimizeMember\'s Multisite Blog Farm functionality are NOT needed in this case; because all of the Child Blogs in your Network belong to trusted Administrators ( i.e. your Customers are NOT going to run Child Blogs on your Network in this case ).</em></p>' . "\n"; echo '</div>' . "\n"; echo '</div>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<table class="form-table">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-mms-registration-file">' . "\n"; echo 'What Do You Plan To Offer? ( please choose one )' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; /**/ if (defined("MULTISITE_FARM") && MULTISITE_FARM) { echo '<select name="ws_plugin__optimizemember_mms_registration_file" id="ws-plugin--optimizemember-mms-registration-file" disabled="disabled">' . "\n"; echo '<option value="wp-signup" selected="selected">Blog Farm ( I plan to offer both Membership & Blog creation )</option>' . "\n"; echo '</select><br />' . "\n"; echo '<em class="ws-menu-page-hilite">This is now locked. Your <code>/wp-config.php</code> file says: <code>MULTISITE_FARM = true</code></em>.' . "\n"; } else { echo '<select name="ws_plugin__optimizemember_mms_registration_file" id="ws-plugin--optimizemember-mms-registration-file">' . "\n"; echo '<option value="wp-login"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["mms_registration_file"] === "wp-login" ? ' selected="selected"' : '') . '>Membership Only ( I\'m NOT offering Blogs )</option>' . "\n"; echo '<option value="wp-signup"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["mms_registration_file"] === "wp-signup" ? ' selected="selected"' : '') . '>Blog Farm ( I plan to offer both Membership & Blog creation )</option>' . "\n"; echo '</select><br />' . "\n"; echo 'Depending on your selection, the options below may change.' . "\n"; } /**/ echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ echo '<table class="form-table ws-plugin--optimizemember-mms-registration-wp-login" style="margin:0;">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th style="padding-top:0;">' . "\n"; echo '<label for="ws-plugin--optimizemember-allow-subscribers-in">' . "\n"; echo 'Your Main Site / Allow Open Registration? ( via <code>wp-login.php?action=register</code> )' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<select name="ws_plugin__optimizemember_allow_subscribers_in" id="ws-plugin--optimizemember-allow-subscribers-in">' . "\n"; echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>No ( do NOT allow Open Registration )</option>' . "\n"; echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>Yes ( allow Open Registration; Free Subscribers at Level #0 )</option>' . "\n"; echo '</select><br />' . "\n"; echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Standard Registration Form.\\n* optimizeMember makes this form available to logged-in Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">wp-login.php?action=register</a> ( on your Main Site ). When a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0. The optimizeMember software reserves Level #0; to be used ONLY for Free Subscribers. All other Membership Levels [1-4] require payment.' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<table class="form-table ws-plugin--optimizemember-mms-registration-wp-signup" style="margin:0;">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th style="padding-top:0;">' . "\n"; echo '<label for="ws-plugin--optimizemember-mms-registration-grants">' . "\n"; echo 'Your Main Site / Allow Open Registration? ( via <code>wp-signup.php</code> )' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td style="padding-bottom:0;">' . "\n"; echo '<select name="ws_plugin__optimizemember_mms_registration_grants" id="ws-plugin--optimizemember-mms-registration-grants">' . "\n"; echo '<option value="none"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["mms_registration_grants"] === "none" ? ' selected="selected"' : '') . '>No ( do NOT allow Open Registration )</option>' . "\n"; echo '<option value="user"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["mms_registration_grants"] === "user" ? ' selected="selected"' : '') . '>Yes ( allow Open Registration; Free Subscribers at Level #0 )</option>' . "\n"; echo '<option value="all"' . ($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["mms_registration_grants"] === "all" ? ' selected="selected"' : '') . '>Yes ( allow Open Registration; Free Subscribers, with a free Blog too )</option>' . "\n"; echo '</select><br />' . "\n"; echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="' . esc_attr(c_ws_plugin__optimizemember_utils_urls::wp_signup_url()) . '" target="_blank" rel="external" onclick="alert(\'optimizeMember will now open your Multisite Registration Form.\\n* optimizeMember makes this form available to logged-in Super Administrators, at all times ( for testing purposes ), regardless of configuration.' . (c_ws_plugin__optimizemember_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(c_ws_plugin__optimizemember_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">wp-signup.php</a> ( on your Main Site ).' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<table class="form-table ws-plugin--optimizemember-mms-registration-wp-signup ws-plugin--optimizemember-mms-registration-wp-signup-blogs-level0">' . "\n"; echo '<tbody>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<th>' . "\n"; echo '<label for="ws-plugin--optimizemember-mms-registration-blogs-level0">' . "\n"; echo 'Level #0 ( Free Subscribers ):' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td style="padding-bottom:0;">' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_mms_registration_blogs_level0" id="ws-plugin--optimizemember-mms-registration-blogs-level0" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["mms_registration_blogs_level0"]) . '" /><br />' . "\n"; echo 'How many blogs can a Free Subscriber create?' . "\n"; echo '</td>' . "\n"; /**/ echo '</tr>' . "\n"; echo '</tbody>' . "\n"; echo '</table>' . "\n"; /**/ echo '<div class="ws-menu-page-hr ws-plugin--optimizemember-mms-registration-wp-signup"></div>' . "\n"; /**/ echo '<table class="form-table ws-plugin--optimizemember-mms-registration-wp-signup" style="margin:0;">' . "\n"; echo '<tbody>' . "\n"; /**/ for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["optimizemember"]["c"]["levels"]; $n++) { $labelText = ws_plugin__optimizemember_getMembershipLabel($n); echo '<tr>' . "\n"; /**/ echo '<th style="padding-top:0;">' . "\n"; echo '<label for="ws-plugin--optimizemember-mms-registration-blogs-level' . $n . '">' . "\n"; echo 'Membership Level ' . $labelText . ' / Maximum Blogs Allowed:' . "\n"; echo '</label>' . "\n"; echo '</th>' . "\n"; /**/ echo '</tr>' . "\n"; echo '<tr>' . "\n"; /**/ echo '<td>' . "\n"; echo '<input type="text" autocomplete="off" name="ws_plugin__optimizemember_mms_registration_blogs_level' . $n . '" id="ws-plugin--optimizemember-mms-registration-blogs-level' . $n . '" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["mms_registration_blogs_level" . $n]) . '" /><br />' . "\n"; echo 'How many blogs can a Member ( at Level ' . $labelText . ' ) create?' . "\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_mms_ops_page_during_left_sections_after_mms_registration", get_defined_vars()); } do_action("ws_plugin__optimizemember_during_mms_ops_page_after_left_sections", get_defined_vars()); /**/ //echo '<div class="ws-menu-page-hr"></div>'."\n"; /**/ echo '<p class="submit"><input type="submit" class="op-pb-button green" value="Save All Changes" /></p>' . "\n"; /**/ echo '</form>' . "\n"; } else { echo '<p style="margin-top:0;"><span class="ws-menu-page-hilite">Your WordPress installation does not have Multisite Networking enabled.<br />Which is perfectly OK :-) Multisite Networking is 100% completely optional.</span></p>' . "\n"; echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["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"; /**/ if (file_exists($ws_plugin__optimizemember_temp = dirname(dirname(dirname(__FILE__))) . "/readme-ms.txt")) { echo '<div class="ws-menu-page-hr"></div>' . "\n"; /**/ if (!function_exists("NC_Markdown")) { include_once dirname(dirname(__FILE__)) . "/externals/markdown/nc-markdown.inc.php"; } /**/ $ws_plugin__optimizemember_temp = file_get_contents($ws_plugin__optimizemember_temp); $ws_plugin__optimizemember_temp = preg_replace("/(\\=)( )(.+?)( )(\\=)/", "<h3>\$3</h3>", $ws_plugin__optimizemember_temp); $ws_plugin__optimizemember_temp = NC_Markdown($ws_plugin__optimizemember_temp); /**/ echo preg_replace("/(\\<a)( href)/i", "\$1" . ' target="_blank" rel="nofollow external"' . "\$2", $ws_plugin__optimizemember_temp); } } /**/ 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"; }
/** * Widget display. * * @package optimizeMember\Widgets * @since 1.5 * * @param array $args Optional. An array of basic settings. * @param array $instance Optional. An array of options for this instance. * @return null */ public function widget($args = FALSE, $instance = FALSE) { $options = c_ws_plugin__optimizemember_pro_login_widget::configure_options_and_their_defaults((array) $instance); /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_pro_login_widget_before_display", get_defined_vars(), $this); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ echo $args["before_widget"]; /* OK, here we go into this widget. */ /**/ if (is_user_logged_in() && strlen($options["profile_title"]) || !is_user_logged_in() && strlen($options["title"])) { echo $args["before_title"] . apply_filters("widget_title", $options[is_user_logged_in() ? "profile_title" : "title"]) . $args["after_title"]; } /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_pro_login_widget_during_display_before", get_defined_vars(), $this); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ if (!is_user_logged_in()) { $links = c_ws_plugin__optimizemember_cache::cached_page_links(); /**/ $ops_page = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["membership_options_page"]; /**/ if ($ops_page && is_page($ops_page) && !empty($_GET["_optimizemember_seeking"]["_uri"])) { $seeking = trim(base64_decode(trim(stripslashes((string) $_GET["_optimizemember_seeking"]["_uri"])))); } /**/ $options["login_redirect"] = $options["login_redirect"] === "%%previous%%" && empty($seeking) && $ops_page && is_page($ops_page) ? "" : $options["login_redirect"]; $options["login_redirect"] = $options["login_redirect"] === "%%previous%%" && empty($seeking) && is_front_page() ? "" : $options["login_redirect"]; $options["login_redirect"] = $options["login_redirect"] === "%%previous%%" && !empty($seeking) && $seeking === "/" ? "" : $options["login_redirect"]; /**/ $redirect_to = $options["login_redirect"]; $redirect_to = preg_replace("/%%previous%%/i", !empty($seeking) ? $seeking : $_SERVER["REQUEST_URI"], $redirect_to); $redirect_to = preg_replace("/%%home%%/i", home_url("/"), $redirect_to); /**/ echo '<div class="ws-plugin--optimizemember-pro-login-widget">' . "\n"; /**/ echo '<form method="post" action="' . esc_url(site_url('wp-login.php', 'login_post')) . '" class="ws-plugin--optimizemember-pro-login-widget-form">' . "\n"; /**/ echo '<div class="ws-plugin--optimizemember-pro-login-widget-username">' . "\n"; echo '<label for="ws-plugin--optimizemember-pro-login-widget-username">' . _x("Username", "s2member-front", "s2member") . ':</label><br />' . "\n"; echo '<input type="text" name="log" id="ws-plugin--optimizemember-pro-login-widget-username" title="Username" />' . "\n"; echo '</div>' . "\n"; /**/ echo '<div class="ws-plugin--optimizemember-pro-login-widget-password">' . "\n"; echo '<label for="ws-plugin--optimizemember-pro-login-widget-password">' . _x("Password", "s2member-front", "s2member") . ':</label><br />' . "\n"; echo '<input type="password" name="pwd" id="ws-plugin--optimizemember-pro-login-widget-password" title="Password" />' . "\n"; echo '</div>' . "\n"; /**/ echo '<div class="ws-plugin--optimizemember-pro-login-widget-lost-password">' . "\n"; $reg_cookies_ok_url = is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && is_main_site() ? c_ws_plugin__optimizemember_utils_urls::wp_signup_url() : c_ws_plugin__optimizemember_utils_urls::wp_register_url(); echo $options["signup_url"] ? '<a href="' . esc_attr($options["signup_url"] !== "%%automatic%%" ? $options["signup_url"] : (c_ws_plugin__optimizemember_register_access::reg_cookies_ok() ? $reg_cookies_ok_url : $links["membership_options_page"])) . '" tabindex="-1">' . _x("signup now", "s2member-front", "s2member") . '</a> | ' : ''; echo '<a href="' . esc_attr(wp_lostpassword_url()) . '" tabindex="-1">' . _x("forgot password?", "s2member-front", "s2member") . '</a>' . "\n"; echo '</div>' . "\n"; /**/ echo '<div class="ws-plugin--optimizemember-pro-login-widget-remember-me">' . "\n"; echo '<label><input type="checkbox" name="rememberme" value="forever" />' . _x("Remember Me", "s2member-front", "s2member") . '</label>' . "\n"; echo '</div>' . "\n"; /**/ echo '<div class="ws-plugin--optimizemember-pro-login-widget-submit">' . "\n"; echo $redirect_to ? '<input type="hidden" name="redirect_to" value="' . esc_attr($redirect_to) . '" />' . "\n" : ''; echo '<input type="submit" value="' . esc_attr(_x("Log Me In", "s2member-front", "s2member")) . '" />' . "\n"; echo '</div>' . "\n"; /**/ echo '</form>' . "\n"; /**/ echo '<div class="ws-plugin--optimizemember-pro-login-widget-code">' . "\n"; /**/ if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site()) { echo do_shortcode(trim($options["logged_out_code"])); } else { /* Otherwise, it's OK to execute PHP code. */ echo do_shortcode(c_ws_plugin__optimizemember_utilities::evl(trim($options["logged_out_code"]))); } /**/ echo '</div>' . "\n"; /**/ echo '<div style="clear:both;"></div>' . "\n"; /**/ echo '</div>' . "\n"; } else { if (is_user_logged_in() && is_object($user = wp_get_current_user()) && !empty($user->ID) && ($user_id = $user->ID)) { $links = c_ws_plugin__optimizemember_cache::cached_page_links(); /**/ $ops_page = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["membership_options_page"]; $welcome_page = $GLOBALS["WS_PLUGIN__"]["optimizemember"]["o"]["login_welcome_page"]; /**/ $options["logout_redirect"] = $options["logout_redirect"] === "%%previous%%" && $ops_page && is_page($ops_page) ? "" : $options["logout_redirect"]; $options["logout_redirect"] = $options["logout_redirect"] === "%%previous%%" && $welcome_page && is_page($welcome_page) ? "" : $options["logout_redirect"]; /**/ $redirect_to = preg_replace("/%%previous%%/i", $_SERVER["REQUEST_URI"], $redirect_to = $options["logout_redirect"]); $redirect_to = preg_replace("/%%home%%/i", home_url("/"), $redirect_to); /**/ echo '<div id="ws-plugin--optimizemember-pro-login-widget" class="ws-plugin--optimizemember-pro-login-widget">' . "\n"; /**/ echo '<div class="ws-plugin--optimizemember-pro-login-widget-profile-summary">' . "\n"; /**/ echo $options["display_gravatar"] ? ($options["link_gravatar"] ? '<a href="http://www.gravatar.com/" target="_blank">' : '') . get_avatar($user_id, 48) . ($options["link_gravatar"] ? '</a>' : '') . "\n" : ''; /**/ echo $options["display_name"] ? '<div class="ws-plugin--optimizemember-pro-login-widget-profile-summary-name">' . esc_html($user->display_name) . '</div>' . "\n" : ''; /**/ echo '<div class="ws-plugin--optimizemember-pro-login-widget-profile-summary-code">' . "\n"; /**/ if (is_multisite() && c_ws_plugin__optimizemember_utils_conds::is_multisite_farm() && !is_main_site()) { echo do_shortcode(trim($options["logged_in_code"])); } else { /* Otherwise, it's OK to execute PHP code. */ echo do_shortcode(c_ws_plugin__optimizemember_utilities::evl(trim($options["logged_in_code"]))); } /**/ echo '</div>' . "\n"; /**/ echo $options["my_account_url"] ? '<div class="ws-plugin--optimizemember-pro-login-widget-profile-summary-my-account"><a href="' . esc_attr($options["my_account_url"] !== "%%automatic%%" ? c_ws_plugin__optimizemember_login_redirects::fill_login_redirect_rc_vars($options["my_account_url"]) : (($login_redirection_url = c_ws_plugin__optimizemember_login_redirects::login_redirection_url($user)) ? $login_redirection_url : $links["login_welcome_page"])) . '">' . _x("My Account", "s2member-front", "s2member") . '</a></div>' . "\n" : ''; echo $options["my_profile_url"] ? '<div class="ws-plugin--optimizemember-pro-login-widget-profile-summary-edit-profile"><a href="' . ($options["my_profile_url"] !== "%%automatic%%" ? esc_attr(c_ws_plugin__optimizemember_login_redirects::fill_login_redirect_rc_vars($options["my_profile_url"])) : esc_attr(site_url("/?optimizemember_profile=1")) . '" onclick="if(!window.open(\'' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(esc_attr(site_url("/?optimizemember_profile=1"))) . '\',\'_profile\', \'width=600,height=400,left=\'+((screen.width/2)-(600/2))+\',screenX=\'+((screen.width/2)-(600/2))+\',top=\'+((screen.height/2)-(400/2))+\',screenY=\'+((screen.height/2)-(400/2))+\',location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1\')) alert(\'' . c_ws_plugin__optimizemember_utils_strings::esc_js_sq(_x("Please disable popup blockers and try again!", "s2member-front", "s2member")) . '\'); return false;') . '">' . _x("Edit My Profile", "s2member-front", "s2member") . '</a></div>' . "\n" : ''; echo '<div class="ws-plugin--optimizemember-pro-login-widget-profile-summary-logout"><a href="' . esc_attr(wp_logout_url($redirect_to)) . '">' . _x("Logout", "s2member-front", "s2member") . '</a></div>' . "\n"; /**/ echo '<div style="clear:both;"></div>' . "\n"; /**/ echo '</div>' . "\n"; /**/ echo '</div>' . "\n"; } } /**/ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;'); do_action("ws_plugin__optimizemember_pro_login_widget_during_display_after", get_defined_vars(), $this); unset($__refs, $__v); /* Unset defined __refs, __v. */ /**/ echo $args["after_widget"]; /**/ do_action("ws_plugin__optimizemember_pro_login_widget_after_display", get_defined_vars(), $this); /**/ return; /* Return for uniformity. */ }