mystickymenu
Last commit date
admin
1 month ago
css
1 month ago
fonts
4 years ago
images
1 year ago
js
7 months ago
languages
1 month ago
class-email-signup.php
7 months ago
class-help.php
2 months ago
class-review-box.php
7 months ago
class-upgrade-box.php
9 months ago
index.php
8 years ago
mystickymenu-admin-widgetanalytics.php
7 months 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
9 months ago
mystickymenu.php
1 month ago
mystickymeny-new-welcomebar.php
7 months ago
readme.txt
1 month ago
recommended-plugins.php
7 months ago
stickymenu-dashboard.php
9 months ago
uninstall.php
2 years ago
upgrade-to-pro.php
1 year ago
welcome-bar.php
7 months 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', 'mystickymenu'); ?> |
| 93 | <div class="mystickyelement-contact-form-leads-btn"> |
| 94 | <a href="#" class="create-rule recommeded-plugins-hide"><?php esc_html_e('Hide From Menu', 'mystickymenu');?></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', 'mystickymenu' ), $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', 'mystickymenu' ), $name ) ), |
| 165 | esc_attr( $name ), |
| 166 | esc_html__( 'Install Now', 'mystickymenu' ) |
| 167 | ); |
| 168 | } else { |
| 169 | $action_links[] = sprintf( |
| 170 | '<button type="button" class="button button-disabled" disabled="disabled">%s</button>', |
| 171 | _x( 'Cannot Install', 'plugin', 'mystickymenu' ) |
| 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', 'mystickymenu' ), $name ) ), |
| 187 | esc_attr( $name ), |
| 188 | esc_html__( 'Update Now', 'mystickymenu' ) |
| 189 | ); |
| 190 | } else { |
| 191 | $action_links[] = sprintf( |
| 192 | '<button type="button" class="button button-disabled" disabled="disabled">%s</button>', |
| 193 | _x( 'Cannot Update', 'plugin', 'mystickymenu' ) |
| 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', 'mystickymenu' ) |
| 205 | ); |
| 206 | } elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) { |
| 207 | $button_text = esc_html__( 'Activate', 'mystickymenu' ); |
| 208 | /* translators: %s: Plugin name. */ |
| 209 | $button_label = _x( 'Activate %s', 'plugin', 'mystickymenu' ); |
| 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', 'mystickymenu' ); |
| 221 | /* translators: %s: Plugin name. */ |
| 222 | $button_label = _x( 'Network Activate %s', 'plugin', 'mystickymenu' ); |
| 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', 'mystickymenu' ) |
| 236 | ); |
| 237 | } |
| 238 | break; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | $details_link = self_admin_url( |
| 243 | 'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] . |
| 244 | '&TB_iframe=true&width=600&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', 'mystickymenu' ), $name ) ), |
| 252 | esc_attr( $name ), |
| 253 | esc_html__( 'More Details', 'mystickymenu' ) |
| 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’t work with your versions of WordPress and PHP.', 'mystickymenu' ); |
| 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>.', 'mystickymenu' ), |
| 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>.', 'mystickymenu' ), |
| 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>.', 'mystickymenu' ), |
| 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’t work with your version of WordPress.', 'mystickymenu' ); |
| 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>.', 'mystickymenu' ), |
| 312 | esc_url(self_admin_url( 'update-core.php' )) |
| 313 | ); |
| 314 | } |
| 315 | } elseif ( ! $compatible_php ) { |
| 316 | esc_html_e( 'This plugin doesn’t work with your version of PHP.', 'mystickymenu' ); |
| 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>.', 'mystickymenu' ), |
| 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:', 'mystickymenu' ); ?></strong> |
| 365 | <?php |
| 366 | /* translators: %s: Human-readable time difference. */ |
| 367 | printf( esc_html__( '%s ago', 'mystickymenu' ), 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', 'mystickymenu' ), |
| 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', 'mystickymenu' ); |
| 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', 'mystickymenu' ), $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', 'mystickymenu' ) . '</span>'; |
| 392 | } elseif ( ! $compatible_wp ) { |
| 393 | echo '<span class="compatibility-incompatible">' . __( '<strong>Incompatible</strong> with your version of WordPress', 'mystickymenu' ) . '</span>'; |
| 394 | } else { |
| 395 | echo '<span class="compatibility-compatible">' . __( '<strong>Compatible</strong> with your version of WordPress', 'mystickymenu' ) . '</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?','mystickymenu');?>"> |
| 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?", 'mystickymenu');?></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 |