Groups - Version 1.3.2

Version Description

  • Fixed capabilities cannot be added or removed from groups in localized installations
Download this release

Release Info

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

Code changes from version 1.3.1 to 1.3.2

Files changed (3) hide show
  1. groups.php +2 -2
  2. lib/admin/groups-admin-groups.php +9 -4
  3. readme.txt +7 -1
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.1
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.1' );
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.2
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.2' );
31
  define( 'GROUPS_FILE', __FILE__ );
32
  if ( !defined( 'GROUPS_CORE_DIR' ) ) {
33
  define( 'GROUPS_CORE_DIR', WP_PLUGIN_DIR . '/groups' );
lib/admin/groups-admin-groups.php CHANGED
@@ -68,15 +68,20 @@ function groups_admin_groups() {
68
  case 'groups-action' :
69
  if ( wp_verify_nonce( $_POST[GROUPS_ADMIN_GROUPS_ACTION_NONCE], 'admin' ) ) {
70
  $group_ids = isset( $_POST['group_ids'] ) ? $_POST['group_ids'] : null;
71
- $subaction = isset( $_POST['add'] ) ? $_POST['add'] : ( isset( $_POST['remove'] ) ? $_POST['remove'] : null );
72
- $capability_id = isset( $_POST['capability_id'] ) ? $_POST['capability_id'] : null;
 
 
 
 
 
73
  if ( is_array( $group_ids ) && ( $subaction !== null ) && ( $capability_id !== null ) ) {
74
  foreach ( $group_ids as $group_id ) {
75
  switch ( $subaction ) {
76
- case 'Add' :
77
  Groups_Group_Capability::create( array( 'group_id' => $group_id, 'capability_id' => $capability_id ) );
78
  break;
79
- case 'Remove' :
80
  Groups_Group_Capability::delete( $group_id, $capability_id );
81
  break;
82
  }
68
  case 'groups-action' :
69
  if ( wp_verify_nonce( $_POST[GROUPS_ADMIN_GROUPS_ACTION_NONCE], 'admin' ) ) {
70
  $group_ids = isset( $_POST['group_ids'] ) ? $_POST['group_ids'] : null;
71
+ $subaction = null;
72
+ if ( isset( $_POST['add'] ) ) {
73
+ $subaction = 'add';
74
+ } else if ( isset( $_POST['remove'] ) ) {
75
+ $subaction = 'remove';
76
+ }
77
+ $capability_id = isset( $_POST['capability_id'] ) ? $_POST['capability_id'] : null;
78
  if ( is_array( $group_ids ) && ( $subaction !== null ) && ( $capability_id !== null ) ) {
79
  foreach ( $group_ids as $group_id ) {
80
  switch ( $subaction ) {
81
+ case 'add' :
82
  Groups_Group_Capability::create( array( 'group_id' => $group_id, 'capability_id' => $capability_id ) );
83
  break;
84
+ case 'remove' :
85
  Groups_Group_Capability::delete( $group_id, $capability_id );
86
  break;
87
  }
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.4.2
7
- Stable tag: 1.3.1
8
  License: GPLv3
9
 
10
  Groups provides group-based user membership management, group-based capabilities and content access control.
@@ -321,6 +321,9 @@ See also [Groups](http://www.itthinx.com/plugins/groups/)
321
 
322
  == Changelog ==
323
 
 
 
 
324
  = 1.3.1 =
325
  * Added users property to Groups_Group
326
  * Moved tests out of core folder
@@ -407,6 +410,9 @@ Some installations wouldn't work correctly, showing no capabilities and making i
407
 
408
  == Upgrade Notice ==
409
 
 
 
 
410
  = 1.3.1 =
411
  * Now you can filter the users section by group. This release also brings API enhancements and fixes.
412
 
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.4.2
7
+ Stable tag: 1.3.2
8
  License: GPLv3
9
 
10
  Groups provides group-based user membership management, group-based capabilities and content access control.
321
 
322
  == Changelog ==
323
 
324
+ = 1.3.2 =
325
+ * Fixed capabilities cannot be added or removed from groups in localized installations
326
+
327
  = 1.3.1 =
328
  * Added users property to Groups_Group
329
  * Moved tests out of core folder
410
 
411
  == Upgrade Notice ==
412
 
413
+ = 1.3.2 =
414
+ * Please update if you are or will be using a localized installation (bug fixes).
415
+
416
  = 1.3.1 =
417
  * Now you can filter the users section by group. This release also brings API enhancements and fixes.
418