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