Groups - Version 1.3.6

Version Description

  • Replaced call to get_users() with query to avoid memory errors on activation with large users bases.
  • Provided a default value for a method in Groups_Access_Meta_Boxes to avoid issues with other plugins or themes.
Download this release

Release Info

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

Code changes from version 1.3.5 to 1.3.6

groups.php CHANGED
@@ -21,13 +21,13 @@
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: 1.3.5
25
  * Author: itthinx
26
  * Author URI: http://www.itthinx.com
27
  * Donate-Link: http://www.itthinx.com
28
  * License: GPLv3
29
  */
30
- define( 'GROUPS_CORE_VERSION', '1.3.5' );
31
  define( 'GROUPS_FILE', __FILE__ );
32
  if ( !defined( 'GROUPS_CORE_DIR' ) ) {
33
  define( 'GROUPS_CORE_DIR', WP_PLUGIN_DIR . '/groups' );
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: 1.3.6
25
  * Author: itthinx
26
  * Author URI: http://www.itthinx.com
27
  * Donate-Link: http://www.itthinx.com
28
  * License: GPLv3
29
  */
30
+ define( 'GROUPS_CORE_VERSION', '1.3.6' );
31
  define( 'GROUPS_FILE', __FILE__ );
32
  if ( !defined( 'GROUPS_CORE_DIR' ) ) {
33
  define( 'GROUPS_CORE_DIR', WP_PLUGIN_DIR . '/groups' );
lib/access/class-groups-access-meta-boxes.php CHANGED
@@ -43,9 +43,9 @@ class Groups_Access_Meta_Boxes {
43
  }
44
 
45
  /**
46
- * Triggered by init() to add capability meta box.
47
  */
48
- public static function add_meta_boxes( $post_type, $post ) {
49
  global $wp_version;
50
  $post_type_object = get_post_type_object( $post_type );
51
  if ( $post_type_object ) {
43
  }
44
 
45
  /**
46
+ * Triggered by init() to add capability meta box.
47
  */
48
+ public static function add_meta_boxes( $post_type, $post = null ) {
49
  global $wp_version;
50
  $post_type_object = get_post_type_object( $post_type );
51
  if ( $post_type_object ) {
lib/auto/class-groups-registered.php CHANGED
@@ -32,6 +32,8 @@ class Groups_Registered {
32
  */
33
  public static function activate() {
34
 
 
 
35
  // create a group for the blog if it doesn't exist
36
  if ( !( $group = Groups_Group::read_by_name( self::REGISTERED_GROUP_NAME ) ) ) {
37
  $group_id = Groups_Group::create( array( "name" => self::REGISTERED_GROUP_NAME ) );
@@ -39,7 +41,7 @@ class Groups_Registered {
39
  $group_id = $group->group_id;
40
  }
41
 
42
- $users = get_users();
43
  foreach( $users as $user ) {
44
  // add the user to the group
45
  if ( $group_id ) {
32
  */
33
  public static function activate() {
34
 
35
+ global $wpdb;
36
+
37
  // create a group for the blog if it doesn't exist
38
  if ( !( $group = Groups_Group::read_by_name( self::REGISTERED_GROUP_NAME ) ) ) {
39
  $group_id = Groups_Group::create( array( "name" => self::REGISTERED_GROUP_NAME ) );
41
  $group_id = $group->group_id;
42
  }
43
 
44
+ $users = $wpdb->get_results( "SELECT ID FROM $wpdb->users" );
45
  foreach( $users as $user ) {
46
  // add the user to the group
47
  if ( $group_id ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.itthinx.com/plugins/groups
4
  Tags: access, access control, capability, capabilities, content, download, downloads, file, file access, files, group, groups, member, members, membership, memberships, paypal, permission, permissions, subscription, subscriptions, woocommerce
5
  Requires at least: 3.3
6
  Tested up to: 3.5
7
- Stable tag: 1.3.5
8
  License: GPLv3
9
 
10
  Groups provides group-based user membership management, group-based capabilities and content access control.
@@ -322,6 +322,10 @@ See also [Groups](http://www.itthinx.com/plugins/groups/)
322
 
323
  == Changelog ==
324
 
 
 
 
 
325
  = 1.3.5 =
326
  * Fixed out of memory issues with large user bases on Users > All Users page. Thanks to [Jason Glaspey](http://www.jasonglaspey.com) who spotted the issue :)
327
 
@@ -420,6 +424,9 @@ Some installations wouldn't work correctly, showing no capabilities and making i
420
 
421
  == Upgrade Notice ==
422
 
 
 
 
423
  = 1.3.5 =
424
  * Fixed out of memory issues with large user bases on Users > All Users page.
425
 
4
  Tags: access, access control, capability, capabilities, content, download, downloads, file, file access, files, group, groups, member, members, membership, memberships, paypal, permission, permissions, subscription, subscriptions, woocommerce
5
  Requires at least: 3.3
6
  Tested up to: 3.5
7
+ Stable tag: 1.3.6
8
  License: GPLv3
9
 
10
  Groups provides group-based user membership management, group-based capabilities and content access control.
322
 
323
  == Changelog ==
324
 
325
+ = 1.3.6 =
326
+ * Replaced call to get_users() with query to avoid memory errors on activation with large users bases.
327
+ * Provided a default value for a method in Groups_Access_Meta_Boxes to avoid issues with other plugins or themes.
328
+
329
  = 1.3.5 =
330
  * Fixed out of memory issues with large user bases on Users > All Users page. Thanks to [Jason Glaspey](http://www.jasonglaspey.com) who spotted the issue :)
331
 
424
 
425
  == Upgrade Notice ==
426
 
427
+ = 1.3.6 =
428
+ * Fixed performance issues with large user bases on plugin activation and improved flexibility with meta boxes.
429
+
430
  = 1.3.5 =
431
  * Fixed out of memory issues with large user bases on Users > All Users page.
432