Groups - Version 1.8.0

Version Description

  • WordPress 4.3.1 compatibility tested.
  • Add-ons section added.
Download this release

Release Info

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

Code changes from version 1.7.2 to 1.8.0

css/groups_admin.css CHANGED
@@ -267,3 +267,43 @@ div.groups-footer form {
267
  font-size: 16px;
268
  }
269
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  font-size: 16px;
268
  }
269
  }
270
+
271
+ .groups-admin-add-ons ul {
272
+ list-style: none;
273
+ display: block;
274
+ padding: 0;
275
+ overflow: hidden;
276
+ }
277
+ .groups-admin-add-ons li {
278
+ float: left;
279
+ margin: 0 1em 1em 0;
280
+ padding: 8px;
281
+ vertical-align: top;
282
+ width: 256px;
283
+ height: 158px;
284
+ background-color: #fff;
285
+ border: 1px solid #ccc;
286
+ }
287
+ .groups-admin-add-ons h3 {
288
+ margin: 0;
289
+ display: block;
290
+ clear: both;
291
+ }
292
+ .groups-admin-add-ons h3 img {
293
+ vertical-align: middle;
294
+ margin: 0 8px 0 0;
295
+ display: block;
296
+ float: left;
297
+ }
298
+ .groups-admin-add-ons a {
299
+ text-decoration: none;
300
+ display: block;
301
+ overflow: hidden;
302
+ }
303
+ .groups-admin-add-ons p {
304
+ margin: 0;
305
+ padding-top: 8px;
306
+ clear: both;
307
+ display: block;
308
+ color: #333;
309
+ }
groups.php CHANGED
@@ -21,7 +21,7 @@
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.7.2
25
  * Author: itthinx
26
  * Author URI: http://www.itthinx.com
27
  * Donate-Link: http://www.itthinx.com
@@ -30,7 +30,7 @@
30
  if ( !defined( 'ABSPATH' ) ) {
31
  exit;
32
  }
33
- define( 'GROUPS_CORE_VERSION', '1.7.2' );
34
  define( 'GROUPS_FILE', __FILE__ );
