Groups - Version 1.4.12

Version Description

  • Fixes missing selectize Javascript for the media uploader's attachment popup.
Download this release

Release Info

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

Code changes from version 1.4.11 to 1.4.12

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.4.11
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.4.11' );
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.4.12
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.4.12' );
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
@@ -41,6 +41,7 @@ class Groups_Access_Meta_Boxes {
41
  */
42
  public static function init() {
43
  add_action( 'init', array( __CLASS__, 'wp_init' ) );
 
44
  }
45
 
46
  /**
@@ -59,6 +60,25 @@ class Groups_Access_Meta_Boxes {
59
  }
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  /**
63
  * Triggered by init() to add capability meta box.
64
  */
@@ -496,10 +516,13 @@ class Groups_Access_Meta_Boxes {
496
  $read_caps = get_post_meta( $post->ID, Groups_Post_Access::POSTMETA_PREFIX . Groups_Post_Access::READ_POST_CAPABILITY );
497
  $valid_read_caps = self::get_valid_read_caps_for_user();
498
 
499
- // @todo On attachments edited within the 'Insert Media' popup, the update is triggered too soon and we end up with only the last capability selected.
500
  // This occurs when using normal checkboxes as well as the select below (Chosen and Selectize tested).
501
  // With checkboxes it's even more confusing, it's actually better to have it using a select as below,
502
  // because the visual feedback corresponds with what is assigned.
 
 
 
503
 
504
  // $output .= '<div style="padding:0 1em;margin:1em 0;border:1px solid #ccc;border-radius:4px;">';
505
  // $output .= '<ul>';
41
  */
42
  public static function init() {
43
  add_action( 'init', array( __CLASS__, 'wp_init' ) );
44
+ add_action( 'admin_init', array(__CLASS__,'admin_init' ) );
45
  }
46
 
47
  /**
60
  }
61
  }
62
 
63
+ /**
64
+ * Hooked on admin_init to register our action on admin_enqueue_scripts.
65
+ */
66
+ public static function admin_init() {
67
+ add_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_enqueue_scripts' ) );
68
+ }
69
+
70
+ /**
71
+ * Hooked on admin_enqueue_scripts to timely enqueue resources required
72
+ * on the media upload / attachment popup.
73
+ */
74
+ public static function admin_enqueue_scripts() {
75
+ global $pagenow;
76
+ if ( $pagenow == 'upload.php' ) {
77
+ Groups_UIE::enqueue( 'select' );
78
+ }
79
+
80
+ }
81
+
82
  /**
83
  * Triggered by init() to add capability meta box.
84
  */
516
  $read_caps = get_post_meta( $post->ID, Groups_Post_Access::POSTMETA_PREFIX . Groups_Post_Access::READ_POST_CAPABILITY );
517
  $valid_read_caps = self::get_valid_read_caps_for_user();
518
 
519
+ // On attachments edited within the 'Insert Media' popup, the update is triggered too soon and we end up with only the last capability selected.
520
  // This occurs when using normal checkboxes as well as the select below (Chosen and Selectize tested).
521
  // With checkboxes it's even more confusing, it's actually better to have it using a select as below,
522
  // because the visual feedback corresponds with what is assigned.
523
+ // See http://wordpress.org/support/topic/multiple-access-restrictions-for-media-items-are-not-saved-in-grid-view
524
+ // and https://core.trac.wordpress.org/ticket/28053 - this is an issue with multiple value fields and should
525
+ // be fixed within WordPress.
526
 
527
  // $output .= '<div style="padding:0 1em;margin:1em 0;border:1px solid #ccc;border-radius:4px;">';
528
  // $output .= '<ul>';
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.5
6
  Tested up to: 4.0
7
- Stable tag: 1.4.11
8
  License: GPLv3
9
 
10
  Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.
@@ -177,6 +177,9 @@ See also [Groups](http://www.itthinx.com/plugins/groups/)
177
 
178
  == Changelog ==
179
 
 
 
 
180
  = 1.4.11 =
181
  * WordPress 4.0 compatible.
182
 
@@ -403,6 +406,9 @@ Some installations wouldn't work correctly, showing no capabilities and making i
403
 
404
  == Upgrade Notice ==
405
 
 
 
 
406
  = 1.4.11 =
407
  * WordPress 4.0 compatible.
408
 
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.5
6
  Tested up to: 4.0
7
+ Stable tag: 1.4.12
8
  License: GPLv3
9
 
10
  Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.
177
 
178
  == Changelog ==
179
 
180
+ = 1.4.12 =
181
+ * Fixes missing selectize Javascript for the media uploader's attachment popup.
182
+
183
  = 1.4.11 =
184
  * WordPress 4.0 compatible.
185
 
406
 
407
  == Upgrade Notice ==
408
 
409
+ = 1.4.12 =
410
+ * Fixes a missing resource required for access restrictions in the media uploader.
411
+
412
  = 1.4.11 =
413
  * WordPress 4.0 compatible.
414