本文整理汇总了PHP中c_ws_plugin__s2member_menu_pages_rs::display方法的典型用法代码示例。如果您正苦于以下问题:PHP c_ws_plugin__s2member_menu_pages_rs::display方法的具体用法?PHP c_ws_plugin__s2member_menu_pages_rs::display怎么用?PHP c_ws_plugin__s2member_menu_pages_rs::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c_ws_plugin__s2member_menu_pages_rs
的用法示例。
在下文中一共展示了c_ws_plugin__s2member_menu_pages_rs::display方法的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>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";
}
示例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>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";
}
示例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 id="icon-plugins" class="icon32"><br /></div>' . "\n";
echo '<h2>Other s2Member® 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://www.s2member.com/bbpress-plugin" 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 '<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 permissions that allow all Members to access and particpate in your forums, just as if they were a WordPress® Subscriber Role. This is how bbPress® expects s2Member to behave. bbPress® also adds a new Role to your WordPress® installation: <em>Forum Moderator</em>. s2Member allows Forum Moderators full access to all content protected by s2Member, just like <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.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 & 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 & 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
echo '<p><em>* WordPress® Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress® Administrators, Editors, Authors, Contributors, <strong class="ws-menu-page-hilite">and bbPress® Forum Moderators</strong> have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.</em></p>' . "\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. s2Member will provide you with drop-down menus whenever you add or edit Forum Topics/Posts/Replies.</p>' . "\n";
echo '<p>You can also take a look at: <code>s2Member -> Restriction Options</code>. * Note, it is currently NOT possible to protect a Forum, and have all Topics inside that Forum protected automatically. In order to accomplish that, you\'ll need to use s2Member\'s URI Access Restrictions. We\'re working to improve this functionality in the mean time. Also, s2Member is currently NOT capable of protecting Topic Tags; but you can use URI Restrictions for these in the mean time.</p>' . "\n";
do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_during_api_easy_way", 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>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";
}
示例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>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">' . "\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 recommends PayPal Pro as the best available option for payment processing. However, s2Member has also been integrated with the additional Payment Gateways listed below. If you wish to take advantage of these additional Gateway integrations, you must enable them explicitly from this page. Once enabled, options will become available in your s2Member Menu on the left-hand side. s2Member has the ability to operate with as many Gateways integrations as you like. If you\'d like to use them all, you can! Just remember, for each Payment Gateway that you integrate, you must configure the options for that Gateway, and you must use s2Member\'s Button Generator 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 '<div class="ws-menu-page-hr"></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";
}
示例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>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";
//.........这里部分代码省略.........
示例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>PayPal Options</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__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_paypal_ops_page_before_left_sections", get_defined_vars());
if (apply_filters("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_display_paypal_account_details", TRUE, get_defined_vars())) {
do_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_before_paypal_account_details", get_defined_vars());
echo '<div class="ws-menu-page-group" title="PayPal Account Details">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-paypal-account-details-section">' . "\n";
echo '<a href="http://www.s2member.com/paypal" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/paypal-logo.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
echo '<h3>PayPal Account Details (required, if using PayPal)</h3>' . "\n";
echo '<p>s2Member integrates with <a href="http://www.s2member.com/paypal" target="_blank" rel="external">PayPal Payments Standard</a>—for businesses. You do not need a PayPal Pro account. You just need to upgrade your Personal PayPal account to a Business status, which is free. A PayPal account can be <a href="http://s2member.com/r/paypal-business-upgrade/" target="_blank" rel="external">upgraded</a> from a Personal account to a Business account by clicking the "Profile" link under your "My Account" tab, selecting "Personal Business Information", and then clicking the "Upgrade Your Account" button. <strong>See also:</strong> This KB article: <a href="http://s2member.com/kb-article/supported-paypal-account-types/" target="_blank" rel="external">PayPal Compatibility (Account Types)</a>.</p>' . "\n";
echo '<p><em><strong>PayPal API Credentials:</strong> Once you have a PayPal Business account, you\'ll need access to your <a href="http://s2member.com/r/paypal-profile-api-access/" target="_blank" rel="external">PayPal API Credentials</a>. Log into your PayPal account, and navigate to <strong>Profile → API Access (or → Request API Credentials)</strong>. From the available options, please choose "Request API Signature".</em></p>' . "\n";
do_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_account_details", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-paypal-merchant-id">' . "\n";
echo 'Your PayPal Merchant ID:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_paypal_merchant_id" id="ws-plugin--s2member-paypal-merchant-id" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_merchant_id"]) . '" /><br />' . "\n";
echo 'At PayPal, see: <strong>Profile → Secure Merchant ID</strong>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-paypal-business">' . "\n";
echo 'Your PayPal EMail Address:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_paypal_business" id="ws-plugin--s2member-paypal-business" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"]) . '" /><br />' . "\n";
echo 'At PayPal, see: <strong>Profile → Email Accounts</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-paypal-api-username">' . "\n";
echo 'Your PayPal API 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_paypal_api_username" id="ws-plugin--s2member-paypal-api-username" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"]) . '" /><br />' . "\n";
echo 'At PayPal, see: <strong>Profile → API Access (or → Request API Credentials)</strong>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-paypal-api-password">' . "\n";
echo 'Your PayPal API Password:' . "\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_paypal_api_password" id="ws-plugin--s2member-paypal-api-password" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"]) . '" /><br />' . "\n";
echo 'At PayPal, see: <strong>Profile → API Access (or → Request API Credentials)</strong>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-paypal-api-signature">' . "\n";
echo 'Your PayPal API Signature:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_paypal_api_signature" id="ws-plugin--s2member-paypal-api-signature" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"]) . '" /><br />' . "\n";
echo 'At PayPal, see: <strong>Profile → API Access (or → "Request API Credentials")</strong>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
do_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_account_detail_rows", get_defined_vars());
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
//.........这里部分代码省略.........
示例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>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";
//.........这里部分代码省略.........
示例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>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";
//.........这里部分代码省略.........
示例11: __construct
//.........这里部分代码省略.........
echo '<tr>' . "\n";
/**/
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-pro-ccbill-dl-pass">' . "\n";
echo 'DataLink Password:' . "\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_ccbill_dl_pass" id="ws-plugin--s2member-pro-ccbill-dl-pass" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_ccbill_dl_pass"]) . '" />' . "\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="ccBill® Approval/Denial URLs">' . "\n";
/**/
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-ccbill-auto-return-section">' . "\n";
echo '<h3>ccBill® Approval/Denial URLs ( required )<br />aka: ccBill® Auto-Return Page Integration</h3>' . "\n";
echo '<p>Log into your ccBill® Client account and navigate to this section:<br /><code>Account Admin -> Basic</code></p>' . "\n";
echo '<p>Your <a href="' . esc_attr(site_url("/?s2member_pro_ccbill_return&s2member_paypal_return=1&s2member_paypal_proxy=ccbill&s2member_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">ccBill® Approval URL</a> is:<br /><code>' . esc_html(site_url("/?s2member_pro_ccbill_return=1")) . '</code></p>' . "\n";
echo '<p>Your ccBill® Denial URL is:<br /><code>' . esc_html(site_url("/?s2member_pro_ccbill_return=0")) . '</code></p>' . "\n";
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
echo '<h3>Approval Page Template ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-pro-ccbill-return-page-template\').toggle(); return false;" class="ws-dotted-link">optional customizations</a> )</h3>' . "\n";
echo '<div id="ws-plugin--s2member-pro-ccbill-return-page-template" style="display:none;">' . "\n";
echo '<p>With s2Member Pro installed, you have the ability to customize your <a href="' . esc_attr(site_url("/?s2member_pro_ccbill_return&s2member_paypal_return=1&s2member_paypal_proxy=ccbill&s2member_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">Approval Page Template</a>. Each of your Customers are returned back to your site immediately after they complete checkout at ccBill®. Your Approval 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 Approval 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 Approval 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://www.w3schools.com/tags/tag_img.asp" 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(site_url("/?s2member_pro_ccbill_return&s2member_paypal_return=1&s2member_paypal_proxy=ccbill&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-ccbill-return-template-header">' . "\n";
echo 'Approval Page Template Header:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
/**/
echo '</tr>' . "\n";
echo '<tr>' . "\n";
/**/
echo '<td>' . "\n";
echo '<textarea name="ws_plugin__s2member_pro_ccbill_return_template_header" id="ws-plugin--s2member-pro-ccbill-return-template-header" rows="5" wrap="off" spellcheck="false">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_ccbill_return_template_header"]) . '</textarea><br />' . "\n";
echo 'Any valid XHTML / JavaScript' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' ( or even PHP )') . ' code will work just fine here.' . "\n";
echo '</td>' . "\n";
/**/
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
echo '<p>It is also possible to build your own Approval Page Template, if you prefer. If you feel the need to create your own Approval Page Template, please make a copy of s2Member\'s default template: <code>' . esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir"] . "/includes/templates/returns/default-template.php")) . '</code>. Place your copy of this default template, inside your active WordPress® theme directory, and name the file: <code>/ccbill-return.php</code>. s2Member will automatically find your Approval Page Template in this location, and s2Member will use your template, instead of the default. Further details are provided inside s2Member\'s default template file. Once your custom template file is in place, you may <a href="' . esc_attr(site_url("/?s2member_pro_ccbill_return&s2member_paypal_return=1&s2member_paypal_proxy=ccbill&s2member_paypal_proxy_use=x-preview")) . '" target="_blank" rel="external">click this link to see what it looks like</a>.</p>' . "\n";
}
/**/
echo '<p>It is also possible to bypass s2Member\'s "Approval" system all together, if you prefer. This only works with the "Approval" system, and NOT with the Denial system <em>( it\'s not really needed in that case anyway )</em>. You can take your default Approval URL <em>( shown above )</em>, and add <code>&s2member_pro_ccbill_return_success=http://...</code> where the value can be set to a custom Approval URL that you prefer. In other words, if you use the <code>&s2member_pro_ccbill_return_success=http://...</code> parameter in your Approval URL, the initial redirection back to s2Member\'s default Approval system MUST still occur. However, instead of s2Member displaying its Approval Template to the Customer, s2Member will silently redirect the Customer to the URL that you specified in the <code>&s2member_pro_ccbill_return_success=http://...</code> parameter, allowing you to take complete control over what happens next. Click for an [ <a href="#" onclick="alert(\'Basic Example ( please remember to URL encode the value ):\\n' . esc_attr(site_url("/?s2member_pro_ccbill_return=1&s2member_pro_ccbill_return_success=" . site_url("/thank-you/"))) . '\\n\\nProper Example ( with the URL having been encoded properly ):\\n' . esc_attr(site_url("/?s2member_pro_ccbill_return=1&s2member_pro_ccbill_return_success=" . rawurlencode(site_url("/thank-you/")))) . '\\n\\n* For help on URL encoding, please see:\\nhttp://www.w3schools.com/tags/ref_urlencode.asp\'); return false;">example</a> ].</p>' . "\n";
示例12: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
/**/
echo '<div id="icon-plugins" class="icon32"><br /></div>' . "\n";
echo '<h2>s2Member® API / Scripting</h2>' . "\n";
/**/
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
/**/
do_action("ws_plugin__s2member_during_scripting_page_before_left_sections", get_defined_vars());
/**/
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_easy_way", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_easy_way", get_defined_vars());
/**/
echo '<div class="ws-menu-page-group" title="The Extremely Easy Way">' . "\n";
/**/
echo '<div class="ws-menu-page-section ws-plugin--s2member-api-easy-way-section">' . "\n";
echo '<h3>The Extremely Easy Way ( no scripting required )</h3>' . "\n";
echo '<p>From your s2Member Restriction Options panel, you may restrict access to certain Posts, Pages, Tags, Categories, and/or URIs based on a Member\'s Level. The s2Member Restriction Options panel makes it easy for you. All you do is type in the basics of what you want to restrict access to, and those sections of your site will be off limits to non-Members. That being said, there are times when you might need to have greater control over which portions of your site can be viewed by non-Members, or Members at different Levels; with different Capabilities. This is where API Scripting with Conditionals comes in.</p>' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_api_easy_way", get_defined_vars());
echo '</div>' . "\n";
/**/
echo '</div>' . "\n";
/**/
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_easy_way", get_defined_vars());
}
/**/
if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_simple_way", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_simple_way", get_defined_vars());
/**/
if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site()) {
echo '<div class="ws-menu-page-group" title="Simple/Shortcode Conditionals">' . "\n";
/**/
echo '<div class="ws-menu-page-section ws-plugin--s2member-api-simple-way-section">' . "\n";
echo '<h3>Simple Conditionals ( via WordPress® Shortcodes )</h3>' . "\n";
echo '<p>In an effort to give you even more control over access restrictions, s2Member makes Simple Conditionals available to you from within WordPress®, using Shortcodes that are fully compatible with both the Visual Editor, and also the HTML Tab in WordPress®. In this section, we\'ll demonstrate several functions that are possible using Shortcodes: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>. To make use of these functions, please follow our code samples below. Using Shortcodes, it\'s easy to build Simple Conditionals within your content; based on a Member\'s Level, or even based on Custom Capabilities. s2Member\'s Shortcodes can be used inside a Post/Page, and also inside Text Widgets.</p>' . "\n";
echo '<p><em>There are <strong>two different Shortcodes</strong> being demonstrated here:<br /><strong>1. <code>s2If</code></strong> ( for testing simple conditional expressions ).<br /><strong>2. <code>s2Get</code></strong> ( to get an API Constant value, a Custom Field, or meta key ).</em></p>' . "\n";
do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_api_simple_way_farm", get_defined_vars());
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
echo '<p><strong>Example #1:</strong> Full access for anyone that is logged in.</strong></p>' . "\n";
echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-is-user-logged-in-farm.x-php")) . '</p>' . "\n";
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
echo '<p><strong>Example #2:</strong> Full access for any Member with a Level >= 1.</strong></p>' . "\n";
echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-current-user-can-full-access-farm.x-php")) . '</p>' . "\n";
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
echo '<p><strong>Example #3:</strong> Specific content for each different Member Level.</strong></p>' . "\n";
echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-current-user-is-specific-content-farm.x-php")) . '</p>' . "\n";
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
echo '<p><strong>Example #4:</strong> Simple Conditionals w/ integrated use of [s2Get /].</strong></p>' . "\n";
echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-1-farm.x-php")) . '</p>' . "\n";
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
echo '<p><strong>Example #5:</strong> Using multiple Conditionals together, and even nesting other Shortcodes.</strong></p>' . "\n";
echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-2-farm.x-php")) . '</p>' . "\n";
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
echo '<p><strong>Example #6:</strong> Using multiple Conditionals together, and even nesting Conditionals.</strong></p>' . "\n";
echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-3-farm.x-php")) . '</p>' . "\n";
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 & 3.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 & 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 & 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
echo '<p><em>* WordPress® Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress® Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
/**/
echo '<div class="ws-menu-page-hr"></div>' . "\n";
/**/
echo '<p><em><strong>s2Member supports many <a href="http://codex.wordpress.org/Conditional_Tags" target="_blank" rel="external">Conditional Tags</a> in WordPress®.</strong> Including: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>, <strong><code>is_admin()</code></strong>, <strong><code>is_blog_admin()</code></strong>, <strong><code>is_user_admin()</code></strong>, <strong><code>is_network_admin()</code></strong>, <strong><code>is_404()</code></strong>, <strong><code>is_home()</code></strong>, <strong><code>is_front_page()</code></strong>, <strong><code>is_singular(ID|slug|{slug,ID})"</code></strong>, <strong><code>is_single(ID|slug|{slug,ID})</code></strong>, <strong><code>is_page(ID|slug|{slug,ID})</code></strong>, <strong><code>is_page_template(file.php)</code></strong>, <strong><code>is_attachment()</code></strong>, <strong><code>is_feed()</code></strong>, <strong><code>is_archive()</code></strong>, <strong><code>is_search()</code></strong>, <strong><code>is_category(ID|slug|{slug,ID})</code></strong>, <strong><code>is_tax(taxonomy,term)</code></strong>, <strong><code>is_tag(slug|{slug,slug})"</code></strong>, <strong><code>has_tag(slug|{slug,slug})"</code></strong>, <strong><code>is_author(ID|slug|{slug,ID})</code></strong>, <strong><code>is_date()</code></strong>, <strong><code>is_day()</code></strong>, <strong><code>is_month()</code></strong>, <strong><code>is_time()</code></strong>, <strong><code>is_year()</code></strong>, <strong><code>is_sticky(ID)</code></strong>, <strong><code>is_paged()</code></strong>, <strong><code>is_preview()</code></strong>, <strong><code>is_comments_popup()</code></strong>, <strong><code>in_the_loop()</code></strong>, <strong><code>comments_open()</code></strong>, <strong><code>pings_open()</code></strong>, <strong><code>has_excerpt(ID)</code></strong>, <strong><code>has_post_thumbnail(ID)</code></strong>.</em></p>' . "\n";
/**/
echo '<p><em><strong>Passing arguments into a Simple Conditional:</strong></em></p>' . "\n";
echo '<p><em>1. True/false -> ex: <code>current_user_can()</code> / <code>!current_user_can()</code><br />2. False explicitly -> ex: <code>current_user_cannot()</code><br />3. Passing an ID -> ex: <code>is_page(24)</code><br />4. Passing a Slug -> ex: <code>is_page(my-cool-page)</code><br />5. Passing an Array -> ex: <code>is_page({my-cool-page,24,about,contact-form})</code></em></p>' . "\n";
echo '<p><em>*Tip: do NOT use spaces inside Conditionals.<br /> <strong class="ws-menu-page-error-hilite">BAD</strong> <code>is_page(My Membership Options Page)</code><br />- use slugs or IDs instead, no spaces.</em></p>' . "\n";
/**/
echo '<p><em><strong>Implementing AND/OR Conditional expressions:</strong></em></p>' . "\n";
echo '<p><em>*Tip: do NOT mix AND/OR expressions.<br /> <strong class="ws-menu-page-error-hilite">BAD</strong> <code>is_user_logged_in() AND is_page(1) OR is_page(2)</code><br />- use one or the other; do NOT mix AND/OR together.</em></p>' . "\n";
echo '<p><em><strong class="ws-menu-page-hilite">If you need to have both types of logic, use nesting:</strong></em></p>' . "\n";
echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-nesting.x-php")) . '</p>' . "\n";
echo '</div>' . "\n";
/**/
echo '</div>' . "\n";
} else {
echo '<div class="ws-menu-page-group" title="Simple/Shortcode Conditionals">' . "\n";
/**/
echo '<div class="ws-menu-page-section ws-plugin--s2member-api-simple-way-section">' . "\n";
echo '<h3>Simple Conditionals ( via WordPress® Shortcodes )</h3>' . "\n";
echo '<p>In an effort to give you even more control over access restrictions, s2Member makes Simple Conditionals available to you from within WordPress®, using Shortcodes that are fully compatible with both the Visual Editor, and also the HTML Tab in WordPress®. In this section, we\'ll demonstrate several functions that are possible using Shortcodes: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>, <strong><code>current_user_is_for_blog(blog_id,role)</code></strong>, <strong><code>current_user_is_not_for_blog(blog_id,role)</code></strong>, <strong><code>current_user_can_for_blog(blog_id,capability)</code></strong>, <strong><code>current_user_cannot_for_blog(blog_id,capability)</code></strong>. To make use of these functions, please follow our code samples below. Using Shortcodes, it\'s easy to build Simple Conditionals within your content; based on a Member\'s Level, or even based on Custom Capabilities. s2Member\'s Shortcodes can be used inside a Post/Page, and also inside Text Widgets.</p>' . "\n";
echo '<p><em>There are <strong>two different Shortcodes</strong> being demonstrated here:<br /><strong>1. <code>s2If</code></strong> ( for testing simple conditional expressions ).<br /><strong>2. <code>s2Get</code></strong> ( to get an API Constant value, a Custom Field, or meta key ).</em></p>' . "\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>AliPay Buttons</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<div class="ws-menu-page-group" title="AliPay Buttons For Level #' . $n . ' Access">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-level' . $n . '-buttons-section">' . "\n";
echo '<h3>Button Code Generator For Level #' . $n . ' Access</h3>' . "\n";
echo '<p>Very simple. All you do is customize the form fields provided, for each Membership Level that you plan to offer. Then press (Generate Button Code). These special AliPay Buttons are customized to work with s2Member seamlessly. Member accounts will be activated instantly, in an automated fashion. s2Member makes extensive use of the AliPay IPN service. s2Member receives updates from AliPay behind-the-scene. <em><strong>Please note:</strong> buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your Membership Options Page. If you lose your Button Code, you\'ll need to come back & re-generate a new one.</em></p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th class="ws-menu-page-th-side">' . "\n";
echo '<label for="ws-plugin--s2member-pro-level' . $n . '-shortcode">' . "\n";
echo 'Button Code<br />For Level #' . $n . ':<br /><br />' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '<td>' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--s2member-pro-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-pro-level' . $n . '-term">' . trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/alipay-membership-regular-terms.php"))) . '</select></p>' . "\n";
echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-level' . $n . '-desc" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="73" /></p>' . "\n";
echo '<p' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities (comma-delimited) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member ⥱ API Scripting ⥱ Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-pro-level' . $n . '-ccaps" size="40" /></p>' . "\n";
echo '<p><input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_pro_alipayButtonGenerate(\'level' . $n . '\');" /></p>' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td colspan="2">' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<strong>WordPress Shortcode:</strong> (recommended for both the WordPress Visual & HTML Editors)<br />' . "\n";
$ws_plugin__s2member_pro_temp_s = trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/alipay-checkout-button-shortcode.php")));
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_refs(esc_attr($n)), $ws_plugin__s2member_pro_temp_s);
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__s2member_utils_strings::esc_refs(esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"])), $ws_plugin__s2member_pro_temp_s);
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_refs(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_pro_temp_s);
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-pro-level' . $n . '-shortcode" value="' . format_to_edit($ws_plugin__s2member_pro_temp_s) . '" onclick="this.select ();" class="monospace" />' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
}
if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
echo '<div class="ws-menu-page-group" title="AliPay Capability (Buy Now) Buttons">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-ccap-buttons-section">' . "\n";
echo '<h3>Button Code Generator For Independent Custom Capabilities</h3>' . "\n";
echo '<p>This is VERY advanced. For further details, please check your Dashboard: <strong>s2Member ⥱ API Scripting ⥱ Custom Capabiities</strong>.</p>' . "\n";
echo '<p>With s2Member, you can sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site <em>(i.e., you could even sell Independent Custom Capabilities to Users at Membership Level #0, normally referred to as Free Subscribers, if you like)</em>. So this is quite flexible. Independent Custom Capabilities do NOT rely on any specific Membership Level. That\'s why s2Member refers to these as `Independent` Custom Capabilities, because you can sell Capabilities this way, through Buy Now functionality, and the Customer\'s Membership Level Access, along with any existing paid access they may already have with you, will remain completely unaffected.</p>' . "\n";
echo '<p>Independent Custom Capabilities are added to a Customer\'s account immediately after checkout, and the Customer will have the Custom Capabilities for as long as their Membership lasts, based on their primary Subscription with your site, and/or forever, if they have a Lifetime account with you. In other words, Independent Custom Capabilities will exist on the Customer\'s account forever, or until an EOT <em>(End Of Term)</em> occurs on their primary Subscription with you; in which case s2Member would demote or delete the Customer\'s account <em>(based on your EOT configuration)</em>, and all Custom Capabilities are removed as well.</p>' . "\n";
echo '<p>Very simple. All you do is customize the form fields provided, for each set of Custom Capabilities that you plan to sell. Then press (Generate Button Code). These special AliPay Buttons are customized to work with s2Member seamlessly. The Customer will be granted additional access to one or more Custom Capabilities that you specify; while the Customer\'s Membership Level Access and any existing paid Subscription they may already have with you, will remain completely unaffected.</p>' . "\n";
echo '<p><em><strong>Important Note:</strong> Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button. Otherwise, post-processing of their transaction will fail to recognize the Customer\'s existing account within WordPress. Please display this Button only to Users/Members that are already logged into their account (perhaps in your Login Welcome Page for s2Member), or in another location where you can be absolutely sure that a User/Member is logged in. s2Member\'s Simple Conditionals could also be used to ensure a User/Member is logged in, by wrapping your Shortcode within a Conditional test. For further details, please see: <strong>s2Member ⥱ API Scripting ⥱ Simple Conditionals</strong>.</em></p>' . "\n";
echo '<p><em><strong>Please note:</strong> buttons are NOT saved here. This is only a Button Generator. If you lose your Button Code, you\'ll need to come back & re-generate a new one.</em></p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th class="ws-menu-page-th-side">' . "\n";
echo '<label for="ws-plugin--s2member-pro-ccap-shortcode">' . "\n";
echo 'Button Code<br />For Capabilities:<br /><br />' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '<td>' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--s2member-pro-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-pro-ccap-term">' . trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/alipay-membership-ccap-terms.php"))) . '</select></p>' . "\n";
echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-ccap-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
echo '<p>Custom Capabilities (comma-delimited) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member ⥱ API Scripting ⥱ Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-pro-ccap-ccaps" size="40" /></p>' . "\n";
echo '<p><input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_pro_alipayCcapButtonGenerate();" /></p>' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td colspan="2">' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<strong>WordPress Shortcode:</strong> (recommended for both the WordPress Visual & HTML Editors)<br />' . "\n";
$ws_plugin__s2member_pro_temp_s = trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/alipay-ccaps-checkout-button-shortcode.php")));
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_refs(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_pro_temp_s);
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-pro-ccap-shortcode" value="' . format_to_edit($ws_plugin__s2member_pro_temp_s) . '" onclick="this.select ();" class="monospace" />' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
}
echo '<div class="ws-menu-page-group" title="AliPay Member Registration Access Links">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-reg-links-section">' . "\n";
echo '<h3>Registration Access Link Generator (for Customer Service)</h3>' . "\n";
echo '<p>s2Member automatically generates Registration Access Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Registration Access Link to be created manually, you can use this tool for that. Alternatively, you can create their account yourself/manually by going to <strong>Users ⥱ Add New</strong>. Either of these methods will work fine.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\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>API / Notifications</h2>' . "\n";
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
echo '<form method="post" name="ws_plugin__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_api_ops_page_before_left_sections", get_defined_vars());
if (apply_filters("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_signup_notifications", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_signup_notifications", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Signup Notifications">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-signup-notifications-section">' . "\n";
echo '<h3>Signup Notification URLs (optional)</h3>' . "\n";
echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever a new Subscription is created, you\'ll want to read this section. This is marked `Signup`, because the URLs that you list below, will be notified each time a "new", "paying" Member signs up. Depending on your fee structure, this may include a payment that establishes their Subscription, or it may not. This Notification will only be triggered once for each Member. Signup Notifications are sent right after a "new", "paying" Member signs up successfully through your Payment Gateway, regardless of whether any money has actually been transacted. In other words, this Notification is triggered anytime a "new", "paying" Member signs up through your Payment Gateway, even if you provided them with something for free <em>(e.g. even if no money is being transacted)</em>.</p>' . "\n";
echo '<p>This Notification will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all (e.g. they simply register on-site; and there is no checkout whatsoever). This Notification will NOT be processed when an "existing" User/Member pays for a new Subscription <em>(see: Modification Notifications for that scenario)</em>.' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' And, this Notification will NOT be processed on Buy Now transactions for Independent Custom Capabilities <em>(see: Payment Notifications for that scenario)</em>.') . '</p>' . "\n";
echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>(and other service integrations)</em> are already built into s2Member. They remain active at all times. These Signup Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
echo '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>' . "\n";
do_action("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_signup_notifications", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-signup-notification-urls">' . "\n";
echo 'Signup Notification URLs:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
echo '<textarea name="ws_plugin__s2member_signup_notification_urls" id="ws-plugin--s2member-signup-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_notification_urls"]) . '</textarea><br />' . "\n";
echo 'Signup Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
echo '<ul class="ws-menu-page-li-margins">' . "\n";
echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any & all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term (non-recurring) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase. Payment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime & Fixed-Term Subscriptions are NOT recurring (i.e. there is only ONE payment), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
echo '<li><code>%%subscr_baid%%</code> = Applicable only with PayPal Pro (Payflow Edition); and only for Express Checkout transactions that require a Billing Agreement. This is the Subscription\'s Billing Agreement ID, which remains constant throughout any & all future payments. [ <a href="#" onclick="alert(\'Applicable only with PayPal Pro (Payflow Edition); and only for Express Checkout transactions that require a Billing Agreement. In all other cases, the %%subscr_baid%% is simply set to the %%subscr_id%% value; i.e. it is a duplicate of %%subscr_id%% in most cases.\'); return false;">?</a> ]</li>' . "\n";
echo '<li><code>%%subscr_cid%%</code> = Applicable only with Stripe integration. This is the Customer\'s ID in Stripe, which remains constant throughout any & all future payments. Each Stripe Customer has this Customer ID; and also a Subscription and/or Transaction ID [ <a href="#" onclick="alert(\'Applicable only when you integrate s2Member with Stripe. In all other cases, the %%subscr_cid%% is simply set to the %%subscr_id%% value; i.e. it is a duplicate of %%subscr_id%% when running anything other than Stripe.\\n\\nEach Stripe Customer has a Customer ID; and also a Subscription and/or Transaction ID. See %%subscr_id%% for further details.\'); return false;">?</a> ]</li>' . "\n";
echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. Even if that amount is 0.\\n\\nIf a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0. So be careful using %%initial%% when you offer a 100% Free Trial Period, because a $0.00 sale amount could cause havoc with affiliate programs.\\n\\nIf you\\\'re offering a 100% Free Trial Period, and you need to track sales through affiliate programs, you can either hard-code an amount; or use `Payment Notifications` instead.\'); return false;">?</a> ]</li>' . "\n";
echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. If you offer something 100% free, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% & %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
echo '<li><code>%%full_name%%</code> = The Full Name (First & Last) of the Customer who purchased the Membership Subscription.</li>' . "\n";
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
echo '<li><code>%%item_number%%</code> = The Item Number (colon separated <code><em>level:custom_capabilities:fixed term</em></code>) for the Membership Subscription.</li>' . "\n";
echo '<li><code>%%item_name%%</code> = The Item Name (as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number).</li>' . "\n";
echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D (this means 1 Day)\\n%%initial_term%% = 1 W (this means 1 Week)\\n%%initial_term%% = 1 M (this means 1 Month)\\n%%initial_term%% = 1 Y (this means 1 Year)\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D (this means 1 Day)\\n%%regular_term%% = 1 W (this means 1 Week)\\n%%regular_term%% = 1 M (this means 1 Month)\\n%%regular_term%% = 1 Y (this means 1 Year)\\n%%regular_term%% = 1 L (this means 1 Lifetime)\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period (or duration) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</li>' . "\n";
echo '</ul>' . "\n";
if (c_ws_plugin__s2member_utils_conds::pro_is_installed()) {
echo '<strong>Coupon Replacement Codes (applicable only w/ s2Member Pro Forms):</strong>' . "\n";
echo '<ul class="ws-menu-page-li-margins">' . "\n";
echo '<li><code>%%full_coupon_code%%</code> = A full Coupon Code — if one is accepted by your configuration of s2Member. This may indicate an Affiliate Coupon Code, which will include your Affiliate Suffix Chars too (e.g. the full Coupon Code).</li>' . "\n";
echo '<li><code>%%coupon_code%%</code> = A Coupon Code — if one is accepted by your configuration of s2Member. This will NOT include any Affiliate Suffix Chars. This indicates the actual Coupon Code accepted by your configuration of s2Member (excluding any Affiliate ID).</li>' . "\n";
echo '<li><code>%%coupon_affiliate_id%%</code> = This is the end of an Affiliate Coupon Code <em>(i.e. the referring affiliate\'s ID)</em>. This is only applicable if an Affiliate Coupon Code is accepted by your configuration of s2Member.</li>' . "\n";
echo '</ul>' . "\n";
}
echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
echo '<ul class="ws-menu-page-li-margins">' . "\n";
echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
echo '</ul>' . "\n";
echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '<div class="ws-menu-page-hr"></div>' . "\n";
echo '<table class="form-table" style="margin-top:0;">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th style="padding-top:0;">' . "\n";
echo '<label for="ws-plugin--s2member-signup-notification-recipients">' . "\n";
echo 'Send An Email Transaction Log Of This Event?' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_signup_notification_recipients" id="ws-plugin--s2member-signup-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_notification_recipients"]) . '" /><br />' . "\n";
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
}
if (apply_filters("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_registration_notifications", true, get_defined_vars())) {
//.........这里部分代码省略.........
示例15: __construct
public function __construct()
{
echo '<div class="wrap ws-menu-page">' . "\n";
/**/
echo '<div id="icon-plugins" class="icon32"><br /></div>' . "\n";
echo '<h2>s2Member® / ClickBank® Buttons</h2>' . "\n";
/**/
echo '<table class="ws-menu-page-table">' . "\n";
echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
echo '<tr class="ws-menu-page-table-tr">' . "\n";
echo '<td class="ws-menu-page-table-l">' . "\n";
/**/
for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<div class="ws-menu-page-group" title="ClickBank® Buttons For Level #' . $n . ' Access">' . "\n";
/**/
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-level' . $n . '-buttons-section">' . "\n";
echo '<h3>Button Code Generator For Level #' . $n . ' Access</h3>' . "\n";
echo '<p>Very simple. All you do is customize the form fields provided, for each Membership Level that you plan to offer. Then press (Generate Button Code). These special ClickBank® Buttons are customized to work with s2Member seamlessly. Member accounts will be activated instantly, in an automated fashion. When you, or a Member, cancels their Membership, or fails to make payments on time, s2Member will automatically terminate their Membership privileges. s2Member makes extensive use of the ClickBank® IPN service. s2Member receives updates from ClickBank® behind-the-scene. <em>* Buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your Membership Options Page. If you lose your Button Code, you\'ll need to come back & re-generate a new one.</em></p>' . "\n";
/**/
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
/**/
echo '<th class="ws-menu-page-th-side">' . "\n";
echo '<label for="ws-plugin--s2member-pro-level' . $n . '-shortcode">' . "\n";
echo 'Button Code<br />For Level #' . $n . ':<br /><br />' . "\n";
echo '<div id="ws-plugin--s2member-pro-level' . $n . '-button-prev"></div>' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
/**/
echo '<td>' . "\n";
echo '<form onsubmit="return false;">' . "\n";
echo '<p>ClickBank® Product Type: <select id="ws-plugin--s2member-pro-level' . $n . '-type">' . trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/clickbank-product-types.php"))) . '</select>' . "\n";
echo '<p>ClickBank® Product Item #: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-level' . $n . '-item-number" value="" size="5" /> <a href="#" onclick="alert(\'This MUST correlate with a Product that you\\\'ve configured in your ClickBank® account.\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_pro_clickbankButtonGenerate(\'level' . $n . '\');" class="button-primary" /></p>' . "\n";
echo '<p id="ws-plugin--s2member-pro-level' . $n . '-term-line">Fixed-Term Access: <select id="ws-plugin--s2member-pro-level' . $n . '-term">' . trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/clickbank-fixed-terms.php"))) . '</select> <a href="#" onclick="alert(\'For Standard Products, a Fixed-Term allows s2Member to configure the Auto-EOT ( End Of Term ) Time after checkout is completed through ClickBank®.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
echo '<p id="ws-plugin--s2member-pro-level' . $n . '-periods-line">ClickBank® Trial Period: <select id="ws-plugin--s2member-pro-level' . $n . '-p1">' . trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/clickbank-trial-p1s.php"))) . '</select>, then Re-Bill: <select id="ws-plugin--s2member-pro-level' . $n . '-p3">' . trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/options/clickbank-regular-p3s.php"))) . '</select> <a href="#" onclick="alert(\'This MUST correlate with a Product that you\\\'ve configured in your ClickBank® account.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-level' . $n . '-desc" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="70" /> <a href="#" onclick="alert(\'This can be worded however you like. It does NOT need to be an exact match to the Product in your ClickBank® account.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
echo '<p' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-pro-level' . $n . '-ccaps" size="40" /></p>' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
/**/
echo '</tr>' . "\n";
echo '<tr>' . "\n";
/**/
echo '<td colspan="2">' . "\n";
echo '<form onsubmit="return false;">' . "\n";
echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual & HTML Editors )<br />' . "\n";
$ws_plugin__s2member_pro_temp_s = trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/clickbank-checkout-button-shortcode.php")));
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%item%%/", c_ws_plugin__s2member_utils_strings::esc_ds(esc_attr("0")), $ws_plugin__s2member_pro_temp_s);
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_ds(esc_attr($n)), $ws_plugin__s2member_pro_temp_s);
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%level_label%%/", c_ws_plugin__s2member_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"])), $ws_plugin__s2member_pro_temp_s);
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_pro_temp_s);
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-pro-level' . $n . '-shortcode" value="' . format_to_edit($ws_plugin__s2member_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
/**/
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
/**/
echo '</div>' . "\n";
}
/**/
echo '<div class="ws-menu-page-group" title="ClickBank® Modification/Cancellation Buttons">' . "\n";
/**/
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-cancellation-buttons-section">' . "\n";
echo '<h3>One Button Does It All For Modifications/Cancellations ( copy/paste )</h3>' . "\n";
echo '<p>Every ClickBank® Recurring Subscription can be modified by the Customer, or even cancelled by the Customer through ClickBank®. It\'s very simple. A Member clicks a Modification/Cancellation Button. This brings the Customer to an "Order Lookup" screen at ClickBank.com. Here they\'ll have easy access to make any changes they like. When important changes occur ( such as a cancellation ), information regarding this event will be relayed back to s2Member through ClickBank\'s IPN service. s2Member will react appropriately at that time.</p>' . "\n";
echo '<p><em><strong>*Understanding Cancellations*</strong> It\'s important to realize that a Cancellation is not an EOT ( End Of Term ). All that happens during a Cancellation event, is that billing is stopped, and it\'s understood that the Customer is going to lose access, at some point in the future. This does NOT mean, that access will be revoked immediately. A separate EOT event will automatically handle a (demotion or deletion) later, at the appropriate time; which could be several days, or even a year after the Cancellation took place.</em></p>' . "\n";
echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through ClickBank®... but, s2Member continues allowing the User access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT ( End Of Term ) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member.</em></p>' . "\n";
echo '<p><em>s2Member will not process an EOT ( End Of Term ) until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). s2Member also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
/**/
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
/**/
echo '<th class="ws-menu-page-th-side">' . "\n";
echo '<label for="ws-plugin--s2member-pro-cancellation-shortcode">' . "\n";
echo 'Button Code<br />For Cancellations:<br /><br />' . "\n";
echo '<div id="ws-plugin--s2member-pro-cancellation-button-prev">' . "\n";
$ws_plugin__s2member_pro_temp_s = trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/buttons/clickbank-cancellation-button.php")));
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds(esc_attr($GLOBALS["WS_PLUGIN__"]["s2member_pro"]["c"]["dir_url"] . "/images")), $ws_plugin__s2member_pro_temp_s);
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds(esc_attr(site_url())), $ws_plugin__s2member_pro_temp_s);
$ws_plugin__s2member_pro_temp_s = preg_replace("/&/", "&", $ws_plugin__s2member_pro_temp_s);
/* Match this with the JavaScript generator. */
echo preg_replace("/\\<a/", '<a target="_blank"', $ws_plugin__s2member_pro_temp_s);
echo '</div>' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
/**/
echo '<td>' . "\n";
echo '<form onsubmit="return false;">' . "\n";
echo '<p>No configuration necessary.</p>' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
/**/
echo '</tr>' . "\n";
echo '<tr>' . "\n";
/**/
//.........这里部分代码省略.........