Version Description
- Improved: code documentation
- WordPress 3.9 compatibility checked
- Changed some filter usage with prepare() for 3.9 nags.
- Fixed unmatched tags in the tree view.
Download this release
Release Info
Developer | itthinx |
Plugin | Groups |
Version | 1.4.10 |
Comparing to | |
See all releases |
Code changes from version 1.4.9 to 1.4.10
- groups.php +2 -2
- lib/admin/groups-admin-capabilities.php +2 -2
- lib/admin/groups-admin-groups.php +2 -2
- lib/admin/groups-admin-tree-view.php +8 -12
- lib/wp/class-groups-wordpress.php +2 -2
- readme.txt +11 -2
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.
|
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.
|
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.10
|
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.10' );
|
31 |
define( 'GROUPS_FILE', __FILE__ );
|
32 |
if ( !defined( 'GROUPS_CORE_DIR' ) ) {
|
33 |
define( 'GROUPS_CORE_DIR', WP_PLUGIN_DIR . '/groups' );
|
lib/admin/groups-admin-capabilities.php
CHANGED
@@ -242,8 +242,8 @@ function groups_admin_capabilities() {
|
|
242 |
$switch_order = 'DESC';
|
243 |
}
|
244 |
|
245 |
-
$filters = array();
|
246 |
-
$filter_params = array();
|
247 |
if ( $capability_id ) {
|
248 |
$filters[] = " $capability_table.capability_id = %d ";
|
249 |
$filter_params[] = $capability_id;
|
242 |
$switch_order = 'DESC';
|
243 |
}
|
244 |
|
245 |
+
$filters = array( " 1=%d " );
|
246 |
+
$filter_params = array( 1 );
|
247 |
if ( $capability_id ) {
|
248 |
$filters[] = " $capability_table.capability_id = %d ";
|
249 |
$filter_params[] = $capability_id;
|
lib/admin/groups-admin-groups.php
CHANGED
@@ -248,8 +248,8 @@ function groups_admin_groups() {
|
|
248 |
$switch_order = 'DESC';
|
249 |
}
|
250 |
|
251 |
-
$filters = array();
|
252 |
-
$filter_params = array();
|
253 |
if ( $group_id ) {
|
254 |
$filters[] = " $group_table.group_id = %d ";
|
255 |
$filter_params[] = $group_id;
|
248 |
$switch_order = 'DESC';
|
249 |
}
|
250 |
|
251 |
+
$filters = array( " 1=%d " );
|
252 |
+
$filter_params = array( 1 );
|
253 |
if ( $group_id ) {
|
254 |
$filters[] = " $group_table.group_id = %d ";
|
255 |
$filter_params[] = $group_id;
|
lib/admin/groups-admin-tree-view.php
CHANGED
@@ -27,33 +27,29 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
27 |
* Tree view : a simple tree view
|
28 |
*/
|
29 |
function groups_admin_tree_view() {
|
30 |
-
|
31 |
global $wpdb;
|
32 |
-
|
33 |
$output = '';
|
34 |
$today = date( 'Y-m-d', time() );
|
35 |
-
|
36 |
if ( !current_user_can( GROUPS_ACCESS_GROUPS ) ) {
|
37 |
wp_die( __( 'Access denied.', GROUPS_PLUGIN_DOMAIN ) );
|
38 |
}
|
39 |
-
|
40 |
$output .=
|
41 |
'<div class="groups-tree-view">' .
|
42 |
-
'<div>' .
|
43 |
'<h2>' .
|
44 |
__( 'Tree of Groups', GROUPS_PLUGIN_DOMAIN ) .
|
45 |
-
'</h2>'
|
46 |
-
'</div>';
|
47 |
|
48 |
$tree = Groups_Utility::get_group_tree();
|
49 |
$tree_output = '';
|
50 |
Groups_Utility::render_group_tree( $tree, $tree_output );
|
51 |
$output .= $tree_output;
|
52 |
-
|
53 |
-
$output .= '</div>'; // .groups-
|
54 |
-
|
55 |
-
|
56 |
echo $output;
|
57 |
Groups_Help::footer();
|
58 |
} // function groups_admin_tree_view()
|
59 |
-
?>
|
27 |
* Tree view : a simple tree view
|
28 |
*/
|
29 |
function groups_admin_tree_view() {
|
30 |
+
|
31 |
global $wpdb;
|
32 |
+
|
33 |
$output = '';
|
34 |
$today = date( 'Y-m-d', time() );
|
35 |
+
|
36 |
if ( !current_user_can( GROUPS_ACCESS_GROUPS ) ) {
|
37 |
wp_die( __( 'Access denied.', GROUPS_PLUGIN_DOMAIN ) );
|
38 |
}
|
39 |
+
|
40 |
$output .=
|
41 |
'<div class="groups-tree-view">' .
|
|
|
42 |
'<h2>' .
|
43 |
__( 'Tree of Groups', GROUPS_PLUGIN_DOMAIN ) .
|
44 |
+
'</h2>';
|
|
|
45 |
|
46 |
$tree = Groups_Utility::get_group_tree();
|
47 |
$tree_output = '';
|
48 |
Groups_Utility::render_group_tree( $tree, $tree_output );
|
49 |
$output .= $tree_output;
|
50 |
+
|
51 |
+
$output .= '</div>'; // .groups-tree-view
|
52 |
+
|
|
|
53 |
echo $output;
|
54 |
Groups_Help::footer();
|
55 |
} // function groups_admin_tree_view()
|
|
lib/wp/class-groups-wordpress.php
CHANGED
@@ -66,8 +66,8 @@ class Groups_WordPress {
|
|
66 |
* Extend user capabilities with Groups user capabilities.
|
67 |
*
|
68 |
* @param array $allcaps the capabilities the user has
|
69 |
-
* @param
|
70 |
-
* @param
|
71 |
*/
|
72 |
public static function user_has_cap( $allcaps, $caps, $args ) {
|
73 |
$user_id = isset( $args[1] ) ? $args[1] : null;
|
66 |
* Extend user capabilities with Groups user capabilities.
|
67 |
*
|
68 |
* @param array $allcaps the capabilities the user has
|
69 |
+
* @param array $caps the requested capabilities
|
70 |
+
* @param array $args capability context which can provide the requested capability as $args[0], the user ID as $args[1] and the related object's ID as $args[2]
|
71 |
*/
|
72 |
public static function user_has_cap( $allcaps, $caps, $args ) {
|
73 |
$user_id = isset( $args[1] ) ? $args[1] : null;
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: itthinx
|
|
3 |
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: 3.
|
7 |
-
Stable tag: 1.4.
|
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,12 @@ See also [Groups](http://www.itthinx.com/plugins/groups/)
|
|
177 |
|
178 |
== Changelog ==
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
= 1.4.9 =
|
181 |
* Fixed: Tree view doesn't appear/disappear in menu directly after setting the option.
|
182 |
* Improved: Feedback when options have been saved.
|
@@ -394,6 +400,9 @@ Some installations wouldn't work correctly, showing no capabilities and making i
|
|
394 |
|
395 |
== Upgrade Notice ==
|
396 |
|
|
|
|
|
|
|
397 |
= 1.4.9 =
|
398 |
* UI improvements and API additions.
|
399 |
|
3 |
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: 3.9
|
7 |
+
Stable tag: 1.4.10
|
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.10 =
|
181 |
+
* Improved: code documentation
|
182 |
+
* WordPress 3.9 compatibility checked
|
183 |
+
* Changed some filter usage with prepare() for 3.9 nags.
|
184 |
+
* Fixed unmatched tags in the tree view.
|
185 |
+
|
186 |
= 1.4.9 =
|
187 |
* Fixed: Tree view doesn't appear/disappear in menu directly after setting the option.
|
188 |
* Improved: Feedback when options have been saved.
|
400 |
|
401 |
== Upgrade Notice ==
|
402 |
|
403 |
+
= 1.4.10 =
|
404 |
+
* WordPress 3.9 compatibility checked, improvements and fixes.
|
405 |
+
|
406 |
= 1.4.9 =
|
407 |
* UI improvements and API additions.
|
408 |
|