Groups - Version 2.10.0

Version Description

Download this release

Release Info

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

Code changes from version 2.9.0 to 2.10.0

changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  == Groups by itthinx - changelog.txt
2
 
 
 
 
 
 
 
3
  = 2.9.0 =
4
  * WordPress 5.3 compatible.
5
  * Added member counts displayed for each group under Groups > Groups.
1
  == Groups by itthinx - changelog.txt
2
 
3
+ = 2.10.0 =
4
+ * WordPress 5.4 compatible.
5
+ * Removed an alternative call to the deprecated wp_cache_reset() and preferrably calling wp_cache_init() when wp_cache_switch_to_blog() is not available.
6
+ * Fixed showing the Groups meta box to restrict posts on new post types which show access restrictions disabled in the options.
7
+ * Updated the add-ons section.
8
+
9
  = 2.9.0 =
10
  * WordPress 5.3 compatible.
11
  * Added member counts displayed for each group under Groups > Groups.
css/groups_admin.css CHANGED
@@ -304,7 +304,7 @@ div.capability.edit label {
304
  padding: 8px;
305
  vertical-align: top;
306
  width: 256px;
307
- height: 158px;
308
  background-color: #fff;
309
  border: 1px solid #ccc;
310
  }
304
  padding: 8px;
305
  vertical-align: top;
306
  width: 256px;
307
+ min-height: 158px;
308
  background-color: #fff;
309
  border: 1px solid #ccc;
310
  }
groups.php CHANGED
@@ -21,7 +21,7 @@
21
  * Plugin Name: Groups
22
  * Plugin URI: http://www.itthinx.com/plugins/groups
23
  * Description: Groups provides group-based user membership management, group-based capabilities and content access control.
24
- * Version: 2.9.0
25
  * Author: itthinx
26
  * Author URI: http://www.itthinx.com
27
  * Donate-Link: http://www.itthinx.com
@@ -32,7 +32,7 @@
32
  if ( !defined( 'ABSPATH' ) ) {
33
  exit;
34
  }
35
- define( 'GROUPS_CORE_VERSION', '2.9.0' );
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: http://www.itthinx.com/plugins/groups
23
  * Description: Groups provides group-based user membership management, group-based capabilities and content access control.
24
+ * Version: 2.10.0
25
  * Author: itthinx
26
  * Author URI: http://www.itthinx.com
27
  * Donate-Link: http://www.itthinx.com
32
  if ( !defined( 'ABSPATH' ) ) {
33
  exit;
34
  }
35
+ define( 'GROUPS_CORE_VERSION', '2.10.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/woocommerce-product-search.png ADDED
Binary file
images/add-ons/woocommerce-sales-analysis.png ADDED
Binary file
lib/access/class-groups-access-meta-boxes.php CHANGED
@@ -101,7 +101,13 @@ class Groups_Access_Meta_Boxes {
101
  $post_type_object = get_post_type_object( $post_type );
102
  if ( $post_type_object && $post_type != 'attachment' ) {
103
  $post_types_option = Groups_Options::get_option( Groups_Post_Access::POST_TYPES, array() );
104
- if ( !isset( $post_types_option[$post_type]['add_meta_box'] ) || $post_types_option[$post_type]['add_meta_box'] ) {
 
 
 
 
 
 
105
 
106
  add_meta_box(
107
  'groups-permissions',
101
  $post_type_object = get_post_type_object( $post_type );
102
  if ( $post_type_object && $post_type != 'attachment' ) {
103
  $post_types_option = Groups_Options::get_option( Groups_Post_Access::POST_TYPES, array() );
104
+ if (
105
+ Groups_Post_Access::handles_post_type( $post_type ) &&
106
+ (
107
+ !isset( $post_types_option[$post_type]['add_meta_box'] ) ||
108
+ $post_types_option[$post_type]['add_meta_box']
109
+ )
110
+ ) {
111
 
112
  add_meta_box(
113
  'groups-permissions',
lib/admin/groups-admin-add-ons.php CHANGED
@@ -172,6 +172,20 @@ function groups_admin_add_ons_content( $params = array( 'offset' => 0 ) ) {
172
  'url' => 'http://www.itthinx.com/shop/affiliates-enterprise/',
173
  'index' => 100
174
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  );
176
  usort( $entries, 'groups_admin_add_ons_sort' );
177
 
172
  'url' => 'http://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' => 'http://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' => 'http://www.itthinx.com/shop/woocommerce-sales-analysis/',
187
+ 'index' => 100
188
+ ),
189
  );
190
  usort( $entries, 'groups_admin_add_ons_sort' );
191
 
lib/core/class-groups-controller.php CHANGED
@@ -43,8 +43,12 @@ class Groups_Controller {
43
  * Some implementations don't have wp_cache_switch_to_blog() nor the deprecated
44
  * wp_cache_reset(), e.g. WP Engine's object-cache.php which has wp_cache_flush().
45
  *
 
 
 
46
  * See wp_cache_reset() in wp-includes/cache.php
47
  * @see wp_cache_switch_to_blog()
 
48
  * @see wp_cache_flush()
49
  * @see wp_cache_reset()
50
  * @link http://core.trac.wordpress.org/ticket/14941
@@ -55,10 +59,10 @@ class Groups_Controller {
55
  switch_to_blog( $blog_id );
56
  if ( function_exists( 'wp_cache_switch_to_blog' ) ) {
57
  wp_cache_switch_to_blog( $blog_id ); // introduced in WP 3.5.0
 
 
58
  } else if ( function_exists( 'wp_cache_flush' ) ) {
59
  wp_cache_flush();
60
- } else if ( function_exists( 'wp_cache_reset' ) ) {
61
- wp_cache_reset(); // deprecated in WP 3.5.0
62
  }
63
  }
64
 
43
  * Some implementations don't have wp_cache_switch_to_blog() nor the deprecated
44
  * wp_cache_reset(), e.g. WP Engine's object-cache.php which has wp_cache_flush().
45
  *
46
+ * @since 2.10.0 giving preference to call wp_cache_init() since it will reset the blog_id
47
+ * @since 2.10.0 removed alternative call to wp_cache_reset()
48
+ *
49
  * See wp_cache_reset() in wp-includes/cache.php
50
  * @see wp_cache_switch_to_blog()
51
+ * @see wp_cache_init()
52
  * @see wp_cache_flush()
53
  * @see wp_cache_reset()
54
  * @link http://core.trac.wordpress.org/ticket/14941
59
  switch_to_blog( $blog_id );
60
  if ( function_exists( 'wp_cache_switch_to_blog' ) ) {
61
  wp_cache_switch_to_blog( $blog_id ); // introduced in WP 3.5.0
62
+ } else if ( function_exists( 'wp_cache_init' ) ) {
63
+ wp_cache_init();
64
  } else if ( function_exists( 'wp_cache_flush' ) ) {
65
  wp_cache_flush();
 
 
66
  }
67
  }
68
 
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: itthinx, proaktion
3
  Donate link: http://www.itthinx.com/plugins/groups
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: 4.6
6
- Tested up to: 5.3
7
  Requires PHP: 5.6.0
8
- Stable tag: 2.9.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.
3
  Donate link: http://www.itthinx.com/plugins/groups
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: 4.6
6
+ Tested up to: 5.4
7
  Requires PHP: 5.6.0
8
+ Stable tag: 2.10.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.