PluginProbe
Groups – Memberships and Access Control / 4.7.1
Groups – Memberships and Access Control v4.7.1
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
← All changes | lib/admin/groups-admin-add-ons.php +176 -74 1.10.14.7.1 View file →
@@ -23,35 +23,163 @@
23 23 exit;
24 24 }
25 25
26 26 /**
27 - * Renders the content of the Add-Ons section.
27 + * Renders the heading and content container for the Add-Ons section.
28 28 */
29 29 function groups_admin_add_ons() {
30 -
31 30 echo '<div class="groups-admin-add-ons wrap">';
32 -
33 31 echo '<h1>';
34 - echo __( 'Add-Ons', GROUPS_PLUGIN_DOMAIN );
32 + echo esc_html__( 'Add-Ons', 'groups' );
35 33 echo '</h1>';
36 34
37 - echo '<h2>';
38 - echo __( 'Recommended extensions for Groups', GROUPS_PLUGIN_DOMAIN );
39 - echo '</h2>';
35 + echo '<div class="groups-extensions-support-contribute">';
36 + $extensions_box = '<div id="groups-extensions-support">';
37 + $extensions_box .= '<div id="groups-extensions-support-inside">';
38 + $extensions_box .= '<h2>';
39 + $extensions_box .= esc_html__( 'Your support matters!', 'groups' );
40 + $extensions_box .= '</h2>';
41 + $extensions_box .= '<p>';
42 + $extensions_box .= esc_html__( 'Enhanced functionality is available via official extensions for Groups.', 'groups' );
43 + $extensions_box .= '</p>';
44 + $extensions_box .= '<p>';
45 + $extensions_box .= esc_html__( 'By getting an official extension, you fund the work that is necessary to maintain and improve Groups.', 'groups' );
46 + $extensions_box .= '</p>';
47 + $extensions_box .= '</div>';
48 + require_once GROUPS_ADMIN_LIB . '/class-groups-admin-bitcoin.php';
49 + $extensions_box .= Groups_Admin_Bitcoin::get_groups_bitcoin_box( array( 'type' => 'horizontal', 'where' => 'add-ons' ) );
50 + $extensions_box .= '</div>';
51 + echo $extensions_box; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
40 52
53 + echo '</div>'; // .groups-extensions-support-contribute
54 +
55 + groups_admin_add_ons_content();
56 + echo '</div>'; // .groups-admin-add-ons.wrap
57 +}
58 +
59 +/**
60 + * Renders the content of the Add-Ons section.
61 + *
62 + * @param $params array of options (offset is 0 by default and used to adjust heading h2)
63 + */
64 +function groups_admin_add_ons_content( $params = array( 'offset' => 0 ) ) {
65 +
66 + $d = intval( $params['offset'] );
67 + $h2 = sprintf( 'h%d', 2+$d );
68 +
69 + echo "<$h2 class='woocommerce'>"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
70 + echo esc_html__( 'Discover our favorite Extensions for Groups and WooCommerce', 'groups' );
71 + echo "</$h2>"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
72 +
41 73 $entries = array(
74 + 'groups-woocommerce' => array(
75 + 'title' => 'Groups for WooCommerce',
76 + 'content' => 'Sell Memberships with Groups and WooCommerce – the best Group Membership and Access Control solution for WordPress and WooCommerce.',
77 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce/groups-woocommerce.png',
78 + 'url' => 'https://woocommerce.com/products/groups-woocommerce/',
79 + 'index' => 10
80 + ),
81 + 'woocommerce-group-coupons' => array(
82 + 'title' => 'Group Coupons',
83 + 'content' => 'Automatically apply and restrict coupon validity for user groups. Offer exclusive, automatic and targeted discounts for your customers.',
84 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce/group-coupons.png',
85 + 'url' => 'https://woocommerce.com/products/group-coupons/',
86 + 'index' => 20
87 + ),
88 + 'woocommerce-product-search' => array(
89 + 'title' => 'WooCommerce Product Search',
90 + 'content' => 'The perfect Search Engine helps customers to find and buy products quickly – essential for every WooCommerce store.',
91 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce/woocommerce-product-search.png',
92 + 'url' => 'https://woocommerce.com/products/woocommerce-product-search/',
93 + 'index' => 30
94 + ),
95 + 'woocommerce-sales-analysis' => array(
96 + 'title' => 'Sales Analysis',
97 + 'content' => 'Sales Analysis for WooCommerce offers reporting for Marketers & Managers. Get insights on key metrics, international sales, revenue, product and customer trends.',
98 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce/sales-analysis.png',
99 + 'url' => 'https://woocommerce.com/products/sales-analysis-for-woocommerce/',
100 + 'index' => 40
101 + ),
102 + 'volume-discount-coupons' => array(
103 + 'title' => 'Volume Discount Coupons',
104 + 'content' => 'Increase your sales by giving customers coupons and automatic discounts based on the quantities purchased.',
105 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce/volume-discount-coupons.png',
106 + 'url' => 'https://woocommerce.com/shop/volume-discount-coupons/',
107 + 'index' => 50
108 + ),
109 + 'restrict-payment-methods' => array(
110 + 'title' => 'Restrict Payment Methods',
111 + 'content' => 'Limit the use of Payment Methods by Group Memberships, Roles, Countries, and Order Amounts.',
112 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce/restrict-payment-methods.png',
113 + 'url' => 'https://woocommerce.com/products/restrict-payment-methods/',
114 + 'index' => 60
115 + ),
116 + 'woopayments' => array(
117 + 'title' => 'WooPayments',
118 + 'content' => 'The only payment solution fully integrated to Woo. Accept credit/debit cards and local payment options with no setup or monthly fees.',
119 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce/woopayments.png',
120 + 'url' => 'https://woocommerce.com/products/woopayments/',
121 + 'index' => 70
122 + ),
123 + 'woocommerce-subscriptions' => array(
124 + 'title' => 'WooCommerce Subscriptions',
125 + 'content' => 'Let customers subscribe to your products or services and pay on a weekly, monthly or annual basis.',
126 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce/woocommerce-subscriptions.png',
127 + 'url' => 'https://woocommerce.com/products/woocommerce-subscriptions/',
128 + 'index' => 80
129 + ),
130 + 'woo' => array(
131 + 'title' => 'WooCommerce Marketplace',
132 + 'content' => 'Explore more extensions on the WooCommerce Marketplace. Products you can trust, built by the WooCommerce team and trusted partners.',
133 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce/woo.png',
134 + 'url' => 'https://woocommerce.com/products/',
135 + 'index' => 90
136 + )
137 + );
138 + usort( $entries, 'groups_admin_add_ons_sort' );
139 +
140 + echo '<ul class="woocommerce add-ons">';
141 + foreach ( $entries as $key => $entry ) {
142 + echo '<li class="add-on">';
143 + echo sprintf( '<a href="%s">', esc_url( $entry['url'] ) );
144 + echo '<h3>';
145 + echo sprintf( '<img src="%s"/>', esc_url( $entry['image'] ) );
146 + echo '<span class="title">';
147 + echo esc_html( $entry['title'] );
148 + echo '</span>';
149 + echo '</h3>';
150 + echo '<p class="content">';
151 + echo wp_kses_post( $entry['content'] );
152 + echo '</p>';
153 + echo '</a>';
154 + echo '</li>'; // .add-on
155 + }
156 + echo '</ul>'; // .add-ons
157 +
158 + echo "<$h2>"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
159 + echo esc_html__( 'More recommended Extensions for Groups', 'groups' );
160 + echo "</$h2>"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
161 +
162 + $entries = array(
163 + 'groups-drip-content' => array(
164 + 'title' => 'Groups Drip Content',
165 + 'content' => 'Release posts, pages, other post types and embedded content on a schedule. Drip content to members based on user account creation, group memberships or specific dates and times.',
166 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-drip-content.png',
167 + 'url' => 'https://www.itthinx.com/shop/groups-drip-content/',
168 + 'index' => 10
169 + ),
42 170 'groups-file-access' => array(
43 171 'title' => 'Groups File Access',
44 172 '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 173 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-file-access.png',
46 - 'url' => 'http://www.itthinx.com/shop/groups-file-access/',
47 - 'index' => 100
174 + 'url' => 'https://www.itthinx.com/shop/groups-file-access/',
175 + 'index' => 50
48 176 ),
49 177 'groups-forums' => array(
50 178 'title' => 'Groups Forums',
51 179 'content' => 'Groups Forums provides a powerful and yet light-weight forum system for WordPress sites.',
52 180 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-forums.png',
53 - 'url' => 'http://www.itthinx.com/shop/groups-forums/',
181 + 'url' => 'https://www.itthinx.com/shop/groups-forums/',
54 182 'index' => 100
55 183 ),
56 184 'groups-gravity-forms' => array(
57 185 'title' => 'Groups Gravity Forms',
@@ -56,9 +184,9 @@
56 184 'groups-gravity-forms' => array(
57 185 'title' => 'Groups Gravity Forms',
58 186 'content' => 'This extension integrates Groups with Gravity Forms. It allows to add users to groups automatically, based on form submissions.',
59 187 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-gravity-forms.png',
60 - 'url' => 'http://www.itthinx.com/shop/groups-gravity-forms/',
188 + 'url' => 'https://www.itthinx.com/shop/groups-gravity-forms/',
61 189 'index' => 100
62 190 ),
63 191 'groups-import-export' => array(
64 192 'title' => 'Groups Import Export',
@@ -63,44 +191,23 @@
63 191 'groups-import-export' => array(
64 192 'title' => 'Groups Import Export',
65 193 '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 194 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-import-export.png',
67 - 'url' => 'http://www.itthinx.com/shop/groups-import-export/',
195 + 'url' => 'https://www.itthinx.com/shop/groups-import-export/',
68 196 'index' => 100
69 197 ),
70 198 '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.',
199 + 'title' => 'Groups Newsletters',
200 + 'content' => 'Newsletter Campaigns for Subscribers and Groups. Groups Newsletters helps you to communicate efficiently, providing targeted information to groups of recipients through automated campaigns. Integrated with WooCommerce, lets customers subscribe to newsletters at checkout.',
73 201 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-newsletters.png',
74 - 'url' => 'http://www.itthinx.com/shop/groups-newsletters/',
202 + 'url' => 'https://www.itthinx.com/shop/groups-newsletters/',
75 203 'index' => 100
76 204 ),
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 205 'groups-restrict-categories' => array(
85 206 'title' => 'Groups Restrict Categories',
86 207 'content' => 'Access restrictions for categories and tags, also supporting custom post types and taxonomies.',
87 208 '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/',
209 + 'url' => 'https://www.itthinx.com/shop/groups-restrict-categories/',
103 210 'index' => 20
104 211 ),
105 212 'widgets-control-pro' => array(
106 213 'title' => 'Widgets Control Pro',
@@ -105,38 +212,26 @@
105 212 'widgets-control-pro' => array(
106 213 'title' => 'Widgets Control Pro',
107 214 '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 215 '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/',
216 + 'url' => 'https://www.itthinx.com/shop/widgets-control-pro/',
117 217 '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 - ),
218 + )
126 219 );
127 220 usort( $entries, 'groups_admin_add_ons_sort' );
128 221
129 - echo '<ul class="add-ons">';
130 - foreach( $entries as $key => $entry ) {
222 + echo '<ul class="groups add-ons">';
223 + foreach ( $entries as $key => $entry ) {
131 224 echo '<li class="add-on">';
132 - echo sprintf( '<a href="%s">', $entry['url'] );
225 + echo sprintf( '<a href="%s">', esc_url( $entry['url'] ) );
133 226 echo '<h3>';
134 - echo sprintf( '<img src="%s"/>', $entry['image'] );
135 - echo $entry['title'];
227 + echo sprintf( '<img src="%s"/>', esc_url( $entry['image'] ) );
228 + echo '<span class="title">';
229 + echo esc_html( $entry['title'] );
230 + echo '</span>';
136 231 echo '</h3>';
137 232 echo '<p>';
138 - echo $entry['content'];
233 + echo wp_kses_post( $entry['content'] );
139 234 echo '</p>';
140 235 echo '</a>';
141 236 echo '</li>'; // .add-on
142 237 }
@@ -141,11 +236,11 @@
141 236 echo '</li>'; // .add-on
142 237 }
143 238 echo '</ul>'; // .add-ons
144 239
145 - echo '<h2>';
146 - echo __( 'Recommended plugins by itthinx', GROUPS_PLUGIN_DOMAIN );
147 - echo '</h2>';
240 + echo "<$h2>"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
241 + echo esc_html__( 'Other recommended Tools', 'groups' );
242 + echo "</$h2>"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
148 243
149 244 $entries = array(
150 245 'affiliates-pro' => array(
151 246 'title' => 'Affiliates Pro',
@@ -150,38 +245,45 @@
150 245 'affiliates-pro' => array(
151 246 'title' => 'Affiliates Pro',
152 247 'content' => 'Boost Sales with Affiliate Marketing for your WordPress site.',
153 248 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-pro.png',
154 - 'url' => 'http://www.itthinx.com/shop/affiliates-pro/',
155 - 'index' => 100
249 + 'url' => 'https://www.itthinx.com/shop/affiliates-pro/',
250 + 'index' => 10
156 251 ),
157 252 'affiliates-enterprise' => array(
158 253 'title' => 'Affiliates Enterprise',
159 254 '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 255 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-enterprise.png',
161 - 'url' => 'http://www.itthinx.com/shop/affiliates-enterprise/',
162 - 'index' => 100
256 + 'url' => 'https://www.itthinx.com/shop/affiliates-enterprise/',
257 + 'index' => 20
163 258 ),
259 + 'itthinx-mail-queue' => array(
260 + 'title' => 'Itthinx Mail Queue',
261 + 'content' => 'Features a fully automated SMTP email queue that substantially improves the way emails are sent out from your site. Prioritize sending by origin, eliminate delays for your visitors and balance your resources.',
262 + 'image' => GROUPS_PLUGIN_URL . 'images/add-ons/itthinx-mail-queue.png',
263 + 'url' => 'https://www.itthinx.com/shop/itthinx-mail-queue/',
264 + 'index' => 30
265 + )
164 266 );
165 267 usort( $entries, 'groups_admin_add_ons_sort' );
166 268
167 - echo '<ul class="add-ons">';
168 - foreach( $entries as $key => $entry ) {
269 + echo '<ul class="other add-ons">';
270 + foreach ( $entries as $key => $entry ) {
169 271 echo '<li class="add-on">';
170 - echo sprintf( '<a href="%s">', $entry['url'] );
272 + echo sprintf( '<a href="%s">', esc_url( $entry['url'] ) );
171 273 echo '<h3>';
172 - echo sprintf( '<img src="%s"/>', $entry['image'] );
173 - echo $entry['title'];
274 + echo sprintf( '<img src="%s"/>', esc_url( $entry['image'] ) );
275 + echo '<span class="title">';
276 + echo esc_html( $entry['title'] );
277 + echo '</span>';
174 278 echo '</h3>';
175 279 echo '<p>';
176 - echo $entry['content'];
280 + echo wp_kses_post( $entry['content'] );
177 281 echo '</p>';
178 282 echo '</a>';
179 283 echo '</li>'; // .add-on
180 284 }
181 285 echo '</ul>'; // .add-ons
182 -
183 - echo '</div>'; // .groups-admin-add-ons
184 286 }
185 287
186 288 function groups_admin_add_ons_sort( $e1, $e2 ) {
187 289 $i1 = isset( $e1['index'] ) ? $e1['index'] : 0;