35
  if ( !defined( 'GROUPS_CORE_DIR' ) ) {
36
  define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
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.8.0
25
  * Author: itthinx
26
  * Author URI: http://www.itthinx.com
27
  * Donate-Link: http://www.itthinx.com
30
  if ( !defined( 'ABSPATH' ) ) {
31
  exit;
32
  }
33
+ define( 'GROUPS_CORE_VERSION', '1.8.0' );
34
  define( 'GROUPS_FILE', __FILE__ );
35
  if ( !defined( 'GROUPS_CORE_DIR' ) ) {
36
  define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
images/add-ons/affiliates-enterprise.png ADDED
Binary file
images/add-ons/affiliates-pro.png ADDED
Binary file
images/add-ons/groups-file-access.png ADDED
Binary file
images/add-ons/groups-forums.png ADDED
Binary file
images/add-ons/groups-gravity-forms.png ADDED
Binary file
images/add-ons/groups-import-export.png ADDED
Binary file
images/add-ons/groups-newsletters.png ADDED
Binary file
images/add-ons/groups-paypal.png ADDED
Binary file
images/add-ons/groups-restrict-categories.png ADDED
Binary file
images/add-ons/groups-restrict-comments-pro.png ADDED
Binary file
images/add-ons/groups-woocommerce.png ADDED
Binary file
images/add-ons/widgets-control-pro.png ADDED
Binary file
images/add-ons/woocommerce-group-coupons.png ADDED
Binary file
images/add-ons/woocommerce-groups-newsletters.png ADDED
Binary file
lib/admin/class-groups-admin.php CHANGED
@@ -149,6 +149,7 @@ class Groups_Admin {
149
  include_once( GROUPS_ADMIN_LIB . '/groups-admin-groups.php');
150
  include_once( GROUPS_ADMIN_LIB . '/groups-admin-capabilities.php');
151
  include_once( GROUPS_ADMIN_LIB . '/groups-admin-options.php');
 
152
 
153
  $pages = array();
154
 
@@ -213,6 +214,19 @@ class Groups_Admin {
213
  add_action( 'admin_print_styles-' . $page, array( __CLASS__, 'admin_print_styles' ) );
214
  add_action( 'admin_print_scripts-' . $page, array( __CLASS__, 'admin_print_scripts' ) );
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  do_action( 'groups_admin_menu', $pages );
217
  }
218
 
149
  include_once( GROUPS_ADMIN_LIB . '/groups-admin-groups.php');
150
  include_once( GROUPS_ADMIN_LIB . '/groups-admin-capabilities.php');
151
  include_once( GROUPS_ADMIN_LIB . '/groups-admin-options.php');
152
+ include_once( GROUPS_ADMIN_LIB . '/groups-admin-add-ons.php');
153
 
154
  $pages = array();
155
 
214
  add_action( 'admin_print_styles-' . $page, array( __CLASS__, 'admin_print_styles' ) );
215
  add_action( 'admin_print_scripts-' . $page, array( __CLASS__, 'admin_print_scripts' ) );
216
 
217
+ // add-ons
218
+ $page = add_submenu_page(
219
+ 'groups-admin',
220
+ __( 'Groups Add-Ons', GROUPS_PLUGIN_DOMAIN ),
221
+ __( 'Add-Ons', GROUPS_PLUGIN_DOMAIN ),
222
+ GROUPS_ACCESS_GROUPS,
223
+ 'groups-admin-add-ons',
224
+ apply_filters( 'groups_add_submenu_page_function', 'groups_admin_add_ons' )
225
+ );
226
+ $pages[] = $page;
227
+ add_action( 'admin_print_styles-' . $page, array( __CLASS__, 'admin_print_styles' ) );
228
+ add_action( 'admin_print_scripts-' . $page, array( __CLASS__, 'admin_print_scripts' ) );
229
+
230
  do_action( 'groups_admin_menu', $pages );
231
  }
232
 
lib/admin/groups-admin-add-ons.php ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * groups-admin-add-ons.php
4
+ *
5
+ * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
6
+ *
7
+ * This code is released under the GNU General Public License.
8
+ * See COPYRIGHT.txt and LICENSE.txt.
9
+ *
10
+ * This code is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * This header and all notices must be kept intact.
16
+ *
17
+ * @author Karim Rahimpur
18
+ * @package groups
19
+ * @since groups 1.8.0
20
+ */
21
+
22
+ if ( !defined( 'ABSPATH' ) ) {
23
+ exit;
24
+ }
25
+
26
+ /**
27
+ * Renders the content of the Add-Ons section.
28
+ */
29
+ function groups_admin_add_ons() {
30
+
31
+ echo '<div class="groups-admin-add-ons">';
32
+
33
+ echo '<h1>';
34
+ echo __( 'Add-Ons', GROUPS_PLUGIN_DOMAIN );
35
+ echo '</h1>';
36
+
37
+ echo '<h2>';
38
+ echo __( 'Recommended extensions for Groups', GROUPS_PLUGIN_DOMAIN );
39
+ echo '</h2>';
40
+
41
+ $entries = array(
42
+ 'groups-file-access' => array(
43
+ 'title' => 'Groups File Access',
44
+ 'content' => 'Groups File Access is a WordPress plugin that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.',
45
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-file-access.png',
46
+ 'url' => 'http://www.itthinx.com/shop/groups-file-access/',
47
+ 'index' => 100
48
+ ),
49
+ 'groups-forums' => array(
50
+ 'title' => 'Groups Forums',
51
+ 'content' => 'Groups Forums provides a powerful and yet light-weight forum system for WordPress sites.',
52
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-forums.png',
53
+ 'url' => 'http://www.itthinx.com/shop/groups-forums/',
54
+ 'index' => 100
55
+ ),
56
+ 'groups-gravity-forms' => array(
57
+ 'title' => 'Groups Gravity Forms',
58
+ 'content' => 'This extension integrates Groups with Gravity Forms. It allows to add users to groups automatically, based on form submissions.',
59
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-gravity-forms.png',
60
+ 'url' => 'http://www.itthinx.com/shop/groups-gravity-forms/',
61
+ 'index' => 100
62
+ ),
63
+ 'groups-import-export' => array(
64
+ 'title' => 'Groups Import Export',
65
+ 'content' => 'This is an extension for Groups, providing import and export facilities. Users can be imported and assigned to groups in bulk from a text file. Users can be exported in bulk, including all users or users that belong to specific groups.',
66
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-import-export.png',
67
+ 'url' => 'http://www.itthinx.com/shop/groups-import-export/',
68
+ 'index' => 100
69
+ ),
70
+ 'groups-newsletters' => array(
71
+ 'title' => 'Groups Newsletter',
72
+ 'content' => 'Newsletter Campaigns for Subscribers and Groups. Groups Newsletters helps you to communicate efficiently, providing targeted information to groups of recipients through automated campaigns.',
73
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-newsletters.png',
74
+ 'url' => 'http://www.itthinx.com/shop/groups-newsletters/',
75
+ 'index' => 100
76
+ ),
77
+ 'groups-paypal' => array(
78
+ 'title' => 'Groups PayPal',
79
+ 'content' => 'Sell memberships and subscriptions with Groups and PayPal.',
80
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-paypal.png',
81
+ 'url' => 'http://www.itthinx.com/shop/groups-paypal/',
82
+ 'index' => 10
83
+ ),
84
+ 'groups-restrict-categories' => array(
85
+ 'title' => 'Groups Restrict Categories',
86
+ 'content' => 'Access restrictions for categories and tags, also supporting custom post types and taxonomies.',
87
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-restrict-categories.png',
88
+ 'url' => 'http://www.itthinx.com/shop/groups-restrict-categories/',
89
+ 'index' => 10
90
+ ),
91
+ 'groups-restrict-comments-pro' => array(
92
+ 'title' => 'Groups Restrict Comments Pro',
93
+ 'content' => 'This extension allows to restrict who can post or read comments based on a user’s group membership.',
94
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-restrict-comments-pro.png',
95
+ 'url' => 'http://www.itthinx.com/shop/groups-restrict-comments-pro/',
96
+ 'index' => 100
97
+ ),
98
+ 'groups-woocommerce' => array(
99
+ 'title' => 'Groups WooCommerce',
100
+ 'content' => 'This extension allows you to sell memberships with WooCommerce.',
101
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-woocommerce.png',
102
+ 'url' => 'http://www.itthinx.com/shop/groups-woocommerce/',
103
+ 'index' => 20
104
+ ),
105
+ 'widgets-control-pro' => array(
106
+ 'title' => 'Widgets Control Pro',
107
+ 'content' => 'An advanced Widget toolbox that adds visibility management and helps to control where widgets are shown efficiently. Show or hide widgets based on a user’s group membership.',
108
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/widgets-control-pro.png',
109
+ 'url' => 'http://www.itthinx.com/shop/widgets-control-pro/',
110
+ 'index' => 20
111
+ ),
112
+ 'woocommerce-group-coupons' => array(
113
+ 'title' => 'WooCommerce Group Coupons',
114
+ 'content' => 'This extension allows to limit the validity of coupons based on groups and roles.',
115
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-group-coupons.png',
116
+ 'url' => 'http://www.itthinx.com/shop/woocommerce-group-coupons/',
117
+ 'index' => 100
118
+ ),
119
+ 'woocommerce-groups-newsletters' => array(
120
+ 'title' => 'WooCommerce Groups Newsletters',
121
+ 'content' => 'The WooCommerce Groups Newsletters extension lets customers subscribe to newsletters at checkout.',
122
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-groups-newsletters.png',
123
+ 'url' => 'http://www.itthinx.com/shop/woocommerce-groups-newsletters/',
124
+ 'index' => 100
125
+ ),
126
+ );
127
+ usort( $entries, 'groups_admin_add_ons_sort' );
128
+
129
+ echo '<ul class="add-ons">';
130
+ foreach( $entries as $key => $entry ) {
131
+ echo '<li class="add-on">';
132
+ echo sprintf( '<a href="%s">', $entry['url'] );
133
+ echo '<h3>';
134
+ echo sprintf( '<img src="%s"/>', $entry['image'] );
135
+ echo $entry['title'];
136
+ echo '</h3>';
137
+ echo '<p>';
138
+ echo $entry['content'];
139
+ echo '</p>';
140
+ echo '</a>';
141
+ echo '</li>'; // .add-on
142
+ }
143
+ echo '</ul>'; // .add-ons
144
+
145
+ echo '<h2>';
146
+ echo __( 'Recommended plugins by itthinx', GROUPS_PLUGIN_DOMAIN );
147
+ echo '</h2>';
148
+
149
+ $entries = array(
150
+ 'affiliates-pro' => array(
151
+ 'title' => 'Affiliates Pro',
152
+ 'content' => 'Boost Sales with Affiliate Marketing for your WordPress site.',
153
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-pro.png',
154
+ 'url' => 'http://www.itthinx.com/shop/affiliates-pro/',
155
+ 'index' => 100
156
+ ),
157
+ 'affiliates-enterprise' => array(
158
+ 'title' => 'Affiliates Enterprise',
159
+ 'content' => 'Affiliates Enterprise provides an affiliate management system for sellers, shops and developers, who want to boost sales with their own affiliate program. Features affiliate campaigns, tracking pixels and multiple tiers.',
160
+ 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-enterprise.png',
161
+ 'url' => 'http://www.itthinx.com/shop/affiliates-enterprise/',
162
+ 'index' => 100
163
+ ),
164
+ );
165
+ usort( $entries, 'groups_admin_add_ons_sort' );
166
+
167
+ echo '<ul class="add-ons">';
168
+ foreach( $entries as $key => $entry ) {
169
+ echo '<li class="add-on">';
170
+ echo sprintf( '<a href="%s">', $entry['url'] );
171
+ echo '<h3>';
172
+ echo sprintf( '<img src="%s"/>', $entry['image'] );
173
+ echo $entry['title'];
174
+ echo '</h3>';
175
+ echo '<p>';
176
+ echo $entry['content'];
177
+ echo '</p>';
178
+ echo '</a>';
179
+ echo '</li>'; // .add-on
180
+ }
181
+ echo '</ul>'; // .add-ons
182
+
183
+ echo '</div>'; // .groups-admin-add-ons
184
+
185
+ Groups_Help::footer();
186
+ }
187
+
188
+ function groups_admin_add_ons_sort( $e1, $e2 ) {
189
+ $i1 = isset( $e1['index'] ) ? $e1['index'] : 0;
190
+ $i2 = isset( $e2['index'] ) ? $e2['index'] : 0;
191
+ $t1 = isset( $e1['title'] ) ? $e1['title'] : '';
192
+ $t2 = isset( $e2['title'] ) ? $e2['title'] : '';
193
+
194
+ return $i1 - $i2 + strnatcmp( $t1, $t2 );
195
+ }
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: 4.0
6
- Tested up to: 4.3
7
- Stable tag: 1.7.2
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.
@@ -181,6 +181,10 @@ See also [Groups](http://www.itthinx.com/plugins/groups/)
181
 
182
  == Changelog ==
183
 
 
 
 
 
184
  = 1.7.2 =
185
  * WordPress 4.3 compatibility tested.
186
  * Updated the menu position constant (string instead of number).
@@ -483,5 +487,5 @@ Some installations wouldn't work correctly, showing no capabilities and making i
483
 
484
  == Upgrade Notice ==
485
 
486
- = 1.7.2 =
487
- This release has been tested with WordPress 4.3 and contains minor internal changes related to the Groups menu, Groups and Capabilities screens.
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: 4.0
6
+ Tested up to: 4.3.1
7
+ Stable tag: 1.8.0
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.
181
 
182
  == Changelog ==
183
 
184
+ = 1.8.0 =
185
+ * WordPress 4.3.1 compatibility tested.
186
+ * Add-ons section added.
187
+
188
  = 1.7.2 =
189
  * WordPress 4.3 compatibility tested.
190
  * Updated the menu position constant (string instead of number).
487
 
488
  == Upgrade Notice ==
489
 
490
+ = 1.8.0 =
491
+ This release has been tested with WordPress 4.3.1 and includes a section for recommended add-ons.