Groups - Version 2.12.0

Version Description

Download this release

Release Info

Developer itthinx
Plugin Icon 128x128 Groups
Version 2.12.0
Comparing to
See all releases

Code changes from version 2.11.1 to 2.12.0

changelog.txt CHANGED
@@ -1,5 +1,12 @@
1
  == Groups by itthinx - changelog.txt
2
 
 
 
 
 
 
 
 
3
  = 2.11.1 =
4
  * Fixes missing capabilities with user_has_cap filter processing modified in 2.11.0.
5
 
1
  == Groups by itthinx - changelog.txt
2
 
3
+ = 2.12.0 =
4
+ * WordPress 5.6 compatible.
5
+ * Updated info on add-ons.
6
+ * Fixed checking menu items so that only those that are related to a post type are processed for access checking.
7
+ * Minor visual adjustments to UI controls to filter by groups on admin pages.
8
+ * Updated documentation links to https.
9
+
10
  = 2.11.1 =
11
  * Fixes missing capabilities with user_has_cap filter processing modified in 2.11.0.
12
 
groups.php CHANGED
@@ -21,7 +21,7 @@
21
  * Plugin Name: Groups
22
  * Plugin URI: https://www.itthinx.com/plugins/groups
23
  * Description: Groups provides group-based user membership management, group-based capabilities and content access control.
24
- * Version: 2.11.1
25
  * Author: itthinx
26
  * Author URI: https://www.itthinx.com
27
  * Donate-Link: https://www.itthinx.com/shop/
@@ -32,7 +32,7 @@
32
  if ( !defined( 'ABSPATH' ) ) {
33
  exit;
34
  }
35
- define( 'GROUPS_CORE_VERSION', '2.11.1' );
36
  define( 'GROUPS_FILE', __FILE__ );
