本文整理汇总了PHP中c_ws_plugin__s2member_menu_pages_tb类的典型用法代码示例。如果您正苦于以下问题:PHP c_ws_plugin__s2member_menu_pages_tb类的具体用法?PHP c_ws_plugin__s2member_menu_pages_tb怎么用?PHP c_ws_plugin__s2member_menu_pages_tb使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了c_ws_plugin__s2member_menu_pages_tb类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Specs / Info</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 '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/brand-icon.png" class="ws-menu-page-brand-icon" alt="." />' . "\n";
echo '<a href="' . esc_attr(add_query_arg("c_check_ver", urlencode(c_ws_plugin__s2member_readmes::parse_readme_value("Version")), c_ws_plugin__s2member_readmes::parse_readme_value("Plugin URI"))) . '" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/brand-updates.png" class="ws-menu-page-brand-updates" alt="." /></a>' . "\n";
do_action("ws_plugin__s2member_during_info_page_before_left_sections", get_defined_vars());
if (apply_filters("ws_plugin__s2member_during_info_page_during_left_sections_display_readme", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_info_page_during_left_sections_before_readme", get_defined_vars());
echo '<div class="ws-menu-page-readme">' . "\n";
do_action("ws_plugin__s2member_during_info_page_during_left_sections_during_readme", get_defined_vars());
echo c_ws_plugin__s2member_readmes::parse_readme() . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_info_page_during_left_sections_after_readme", get_defined_vars());
}
do_action("ws_plugin__s2member_during_info_page_after_left_sections", get_defined_vars());
echo '</td>' . "\n";
echo '<td class="ws-menu-page-table-r">' . "\n";
c_ws_plugin__s2member_menu_pages_rs::display();
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
}
示例2: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Pro Specs / Info</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 '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/brand-icon.png" class="ws-menu-page-brand-icon" alt="." />' . "\n";
echo '<a href="' . esc_attr(add_query_arg("c_check_ver", urlencode(c_ws_plugin__s2member_pro_readmes::parse_readme_value("Version")), c_ws_plugin__s2member_pro_readmes::parse_readme_value("Plugin URI"))) . '" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/brand-updates.png" class="ws-menu-page-brand-updates" alt="." /></a>' . "\n";
echo '<div class="ws-menu-page-readme">' . "\n";
echo c_ws_plugin__s2member_pro_readmes::parse_readme() . "\n";
echo '</div>' . "\n";
echo '</td>' . "\n";
echo '<td class="ws-menu-page-table-r">' . "\n";
c_ws_plugin__s2member_menu_pages_rs::display();
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
}
示例3: __construct
public function __construct()
{
if (c_ws_plugin__s2member_utils_conds::pro_is_installed()) {
c_ws_plugin__s2member_pro_menu_pages::mms_ops_page_display();
return;
// Stop here.
}
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Multisite Config</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
if (is_multisite() && is_main_site()) {
echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:25px 0 0 25px; border:0;" />' . "\n";
if (file_exists($ws_plugin__s2member_temp = dirname(dirname(dirname(__FILE__))) . "/readme-ms.txt")) {
echo '<div class="ws-menu-page-hr"></div>' . "\n";
if (!function_exists("NC_Markdown")) {
include_once dirname(dirname(__FILE__)) . "/externals/markdown/nc-markdown.inc.php";
}
$ws_plugin__s2member_temp = file_get_contents($ws_plugin__s2member_temp);
$ws_plugin__s2member_temp = preg_replace("/(\\=)( )(.+?)( )(\\=)/", "<h3>\$3</h3>", $ws_plugin__s2member_temp);
$ws_plugin__s2member_temp = NC_Markdown($ws_plugin__s2member_temp);
echo '<div style="max-width:1024px;">';
echo preg_replace("/(\\<a)( href)/i", "\$1" . ' target="_blank" rel="nofollow external"' . "\$2", $ws_plugin__s2member_temp);
echo '</div>';
}
} else {
echo '<p style="margin-top:0;">Your WordPress installation does not have Multisite Networking enabled.<br />Which is perfectly OK :-) Multisite Networking is 100% completely optional.</p>' . "\n";
echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:25px 0 0 25px; border:0;" />' . "\n";
if (file_exists($ws_plugin__s2member_temp = dirname(dirname(dirname(__FILE__))) . "/readme-ms.txt")) {
echo '<div class="ws-menu-page-hr"></div>' . "\n";
if (!function_exists("NC_Markdown")) {
include_once dirname(dirname(__FILE__)) . "/externals/markdown/nc-markdown.inc.php";
}
$ws_plugin__s2member_temp = file_get_contents($ws_plugin__s2member_temp);
$ws_plugin__s2member_temp = preg_replace("/(\\=)( )(.+?)( )(\\=)/", "<h3>\$3</h3>", $ws_plugin__s2member_temp);
$ws_plugin__s2member_temp = NC_Markdown($ws_plugin__s2member_temp);
echo '<div style="max-width:1024px;">';
echo preg_replace("/(\\<a)( href)/i", "\$1" . ' target="_blank" rel="nofollow external"' . "\$2", $ws_plugin__s2member_temp);
echo '</div>';
}
}
echo '</td>' . "\n";
echo '<td class="ws-menu-page-table-r">' . "\n";
c_ws_plugin__s2member_menu_pages_rs::display();
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
}
示例4: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Other Integrations</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
do_action("ws_plugin__s2member_during_integrations_page_before_left_sections", get_defined_vars());
if (apply_filters("ws_plugin__s2member_during_integrations_page_during_left_sections_display_bbpress", TRUE, get_defined_vars())) {
do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_before_bbpress", get_defined_vars());
echo '<div class="ws-menu-page-group" title="bbPress Plugin Integration (2.0+ plugin version)" default-state="open">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-bbpress-section">' . "\n";
echo '<h3>bbPress Plugin Integration (easy peasy)</h3>' . "\n";
echo '<input type="button" value="Update Roles/Capabilities" class="ws-menu-page-right ws-plugin--s2member-update-roles-button" style="min-width:175px;" />' . "\n";
echo '<p>The plugin version of <a href="http://s2member.com/r/bbpress/" target="_blank" rel="external">bbPress 2.0+</a> integrates seamlessly with WordPress. If bbPress was already installed when you activated s2Member, your s2Member Roles/Capabilities are already configured to work in harmony with bbPress. If you didn\'t, you can simply click the "Update Roles/Capabilities" button here. That\'s all it takes. Once your Roles/Capbilities are updated, s2Member and bbPress are fully integrated with each other.</p>' . "\n";
echo '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/roles-caps/#s2-roles-caps" target="_blank" rel="external">s2Member Roles/Capabilities (Including <strong>bbPress</strong> Support)</a>.</p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>bbPress Forums and s2Member Roles/Capabilities</h3>' . "\n";
echo '<p>s2Member configures your Membership Roles (by default, these include: <em>s2Member Level 1</em>, <em>s2Member Level 2</em>, <em>s2Member Level 3</em>, <em>s2Member Level 4</em>), with a default set of bbPress permissions that allow all Members to both spectate and particpate in your forums, just as if they were a WordPress Subscriber Role (or a bbPress Participant Role).</p>' . "\n";
echo '<p>bbPress also adds some new Roles (dynamic Roles in bbPress 2.2+) to your WordPress installation. These include but are not limited to: <em>Keymaster</em> and <em>Moderator</em>. s2Member allows Forum Keymasters & Moderators full access to the highest Membership Level you offer; just like it does with <em>Administrators</em>, <em>Editors</em>, <em>Authors</em>, and <em>Contributors</em>.</p>' . "\n";
echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3 <em>(plus spectate/participate in bbPress Forums)</em>.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 & 2 <em>(plus spectate/participate in bbPress Forums)</em>.<br />* A Member with Level 2 access, will also be able to access Levels 0 & 1 <em>(plus spectate/participate in bbPress Forums)</em>.<br />* A Member with Level 1 access, will also be able to access Level 0 <em>(plus spectate/participate in bbPress Forums)</em>.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0 <em>(plus spectate/participate in bbPress Forums)</em>.<br />* A public Visitor will have NO access to protected content <em>(and no special access to bbPress Forums)</em>.</p>' . "\n";
echo '<p><em>* WordPress Subscribers <strong class="ws-menu-page-hilite">and bbPress Spectators/Participants</strong> are at Membership Level 0. If you\'re allowing Open Registration via s2Member, Subscribers will be at Level 0 (a Free Subscriber).</em></p>' . "\n";
echo '<p><em>* WordPress Administrators, Editors, Authors, Contributors, <strong class="ws-menu-page-hilite">and bbPress Keymasters/Moderators</strong> have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>Protecting Content Introduced by bbPress</h3>' . "\n";
echo '<p>You can protect individual Forum Topics/Posts/Replies at different Levels with s2Member, or even with Custom Capabilities. Forum Topics/Posts/Replies are integrated by bbPress internally as "Custom Post Types", which can be protected by s2Member either through Post Level Access Restrictions, or through URI Level Access Restrictions. If you choose to use Post Level Access Restrictions, please remember that s2Member will provide you with drop-down menus whenever you add or edit Forum Topics/Posts/Replies to make things easier for you.</p>' . "\n";
echo '<p>You\'ll be happy to know that protecting a bbPress Forum will also (automatically) protect all Topics within that Forum. In other words, if you require a certain Membership Level to access a particular bbPress Forum (or if you require a certain Custom Capability to access a particular Forum), all Topics in that Forum will also require the same.</p>' . "\n";
do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_during_bbpress", get_defined_vars());
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_after_bbpress", get_defined_vars());
}
do_action("ws_plugin__s2member_during_integrations_page_after_left_sections", get_defined_vars());
echo '</td>' . "\n";
echo '<td class="ws-menu-page-table-r">' . "\n";
c_ws_plugin__s2member_menu_pages_rs::display();
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
}
示例5: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Gateways</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_pro_options_form" id="ws-plugin--s2member-pro-options-form" autocomplete="off">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<div class="ws-menu-page-group" title="Other Payment Gateways (optional)" default-state="open">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-other-gateways-section">' . "\n";
echo '<h3>Other Payment Gateways (enable/disable)</h3>' . "\n";
echo '<p>s2Member Pro has been integrated with the additional Payment Gateways listed below. If you wish to take advantage of these additional Payment Gateway integrations, you will need to enable them explicitly from this page. Once enabled, please refresh the page. New options will become available in your s2Member Menu on the left-hand side.</p>' . "\n";
echo '<p>s2Member has the ability to operate with as many Payment Gateway integrations as you like. If you\'d like to use them all, you can! Please remember, for each Payment Gateway that you integrate, you will need to configure the options for that Payment Gateway. You\'ll then use s2Member\'s Pro-Form/Button Generators to create WordPress Shortcodes that go into your Membership Options Page <em>(aka: your Signup Page)</em>.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<div class="ws-menu-page-scrollbox" style="height:250px;">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_pro_gateways_enabled[]" value="update-signal" />' . "\n";
foreach (c_ws_plugin__s2member_pro_gateways::available_gateways() as $ws_plugin__s2member_temp_s_key => $ws_plugin__s2member_temp_s_val) {
echo '<input type="checkbox" name="ws_plugin__s2member_pro_gateways_enabled[]" id="ws-plugin--s2member-pro-gateways-enabled-' . esc_attr($ws_plugin__s2member_temp_s_key) . '" value="' . esc_attr($ws_plugin__s2member_temp_s_key) . '"' . (in_array($ws_plugin__s2member_temp_s_key, $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_gateways_enabled"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-pro-gateways-enabled-' . esc_attr($ws_plugin__s2member_temp_s_key) . '">' . $ws_plugin__s2member_temp_s_val . '</label><br /><br />' . "\n";
}
echo '<input type="checkbox" checked="checked" disabled="disabled" /> <label><strong>PayPal Website Payments Standard</strong> <em>(w/ Buttons)</em><br />↑ supports Buy Now & Recurring. (core / always on)</label>' . "\n";
echo '</div>' . "\n";
echo 'Enable/disable Payment Gateways integrated with s2Member Pro.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '<p class="submit"><input type="submit" value="Save Changes, (then refresh)" /></p>' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '<td class="ws-menu-page-table-r">' . "\n";
c_ws_plugin__s2member_menu_pages_rs::display();
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
}
示例6: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>ClickBank Options</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_pro_options_form" id="ws-plugin--s2member-pro-options-form" autocomplete="off">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<div class="ws-menu-page-group" title="ClickBank Account Details">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-clickbank-account-details-section">' . "\n";
echo '<h3>ClickBank Account Details (required)</h3>' . "\n";
echo '<p><a href="http://s2member.com/r/clickbank/" target="_blank" rel="external">ClickBank</a> is a secure online retail outlet for more than 70,000 digital product vendors and 110,000 active affiliate marketers. ClickBank makes a sale somewhere in the world every three seconds, safely processing more than 27,000 digital transactions a day. They serve more than 200 countries, and are consistently ranked as one of the most highly-trafficked sites on the web.</p>' . "\n";
echo '<p>s2Member has been integrated with ClickBank for Direct Payments and also for Recurring Billing. In order to take advantage of this integration, you will need to have a ClickBank Merchant Account. Once you have an account, all of the details below can be generated from inside of your ClickBank Merchant account. If you need assistance, please check their <a href="http://s2member.com/r/clickbank-help/" target="_blank" rel="external">help section</a>.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-clickbank-username">' . "\n";
echo 'ClickBank Account Username:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_clickbank_username" id="ws-plugin--s2member-pro-clickbank-username" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_clickbank_username"]) . '" /><br />' . "\n";
echo 'This is provided by ClickBank. Check your ClickBank account for this information.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-clickbank-clerk-key">' . "\n";
echo 'ClickBank Clerk/API Key (Read Access):' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_pro_clickbank_clerk_key" id="ws-plugin--s2member-pro-clickbank-clerk-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_clickbank_clerk_key"]) . '" /><br />' . "\n";
echo 'This can be generated at ClickBank. s2Member needs a Clerk Key with "Read Access".' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-clickbank-developer-key">' . "\n";
echo 'ClickBank Developer/API Key:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_pro_clickbank_developer_key" id="ws-plugin--s2member-pro-clickbank-developer-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_clickbank_developer_key"]) . '" /><br />' . "\n";
echo 'This can be generated at ClickBank. Check your ClickBank account for this Key.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-gateway-debug-logs">' . "\n";
echo 'Enable Logging Routines?<br />' . "\n";
echo '<small><em class="ws-menu-page-hilite">* This setting applies universally. [ <a href="#" onclick="alert(\'This configuration option may ALSO appear under (s2Member → PayPal Options). Feel free to configure it here; but please remember that this setting is applied universally (i.e., SHARED) among all Payment Gateways integrated with s2Member.\'); return false;">?</a> ]</em></small>' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging, with API, IPN & Return Page logging.</label><br />' . "\n";
echo '<em>This enables API, IPN and Return Page logging. The log files are stored here: <code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) . '</code></em><br />' . "\n";
echo '<em class="ws-menu-page-hilite">If you have any trouble, please review your s2Member log files for problems. See: <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--s2member-logs")) . '">Log Viewer</a></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<div class="info" style="margin-bottom:0;">' . "\n";
echo '<p style="margin-top:0;"><span>We highly recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems during payment processing. See: <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--s2member-logs")) . '">Log Files (Debug)</a>.</span></p>' . "\n";
echo '<p style="margin-bottom:0;"><span class="ws-menu-page-error">However, it is very important to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, secret API credentials, passwords and/or other sensitive information. We strongly suggest that logging be disabled on a live site (for security reasons).</span></p>' . "\n";
echo '</div>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
}
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-menu-page-group" title="ClickBank IPN v2.1 or v6 Integration">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-clickbank-ipn-section">' . "\n";
echo '<h3>ClickBank IPN "Instant Payment Notifications" (required)</h3>' . "\n";
echo '<p><strong>1.</strong> Log into your ClickBank account and navigate to this section:<br /><strong>Account Settings → My Site → Advanced Tools</strong></p>' . "\n";
echo '<p><strong>2.</strong> Edit your IPN settings & generate a Secret Key.</strong></p>' . "\n";
echo '<p><strong>3.</strong> You\'ll need your IPN v2.1 URL, which is:<br /><code>' . esc_html(home_url("/?s2member_pro_clickbank_notify=2.1")) . '</code> (or <code>=1</code>; same thing)</p>' . "\n";
echo '<p>Or, you can choose to use v6. Your v6 IPN URL is:<br /><code>' . esc_html(home_url("/?s2member_pro_clickbank_notify=6")) . '</code></p>' . "\n";
echo '<p class="warning">Please do NOT integrate both IPN URLs. Choose one version or the other.</strong></p>' . "\n";
echo '<p><strong>4.</strong> Now provide s2Member with your Secret Key in the field below.</strong></p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
//.........这里部分代码省略.........
示例7: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Coupon Codes</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_pro_options_form" id="ws-plugin--s2member-pro-options-form" autocomplete="off">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<div class="ws-menu-page-group" title="Pro-Form Coupon Code Configuration">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-coupon-codes-section">' . "\n";
echo '<h3>Coupon Code Configuration File (optional, to provide discounts)</h3>' . "\n";
echo '<p>Coupons are compatible with Pro-Forms for Stripe, PayPal Pro and Authorize.Net. Coupons allow you to provide discounts through a special promotion. A Customer may enter a Coupon Code at checkout, and depending on the Code they enter, a discount may be applied <em>(based on your configuration below)</em>.</p>' . "\n";
echo '<p>You can have an unlimited number of Coupon Codes. Coupon Codes can be configured to provide a flat-rate discount, or a percentage-based discount. It is possible to force specific Coupon Codes to expire automatically, on a particular date in the future. It is possible to specify which charge(s) a specific Coupon Code applies to <em>(e.g., the Initial/Trial Amount only, the Regular Amount only, or both; including all Recurring fees)</em>. In addition, it is also possible to limit the use of a particular Coupon Code to a particular Post or Page ID; where a particular Pro-Form Shortcode is made available to Customers. You\'ll find several configuration examples below.</p>' . "\n";
if (in_array('stripe', $GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_gateways_enabled'])) {
echo '<div class="info">' . "\n";
echo '<p><strong>* Stripe:</strong> Coupons <em>must</em> be configured with s2Member and <strong>not via the Stripe Dashboard</strong>. s2Member Pro-Forms currently do <em>not</em> support Stripe-generated coupon codes; only those configured here with s2Member.</p>' . "\n";
echo '</div>' . "\n";
}
echo '<p><strong>Required Shortcode Attribute:</strong> In order to display a "Coupon Code" field on your Checkout Form you <em>must</em> add this special Shortcode Attribute to your s2Member Pro-Form Shortcode(s): <code>accept_coupons="1"</code>. If you would like to force-feed a default Coupon Code <em>(optional)</em>, you can add this special Shortcode attribute: <code>coupon="[your default code]"</code>. Or, instead of <code>coupon="[your default code]"</code>, you could pass <code>?s2p-coupon=[your default code]</code> in the query string of a URL leading to a Checkout Form.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<table class="coupons-table">' . "\n";
echo '<thead>' . "\n";
echo '<tr>' . "\n";
echo '<th class="-code"><i class="fa fa-barcode"></i> Code</td>' . "\n";
echo '<th class="-discount"><i class="fa fa-cart-arrow-down"></i> Discount</td>' . "\n";
echo '<th class="-active_time"><i class="fa fa-calendar"></i> Active</td>' . "\n";
echo '<th class="-expires_time"><i class="fa fa-clock-o"></i> Expires</td>' . "\n";
echo '<th class="-directive"><i class="fa fa-cog"></i> Directive</td>' . "\n";
echo '<th class="-singulars"><i class="fa fa-sitemap"></i> Post IDs</td>' . "\n";
echo '<th class="-users"><i class="fa fa-users"></i> User IDs</td>' . "\n";
echo '<th class="-max_uses"><i class="fa fa-gavel"></i> Max Uses</td>' . "\n";
echo '<th class="-uses"><i class="fa fa-line-chart"></i> Uses</td>' . "\n";
echo '<th class="-actions"> </td>' . "\n";
echo '</tr>' . "\n";
echo '</thead>' . "\n";
echo '<tbody>' . "\n";
$_coupons = new c_ws_plugin__s2member_pro_coupons();
foreach ($_coupons->coupons as $_coupon) {
echo '<tr>' . "\n";
echo '<td class="-code"><input type="text" spellcheck="false" value="' . esc_attr($_coupon['code']) . '" /></td>' . "\n";
echo '<td class="-discount"><input type="text" spellcheck="false" value="' . esc_attr($_coupon['discount'] ? $_coupon['discount'] : '') . '" /></td>' . "\n";
echo '<td class="-active_time"><input type="text" spellcheck="false" value="' . esc_attr($_coupon['active_time'] ? date('m/d/Y', $_coupon['active_time']) : '') . '" /></td>' . "\n";
echo '<td class="-expires_time"><input type="text" spellcheck="false" value="' . esc_attr($_coupon['expires_time'] ? date('m/d/Y', $_coupon['expires_time']) : '') . '" /></td>' . "\n";
echo '<td class="-directive"><input type="text" spellcheck="false" value="' . esc_attr($_coupon['directive'] ? $_coupon['directive'] : '') . '" /></td>' . "\n";
echo '<td class="-singulars"><input type="text" spellcheck="false" value="' . esc_attr($_coupon['singulars'] ? implode(',', $_coupon['singulars']) : '') . '" /></td>' . "\n";
echo '<td class="-users"><input type="text" spellcheck="false" value="' . esc_attr($_coupon['users'] ? implode(',', $_coupon['users']) : '') . '" /></td>' . "\n";
echo '<td class="-max_uses"><input type="text" spellcheck="false" value="' . esc_attr($_coupon['max_uses'] ? $_coupon['max_uses'] : '') . '" /></td>' . "\n";
echo '<td class="-uses"><input type="text" spellcheck="false" value="' . esc_attr($_coupons->get_uses($_coupon['code'])) . '" /></td>' . "\n";
echo '<td class="-actions"><a href="#" class="-up" title="Move Up" tabindex="-1"><i class="fa fa-chevron-circle-up"></i></a><a href="#" class="-down" title="Move Down" tabindex="-1"><i class="fa fa-chevron-circle-down"></i></a><a href="#" class="-delete" title="Delete" tabindex="-1"><i class="fa fa-times-circle"></i></a></td>' . "\n";
echo '</tr>' . "\n";
}
unset($_coupons, $_coupon);
// Housekeeping.
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<div><input type="hidden" name="ws_plugin__s2member_pro_coupon_codes" id="ws-plugin--s2member-pro-coupon-codes" value="" />' . "\n";
echo '<div class="coupon-add"><a href="#" title="Add Coupon"><i class="fa fa-plus-square"></i> Add Coupon</a></div>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>Legend for the Above Configuration Fields</h3>' . "\n";
echo '<ul style="list-style:none; margin:0; padding:0;">' . "\n";
// Explaining Coupon Codes by example.
echo '<li style="list-style:none;"><strong><i class="fa fa-barcode"></i> Code</strong> e.g., <code>SAVE-100</code>, <code>$100OFF</code>, <code>XMAS!!</code> <em>This is what a customer will enter to acquire a discount. It may contain any sequence of characters (or symbols) that you like. Coupon Codes are not caSe-sensitive here, and they are not caSe-sensitive when a customer enter them either. <strong>Tip:</strong> it is recommended that you refrain from using complex Coupon Codes that are difficult for a customer to enter during checkout.</em></li>' . "\n";
echo '<li style="list-style:none;margin-top:1em;"><strong><i class="fa fa-cart-arrow-down"></i> Discount</strong> e.g., <code>100.00</code> (flat-rate) or <code>100%</code> (percentage-based) <em>How much of a discount will you offer?</em></li>' . "\n";
echo '<li style="list-style:none;margin-top:1em;"><strong><i class="fa fa-calendar"></i> Active</strong> e.g., <code>12/01/2020</code> <em>When will the coupon become active? If empty, it becomes active immediately. If you fill this in, please use <code>MM/DD/YYYY</code> format.</em></li>' . "\n";
echo '<li style="list-style:none;margin-top:1em;"><strong><i class="fa fa-clock-o"></i> Expires</strong> e.g., <code>12/31/2020</code> <em>When will the coupon expire? If empty, it never expires. If you fill this in, please use <code>MM/DD/YYYY</code> format.</em></li>' . "\n";
echo '<li style="list-style:none;margin-top:1em;"><strong><i class="fa fa-cog"></i> Directive</strong> e.g., <code>ta-only</code> or <code>ra-only</code> <em>By default (i.e., if this is empty), s2Member will apply the discount to all amounts, including any Regular/Recurring fees. However, you may configure Coupon Codes that will only apply to (ta) Trial Amounts, or (ra) Regular Amounts. If this is empty, the discount applies to all amounts, including any Regular/Recurring fees.</em></li>' . "\n";
echo '<li style="list-style:none;margin-top:1em;"><strong><i class="fa fa-sitemap"></i> Post IDs</strong> e.g., <code>123</code> or <code>1,9983,223</code> <em>By default (i.e., if this is empty), s2Member accepts Coupon Codes on any Pro-Form with Shortcode Attribute: <code>accept_coupons="1"</code>. However, you may configure Coupon Codes that only work on specific Post or Page IDs. This can be entered as a single Post/Page ID, or as a comma-delimited list of multiple IDs.</em></li>' . "\n";
echo '<li style="list-style:none;margin-top:1em;"><strong><i class="fa fa-users"></i> User IDs</strong> e.g., <code>456</code> or <code>8,673,93</code> <em>By default (i.e., if this is empty), s2Member accepts Coupon Codes from any User, whether they are logged-in or not. However, you may configure Coupon Codes that only work for specific WordPress User IDs. This can be entered as a single WordPress User ID, or as a comma-delimited list of multiple IDs. <strong>Note:</strong> adding this limitation requires that a user be logged-in when they use the Coupon Code.</em></li>' . "\n";
echo '<li style="list-style:none;margin-top:1em;"><strong><i class="fa fa-gavel"></i> Max Uses</strong> e.g., <code>1000</code> <em>By default (i.e., if this is empty), a Coupon Code can be used any number of times, or until it expires. However, you can set a limit on the number of times that a Coupon Code can be used to complete checkout by any number of customers overall. If you fill this in, when the limit is reached, because X number of customers used the Coupon Code to complete checkout, the Coupon will automatically expire. <strong>Note:</strong> setting this to <code>0</code> is the same as leaving it empty; i.e., if you set this to <code>0</code>, the Coupon Code can be used any number of times, or until it expires. No difference.</em></li>' . "\n";
echo '<li style="list-style:none;margin-top:1em;"><strong><i class="fa fa-line-chart"></i> Uses (Counter)</strong> e.g., <code>0</code> <em>s2Member updates this field automatically, incrementing it by <code>1</code> each time the Coupon Code is used to complete checkout. However, you can reset this to <code>0</code> (or any other number) if you so desire.</em></li>' . "\n";
echo '</ul>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<p>' . "\n";
echo '<em><strong>REMINDER:</strong> you need a Pro-Form with Shortcode Attribute: <code>accept_coupons="1"</code></em><br />' . "\n";
echo '<em>* s2Member ONLY accepts Coupons on Pro-Forms with Shortcode Attribute: <code>accept_coupons="1"</code></em>' . "\n";
echo '</p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<p>' . "\n";
echo '<em><strong>TIP:</strong> your changes to the configuration above (including deletions) will not take affect until you click <strong>Save All Changes</strong> down below.</em>' . "\n";
echo '</p>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-menu-page-group" title="Pro-Form Affiliate Coupon Codes">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-affiliate-coupon-codes-section">' . "\n";
echo '<h3>Affiliate Coupon Codes (optional, for affiliate tracking systems)</h3>' . "\n";
echo '<p>Coupons are compatible with Pro-Forms for Stripe, PayPal Pro and Authorize.Net. Coupon Codes allow you to provide discounts through a special promotion. <strong>Affiliate Coupon Codes</strong> make it possible for your affiliates to receive credit for sales they refer, using one of your Coupon Codes <em>(which you may have configured in the section above)</em>.</p>' . "\n";
echo '<p>Here\'s how it works. You tell your affiliates about one or more of the Coupon Codes that you accept <em>(which you may have configured in the section above)</em>. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code, like this: <code>COUPON-CODE' . esc_html($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_affiliate_coupon_code_suffix_chars"]) . '123</code>; where <code>COUPON-CODE</code> is the valid Coupon Code that you\'ve configured, and <code>123</code> is the affiliate\'s ID <em>(see also, Suffix Chars below)</em>. If a Customer comes to your site, and they use a Coupon Code with an affiliate ID on the end of it; your affiliate will be <strong>tracked</strong> automatically by s2Member. If this Customer actually completes the sale, the referring affiliate will be credited with whatever commission your affiliate program offers.</p>' . "\n";
echo '<p><strong>Prerequisites.</strong> Your affiliate tracking system MUST provide you with a Tracking URL that s2Member can connect to silently behind-the-scenes <em>(sometimes referred to as a cURL Tracking Logger)</em>. The Standard edition of <a href="http://www.s2member.com/idev-affiliate" target="_blank" rel="external">iDevAffiliate</a> meets this requirement, and it\'s our recommendation to use the cURL Tracking Logger provided by iDevAffiliate. Or, if you\'re using another affiliate system that offers a URL s2Member can load as a 1px IMG in the Customer\'s browser after a Coupon Code is applied, that\'s fine too. In either case, this URL should ONLY <strong>track</strong> a potential Customer upon entering a Coupon Code, and NOT credit an affiliate with a commission. Credit is given to an affiliate through other forms of integration which you may or may not have configured yet. Please see: <strong>s2Member ⥱ API Tracking</strong>.</p>' . "\n";
//.........这里部分代码省略.........
示例8: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Stripe Options</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_pro_options_form" id="ws-plugin--s2member-pro-options-form" autocomplete="off">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce('ws-plugin--s2member-options-save')) . '" />' . "\n";
echo '<div class="ws-menu-page-group" title="Stripe Account Details">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-stripe-account-details-section">' . "\n";
echo '<img src="' . esc_attr($GLOBALS['WS_PLUGIN__']['s2member']['c']['dir_url']) . '/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n";
echo '<a href="http://www.s2member.com/r/stripe/" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member_pro"]["c"]["dir_url"]) . '/images/stripe-logo.png" class="ws-menu-page-right" style="width:250px; height:116px; background:#0D1F2F; border-radius:5px; border:0; margin-bottom:10px;" alt="." /></a>' . "\n";
echo '<a href="http://www.s2member.com/r/stripe-bitcoin-enable/" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member_pro"]["c"]["dir_url"]) . '/images/bitcoin-logo.png" class="ws-menu-page-right" style="clear:both; width:225px; height:74px; border:0; margin-left:5px; margin-bottom:10px;" alt="." /></a>' . "\n";
echo '<i class="fa fa-3x fa-plus ws-menu-page-right" style="color:#BECD97;"></i>' . "\n";
echo '<h3>Stripe Account Details (required)</h3>' . "\n";
echo '<p><a href="http://www.s2member.com/r/stripe/" target="_blank" rel="external">Stripe</a> absolutely rocks! It\'s a developer-friendly way to accept payments online and in mobile apps. They process billions of dollars a year for thousands of companies of all sizes. Easy to integrate; and easy for customers to use.</p>' . "\n";
echo '<p>s2Member Pro has been integrated with Stripe for Direct Payments and also for Subscriptions (Automated Recurring Billing). In order to take advantage of this integration, you will need to have a Stripe Merchant Account (free). Once you have an account, all of the details below can be obtained from inside of your Stripe account. If you need assistance, please check their <a href="http://www.s2member.com/r/stripe-help/" target="_blank" rel="external">help section</a>.</p>' . "\n";
echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>Secure Server:</strong> In order to comply with Stripe and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Stripe Pro-Forms on an SSL enabled site. Please check with your hosting provider to ask about obtaining an SSL certificate for your domain. Please note... when you create Stripe Pro-Forms with s2Member; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with (<code>https://</code>). — You can skip the SSL certificate during Development/Sandbox testing. SSL is not required until you officially go live. Once you\'re live, you can add the Custom Field <code>s2member_force_ssl = yes</code> to any Post/Page.</em></p>' . "\n" : '<p><em><strong>Secure Server:</strong> In order to comply with Stripe and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Stripe Pro-Forms on an SSL enabled page. When you create Stripe Pro-Forms with s2Member; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with (<code>https://</code>). You can add the Custom Field <code>s2member_force_ssl = yes</code> to any Post/Page that contains a Pro-Form Shortcode. This tells s2Member to force those special Posts/Pages to be viewed over SSL at all times; no matter what.</em></p>' . "\n";
echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>SSL Compatibility:</strong> Most themes available at <a href="http://www.s2member.com/r/themeforest/" target="_blank" rel="external">ThemeForest™</a> include full support for SSL, as does WordPress itself. However, there are many themes/plugins that do NOT support SSL enabled Posts/Pages like they should. For this reason, you should be very careful when choosing a WordPress theme to use with s2Member Pro. Otherwise, your visitors could see the famous "Secure/Insecure" warnings in Internet Explorer browsers. With s2Member installed, you can add the Custom Field <code>s2member_force_ssl = yes</code> to any Post/Page. s2Member will buffer output on those special Posts/Pages, converting everything over to <code>https://</code> for you automatically, and forcing those specific Posts/Pages to be viewed over a secure SSL connection; so long as your server supports the https protocol.</em></p>' . "\n" : '';
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-stripe-api-secret-key">' . "\n";
echo 'Stripe Secret API Key:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_pro_stripe_api_secret_key" id="ws-plugin--s2member-pro-stripe-api-secret-key" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_stripe_api_secret_key']) . '" /><br />' . "\n";
echo 'You\'ll find this in your Stripe Merchant account, under: <strong>Account Settings → API Keys</strong>.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-stripe-api-publishable-key">' . "\n";
echo 'Stripe Publishable API Key:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_stripe_api_publishable_key" id="ws-plugin--s2member-pro-stripe-api-publishable-key" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_stripe_api_publishable_key']) . '" /><br />' . "\n";
echo 'You\'ll find this in your Stripe Merchant account, under: <strong>Account Settings → API Keys</strong>.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-stripe-api-accept-bitcoin">' . "\n";
echo 'Accept Bitcoin via Stripe?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<select name="ws_plugin__s2member_pro_stripe_api_accept_bitcoin" id="ws-plugin--s2member-pro-stripe-api-accept-bitcoin">' . "\n";
echo '<option value="0"' . (!$GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_stripe_api_accept_bitcoin'] ? ' selected="selected"' : '') . '>No, do not accept Bitcoin (default Stripe behavior)</option>' . "\n";
echo '<option value="1"' . ($GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_stripe_api_accept_bitcoin'] ? ' selected="selected"' : '') . '>Yes, accept Bitcoin (enabled for "Buy Now" only; i.e., recurring charges not possible at this time)</option>' . "\n";
echo '</select><br />' . "\n";
echo 'Works for "Buy Now" transactions in USD only; i.e., other currency conversions not supported by Stripe at this time.<br />' . "\n";
echo 'Turning this on requires that you <a href="http://www.s2member.com/r/stripe-bitcoin-enable/" target="_blank" rel="external">enable the live Bitcoin API on your account</a>' . "\n";
echo '<p><em><strong>Tip:</strong> This setting for Bitcoin is a global flag that enables Bitcoin for all Pro-Forms that offer a "Buy Now" item. However, you can also enable/disable Bitcoin in a specific Pro-Form (regardless of your configuration here), by adding the Shortcode Attribute <code>accept="bitcoin"</code> (to enable Bitcoin) or <code>accept=""</code> (to disable Bitcoin). For further details, please see: <strong>s2Member → Stripe Pro-Forms → Shortcode Attributes (Explained)</strong></em></p>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-stripe-api-image">' . "\n";
echo 'Stripe Image Branding:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_stripe_api_image" id="ws-plugin--s2member-pro-stripe-api-image" value="' . format_to_edit($GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_stripe_api_image']) . '" /><br />' . "\n";
echo 'Minimum size of <code>128px</code> x <code>128px</code> (square). Stripe displays this image above credit card input fields; <code>https://...</code> recommended here.<br />' . "\n";
echo '<small><strong>Note:</strong> If you leave this empty, an account-level default value may or may not be displayed by Stripe. It\'s best to configure it here.</small>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-stripe-api-statement-description">' . "\n";
echo 'Stripe Statement Description:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
//.........这里部分代码省略.........
示例9: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Download Options</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_amazon_cf_files_distros_auto_config_status" id="ws-plugin--s2member-amazon-cf-files-distros-auto-config-status" value="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_distros_auto_config_status"]) . '" />' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />' . "\n";
do_action("ws_plugin__s2member_during_down_ops_page_before_left_sections", get_defined_vars());
if (apply_filters("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_restrictions", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_restrictions", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Basic Download Restrictions">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-restrictions-section">' . "\n";
echo '<h3>File Download Restrictions (required, if providing access to protected files)</h3>' . "\n";
echo '<p>If your Membership offering allows access to restricted files, you\'ll want to configure these options.</p>' . "\n";
do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_restrictions", get_defined_vars());
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<p><strong>Upload restricted files to this security-enabled directory:</strong><br /><code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '</code></p>' . "\n";
echo '<p>- Now, you can link to any protected file, using this special format:<br /> <code>' . esc_html(site_url("/?s2member_file_download=example-file.zip")) . '</code><br /> <small><em><strong>s2member_file_download</strong> = file, relative to the /' . esc_html(c_ws_plugin__s2member_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/ directory. In other words, just the file name.</em></small></p>' . "\n";
echo '<p>- Or, use: <code>[s2File download="example-file.zip" /]</code> <em>(easier Shortcode if you prefer)</em><br /> <small><em><strong>Shortcode equivalent:</strong> <code>[s2File /]</code> produces the entire URL for you, easier.</em></small></p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<p>s2Member will allow access to these protected files, based on the configuration you specify below. Repeated downloads of the same exact file are NOT tabulated against the totals below. Once a file has been downloaded, future downloads of the same exact file, by the same exact Member will not be counted against them. In other words, if a Member downloads the same file three times, the system only counts that as one unique download. In addition, multiple variations of popular media formats are only counted once. This is because many site owners provide multiple download options to their Users/Members, for compatibility purposes. Files that have the same exact name, with one of these extensions, will only be counted ONE time: <code>' . esc_html(implode(",", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["streaming_file_extns"])) . '</code>.</p>' . "\n";
echo '<p>s2Member will automatically detect links, anywhere in your content, and/or anywhere in your theme files, that contain <code>s2member_file_download</code> or <code>s2member-files</code>. Whenever a logged-in Member clicks a link that contains <code>s2member_file_download</code> or <code>s2member-files</code>, the system will politely ask the user to confirm the download using a very intuitive JavaScript confirmation prompt, which contains specific details about your configured download limitations. This way your Members will be aware of how many files they\'ve downloaded in the current period; and they\'ll be able to make a conscious decision about whether to proceed with a specific download or not. If you want to suppress this JavaScript confirmation prompt, you can add this to the end of your links: <code>&s2member_skip_confirmation</code>. Shortcode alternative: <code>[s2File skip_confirmation="yes" /]</code>.</p>' . "\n";
echo '<p><em>* The above only applies to Users who are logged in as Members. For all other visitors in the general public, the <code>?s2member_file_download</code> links will redirect them your Membership Options Page, so that new visitors can signup, in order to gain access, by becoming a Member. You may also want to have a look down below at s2Member\'s "Advanced Download Restrictions", which provides a greater degree of flexibility.</em></p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<table class="form-table" style="margin-top:0;">' . "\n";
echo '<tbody>' . "\n";
for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<tr>' . "\n";
echo '<th style="padding-top:0;">' . "\n";
echo '<label for="ws-plugin--s2member-level' . $n . '-file-downloads-allowed">' . "\n";
echo $n === $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] ? 'File Downloads ( Highest Level #' . $n . ' ):' . "\n" : 'File Downloads (Level #' . $n . ' Or Higher):' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" maxlength="9" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"]) . '" style="width:200px;" /> every <input type="text" maxlength="3" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed_days" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed-days" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed_days"]) . '" style="width:200px;" onkeyup="if(this.value > 365){ alert(\'(365 days is the maximum).\\nThis keeps the logs optimized.\'); this.value = 365; }" /> day(s).<br />' . "\n";
echo 'Only this many unique downloads will be permitted every X day(s), at ' . ($n === $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] ? 'highest Level #' . $n : 'Level #' . $n . ' or higher') . '.<br />' . "\n";
echo '<em>* To allow UNLIMITED downloads, use: <code>999999999</code> (i.e. <code>999999999</code> = unlimited).</em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo $n < $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] ? '<tr><td><div class="ws-menu-page-hr" style="margin:10px 0 10px 0;"></div></td></tr>' : '';
}
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_restrictions", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_limit_exceeded_page", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_limit_exceeded_page", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Download Limit Exceeded Page">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-limit-exceeded-page-section">' . "\n";
echo '<h3>Download Limit Exceeded Page (required, if providing access to protected files)</h3>' . "\n";
echo '<p>This Page will be shown when/if a Member reaches their download limit, based on your configuration of <strong>Basic Download Restrictions</strong> above. This Page should be created by you, in WordPress. This Page should provide an informative message to the Member, describing your file access restrictions. Just tell them a little bit about your policy on file downloads, and why they might have reached this Page.</p>' . "\n";
do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_limit_exceeded_page", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-file-download-limit-exceeded-page">' . "\n";
echo 'Download Limit Exceeded Page:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<select name="ws_plugin__s2member_file_download_limit_exceeded_page" id="ws-plugin--s2member-file-download-limit-exceeded-page">' . "\n";
echo '<option value="">— Select —</option>' . "\n";
foreach ($ws_plugin__s2member_temp_a = array_merge((array) get_pages()) as $ws_plugin__s2member_temp_o) {
echo '<option value="' . esc_attr($ws_plugin__s2member_temp_o->ID) . '"' . ($ws_plugin__s2member_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"] ? ' selected="selected"' : '') . '>' . esc_html($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
}
echo '</select><br />' . "\n";
echo 'We recommend the following title: <code>Download Limit Exceeded</code>.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_limit_exceeded_page", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_advanced_restrictions", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_advanced_restrictions", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Advanced Download Restrictions">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-restrictions-section">' . "\n";
echo '<h3>Advanced Download Restrictions (optional, for greater flexibility)</h3>' . "\n";
echo '<p>By default, s2Member uses your Basic Download Restrictions, as configured above. However, you can force s2Member to allow File Downloads, using an extra query string parameter: <code>&s2member_file_download_key=[Key]</code>. A File Download `Key` is passed through this parameter; it tells s2Member to allow the download of this particular file, regardless of Membership Level; and WITHOUT checking any Basic Restrictions, that you may or may not have configured above. The creation of a File Download `Key`, requires a small PHP code snippet. In order to use PHP scripting inside your Posts/Pages, you\'ll need to install this handy plugin (<a href="http://wordpress.org/extend/plugins/ezphp/" target="_blank" rel="external">ezPHP</a>). There is also a Shortcode equivalent, which does NOT require PHP at all, as seen below.</p>' . "\n";
do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_advanced_restrictions", get_defined_vars());
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<p>' . esc_html(site_url("/?s2member_file_download=example-file.zip")) . '<code>&s2member_file_download_key=<?php echo s2member_file_download_key("example-file.zip"); ?></code><br /> <small><em><strong>s2member_file_download_key</strong> = <?php echo s2member_file_download_key("file, relative to the /' . esc_html(c_ws_plugin__s2member_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/ directory"); ?></em></small></p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
//.........这里部分代码省略.........
示例10: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Authorize.Net Options</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_pro_options_form" id="ws-plugin--s2member-pro-options-form" autocomplete="off">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<div class="ws-menu-page-group" title="Authorize.Net Account Details">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-authnet-account-details-section">' . "\n";
echo '<h3>Authorize.Net Account Details (required)</h3>' . "\n";
echo '<p><a href="http://www.s2member.com/authorize.net" target="_blank" rel="external">Authorize.Net</a> is a leading provider of payment gateway services, managing the submission of billions of transactions to processing networks on behalf of merchant customers. Authorize.Net is a solution offered by the CyberSource Corporation, a wholly owned subsidiary of Visa (NYSE: V).</p>' . "\n";
echo '<p>s2Member has been integrated with Authorize.Net for Direct Payments and also for ARB (Automated Recurring Billing). In order to take advantage of this integration, you will need to have an Authorize.Net Merchant Account. Once you have an account, all of the details below can be obtained from inside of your Authorize.Net account. If you need assistance, please check their <a href="http://www.s2member.com/authorize.net-developers" target="_blank" rel="external">help section</a>.</p>' . "\n";
echo '<p><em><strong>Authorize.Net Version (3.1):</strong> s2Member integrates with Transaction Version 3.1 for Authorize.Net. Please log into your Authorize.Net Merchant account and make sure your Transaction Version setting is configured as: <code>3.1</code>. You will find this inside your Authorize.Net Merchant account, under: <strong>Account ⥱ Settings ⥱ Transaction Version</strong>.</em></p>' . "\n";
echo '<p><em><strong>Recurring Billing:</strong> If you plan to use any of the ( `Subscription` ) options in the s2Member Form Generator for Authorize.Net, you will ALSO need <a href="http://www.s2member.com/authorize.net-arb" target="_blank" rel="external">ARB (Automated Recurring Billing)</a> enabled for your Authorize.Net account. Authorize.Net\'s Recurring Billing service is <strong>required</strong> for all types of ( `Subscriptions` ), whether you intend for them to be recurring or not. However, it is NOT required for ( `Buy Now` ) functionality. The drop-down menus in the s2Member Form Generator, have been marked ( `Subscription` ) and ( `Buy Now` ) just for this reason. See: <strong>s2Member ⥱ Authorize.Net Pro-Forms</strong>. This way you can see which options will require the use of Authorize.Net\'s Recurring Billing service. Authorize.Net will charge you a small monthly fee for their Automated Recurring Billing service.</em></p>' . "\n";
echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>Secure Server:</strong> In order to comply with Authorize.Net and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Authorize.Net Pro-Forms on an SSL enabled site. Please check with your hosting provider to ask about obtaining an SSL certificate for your domain. Please note... when you create Authorize.Net Pro-Forms with s2Member; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with (<code>https://</code>). — You can skip the SSL certificate during Development/Sandbox testing. SSL is not required until you officially go live. Once you\'re live, you can add the Custom Field <code>s2member_force_ssl = yes</code> to any Post/Page.</em></p>' . "\n" : '<p><em><strong>Secure Server:</strong> In order to comply with Authorize.Net and PCI Compliance policies, as set forth by major credit card companies; you will need to host all of your Authorize.Net Pro-Forms on an SSL enabled page. When you create Authorize.Net Pro-Forms with s2Member; you\'ll be supplied with WordPress Shortcodes, which you\'ll insert into Posts/Pages of your choosing. These special Posts/Pages will need to be displayed in SSL mode, using links that start with (<code>https://</code>). You can add the Custom Field <code>s2member_force_ssl = yes</code> to any Post/Page that contains a Pro-Form Shortcode. This tells s2Member to force those special Posts/Pages to be viewed over SSL at all times; no matter what.</em></p>' . "\n";
echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>SSL Compatibility:</strong> Most themes available at <a href="http://www.s2member.com/r/themeforest/" target="_blank" rel="external">ThemeForest™</a> include full support for SSL, as does WordPress itself. However, there are many themes/plugins that do NOT support SSL enabled Posts/Pages like they should. For this reason, you should be very careful when choosing a WordPress theme to use with s2Member Pro. Otherwise, your visitors could see the famous "Secure/Insecure" warnings in Internet Explorer browsers. With s2Member installed, you can add the Custom Field <code>s2member_force_ssl = yes</code> to any Post/Page. s2Member will buffer output on those special Posts/Pages, converting everything over to <code>https://</code> for you automatically, and forcing those specific Posts/Pages to be viewed over a secure SSL connection; so long as your server supports the https protocol.</em></p>' . "\n" : '';
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-authnet-api-login-id">' . "\n";
echo 'Authorize.Net API Login ID:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_authnet_api_login_id" id="ws-plugin--s2member-pro-authnet-api-login-id" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_api_login_id"]) . '" /><br />' . "\n";
echo 'You\'ll find this in your Authorize.Net Merchant account, under: <strong>Account ⥱ Settings</strong>.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-authnet-api-trans-key">' . "\n";
echo 'Authorize.Net API Transaction Key:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_pro_authnet_api_trans_key" id="ws-plugin--s2member-pro-authnet-api-trans-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_api_trans_key"]) . '" /><br />' . "\n";
echo 'You\'ll find this in your Authorize.Net Merchant account, under: <strong>Account ⥱ Settings</strong>.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-authnet-api-salt-key">' . "\n";
echo 'Authorize.Net Secret MD5 Hash:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_pro_authnet_api_salt_key" id="ws-plugin--s2member-pro-authnet-api-salt-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_api_salt_key"]) . '" /><br />' . "\n";
echo 'You\'ll set this in your Authorize.Net Merchant account, under: <strong>Account ⥱ Settings</strong>.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th style="padding-top:0;">' . "\n";
echo '<label for="ws-plugin--s2member-pro-authnet-sandbox">' . "\n";
echo 'Developer/Sandbox Testing?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_pro_authnet_sandbox" id="ws-plugin--s2member-pro-authnet-sandbox-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-pro-authnet-sandbox-0">No</label> <input type="radio" name="ws_plugin__s2member_pro_authnet_sandbox" id="ws-plugin--s2member-pro-authnet-sandbox-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_authnet_sandbox"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-pro-authnet-sandbox-1">Yes, enable support for Sandbox testing.</label><br />' . "\n";
echo '<em>Only enable this if you\'ve provided Developer credentials above.<br />This puts s2Member\'s Authorize.Net integration into Sandbox/Test mode.<br />See: <a href="http://www.s2member.com/authorize.net-test-accounts" target="_blank" rel="external">Authorize.Net Test Accounts</a></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-gateway-debug-logs">' . "\n";
echo 'Enable Logging Routines?<br />' . "\n";
echo '<small><em class="ws-menu-page-hilite">* This setting applies universally. [ <a href="#" onclick="alert(\'This configuration option may ALSO appear under (s2Member ⥱ PayPal Options). Feel free to configure it here; but please remember that this setting is applied universally (i.e., SHARED) among all Payment Gateways integrated with s2Member.\'); return false;">?</a> ]</em></small>' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging, with API, IPN & Return Page logging.</label><br />' . "\n";
echo '<em>This enables API, IPN and Return Page logging. The log files are stored here: <code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) . '</code></em><br />' . "\n";
echo '<em class="ws-menu-page-hilite">If you have any trouble, please review your s2Member log files for problems. See: <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--s2member-logs")) . '">Log Viewer</a></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<div class="info" style="margin-bottom:0;">' . "\n";
//.........这里部分代码省略.........
示例11: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>General Options</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />' . "\n";
do_action("ws_plugin__s2member_during_gen_ops_page_before_left_sections", get_defined_vars());
if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_uninstall", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() || is_super_admin(), get_defined_vars())) {
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_uninstall", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Plugin Deletion Safeguards"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_uninstall_routines"] ? ' default-state="open"' : '') . '>' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-uninstall-section">' . "\n";
echo '<h3>Plugin Deletion Safeguards (highly recommended)</h3>' . "\n";
echo '<p>By default, s2Member will retain all of it\'s Roles, Capabilities, and your Configuration Options when/if you delete s2Member from the Plugins Menu in WordPress. However, if you would like for s2Member to erase itself completely, please choose: <code>No (upon deletion, erase all data/options)</code>.</p>';
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_uninstall", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-run-uninstall-routines">' . "\n";
echo 'Safeguard s2Member Data/Options?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<select name="ws_plugin__s2member_run_uninstall_routines" id="ws-plugin--s2member-run-uninstall-routines">' . "\n";
echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_uninstall_routines"] ? ' selected="selected"' : '') . '>Yes (safeguard all data/options)</option>' . "\n";
echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_uninstall_routines"] ? ' selected="selected"' : '') . '>No (upon deletion, erase all data/options)</option>' . "\n";
echo '</select><br />' . "\n";
echo 'Recommended setting: (<code>Yes, safeguard all data/options</code>)' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_uninstall", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_security", TRUE, get_defined_vars())) {
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_security", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Security Encryption Key">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-security-section">' . "\n";
echo '<img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n";
echo '<h3>Security Encryption Key (optional, for tighter security)</h3>' . "\n";
echo '<p>Just like WordPress, s2Member is open-source software. Which is wonderful. However, this also makes it possible for anyone to grab a copy of the software, and try to learn their way around its security measures. In order to keep your installation of s2Member unique/secure, you should configure a Security Encryption Key. s2Member will use your Security Encryption Key to protect itself against hackers. It does this by encrypting all sensitive information with your Key. A Security Encryption Key is unique to your installation.</p>' . "\n";
echo '<p>Once you configure this, you do NOT want to change it; not ever. In fact, it is a VERY good idea to keep this backed up in a safe place, just in case you need to move your site, or re-install s2Member in the future. Some of the sensitive data that s2Member stores, will be encrypted with this Key. If you change it, that data can no longer be read, even by s2Member itself. In other words, don\'t use s2Member for six months, then decide to change your Key. That would break your installation.</p>' . "\n";
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_security", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-sec-encryption-key">' . "\n";
echo 'Security Encryption Key (at least 60 chars)' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] ? ' <a href="#" onclick="ws_plugin__s2member_enableSecurityKey(); return false;" title="(not recommended)">edit key</a>' : ' <a href="#" onclick="ws_plugin__s2member_generateSecurityKey(); return false;" title="Insert an auto-generated Key. (recommended)">auto-generate</a>') . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" maxlength="256" autocomplete="off" name="ws_plugin__s2member_sec_encryption_key" id="ws-plugin--s2member-sec-encryption-key" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) . '"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] ? ' disabled="disabled"' : '') . ' />' . "\n";
echo !$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] ? '<br />This may contain letters, numbers, spaces; even punctuation. Up to 256 characters.<br /><em>Ex: <code>' . esc_html(strtoupper(c_ws_plugin__s2member_utils_strings::random_str_gen(64))) . '</code></em>' . "\n" : '';
echo count($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key_history"]) > 1 ? '<br /><a href="#" onclick="ws_plugin__s2member_securityKeyHistory(); return false;">Click here</a> for a history of your last 10 Encryption Keys.<div id="ws-plugin--s2member-sec-encryption-key-history" style="display:none;"><code>' . implode('</code><br /><code>', $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key_history"]) . '</code></div>' . "\n" : '';
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>Additional Details Regarding this Key:</h3>' . "\n";
echo '<p>Your Security Encryption Key is used throughout s2Member\'s source code for many different things. However, MOST (not all, but most) uses of this Key are related to transactional processing within a particular session; so changing the Key won\'t really impact these scenarios in any significant way. Your Security Encryption Key is simply there to enhance security of data that is being transmitted in these cases.</p>' . "\n";
echo '<p>That said, there are a few scenarios where use of your Security Encryption Key is more long-term. These include: Specific Post/Page Access Links, Registration Access Links, and it can also have a long-term impact on IPN communication because some data analyzed by s2Member includes a checksum that depends on your Key. If the Key changes, it could cause future IPN data (i.e. data from your payment gateway) to fail validation.</p>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_security", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_localhost_info", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() || is_super_admin(), get_defined_vars())) {
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_localhost_info", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Localhost WAMP/MAMP Developers">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-localhost-info-section">' . "\n";
echo '<h3>Localhost WAMP/MAMP Installs (are you a developer?)</h3>' . "\n";
echo '<p>If you\'re developing your site in a <code>localhost</code> environment, running something like WAMP/MAMP, or <a href="http://www.easyphp.org/" target="_blank" rel="external">EasyPHP</a>, please add this line to your <code>/wp-config.php</code> file: <code><span style="color:#0000BB;">define</span><span style="color:#007700;">(</span><span style="color:#DD0000;">"LOCALHOST"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>.</p>' . "\n";
echo '<p>This lets s2Member know definitively that your site is in a <code>localhost</code> environment. s2Member will adjust itself accordingly, maximizing functionality during your developement. s2Member can usually auto-detect this, but in cases where your <code>localhost</code> installation runs on something other than <code>127.0.0.1/localhost</code>, you need to tell s2Member definitively, by adding that line to your <code>/wp-config.php</code> file. For instance, s2Member needs to know when your server IP is the same as all User IPs.</p>' . "\n";
echo '<p><em>Once your site goes live, please remove the line. If you\'re already on a live server connected to the web, please ignore this section.</em></p>' . "\n";
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_localhost_info", get_defined_vars());
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_localhost_info", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_lazy_load", !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() || is_super_admin(), get_defined_vars())) {
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_lazy_load", get_defined_vars());
echo '<div class="ws-menu-page-group" title="CSS/JS Lazy Loading">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-lazy-load-section">' . "\n";
echo '<h3>CSS/JS Lazy Loading (Client-Side Libraries)</h3>' . "\n";
echo '<p>By default, s2Member will load it\'s CSS/JS libraries on every page of your site. However, you may wish to enable lazy-loading here (e.g. only load when absolutely necessary).</p>' . "\n";
//.........这里部分代码省略.........
示例12: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Log Files</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
do_action("ws_plugin__s2member_during_logs_page_before_left_sections", get_defined_vars());
if (apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_help", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_help", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Getting Help">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-help">' . "\n";
echo '<h3>Getting Help w/ s2Member (Troubleshooting)</h3>' . "\n";
echo '<p>s2Member is pretty easy to setup and install initially. Most of the official documentation is right here in your Dashboard (i.e. there is a lot of inline documentation built into the software). That being said, it CAN take some time to master everything there is to know about s2Member\'s advanced features. If you need assistance with s2Member, please search the <a href="http://www.s2member.com/kb/" target="_blank" rel="external">s2Member Knowledge Base</a>, <a href="http://www.s2member.com/videos/" target="_blank" rel="external">Video Tutorials</a>, <a href="http://www.s2member.com/forums/" target="_blank" rel="external">Forums</a> and <a href="http://www.s2member.com/codex/" target="_blank" rel="external">Codex</a>. If you are planning to do something creative with s2Member, you might want to <a href="http://jobs.wordpress.net" target="_blank" rel="external">hire a freelance developer</a> to assist you.</p>' . "\n";
echo '<p><strong>See also:</strong> <a href="http://www.s2member.com/kb/common-troubleshooting-tips/" target="_blank" rel="external">s2Member Troubleshooting Guide</a> (please read this first if you\'re having trouble).</p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>Testing Server Compatibility</h3>' . "\n";
echo '<p>Please download the <a href="http://www.s2member.com/r/server-check-tool/">s2Member Server Scanner</a>. Unzip, upload via FTP; then open in a browser for a full report.</p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>Troubleshooting Payment Gateway Integrations</h3>' . "\n";
echo '<p>Please use the s2Member Log Viewer (below). Log files can be very helpful.</p>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<h3>Search s2Member KB Articles, Forums, Codex and more<em>!</em></h3>' . "\n";
echo '<form method="get" action="http://www.s2member.com/quick-s.php" target="_blank" onsubmit="if(this.q.value === \'enter search terms...\') this.q.value = \'\';">' . "\n";
echo '<p><input type="text" name="q" value="enter search terms..." style="width:60%;" onfocus="if(this.value === \'enter search terms...\') this.value = \'\';" onblur="if(this.value === \'\') this.value = \'enter search terms...\';" /> <input type="submit" value="Search" style="font-size:120%; font-weight:normal;" /></p>' . "\n";
echo '</form>' . "\n";
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_during_help", get_defined_vars());
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_after_help", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_log_settings", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_log_settings", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Logging Configuration">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-log-settings-section">' . "\n";
echo '<h3>Logging Configuration</h3>' . "\n";
echo '<div class="info">' . "\n";
echo '<p style="font-size:110%; margin-top:0;"><span>We HIGHLY recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems that occur during processing. Enable logging here, and then view your log files below; in the s2Member Log Viewer.</span></p>' . "\n";
echo '<p style="font-size:110%; margin-bottom:0;"><span class="ws-menu-page-error">However, it is VERY IMPORTANT to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, secret API credentials, passwords and/or other sensitive information. We STRONGLY suggest that logging be disabled on a live site (for security reasons).</span></p>' . "\n";
echo '</div>' . "\n";
echo '<div class="notice" style="margin-bottom:0;">' . "\n";
echo '<p style="font-size:110%; margin-bottom:0;"><span>Regarding s2Member Security Badges. If debug logging is enabled, your site will NOT qualify for an s2Member Security Badge until you disable logging (and you must ALSO download, and then delete any existing log files). For further details, please see KB Article: <a href="http://www.s2member.com/kb/security-badges/" target="_blank" rel="external">s2Member Security Badges</a>.</span></p>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_during_log_settings", get_defined_vars());
echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-gateway-debug-logs">' . "\n";
echo 'Enable Logging Routines?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging w/ HTTP, API, IPN & Return Page logging (and List Server API logs too).</label><br />' . "\n";
echo '<em>This enables logging overall. Includes s2Member HTTP, API, IPN and Return Page logging. Also logs any List Server integrations.</em><br />' . "\n";
echo '<em>* Use only for debugging. This should NEVER be enabled on a live site.<br />* The log files are stored here: <code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) . '</code></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-gateway-debug-logs-extensive">' . "\n";
echo 'Enable Additional Logging Routines?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs_extensive" id="ws-plugin--s2member-gateway-debug-logs-extensive-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs_extensive"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-extensive-0">No</label> <input type="radio" name="ws_plugin__s2member_gateway_debug_logs_extensive" id="ws-plugin--s2member-gateway-debug-logs-extensive-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs_extensive"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-extensive-1">Yes, enable debugging w/ HTTP connection logging for ALL of WordPress.</label><br />' . "\n";
echo '<em>This enables HTTP connection logging for ALL of WordPress (quite extensive).<br />* Use only for debugging. This should NEVER be enabled on a live site.<br />* Creates the additional log file: <code>wp-http-api-debug.log</code></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<p class="submit" style="margin-top:20px;">' . "\n";
echo '<input type="submit" value="Update Logging Configuration" />' . "\n";
echo '</p>' . "\n";
echo '</form>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_after_log_settings", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_logs", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_logs", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Logs Viewer" default-state="open">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-logs-section">' . "\n";
echo '<h3>Debugging Tools/Tips & Other Important Details (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-debugging-tips-details\').toggle(); return false;" class="ws-dotted-link">click here to toggle</a>)</h3>' . "\n";
echo '<div id="ws-plugin--s2member-debugging-tips-details" style="display:none;">' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<form method="post" onsubmit="if(!confirm(\'Archive all existing log files?\\n\\nAll of your current log files will be archived (e.g. they will simply be renamed with an ARCHIVED tag & date in their file name); and new log files will be created automatically the next time s2Member logs something on your installation.\\n\\nPlease click OK to confirm this action.\')) return false;">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_logs_archive_start_fresh" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-logs-archive-start-fresh")) . '" />' . "\n";
echo '<input type="submit" value="Archive All Current Log Files" class="ws-menu-page-right ws-plugin--s2member-archive-logs-start-fresh-button" style="font-size:110%; font-weight:normal; clear:right; min-width:200px;" />' . "\n";
//.........这里部分代码省略.........
示例13: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Coupon Codes</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_pro_options_form" id="ws-plugin--s2member-pro-options-form">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<div class="ws-menu-page-group" title="(Pro Form) Coupon Code Configuration" default-state="open">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-coupon-codes-section">' . "\n";
echo '<h3>Coupon Code Configuration File (optional, to provide discounts)</h3>' . "\n";
echo '<p>Currently, this is ONLY compatible with Pro Forms for PayPal Pro and Authorize.Net, enabled by the s2Member Pro Module. Coupon Codes allow you to provide discounts <em>(through a special promotion)</em>. A Customer may enter a Coupon Code at checkout, and depending on the Code they enter, a discount may be applied <em>(based on your configuration below)</em>.</p>' . "\n";
echo '<p>You can have an unlimited number of Coupon Codes. Coupon Codes can be configured to provide a flat-rate discount, or a percentage-based discount. It is possible to force specific Coupon Codes to expire automatically, on a particular date in the future. It is possible to specify which charge(s) a specific Coupon Code applies to <em>(e.g. the Initial/Trial Amount only, the Regular Amount only, or both; including all Recurring fees)</em>. In addition, it is also possible to limit the use of a particular Coupon Code, to a particular Post or Page ID, where a particular Pro Form Shortcode is made available to Customers. You\'ll find several configuration examples below.</p>' . "\n";
echo '<p><strong>Prerequisites:</strong> In order to display a "Coupon Code" field on your Checkout Form, you MUST add this special Shortcode Attribute to your s2Member Pro Form Shortcode(s): <code>accept_coupons="1"</code>. If you would like to force-feed a default Coupon Code <em>(optional)</em>, you can add this special Shortcode attribute: <code>coupon="[your default code]"</code>. Also optional, instead of <code>coupon="[your default code]"</code>, you could pass <code>?s2p-coupon=[your default code]</code> in the query string of a URL leading to a Checkout Form.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<textarea name="ws_plugin__s2member_pro_coupon_codes" id="ws-plugin--s2member-pro-coupon-codes" rows="10" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_coupon_codes"]) . '</textarea><br />' . "\n";
echo 'One Coupon Code per line please, using a pipe (<code>|</code>) delimitation as seen below.' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo 'Here are a few basic Coupon Code examples you can follow:<br />' . "\n";
echo '<ul>' . "\n";
// Explaining Coupon Codes by example.
echo '<li><code>SAVE-10|10%</code> <em>(saves the Customer 10%)</em></li>' . "\n";
echo '<li><code>SAVE-20|20%</code> <em>(saves the Customer 20%)</em></li>' . "\n";
echo '<li><code>2$OFF|2.00</code> <em>($2.00 off the normal price)</em></li>' . "\n";
echo '<li><code>EASTER|5.00</code> <em>($5.00 off the normal price)</em></li>' . "\n";
echo '<li><code>CHRISTMAS|5.00|12/31/2020</code> <em>($5.00 off, expires Dec 31st, 2020)</em></li>' . "\n";
echo '<li><code>CHRISTMAS-25|25%|01/01/2021</code> <em>(25% off, expires Jan 1st, 2021)</em></li>' . "\n";
echo '<li><code>100%OFF|100%</code> <em>(100% FREE access @ <strong>$0.00</strong>)</em></li>' . "\n";
echo '</ul>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<em>By default, s2Member will apply the discount to ALL amounts, including any Regular/Recurring fees.<br />' . "\n";
echo '* However, you may configure Coupon Codes that will ONLY apply to (ta) Trial Amounts, or (ra) Regular Amounts.</em>' . "\n";
echo '<ul>' . "\n";
// Explaining this by example.
echo '<li><code>SAVE-10|10%||ta-only</code> <em>(10% off an Initial/Trial Amount; the ta="" attribute in your Shortcode)</em></li>' . "\n";
echo '<li><code>SAVE-15|15%||ra-only</code> <em>(15% off the Regular Amount(s); the ra="" attribute in your Shortcode)</em></li>' . "\n";
echo '<li><code>XMAS|5.00|12/31/2021|ra-only</code> <em>($5 off Regular Amount(s); the ra="" attribute in your Shortcode)</em></li>' . "\n";
echo '<li><code>5PER|5%|12/31/2021|all</code> <em>(5% off All Amounts; this is the default behavior "all")</em></li>' . "\n";
echo '</ul>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<em>By default, s2Member accepts Coupon Codes on any Pro Form with Shortcode Attribute: <code>accept_coupons="1"</code>.<br />' . "\n";
echo '* However, you may configure Coupon Codes that ONLY work on specific Post or Page IDs, as seen below.</em>' . "\n";
echo '<ul>' . "\n";
// Explaining this by example.
echo '<li><code>SAVE-10|10%|||123</code> <em>(10% off; works only on Post or Page ID #<code>123</code>)</em></li>' . "\n";
echo '<li><code>SAVE-15|15%||ra-only|123</code> <em>(15% off Regular Amount(s); works only on Post or Page ID #<code>123</code>)</em></li>' . "\n";
echo '<li><code>XMAS|5.00|12/31/2021|ra-only|123,456</code> <em>($5 off Regular Amount(s); works only on Post or Page IDs <code>123</code>,<code>456</code>)</em></li>' . "\n";
echo '<li><code>5PER|5%|12/31/2021|all|all</code> <em>(5% off All Amounts; works on all Posts/Pages; this is the default behavior "all")</em></li>' . "\n";
echo '</ul>' . "\n";
echo '<em>Remember, you still need a Pro Form with Shortcode Attribute: <code>accept_coupons="1"</code></em><br />' . "\n";
echo '<em>* s2Member ONLY accepts Coupons on Pro Forms with Shortcode Attribute: <code>accept_coupons="1"</code></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-menu-page-group" title="(Pro Form) Affiliate Coupon Codes">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-affiliate-coupon-codes-section">' . "\n";
echo '<h3>Affiliate Coupon Codes (optional, for affiliate tracking systems)</h3>' . "\n";
echo '<p>Currently, this is ONLY compatible with Pro Forms for PayPal Pro and Authorize.Net, which are enabled by the s2Member Pro Module. Coupon Codes allow you to provide discounts <em>(through a special promotion)</em>. <strong>Affiliate Coupon Codes</strong> make it possible for your affiliates to receive credit for sales they refer, using one of your Coupon Codes <em>(which you may have configured in the section above)</em>.</p>' . "\n";
echo '<p>Here\'s how it works. You tell your affiliates about one or more of the Coupon Codes that you accept <em>(which you may have configured in the section above)</em>. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code, like this: <code>COUPON-CODE' . esc_html($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_affiliate_coupon_code_suffix_chars"]) . '123</code>; where <code>COUPON-CODE</code> is the valid Coupon Code that you\'ve configured, and <code>123</code> is the affiliate\'s ID <em>(see also, Suffix Chars below)</em>. If a Customer comes to your site, and they use a Coupon Code with an affiliate ID on the end of it; your affiliate will be <strong>tracked</strong> automatically by s2Member. If this Customer actually completes the sale, the referring affiliate will be credited with whatever commission your affiliate program offers.</p>' . "\n";
echo '<p><strong>Prerequisites.</strong> Your affiliate tracking system MUST provide you with a Tracking URL that s2Member can connect to silently behind-the-scene <em>(sometimes referred to as a cURL Tracking Logger)</em>. The Standard edition of <a href="http://www.s2member.com/idev-affiliate" target="_blank" rel="external">iDevAffiliate</a> meets this requirement, and it\'s our recommendation to use the cURL Tracking Logger provided by iDevAffiliate. Or, if you\'re using another affiliate system that offers a URL s2Member can load as a 1px IMG in the Customer\'s browser after a Coupon Code is applied, that\'s fine too. In either case, this URL should ONLY <strong>track</strong> a potential Customer upon entering a Coupon Code, and NOT credit an affiliate with a commission. Credit is given to an affiliate through other forms of integration which you may or may not have configured yet. Please see: <code>s2Member -› API Tracking</code>.</p>' . "\n";
echo '<p><strong><a href="http://www.s2member.com/idev-affiliate" target="_blank" rel="external">iDevAffiliate</a> <em>(recommended)</em>:</strong> You can obtain an Affiliate Tracking URL inside your iDevAffiliate dashboard. See: <code>iDevAffiliate -› Setup & Tools -› Advanced Developer Tools -› Custom Functions -› cURL Tracking Log</code>. s2Member only needs the Tracking URL itself <em>(and NOT all of the PHP code that iDevAffiliate provides)</em>. Your iDevAffiliate Tracking URL <em>( including the <code>SILENT-PHP|</code> prefix described below)</em> should contain s2Member\'s <code><em class="ws-menu-page-hilite">%%</em></code> Replacement Codes, like this: <code>SILENT-PHP|http://example.com/idevaffiliate.php?ip_address=<em class="ws-menu-page-hilite">%%user_ip%%</em>&id=<em class="ws-menu-page-hilite">%%coupon_affiliate_id%%</em></code></p>' . "\n";
echo '<p><strong><a href="http://www.s2member.com/shareasale" target="_blank" rel="external">ShareASale</a>:</strong> Use this ShareASale URL <em>(including the <code>IMG-1PX|</code> prefix described below)</em>, and modify it just a bit to match your product: <code>IMG-1PX|https://www.shareasale.com/r.cfm?u=<em class="ws-menu-page-hilite">%%coupon_affiliate_id%%</em>&b=<em class="ws-menu-page-hilite">BBBBBB</em>&m=<em class="ws-menu-page-hilite">MMMMMM</em>&urllink=about%3Ablank&afftrack=<em class="ws-menu-page-hilite">%%full_coupon_code%%</em></code>. Be sure to replace <code><em class="ws-menu-page-hilite">BBBBBB</em></code> with a specific ShareASale Banner/Creative ID that you make available to your affiliates. Replace <code><em class="ws-menu-page-hilite">MMMMMM</em></code> with your ShareASale Merchant ID. The other <code><em class="ws-menu-page-hilite">%%</em></code> Replacement Codes should remain as they are, these are documented below.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-affiliate-coupon-code-suffix-chars">' . "\n";
echo 'Affiliate Suffix Chars (indicating an Affiliate ID):' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_affiliate_coupon_code_suffix_chars" id="ws-plugin--s2member-pro-affiliate-coupon-code-suffix-chars" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_affiliate_coupon_code_suffix_chars"]) . '" /><br />' . "\n";
echo 'Characters that s2Member will use to identify an Affiliate\'s ID in Coupon Codes.<br />' . "\n";
echo '<em>Example: <code>COUPON-CODE' . esc_html($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_affiliate_coupon_code_suffix_chars"]) . '123</code>. Coupon Code is <code>COUPON-CODE</code>. Affiliate ID is <code>123</code>.</em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-affiliate-coupon-code-tracking-urls">' . "\n";
echo 'Affiliate Tracking URLs (one per line):' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo 'You can input multiple Tracking URLs by inserting one per line.<br />' . "\n";
echo 'Each line must include a prefix. One of: <code>SILENT-PHP|</code> or <code>IMG-1PX|</code> (details below)<br />' . "\n";
//.........这里部分代码省略.........
示例14: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>Restriction Options</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form" autocomplete="off">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />' . "\n";
do_action("ws_plugin__s2member_during_res_ops_page_before_left_sections", get_defined_vars());
if (apply_filters("ws_plugin__s2member_during_res_ops_page_during_left_sections_display_post_level_access", TRUE, get_defined_vars())) {
do_action("ws_plugin__s2member_during_res_ops_page_during_left_sections_before_post_level_access", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Post Access Restrictions">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-post-level-access-section">' . "\n";
echo '<h3>Post Level Access Restrictions (optional)</h3>' . "\n";
echo '<p>Here you can specify Posts that are restricted to certain Membership Access Levels. s2Member also supports Custom <a href="http://codex.wordpress.org/Post_Types" target="_blank" rel="external">Post Types</a> here. If you have a theme or plugin installed, which has enabled Custom Post Types <em>(i.e., Music/Videos or something else)</em>, you can put the IDs for those Posts here.</p>' . "\n";
echo '<p><strong>What do I enter?</strong> Post IDs in comma-delimited format. Example: <code>1,2,3,84,8,21</code>. Or, you can type: <code>all</code> <em>(to protect all Posts, of any type)</em>. You can also include all Post IDs of a specific <a href="http://codex.wordpress.org/Post_Types" target="_blank" rel="external">Post Type</a>. e.g., <code>1,2,3,all-newspapers</code> <em>(protects several Post IDs, and all Posts of type: <code>newspaper</code>)</em>.</p>' . "\n";
echo '<p><em><strong>Note:</strong> Protecting individual Posts, <strong>only</strong> protects the Permalinks for those Posts. It is still possible for excerpts of protected content to be seen in search results generated by WordPress, feeds, and Archive views; such as your Home Page, inside a Category listing, or through other queries formulated by your theme. This is the intended functionality. Excerpts are a great way to "tease" public visitors. In other words, public visitors may have access to excerpts introduced by your theme, but any attempt to view the full Post (i.e., the Permalink) will result in an automatic redirect to your Membership Options Page; requiring registration.</em></p>' . "\n";
echo '<p><em><strong>Note:</strong> If you would like to protect many Posts at once (including Archive views), you can use Category Level Restrictions, Tag Level Restrictions, or have a look down below at s2Member\'s options for "Alternative View Protection", which deals with search results, as well as feeds.</em></p>' . "\n";
echo (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) && empty($GLOBALS["WS_PLUGIN__"]["wp_show_ids"]) ? '<p><em><strong>Tip:</strong> Can\'t find your Post IDs? Get <a href="http://wordpress.org/extend/plugins/wp-show-ids/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
do_action("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_post_level_access", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-level' . $n . '-posts">' . "\n";
echo $n === $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] ? 'Posts That Require Highest Level #' . $n . ':' . "\n" : 'Posts That Require Level #' . $n . ' Or Higher:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_posts" id="ws-plugin--s2member-level' . $n . '-posts" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"]) . '" />' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
}
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_res_ops_page_during_left_sections_after_post_level_access", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_res_ops_page_during_left_sections_display_page_level_access", TRUE, get_defined_vars())) {
do_action("ws_plugin__s2member_during_res_ops_page_during_left_sections_before_page_level_access", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Page Access Restrictions">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-page-level-access-section">' . "\n";
echo '<h3>Page Level Access Restrictions (optional)</h3>' . "\n";
echo '<p>Here you can specify Pages that are restricted to certain Membership Access Levels.</p>' . "\n";
echo '<p><strong>What do I enter?</strong> Page IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code>. Or, you can type: <code>all</code> <em>(to protect all Pages)</em>.</p>' . "\n";
echo (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) && empty($GLOBALS["WS_PLUGIN__"]["wp_show_ids"]) ? '<p><em><strong>Tip:</strong> Can\'t find your Page IDs? Get <a href="http://wordpress.org/extend/plugins/wp-show-ids/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
do_action("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_page_level_access", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-level' . $n . '-pages">' . "\n";
echo $n === $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] ? 'Pages That Require Highest Level #' . $n . ':' . "\n" : 'Pages That Require Level #' . $n . ' Or Higher:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_pages" id="ws-plugin--s2member-level' . $n . '-pages" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"]) . '" />' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
}
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
do_action("ws_plugin__s2member_during_res_ops_page_during_left_sections_after_page_level_access", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_res_ops_page_during_left_sections_display_tag_level_access", TRUE, get_defined_vars())) {
do_action("ws_plugin__s2member_during_res_ops_page_during_left_sections_before_tag_level_access", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Tag Access Restrictions">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-tag-level-access-section">' . "\n";
echo '<h3>Tag Level Access Restrictions (optional)</h3>' . "\n";
echo '<p>Here you can specify Tags that are restricted to certain Membership Access Levels. This is similar to Category Level Access. When you restrict access to a Tag Archive, it also restricts access to any Post having that Tag; even if a Post has other Tags. <strong>Tip:</strong> Tags can be applied to any Post, without affecting your Category structure at all. If you\'d like to use Tags with Pages get the <a href="https://wordpress.org/plugins/tag-pages/" target="_blank" rel="external">Tag Pages</a> plugin.</p>' . "\n";
echo '<p><strong>What do I enter?</strong> Tags in comma-delimited format. Example: <code>members, members only, free subscribers, premium</code>. Or, you can type: <code>all</code> <em>(to protect all Tags)</em>. <strong>Note:</strong> tags are caSe sensitive. The Tag <code>members only</code> is not the same as <code>Members Only</code>.</p>' . "\n";
do_action("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_tag_level_access", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-level' . $n . '-ptags">' . "\n";
echo $n === $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] ? 'Tags That Require Highest Level #' . $n . ':' . "\n" : 'Tags That Require Level #' . $n . ' Or Higher:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_ptags" id="ws-plugin--s2member-level' . $n . '-ptags" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"]) . '" />' . "\n";
//.........这里部分代码省略.........
示例15: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
echo '<div class="ws-menu-page-toolbox">' . "\n";
c_ws_plugin__s2member_menu_pages_tb::display();
echo '</div>' . "\n";
echo '<h2>AliPay Options</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__s2member_pro_options_form" id="ws-plugin--s2member-pro-options-form" autocomplete="off">' . "\n";
echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
echo '<div class="ws-menu-page-group" title="AliPay Account Details">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-alipay-account-details-section">' . "\n";
echo '<h3>AliPay Account Details (required)</h3>' . "\n";
echo '<p><a href="http://www.s2member.com/alipay" target="_blank" rel="external">AliPay</a> is China\'s leading independent third-party online payment platform. Established in 2004 by Alibaba Group, a leading international e-commerce service provider, AliPay is dedicated to providing it\'s members and merchants with a "simple, secure and speedy" online payment solution. If you\'re a merchant in the USA, AliPay is THE way to reach a population of over 1.3 billion in China. AliPay is similar to what we call PayPal here in the USA.</p>' . "\n";
echo '<p>s2Member has been integrated with AliPay for Direct Payments. In order to take advantage of this integration, you will need to have an AliPay Merchant Account with Direct Pay enabled ( aka: 前台自助--即时到账收款 ). This can sometimes take a couple of days to acquire. Once you\'ve been approved at AliPay, you\'ll be given a Partner ID, and a Security Code; which you\'ll need to fill in below.</p>' . "\n";
echo '<p><em>* s2Member only integrates AliPay "Buy Now" functionality. AliPay does NOT support Recurring Billing or Trial Periods.</em></p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-alipay-partner-id">' . "\n";
echo 'AliPay Partner ID:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_alipay_partner_id" id="ws-plugin--s2member-pro-alipay-partner-id" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_alipay_partner_id"]) . '" /><br />' . "\n";
echo 'This is provided by AliPay. Check your AliPay Merchant account for this information.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-alipay-seller-email">' . "\n";
echo 'AliPay Seller Email:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_pro_alipay_seller_email" id="ws-plugin--s2member-pro-alipay-seller-email" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_alipay_seller_email"]) . '" /><br />' . "\n";
echo 'This is the Email Address configured in your AliPay Merchant account.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-alipay-security-code">' . "\n";
echo 'AliPay Security Code:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_pro_alipay_security_code" id="ws-plugin--s2member-pro-alipay-security-code" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_alipay_security_code"]) . '" /><br />' . "\n";
echo 'This is provided by AliPay. Check your AliPay Merchant account for this information.' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-gateway-debug-logs">' . "\n";
echo 'Enable Logging Routines?<br />' . "\n";
echo '<small><em class="ws-menu-page-hilite">* This setting applies universally. [ <a href="#" onclick="alert(\'This configuration option may ALSO appear under (s2Member → PayPal Options). Feel free to configure it here; but please remember that this setting is applied universally (i.e., SHARED) among all Payment Gateways integrated with s2Member.\'); return false;">?</a> ]</em></small>' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"] ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging, with API, IPN & Return Page logging.</label><br />' . "\n";
echo '<em>This enables API, IPN and Return Page logging. The log files are stored here: <code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) . '</code></em><br />' . "\n";
echo '<em class="ws-menu-page-hilite">If you have any trouble, please review your s2Member log files for problems. See: <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--s2member-logs")) . '">Log Viewer</a></em>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<div class="info" style="margin-bottom:0;">' . "\n";
echo '<p style="margin-top:0;"><span>We highly recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems during payment processing. See: <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--s2member-logs")) . '">Log Files (Debug)</a>.</span></p>' . "\n";
echo '<p style="margin-bottom:0;"><span class="ws-menu-page-error">However, it is very important to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, secret API credentials, passwords and/or other sensitive information. We strongly suggest that logging be disabled on a live site (for security reasons).</span></p>' . "\n";
echo '</div>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
}
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-menu-page-group" title="AliPay Return-Page Template">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-alipay-return-page-template">' . "\n";
echo '<h3>AliPay Return-Page Template (optional, for further customization)</h3>' . "\n";
echo '<p>With s2Member Pro installed, you have the ability to customize your <a href="' . esc_attr(home_url("/?s2member_pro_alipay_return&s2member_paypal_return=1&s2member_paypal_proxy=alipay&s2member_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">Return-Page Template</a>. Each of your Customers are returned back to your site immediately after they complete checkout at AliPay. Your Return-Page displays a message and instructions for the Customer. s2Member may change the message and instructions dynamically, based on what the Customer is actually doing <em>(i.e., based on the type of transaction that is taking place)</em>. So, although we do NOT recommend that you attempt to change the message and instructions presented dynamically by s2Member, you CAN certainly control the Header, and/or the overall appearance of s2Member\'s Return-Page Template.</p>' . "\n";
echo '<p>The quickest/easiest way, is to simply add some HTML code in the box below. For instance, you might include an <img> tag with your logo. The box below, allows you to customize the Header section <em>(i.e., the top)</em> of s2Member\'s default Return-Page Template. Everything else, including the textual response and other important details that each Customer needs to know about, are already handled dynamically by s2Member <em>(based on the type of transaction that is taking place)</em>. All you need to do is customize the Header with your logo and anything else you feel is important. Although this Header customization is completely optional, we recommend an <a href="http://s2member.com/r/image-tag-reference/" target="_blank" rel="external"><img> tag</a>, with a logo that is around 300px wide. After you "Save All Changes" below, you may <a href="' . esc_attr(home_url("/?s2member_pro_alipay_return&s2member_paypal_return=1&s2member_paypal_proxy=alipay&s2member_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">click this link to see what your Header looks like</a>.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-alipay-return-template-header">' . "\n";
echo 'Return-Page Template Header:' . "\n";
//.........这里部分代码省略.........