Groups - Version 1.3.7

Version Description

  • Fix: missing argument for meta box when saving a post
  • Fix: Groups conflicting with other plugins adding columns to the Users screen (in the manage_users_custom_column filter) thanks to Erwin who spotted this :)
Download this release

Release Info

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

Code changes from version 1.3.6 to 1.3.7

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.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' );
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.7
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.7' );
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
@@ -146,7 +146,11 @@ class Groups_Access_Meta_Boxes {
146
  if ( isset( $_POST[self::NONCE] ) && wp_verify_nonce( $_POST[self::NONCE], self::SET_CAPABILITY ) ) {
147
  $post_type = isset( $_POST["post_type"] ) ? $_POST["post_type"] : null;
148
  if ( $post_type !== null ) {
149
- if ( current_user_can( 'edit_'.$post_type ) ) {
 
 
 
 
150
  Groups_Post_Access::delete( $post_id, null );
151
  if ( !empty( $_POST[self::CAPABILITY] ) ) {
152
  foreach ( $_POST[self::CAPABILITY] as $capability_id ) {
146
  if ( isset( $_POST[self::NONCE] ) && wp_verify_nonce( $_POST[self::NONCE], self::SET_CAPABILITY ) ) {
147
  $post_type = isset( $_POST["post_type"] ) ? $_POST["post_type"] : null;
148
  if ( $post_type !== null ) {
149
+ // See http://codex.wordpress.org/Function_Reference/current_user_can 20130119 WP 3.5
150
+ // "... Some capability checks (like 'edit_post' or 'delete_page') require this [the post ID] be provided."
151
+ // If the post ID is not provided, it will throw:
152
+ // PHP Notice: Undefined offset: 0 in /var/www/groups-forums/wp-includes/capabilities.php on line 1067
153
+ if ( current_user_can( 'edit_'.$post_type, $post_id ) ) {
154
  Groups_Post_Access::delete( $post_id, null );
155
  if ( !empty( $_POST[self::CAPABILITY] ) ) {
156
  foreach ( $_POST[self::CAPABILITY] as $capability_id ) {
lib/admin/class-groups-admin-users.php CHANGED
@@ -226,22 +226,18 @@ class Groups_Admin_Users {
226
  /**
227
  * Renders custom column content.
228
  *
229
- * $foo : both filter invocations in class-wp-ms-users-list-table.php and
230
- * class-wp-users-list-table.php pass ''
231
- *
232
- * @param unknown_type $foo
233
  * @param string $column_name
234
  * @param int $user_id
235
  * @return string custom column content
236
  */
237
- public static function manage_users_custom_column( $foo, $column_name, $user_id ) {
238
- $output = '';
239
  switch ( $column_name ) {
240
  case self::GROUPS :
241
  $groups_user = new Groups_User( $user_id );
242
  $groups = $groups_user->groups;
243
  if ( count( $groups ) > 0 ) {
244
- $output .= '<ul>';
245
  foreach( $groups as $group ) {
246
  $output .= '<li>';
247
  $output .= wp_filter_nohtml_kses( $group->name );
226
  /**
227
  * Renders custom column content.
228
  *
229
+ * @param string $output
 
 
 
230
  * @param string $column_name
231
  * @param int $user_id
232
  * @return string custom column content
233
  */
234
+ public static function manage_users_custom_column( $output, $column_name, $user_id ) {
 
235
  switch ( $column_name ) {
236
  case self::GROUPS :
237
  $groups_user = new Groups_User( $user_id );
238
  $groups = $groups_user->groups;
239
  if ( count( $groups ) > 0 ) {
240
+ $output = '<ul>';
241
  foreach( $groups as $group ) {
242
  $output .= '<li>';
243
  $output .= wp_filter_nohtml_kses( $group->name );
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.6
8
  License: GPLv3
9
 
10
  Groups provides group-based user membership management, group-based capabilities and content access control.
@@ -17,10 +17,12 @@ It integrates standard WordPress capabilities and application-specific capabilit
17
  ### Extensions ###
18
 
19
  - [Groups File Access](http://www.itthinx.com/plugins/groups-file-access/) Groups File Access is an extension that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.
20
- - [Groups Notifications](http://www.itthinx.com/plugins/groups-notifications/) Adds customizable notifications for events related to Groups.
21
- - [Groups PayPal](http://www.itthinx.com/plugins/groups-paypal/) Groups for PayPal allows to sell memberships and subscriptions with Groups.
22
  - [Groups Jigoshop](http://jigoshop.com/product/subscriptions/) Groups integration for Jigoshop that supports memberships and subscriptions.
 
 
23
  - [Groups WooCommerce](http://www.woothemes.com/extension/groups-woocommerce/) Groups for WooCommerce is a WordPress plugin that allows you to sell memberships.
 
24
 
25
  ### Features ###
26
 
@@ -322,6 +324,10 @@ See also [Groups](http://www.itthinx.com/plugins/groups/)
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.
@@ -424,6 +430,9 @@ Some installations wouldn't work correctly, showing no capabilities and making i
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
 
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.7
8
  License: GPLv3
9
 
10
  Groups provides group-based user membership management, group-based capabilities and content access control.
17
  ### Extensions ###
18
 
19
  - [Groups File Access](http://www.itthinx.com/plugins/groups-file-access/) Groups File Access is an extension that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.
20
+ - [Groups Forums](http://www.itthinx.com/plugins/groups-forums/) A powerful and yet light-weight forum system.
 
21
  - [Groups Jigoshop](http://jigoshop.com/product/subscriptions/) Groups integration for Jigoshop that supports memberships and subscriptions.
22
+ - [Groups Notifications](http://www.itthinx.com/plugins/groups-notifications/) Adds customizable notifications for events related to Groups.
23
+ - [Groups PayPal](http://www.itthinx.com/plugins/groups-paypal/) Groups for PayPal allows to sell memberships and subscriptions with Groups.
24
  - [Groups WooCommerce](http://www.woothemes.com/extension/groups-woocommerce/) Groups for WooCommerce is a WordPress plugin that allows you to sell memberships.
25
+ - [Groups 404 Redirect](http://wordpress.org/extend/plugins/groups-404-redirect/) Redirects 404's caused by hits on pages that are protected by Groups.
26
 
27
  ### Features ###
28
 
324
 
325
  == Changelog ==
326
 
327
+ = 1.3.7 =
328
+ * Fix: missing argument for meta box when saving a post
329
+ * Fix: Groups conflicting with other plugins adding columns to the Users screen (in the manage_users_custom_column filter) thanks to [Erwin](http://www.transpontine.com) who spotted this :)
330
+
331
  = 1.3.6 =
332
  * Replaced call to get_users() with query to avoid memory errors on activation with large users bases.
333
  * Provided a default value for a method in Groups_Access_Meta_Boxes to avoid issues with other plugins or themes.
430
 
431
  == Upgrade Notice ==
432
 
433
+ = 1.3.7 =
434
+ * Please update, this includes fixes: missing argument for meta box when saving a post; Groups conflicting with other plugins adding columns to the Users screen.
435
+
436
  = 1.3.6 =
437
  * Fixed performance issues with large user bases on plugin activation and improved flexibility with meta boxes.
438