37
  if ( !defined( 'GROUPS_CORE_DIR' ) ) {
38
  define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
21
  * Plugin Name: Groups
22
  * Plugin URI: https://www.itthinx.com/plugins/groups
23
  * Description: Groups provides group-based user membership management, group-based capabilities and content access control.
24
+ * Version: 2.12.0
25
  * Author: itthinx
26
  * Author URI: https://www.itthinx.com
27
  * Donate-Link: https://www.itthinx.com/shop/
32
  if ( !defined( 'ABSPATH' ) ) {
33
  exit;
34
  }
35
+ define( 'GROUPS_CORE_VERSION', '2.12.0' );
36
  define( 'GROUPS_FILE', __FILE__ );
37
  if ( !defined( 'GROUPS_CORE_DIR' ) ) {
38
  define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
images/add-ons/groups-drip-content.png ADDED
Binary file
images/add-ons/itthinx-mail-queue.png ADDED
Binary file
lib/access/class-groups-post-access.php CHANGED
@@ -402,9 +402,12 @@ class Groups_Post_Access {
402
  if ( apply_filters( 'groups_post_access_wp_get_nav_menu_items_apply', true, $items, $menu, $args ) ) {
403
  $user_id = get_current_user_id();
404
  foreach ( $items as $item ) {
405
- // @todo might want to check $item->object and $item->type first,
406
- // for example these are 'page' and 'post_type' for a page
407
- if ( self::user_can_read_post( $item->object_id, $user_id ) ) {
 
 
 
408
  $result[] = $item;
409
  }
410
  }
402
  if ( apply_filters( 'groups_post_access_wp_get_nav_menu_items_apply', true, $items, $menu, $args ) ) {
403
  $user_id = get_current_user_id();
404
  foreach ( $items as $item ) {
405
+ // Check whether the menu item is for some post type, otherwise it's for something else which we don't control.
406
+ if ( is_object( $item ) && isset( $item->type ) && $item->type === 'post_type' ) {
407
+ if ( self::user_can_read_post( $item->object_id, $user_id ) ) {
408
+ $result[] = $item;
409
+ }
410
+ } else {
411
  $result[] = $item;
412
  }
413
  }
lib/admin/class-groups-admin-posts.php CHANGED
@@ -99,13 +99,14 @@ class Groups_Admin_Posts {
99
  echo '.groups-groups-container .groups-select-container select, .groups-bulk-container select.groups-action { float: none; margin-right: 4px; vertical-align: top; }';
100
  echo '.groups-groups-container .selectize-control { min-width: 128px; }';
101
  echo '.groups-groups-container .selectize-control, .groups-bulk-container select.groups-action { margin-right: 4px; vertical-align: top; }';
102
- echo '.groups-groups-container .selectize-input { font-size: inherit; line-height: 18px; padding: 1px 2px 2px 2px; vertical-align: middle; }';
103
  echo '.groups-groups-container .selectize-input input[type="text"] { font-size: inherit; vertical-align: middle; }';
104
  echo '.groups-groups-container input.button { margin-top: 1px; vertical-align: top; }';
105
  echo '.inline-edit-row fieldset .capabilities-bulk-container label span.title { min-width: 5em; padding: 2px 1em; width: auto; }';
106
  echo '.tablenav .actions { overflow: visible; }'; // this is important so that the selectize options aren't hidden
107
  echo '.wp-list-table td { overflow: visible; }'; // idem for bulk actions
108
- echo 'label.groups-read-terms {vertical-align: middle; line-height: 28px; margin-right: 4px; }'; // Terms checkbox
 
109
  echo 'th.column-groups, th.column-groups-read { width:10%; }';
110
  echo '</style>';
111
  }
99
  echo '.groups-groups-container .groups-select-container select, .groups-bulk-container select.groups-action { float: none; margin-right: 4px; vertical-align: top; }';
100
  echo '.groups-groups-container .selectize-control { min-width: 128px; }';
101
  echo '.groups-groups-container .selectize-control, .groups-bulk-container select.groups-action { margin-right: 4px; vertical-align: top; }';
102
+ echo '.groups-groups-container .selectize-input { min-height: 30px; font-size: inherit; line-height: 18px; padding: 0 4px; vertical-align: middle; }';
103
  echo '.groups-groups-container .selectize-input input[type="text"] { font-size: inherit; vertical-align: middle; }';
104
  echo '.groups-groups-container input.button { margin-top: 1px; vertical-align: top; }';
105
  echo '.inline-edit-row fieldset .capabilities-bulk-container label span.title { min-width: 5em; padding: 2px 1em; width: auto; }';
106
  echo '.tablenav .actions { overflow: visible; }'; // this is important so that the selectize options aren't hidden
107
  echo '.wp-list-table td { overflow: visible; }'; // idem for bulk actions
108
+ echo 'label.groups-read-terms { vertical-align: middle; line-height: 28px; margin-right: 4px; }'; // Terms checkbox label
109
+ echo 'label.groups-read-terms input[type="checkbox"] { height: 1rem; }'; // Terms checkbox
110
  echo 'th.column-groups, th.column-groups-read { width:10%; }';
111
  echo '</style>';
112
  }
lib/admin/class-groups-admin-welcome.php CHANGED
@@ -191,7 +191,7 @@ class Groups_Admin_Welcome {
191
  _e( 'New Documentation', 'groups' );
192
  echo '</h3>';
193
  echo '<p>';
194
- _e( 'Whether you are new to Groups or have been using it before, please make sure to visit the <a target="_blank" href="http://docs.itthinx.com/document/groups/">Documentation</a> pages to know more about how to use it.', 'groups' );
195
  echo '</p>';
196
 
197
  $legacy_enabled = Groups_Options::get_option( GROUPS_LEGACY_ENABLE );
@@ -226,7 +226,7 @@ class Groups_Admin_Welcome {
226
  echo ' ';
227
  _e( 'Once you have adjusted your access restrictions based on groups, you can disable legacy access control.', 'groups' );
228
  echo ' ';
229
- _e( 'Please refer to the <a target="_blank" href="http://docs.itthinx.com/document/groups/">Documentation</a> for details on how to switch to and use the new access restrictions.', 'groups' );
230
  echo '</p>';
231
  echo '</div>'; // .indent
232
 
191
  _e( 'New Documentation', 'groups' );
192
  echo '</h3>';
193
  echo '<p>';
194
+ _e( 'Whether you are new to Groups or have been using it before, please make sure to visit the <a target="_blank" href="https://docs.itthinx.com/document/groups/">Documentation</a> pages to know more about how to use it.', 'groups' );
195
  echo '</p>';
196
 
197
  $legacy_enabled = Groups_Options::get_option( GROUPS_LEGACY_ENABLE );
226
  echo ' ';
227
  _e( 'Once you have adjusted your access restrictions based on groups, you can disable legacy access control.', 'groups' );
228
  echo ' ';
229
+ _e( 'Please refer to the <a target="_blank" href="https://docs.itthinx.com/document/groups/">Documentation</a> for details on how to switch to and use the new access restrictions.', 'groups' );
230
  echo '</p>';
231
  echo '</div>'; // .indent
232
 
lib/admin/groups-admin-add-ons.php CHANGED
@@ -50,12 +50,19 @@ function groups_admin_add_ons_content( $params = array( 'offset' => 0 ) ) {
50
  echo "</$h2>";
51
 
52
  $entries = array(
 
 
 
 
 
 
 
53
  'groups-file-access' => array(
54
  'title' => 'Groups File Access',
55
  'content' => 'Groups File Access is a WordPress plugin that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.',
56
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-file-access.png',
57
  'url' => 'https://www.itthinx.com/shop/groups-file-access/',
58
- 'index' => 100
59
  ),
60
  'groups-forums' => array(
61
  'title' => 'Groups Forums',
@@ -90,14 +97,14 @@ function groups_admin_add_ons_content( $params = array( 'offset' => 0 ) ) {
90
  'content' => 'Sell memberships and subscriptions with Groups and PayPal.',
91
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-paypal.png',
92
  'url' => 'https://www.itthinx.com/shop/groups-paypal/',
93
- 'index' => 10
94
  ),
95
  'groups-restrict-categories' => array(
96
  'title' => 'Groups Restrict Categories',
97
  'content' => 'Access restrictions for categories and tags, also supporting custom post types and taxonomies.',
98
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-restrict-categories.png',
99
  'url' => 'https://www.itthinx.com/shop/groups-restrict-categories/',
100
- 'index' => 10
101
  ),
102
  'groups-restrict-comments-pro' => array(
103
  'title' => 'Groups Restrict Comments Pro',
@@ -111,21 +118,21 @@ function groups_admin_add_ons_content( $params = array( 'offset' => 0 ) ) {
111
  'content' => 'This extension allows you to sell memberships with WooCommerce.',
112
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-woocommerce.png',
113
  'url' => 'https://www.itthinx.com/shop/groups-woocommerce/',
114
- 'index' => 20
115
  ),
116
  'widgets-control-pro' => array(
117
  'title' => 'Widgets Control Pro',
118
  'content' => 'An advanced Widget toolbox that adds visibility management and helps to control where widgets are shown efficiently. Show or hide widgets based on a user’s group membership.',
119
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/widgets-control-pro.png',
120
  'url' => 'https://www.itthinx.com/shop/widgets-control-pro/',
121
- 'index' => 20
122
  ),
123
  'woocommerce-group-coupons' => array(
124
  'title' => 'WooCommerce Group Coupons',
125
  'content' => 'This extension allows to limit the validity of coupons based on groups and roles.',
126
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-group-coupons.png',
127
  'url' => 'https://www.itthinx.com/shop/woocommerce-group-coupons/',
128
- 'index' => 100
129
  ),
130
  'woocommerce-groups-newsletters' => array(
131
  'title' => 'WooCommerce Groups Newsletters',
@@ -163,28 +170,35 @@ function groups_admin_add_ons_content( $params = array( 'offset' => 0 ) ) {
163
  'content' => 'Boost Sales with Affiliate Marketing for your WordPress site.',
164
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-pro.png',
165
  'url' => 'https://www.itthinx.com/shop/affiliates-pro/',
166
- 'index' => 100
167
  ),
168
  'affiliates-enterprise' => array(
169
  'title' => 'Affiliates Enterprise',
170
  'content' => 'Affiliates Enterprise provides an affiliate management system for sellers, shops and developers, who want to boost sales with their own affiliate program. Features affiliate campaigns, tracking pixels and multiple tiers.',
171
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-enterprise.png',
172
  'url' => 'https://www.itthinx.com/shop/affiliates-enterprise/',
173
- 'index' => 100
 
 
 
 
 
 
 
174
  ),
175
  'woocommerce-product-search' => array(
176
  'title' => 'WooCommerce Product Search',
177
  'content' => 'The essential extension for every WooCommerce Store! The perfect Search Engine for your store helps your customers to find and buy the right products quickly.',
178
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-product-search.png',
179
  'url' => 'https://www.itthinx.com/shop/woocommerce-product-search/',
180
- 'index' => 100
181
  ),
182
  'woocommerce-sales-analysis' => array(
183
  'title' => 'Sales Analysis for WooCommerce',
184
  'content' => 'Sales Analysis for Managers and Marketers. Get in-depth views on fundamental Business Intelligence. Focused on sales and net revenue trends, regional analysis, product market, and customer trends.',
185
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-sales-analysis.png',
186
  'url' => 'https://www.itthinx.com/shop/woocommerce-sales-analysis/',
187
- 'index' => 100
188
  ),
189
  );
190
  usort( $entries, 'groups_admin_add_ons_sort' );
50
  echo "</$h2>";
51
 
52
  $entries = array(
53
+ 'groups-drip-content' => array(
54
+ 'title' => 'Groups Drip Content',
55
+ 'content' => 'Release posts, pages, other post types and embedded content on a schedule. Drip content to members based on user account creation, group memberships or specific dates and times.',
56
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-drip-content.png',
57
+ 'url' => 'https://www.itthinx.com/shop/groups-drip-content/',
58
+ 'index' => 10
59
+ ),
60
  'groups-file-access' => array(
61
  'title' => 'Groups File Access',
62
  'content' => 'Groups File Access is a WordPress plugin that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.',
63
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-file-access.png',
64
  'url' => 'https://www.itthinx.com/shop/groups-file-access/',
65
+ 'index' => 50
66
  ),
67
  'groups-forums' => array(
68
  'title' => 'Groups Forums',
97
  'content' => 'Sell memberships and subscriptions with Groups and PayPal.',
98
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-paypal.png',
99
  'url' => 'https://www.itthinx.com/shop/groups-paypal/',
100
+ 'index' => 100
101
  ),
102
  'groups-restrict-categories' => array(
103
  'title' => 'Groups Restrict Categories',
104
  'content' => 'Access restrictions for categories and tags, also supporting custom post types and taxonomies.',
105
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-restrict-categories.png',
106
  'url' => 'https://www.itthinx.com/shop/groups-restrict-categories/',
107
+ 'index' => 20
108
  ),
109
  'groups-restrict-comments-pro' => array(
110
  'title' => 'Groups Restrict Comments Pro',
118
  'content' => 'This extension allows you to sell memberships with WooCommerce.',
119
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-woocommerce.png',
120
  'url' => 'https://www.itthinx.com/shop/groups-woocommerce/',
121
+ 'index' => 30
122
  ),
123
  'widgets-control-pro' => array(
124
  'title' => 'Widgets Control Pro',
125
  'content' => 'An advanced Widget toolbox that adds visibility management and helps to control where widgets are shown efficiently. Show or hide widgets based on a user’s group membership.',
126
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/widgets-control-pro.png',
127
  'url' => 'https://www.itthinx.com/shop/widgets-control-pro/',
128
+ 'index' => 100
129
  ),
130
  'woocommerce-group-coupons' => array(
131
  'title' => 'WooCommerce Group Coupons',
132
  'content' => 'This extension allows to limit the validity of coupons based on groups and roles.',
133
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-group-coupons.png',
134
  'url' => 'https://www.itthinx.com/shop/woocommerce-group-coupons/',
135
+ 'index' => 40
136
  ),
137
  'woocommerce-groups-newsletters' => array(
138
  'title' => 'WooCommerce Groups Newsletters',
170
  'content' => 'Boost Sales with Affiliate Marketing for your WordPress site.',
171
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-pro.png',
172
  'url' => 'https://www.itthinx.com/shop/affiliates-pro/',
173
+ 'index' => 30
174
  ),
175
  'affiliates-enterprise' => array(
176
  'title' => 'Affiliates Enterprise',
177
  'content' => 'Affiliates Enterprise provides an affiliate management system for sellers, shops and developers, who want to boost sales with their own affiliate program. Features affiliate campaigns, tracking pixels and multiple tiers.',
178
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-enterprise.png',
179
  'url' => 'https://www.itthinx.com/shop/affiliates-enterprise/',
180
+ 'index' => 40
181
+ ),
182
+ 'itthinx-mail-queue' => array(
183
+ 'title' => 'Itthinx Mail Queue',
184
+ 'content' => 'Features a fully automated SMTP email queue that substantially improves the way emails are sent out from your site. Prioritize sending by origin, eliminate delays for your visitors and balance your resources.',
185
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/itthinx-mail-queue.png',
186
+ 'url' => 'https://www.itthinx.com/shop/itthinx-mail-queue/',
187
+ 'index' => 50
188
  ),
189
  'woocommerce-product-search' => array(
190
  'title' => 'WooCommerce Product Search',
191
  'content' => 'The essential extension for every WooCommerce Store! The perfect Search Engine for your store helps your customers to find and buy the right products quickly.',
192
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-product-search.png',
193
  'url' => 'https://www.itthinx.com/shop/woocommerce-product-search/',
194
+ 'index' => 10
195
  ),
196
  'woocommerce-sales-analysis' => array(
197
  'title' => 'Sales Analysis for WooCommerce',
198
  'content' => 'Sales Analysis for Managers and Marketers. Get in-depth views on fundamental Business Intelligence. Focused on sales and net revenue trends, regional analysis, product market, and customer trends.',
199
  'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-sales-analysis.png',
200
  'url' => 'https://www.itthinx.com/shop/woocommerce-sales-analysis/',
201
+ 'index' => 20
202
  ),
203
  );
204
  usort( $entries, 'groups_admin_add_ons_sort' );
lib/core/class-groups-help.php CHANGED
@@ -84,7 +84,7 @@ class Groups_Help {
84
  if ( $show_groups_help ) {
85
  $help = '<h3><a href="https://www.itthinx.com/plugins/groups" target="_blank">'. $help_title .'</a></h3>';
86
  $help .= '<p>';
87
- $help .= __( 'The complete documentation is available on the <a href="http://docs.itthinx.com/document/groups">Documentation</a> pages for Groups.', 'groups' );
88
  $help .= '</p>';
89
  switch ( $screen_id ) {
90
  case 'groups-admin' :
84
  if ( $show_groups_help ) {
85
  $help = '<h3><a href="https://www.itthinx.com/plugins/groups" target="_blank">'. $help_title .'</a></h3>';
86
  $help .= '<p>';
87
+ $help .= __( 'The complete documentation is available on the <a href="https://docs.itthinx.com/document/groups">Documentation</a> pages for Groups.', 'groups' );
88
  $help .= '</p>';
89
  switch ( $screen_id ) {
90
  case 'groups-admin' :
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: itthinx, proaktion
3
  Donate link: https://www.itthinx.com/shop/
4
  Tags: groups, access, access control, membership, memberships, member, members, capability, capabilities, content, download, downloads, file, file access, files, paypal, permission, permissions, subscription, subscriptions, woocommerce
5
  Requires at least: 5.2
6
- Tested up to: 5.5
7
  Requires PHP: 5.6.0
8
- Stable tag: 2.11.1
9
  License: GPLv3
10
 
11
  Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.
@@ -22,7 +22,7 @@ Enhanced functionality is available via [Official Extensions](https://www.itthin
22
 
23
  ### Documentation ###
24
 
25
- The official documentation is located at the [Groups Documentation](http://docs.itthinx.com/document/groups/) pages.
26
 
27
  ### Features ###
28
 
@@ -118,7 +118,7 @@ Many thanks for your help!
118
 
119
  = Where is the documentation? =
120
 
121
- The official documentation is located at the [Groups Documentation](http://docs.itthinx.com/document/groups/) pages.
122
 
123
  = I have a question, where do I ask? =
124
 
@@ -170,11 +170,11 @@ The Groups plugin provides an extensive framework to handle memberships, group-b
170
 
171
  The API documentation is available here: [Groups API](http://api.itthinx.com/groups).
172
 
173
- Also refer to the official [Groups Plugin](https://www.itthinx.com/plugins/groups/) page to post your questions and the [Groups Documentation](http://docs.itthinx.com/document/groups/) pages.
174
 
175
  == Screenshots ==
176
 
177
- See also the [Groups Documentation](http://docs.itthinx.com/document/groups/) pages and the [Groups Plugin](https://www.itthinx.com/plugin/groups/) page.
178
 
179
  1. Groups - this is where you add and remove groups and assign capabilities to groups.
180
  2. Capabilities - here you get an overview of the capabilities that are defined and you can add and remove capabilities as well.
3
  Donate link: https://www.itthinx.com/shop/
4
  Tags: groups, access, access control, membership, memberships, member, members, capability, capabilities, content, download, downloads, file, file access, files, paypal, permission, permissions, subscription, subscriptions, woocommerce
5
  Requires at least: 5.2
6
+ Tested up to: 5.6
7
  Requires PHP: 5.6.0
8
+ Stable tag: 2.12.0
9
  License: GPLv3
10
 
11
  Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.
22
 
23
  ### Documentation ###
24
 
25
+ The official documentation is located at the [Groups Documentation](https://docs.itthinx.com/document/groups/) pages.
26
 
27
  ### Features ###
28
 
118
 
119
  = Where is the documentation? =
120
 
121
+ The official documentation is located at the [Groups Documentation](https://docs.itthinx.com/document/groups/) pages.
122
 
123
  = I have a question, where do I ask? =
124
 
170
 
171
  The API documentation is available here: [Groups API](http://api.itthinx.com/groups).
172
 
173
+ Also refer to the official [Groups Plugin](https://www.itthinx.com/plugins/groups/) page to post your questions and the [Groups Documentation](https://docs.itthinx.com/document/groups/) pages.
174
 
175
  == Screenshots ==
176
 
177
+ See also the [Groups Documentation](https://docs.itthinx.com/document/groups/) pages and the [Groups Plugin](https://www.itthinx.com/plugin/groups/) page.
178
 
179
  1. Groups - this is where you add and remove groups and assign capabilities to groups.
180
  2. Capabilities - here you get an overview of the capabilities that are defined and you can add and remove capabilities as well.