| 1 |
<?php |
| 2 |
// @codingStandardsIgnoreFile |
| 3 |
/** |
| 4 |
* Menu page for the s2Member plugin (Integrations page). |
| 5 |
* |
| 6 |
* Copyright: © 2009-2011 |
| 7 |
* {@link http://websharks-inc.com/ WebSharks, Inc.} |
| 8 |
* (coded in the USA) |
| 9 |
* |
| 10 |
* Released under the terms of the GNU General Public License. |
| 11 |
* You should have received a copy of the GNU General Public License, |
| 12 |
* along with this software. In the main directory, see: /licensing/ |
| 13 |
* If not, see: {@link http://www.gnu.org/licenses/}. |
| 14 |
* |
| 15 |
* @package s2Member\Menu_Pages |
| 16 |
* @since 3.0 |
| 17 |
*/ |
| 18 |
if(!defined('WPINC')) // MUST have WordPress. |
| 19 |
exit("Do not access this file directly."); |
| 20 |
|
| 21 |
if(!class_exists("c_ws_plugin__s2member_menu_page_integrations")) |
| 22 |
{ |
| 23 |
/** |
| 24 |
* Menu page for the s2Member plugin (Integrations page). |
| 25 |
* |
| 26 |
* @package s2Member\Menu_Pages |
| 27 |
* @since 110531 |
| 28 |
*/ |
| 29 |
class c_ws_plugin__s2member_menu_page_integrations |
| 30 |
{ |
| 31 |
public function __construct() |
| 32 |
{ |
| 33 |
echo '<div class="wrap ws-menu-page">'."\n"; |
| 34 |
|
| 35 |
echo '<div class="wp-header-end"></div>'."\n"; |
| 36 |
|
| 37 |
echo '<div class="ws-menu-page-toolbox">'."\n"; |
| 38 |
c_ws_plugin__s2member_menu_pages_tb::display(); |
| 39 |
echo '</div>'."\n"; |
| 40 |
|
| 41 |
echo '<h2>Other Integrations</h2>'."\n"; |
| 42 |
|
| 43 |
echo '<table class="ws-menu-page-table">'."\n"; |
| 44 |
echo '<tbody class="ws-menu-page-table-tbody">'."\n"; |
| 45 |
echo '<tr class="ws-menu-page-table-tr">'."\n"; |
| 46 |
echo '<td class="ws-menu-page-table-l">'."\n"; |
| 47 |
|
| 48 |
do_action("ws_plugin__s2member_during_integrations_page_before_left_sections", get_defined_vars()); |
| 49 |
|
| 50 |
if(apply_filters("ws_plugin__s2member_during_integrations_page_during_left_sections_display_bbpress", TRUE, get_defined_vars())) |
| 51 |
{ |
| 52 |
do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_before_bbpress", get_defined_vars()); |
| 53 |
|
| 54 |
echo '<div class="ws-menu-page-group" title="bbPress Plugin Integration (2.0+ plugin version)" default-state="open">'."\n"; |
| 55 |
|
| 56 |
echo '<div class="ws-menu-page-section ws-plugin--s2member-bbpress-section">'."\n"; |
| 57 |
echo '<h3>bbPress Plugin Integration (easy peasy)</h3>'."\n"; |
| 58 |
echo '<input type="button" value="Update Roles/Capabilities" class="ws-menu-page-right ws-plugin--s2member-update-roles-button" style="min-width:175px;" />'."\n"; |
| 59 |
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"; |
| 60 |
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"; |
| 61 |
|
| 62 |
echo '<div class="ws-menu-page-hr"></div>'."\n"; |
| 63 |
|
| 64 |
echo '<h3>bbPress Forums and s2Member Roles/Capabilities</h3>'."\n"; |
| 65 |
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"; |
| 66 |
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"; |
| 67 |
echo '<p><strong>Membership Levels provide incremental access:</strong></p>'."\n"; |
| 68 |
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"; |
| 69 |
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"; |
| 70 |
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"; |
| 71 |
|
| 72 |
echo '<div class="ws-menu-page-hr"></div>'."\n"; |
| 73 |
|
| 74 |
echo '<h3>Protecting Content Introduced by bbPress</h3>'."\n"; |
| 75 |
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"; |
| 76 |
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"; |
| 77 |
|
| 78 |
do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_during_bbpress", get_defined_vars()); |
| 79 |
echo '</div>'."\n"; |
| 80 |
|
| 81 |
echo '</div>'."\n"; |
| 82 |
|
| 83 |
do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_after_bbpress", get_defined_vars()); |
| 84 |
} |
| 85 |
do_action("ws_plugin__s2member_during_integrations_page_after_left_sections", get_defined_vars()); |
| 86 |
|
| 87 |
echo '</td>'."\n"; |
| 88 |
|
| 89 |
echo '<td class="ws-menu-page-table-r">'."\n"; |
| 90 |
c_ws_plugin__s2member_menu_pages_rs::display(); |
| 91 |
echo '</td>'."\n"; |
| 92 |
|
| 93 |
echo '</tr>'."\n"; |
| 94 |
echo '</tbody>'."\n"; |
| 95 |
echo '</table>'."\n"; |
| 96 |
|
| 97 |
echo '</div>'."\n"; |
| 98 |
} |
| 99 |
} |
| 100 |
} |
| 101 |
|
| 102 |
new c_ws_plugin__s2member_menu_page_integrations(); |
| 103 |
|