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