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