PluginProbe
Groups – Memberships and Access Control / 1.10.3
Groups – Memberships and Access Control v1.10.3
4.7.1 4.7.0 4.6.0 4.5.0 4.4.0 4.3.0 trunk 1.0.0-beta-1 1.0.0-beta-2 1.0.0-beta-3 1.0.0-beta-3b 1.0.0-beta-3c 1.0.0-beta-3d 1.1.4 1.1.5 1.10.0 1.10.1 1.10.2 1.10.3 1.11.0 1.11.1 1.11.2 1.11.3 1.12.0 1.13.0 All 131 releases
groups / lib / admin / groups-admin-add-ons.php

groups-admin-add-ons.php in Groups – Memberships and Access Control 1.10.3, at lib/admin/groups-admin-add-ons.php

194 lines 7.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 wrap">';
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
186 function groups_admin_add_ons_sort( $e1, $e2 ) {
187 $i1 = isset( $e1['index'] ) ? $e1['index'] : 0;
188 $i2 = isset( $e2['index'] ) ? $e2['index'] : 0;
189 $t1 = isset( $e1['title'] ) ? $e1['title'] : '';
190 $t2 = isset( $e2['title'] ) ? $e2['title'] : '';
191
192 return $i1 - $i2 + strnatcmp( $t1, $t2 );
193 }
194