PluginProbe ʕ •ᴥ•ʔ
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager / 2.9.6
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager v2.9.6
3.1.9 3.1.8 3.1.7 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 trunk 1.3.7 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9 2.9.1 2.9.2
folders / templates / admin / recommended-plugins.php
folders / templates / admin Last commit date
admin-content.php 3 years ago folder-deactivate-form.php 4 years ago folder-popup.php 3 years ago folder-user-settings.php 3 years ago general-settings.php 3 years ago help.php 4 years ago media-cleaning.php 4 years ago media-replace.php 3 years ago recommended-plugins.php 4 years ago update.php 4 years ago upgrade-table.php 3 years ago upgrade-to-pro.php 4 years ago
recommended-plugins.php
520 lines
1 <?php
2 /**
3 * Premio.io Recommended Plugins
4 *
5 * @author : Premio <contact@premio.io>
6 * @license : GPL2
7 * */
8
9 if (! defined('ABSPATH')) {
10 exit;
11 }
12 ?>
13 <style>
14 a.hide-recommended-btn {
15 background: #1da1f4;
16 display: block;
17 float: right;
18 color: #fff;
19 text-decoration: none;
20 padding: 5px 20px;
21 font-size: 18px;
22 /* font-weight: bold; */
23 border-radius: 4px;
24 }
25 .ui-dialog-titlebar {
26 background: none !important;
27 }
28 .ui-dialog {
29 z-index: 999999;
30 text-align: center;
31 }
32 .ui-dialog-buttonpane {
33 border: none;
34 background: transparent;
35 padding-top: 0;
36 }
37 .ui-dialog .ui-dialog-buttonset{
38 float:none;
39 text-align: center;
40 }
41 .ui-dialog .ui-dialog-buttonpane .ui-button {
42 margin: 0 10px;
43 }
44 .ui-dialog-buttonpane .ui-dialog-buttonset .red-btn,
45 .ui-dialog-buttonpane .ui-dialog-buttonset .purple-btn,
46 .ui-dialog-buttonpane .ui-dialog-buttonset .gray-btn {
47 background-color: #ffffff;
48 color: #fff;
49 border-color: #1da1f4;
50 line-height: 1.4;
51 padding: 5px 0;
52 height: auto;
53 display: inline-block;
54 vertical-align: top;
55 font-size: 16px;
56 min-width: 150px;
57 color: #1da1f4;
58 }
59 .ui-dialog-buttonpane .ui-dialog-buttonset .red-btn {
60 background-color: #1da1f4;
61 border-color: #1da1f4;
62 color: #ffffff;
63 }
64 </style>
65 <?php
66 wp_enqueue_style('wp-jquery-ui-dialog');
67 wp_enqueue_script('jquery-ui-dialog');
68 // You may comment this out IF you're sure the function exists.
69 require_once ABSPATH.'wp-admin/includes/plugin-install.php';
70 remove_all_filters('plugins_api');
71 $plugins_allowedtags = [
72 'a' => [
73 'href' => [],
74 'title' => [],
75 'target' => [],
76 ],
77 'abbr' => [ 'title' => [] ],
78 'acronym' => [ 'title' => [] ],
79 'code' => [],
80 'pre' => [],
81 'em' => [],
82 'strong' => [],
83 'ul' => [],
84 'ol' => [],
85 'li' => [],
86 'p' => [],
87 'br' => [],
88 ];
89
90 $recommended_plugins = [];
91 // Poptin Plugins
92 $args = [
93 'slug' => 'poptin',
94 'fields' => [
95 'short_description' => true,
96 'icons' => true,
97 'reviews' => false,
98 // excludes all reviews
99 ],
100 ];
101 $data = plugins_api('plugin_information', $args);
102 if ($data && ! is_wp_error($data)) {
103 $recommended_plugins['poptin'] = $data;
104 $recommended_plugins['poptin']->name = 'Poptin: Beautiful Pop Ups and Embedded Inline Contact Forms for Your Website';
105 $recommended_plugins['poptin']->short_description = 'Pop ups and contact forms builder for your website. Get more sales, leads, and subscribers with beautiful popups & inline forms templates, no coding skills required';
106 }
107
108 // Chaty Plugins
109 $args = [
110 'slug' => 'chaty',
111 'fields' => [
112 'short_description' => true,
113 'icons' => true,
114 'reviews' => false,
115 // excludes all reviews
116 ],
117 ];
118 $data = plugins_api('plugin_information', $args);
119 if ($data && ! is_wp_error($data)) {
120 $recommended_plugins['chaty'] = $data;
121 $recommended_plugins['chaty']->name = 'Chaty: WhatsApp, Facebook Messenger, and Many Other Chat Buttons For Your Website';
122 $recommended_plugins['chaty']->short_description = 'Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, Phone call, SMS and more with customizable chat & call buttons';
123 }
124
125 // mystickyelements Plugins
126 $args = [
127 'slug' => 'mystickyelements',
128 'fields' => [
129 'short_description' => true,
130 'icons' => true,
131 'reviews' => false,
132 // excludes all reviews
133 ],
134 ];
135 $data = plugins_api('plugin_information', $args);
136 if ($data && ! is_wp_error($data)) {
137 $recommended_plugins['mystickyelements'] = $data;
138 $recommended_plugins['mystickyelements']->name = 'All-in-one Floating Contact Form, Call, Chat, and 50+ Social Icon Tabs – My Sticky Elements';
139 $recommended_plugins['mystickyelements']->short_description = 'Add floating form and tabs on any side of your website to help your visitors contact you and easily find your Facebook page, YouTube channel, open hours';
140 }
141
142 // Stars Ttestimonials Plugins
143 $args = [
144 'slug' => 'stars-testimonials-with-slider-and-masonry-grid',
145 'fields' => [
146 'short_description' => true,
147 'icons' => true,
148 'reviews' => false,
149 // excludes all reviews
150 ],
151 ];
152 $data = plugins_api('plugin_information', $args);
153 if ($data && ! is_wp_error($data)) {
154 $recommended_plugins['stars-testimonials'] = $data;
155 $recommended_plugins['stars-testimonials']->name = 'Stars Testimonials: Responsive Testimonials, Social Proof, and Customer Reviews';
156 $recommended_plugins['stars-testimonials']->short_description = 'Simple but yet powerful testimonial WordPress plugin for your website. Display responsive website testimonials and customer reviews with ease and increase conversion rate';
157 }
158
159
160 ?>
161 <div class="wrap mystickyelement-wrap recommended-plugins">
162 <h2>
163 <?php _e('Try out our recommended plugins', 'folders'); ?>
164 <a class="hide-recommended-btn" href="#" class=""><?php _e('Hide From Menu', 'folders');?></a>
165 </h2>
166 </div>
167 <div class="wrap recommended-plugins">
168 <div class="wp-list-table widefat plugin-install">
169 <div class="the-list">
170 <?php
171 foreach ((array) $recommended_plugins as $plugin) {
172 if (is_object($plugin)) {
173 $plugin = (array) $plugin;
174 }
175
176 // Display the group heading if there is one.
177 if (isset($plugin['group']) && $plugin['group'] != $group) {
178 if (isset($this->groups[$plugin['group']])) {
179 $group_name = $this->groups[$plugin['group']];
180 if (isset($plugins_group_titles[$group_name])) {
181 $group_name = $plugins_group_titles[$group_name];
182 }
183 } else {
184 $group_name = $plugin['group'];
185 }
186
187 // Starting a new group, close off the divs of the last one.
188 if (! empty($group)) {
189 echo '</div></div>';
190 }
191
192 echo '<div class="plugin-group"><h3>'.esc_html($group_name).'</h3>';
193 // Needs an extra wrapping div for nth-child selectors to work.
194 echo '<div class="plugin-items">';
195
196 $group = $plugin['group'];
197 }//end if
198
199 $title = wp_kses($plugin['name'], $plugins_allowedtags);
200
201 // Remove any HTML from the description.
202 $description = strip_tags($plugin['short_description']);
203 $version = wp_kses($plugin['version'], $plugins_allowedtags);
204
205 $name = strip_tags($title.' '.$version);
206
207 $author = wp_kses($plugin['author'], $plugins_allowedtags);
208 if (! empty($author)) {
209 // translators: %s: Plugin author.
210 $author = ' <cite>'.sprintf(__('By %s'), $author).'</cite>';
211 }
212
213 $requires_php = isset($plugin['requires_php']) ? $plugin['requires_php'] : null;
214 $requires_wp = isset($plugin['requires']) ? $plugin['requires'] : null;
215
216 $compatible_php = is_php_version_compatible($requires_php);
217 $compatible_wp = is_wp_version_compatible($requires_wp);
218 $tested_wp = ( empty($plugin['tested']) || version_compare(get_bloginfo('version'), $plugin['tested'], '<=') );
219
220 $action_links = [];
221
222 if (current_user_can('install_plugins') || current_user_can('update_plugins')) {
223 $status = install_plugin_install_status($plugin);
224
225 switch ($status['status']) {
226 case 'install':
227 if ($status['url']) {
228 if ($compatible_php && $compatible_wp) {
229 $action_links[] = sprintf(
230 '<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
231 esc_attr($plugin['slug']),
232 esc_url($status['url']),
233 // translators: %s: Plugin name and version.
234 esc_attr(sprintf(_x('Install %s now', 'plugin'), $name)),
235 esc_attr($name),
236 __('Install Now')
237 );
238 } else {
239 $action_links[] = sprintf(
240 '<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
241 _x('Cannot Install', 'plugin')
242 );
243 }
244 }
245 break;
246
247 case 'update_available':
248 if ($status['url']) {
249 if ($compatible_php && $compatible_wp) {
250 $action_links[] = sprintf(
251 '<a class="update-now button aria-button-if-js" data-plugin="%s" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
252 esc_attr($status['file']),
253 esc_attr($plugin['slug']),
254 esc_url($status['url']),
255 // translators: %s: Plugin name and version.
256 esc_attr(sprintf(_x('Update %s now', 'plugin'), $name)),
257 esc_attr($name),
258 __('Update Now')
259 );
260 } else {
261 $action_links[] = sprintf(
262 '<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
263 _x('Cannot Update', 'plugin')
264 );
265 }
266 }
267 break;
268
269 case 'latest_installed':
270 case 'newer_installed':
271 if (is_plugin_active($status['file'])) {
272 $action_links[] = sprintf(
273 '<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
274 _x('Active', 'plugin')
275 );
276 } else if (current_user_can('activate_plugin', $status['file'])) {
277 $button_text = __('Activate');
278 // translators: %s: Plugin name.
279 $button_label = _x('Activate %s', 'plugin');
280 $activate_url = add_query_arg(
281 [
282 '_wpnonce' => wp_create_nonce('activate-plugin_'.$status['file']),
283 'action' => 'activate',
284 'plugin' => $status['file'],
285 ],
286 network_admin_url('plugins.php')
287 );
288
289 if (is_network_admin()) {
290 $button_text = __('Network Activate');
291 // translators: %s: Plugin name.
292 $button_label = _x('Network Activate %s', 'plugin');
293 $activate_url = add_query_arg([ 'networkwide' => 1 ], $activate_url);
294 }
295
296 $action_links[] = sprintf(
297 '<a href="%1$s" class="button activate-now" aria-label="%2$s">%3$s</a>',
298 esc_url($activate_url),
299 esc_attr(sprintf($button_label, $plugin['name'])),
300 $button_text
301 );
302 } else {
303 $action_links[] = sprintf(
304 '<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
305 _x('Installed', 'plugin')
306 );
307 }//end if
308 break;
309 }//end switch
310 }//end if
311
312 $details_link = self_admin_url(
313 'plugin-install.php?tab=plugin-information&amp;plugin='.$plugin['slug'].'&amp;TB_iframe=true&amp;width=600&amp;height=550'
314 );
315
316 $action_links[] = sprintf(
317 '<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>',
318 esc_url($details_link),
319 // translators: %s: Plugin name and version.
320 esc_attr(sprintf(__('More information about %s'), $name)),
321 esc_attr($name),
322 __('More Details')
323 );
324
325 if (! empty($plugin['icons']['svg'])) {
326 $plugin_icon_url = $plugin['icons']['svg'];
327 } else if (! empty($plugin['icons']['2x'])) {
328 $plugin_icon_url = $plugin['icons']['2x'];
329 } else if (! empty($plugin['icons']['1x'])) {
330 $plugin_icon_url = $plugin['icons']['1x'];
331 } else {
332 $plugin_icon_url = $plugin['icons']['default'];
333 }
334
335 /*
336 * Filters the install action links for a plugin.
337 *
338 * @since 2.7.0
339 *
340 * @param string[] $action_links An array of plugin action links. Defaults are links to Details and Install Now.
341 * @param array $plugin The plugin currently being listed.
342 */
343 $action_links = apply_filters('plugin_install_action_links', $action_links, $plugin);
344
345 $last_updated_timestamp = strtotime($plugin['last_updated']);
346 ?>
347 <div class="plugin-card plugin-card-<?php echo sanitize_html_class($plugin['slug']); ?>">
348 <?php
349 if (! $compatible_php || ! $compatible_wp) {
350 echo '<div class="notice inline notice-error notice-alt"><p>';
351 if (! $compatible_php && ! $compatible_wp) {
352 _e('This plugin doesn&#8217;t work with your versions of WordPress and PHP.');
353 if (current_user_can('update_core') && current_user_can('update_php')) {
354 printf(
355 // translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page.
356 ' '.__('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
357 self_admin_url('update-core.php'),
358 esc_url(wp_get_update_php_url())
359 );
360 wp_update_php_annotation('</p><p><em>', '</em>');
361 } else if (current_user_can('update_core')) {
362 printf(
363 // translators: %s: URL to WordPress Updates screen.
364 ' '.__('<a href="%s">Please update WordPress</a>.'),
365 self_admin_url('update-core.php')
366 );
367 } else if (current_user_can('update_php')) {
368 printf(
369 // translators: %s: URL to Update PHP page.
370 ' '.__('<a href="%s">Learn more about updating PHP</a>.'),
371 esc_url(wp_get_update_php_url())
372 );
373 wp_update_php_annotation('</p><p><em>', '</em>');
374 }//end if
375 } else if (! $compatible_wp) {
376 _e('This plugin doesn&#8217;t work with your version of WordPress.');
377 if (current_user_can('update_core')) {
378 printf(
379 // translators: %s: URL to WordPress Updates screen.
380 ' '.__('<a href="%s">Please update WordPress</a>.'),
381 self_admin_url('update-core.php')
382 );
383 }
384 } else if (! $compatible_php) {
385 _e('This plugin doesn&#8217;t work with your version of PHP.');
386 if (current_user_can('update_php')) {
387 printf(
388 // translators: %s: URL to Update PHP page.
389 ' '.__('<a href="%s">Learn more about updating PHP</a>.'),
390 esc_url(wp_get_update_php_url())
391 );
392 wp_update_php_annotation('</p><p><em>', '</em>');
393 }
394 }//end if
395
396 echo '</p></div>';
397 }//end if
398 ?>
399 <div class="plugin-card-top">
400 <div class="name column-name">
401 <h3>
402 <a href="<?php echo esc_url($details_link); ?>" class="thickbox open-plugin-details-modal">
403 <?php echo esc_attr($title); ?>
404 <img src="<?php echo esc_attr($plugin_icon_url); ?>" class="plugin-icon" alt="" />
405 </a>
406 </h3>
407 </div>
408 <div class="action-links">
409 <?php
410 if ($action_links) {
411 echo '<ul class="plugin-action-buttons"><li>'.implode('</li><li>', $action_links).'</li></ul>';
412 }
413 ?>
414 </div>
415 <div class="desc column-description">
416 <p><?php echo esc_attr($description); ?></p>
417 <p class="authors"><?php echo wp_kses($author, $plugins_allowedtags); ?></p>
418 </div>
419 </div>
420 <div class="plugin-card-bottom">
421 <div class="vers column-rating">
422 <?php
423 wp_star_rating(
424 [
425 'rating' => $plugin['rating'],
426 'type' => 'percent',
427 'number' => $plugin['num_ratings'],
428 ]
429 );
430 ?>
431 <span class="num-ratings" aria-hidden="true">(<?php echo number_format_i18n($plugin['num_ratings']); ?>)</span>
432 </div>
433 <div class="column-updated">
434 <strong><?php _e('Last Updated:'); ?></strong>
435 <?php
436 // translators: %s: Human-readable time difference.
437 printf(__('%s ago'), human_time_diff($last_updated_timestamp));
438 ?>
439 </div>
440 <div class="column-downloaded">
441 <?php
442 if ($plugin['active_installs'] >= 1000000) {
443 $active_installs_millions = floor(($plugin['active_installs'] / 1000000));
444 $active_installs_text = sprintf(
445 // translators: %s: Number of millions.
446 _nx('%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations'),
447 number_format_i18n($active_installs_millions)
448 );
449 } else if (0 == $plugin['active_installs']) {
450 $active_installs_text = _x('Less Than 10', 'Active plugin installations');
451 } else {
452 $active_installs_text = number_format_i18n($plugin['active_installs']).'+';
453 }
454
455 // translators: %s: Number of installations.
456 printf(__('%s Active Installations'), $active_installs_text);
457 ?>
458 </div>
459 <div class="column-compatibility">
460 <?php
461 if (! $tested_wp) {
462 echo '<span class="compatibility-untested">'.__('Untested with your version of WordPress').'</span>';
463 } else if (! $compatible_wp) {
464 echo '<span class="compatibility-incompatible">'.__('<strong>Incompatible</strong> with your version of WordPress').'</span>';
465 } else {
466 echo '<span class="compatibility-compatible">'.__('<strong>Compatible</strong> with your version of WordPress').'</span>';
467 }
468 ?>
469 </div>
470 </div>
471 </div>
472 <?php
473 }//end foreach
474 ?>
475 </div>
476 </div>
477 <div id="hide-recommeded-plugins" style="display:none;" title="<?php _e('Are you sure?', 'mystickyelements');?>">
478 <p><?php _e("If you hide the recommended plugins page from your menu, it won't appear there again. Are you sure you'd like to do it?", 'mystickyelements');?></p>
479 </div>
480
481 </div>
482 <script>
483 ( function( $ ) {
484 "use strict";
485 $(document).ready(function(){
486 $('a.hide-recommended-btn').on('click',function(event){
487 event.preventDefault();
488 $( "#hide-recommeded-plugins" ).dialog({
489 resizable: false,
490 modal: true,
491 draggable: false,
492 height: 'auto',
493 width: 400,
494 open: function (event, ui) {
495 $(".ui-widget-overlay").click(function () {
496 $('#hide-recommeded-plugins').dialog('close');
497 });
498 },
499 buttons: {
500 "Hide it": {
501 click: function () {
502 window.location = "<?php echo admin_url('admin.php?page=wcp_folders_settings&hide_folder_recommended_plugin=1&nonce='.wp_create_nonce("folder_recommended_plugin"));?>";
503 },
504 text: 'Hide it',
505 class: 'btn red-btn'
506 },
507 "Keep it": {
508 click: function () {
509 $(this).dialog('close');
510 },
511 text: 'Keep it',
512 class: 'btn alt gray-btn'
513 },
514 }
515 });
516 });
517 });
518 })( jQuery );
519 </script>
520