Slider by WD – Responsive Slider - Version 1.1.91

Version Description

  • Changed: Show notification to install Backup WD plugin only on plugin pages.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Slider by WD – Responsive Slider
Version 1.1.91
Comparing to
See all releases

Code changes from version 1.1.90 to 1.1.91

css/wd_bp_install.css DELETED
@@ -1,46 +0,0 @@
1
- @media only screen and (max-width: 500px) {
2
- body #wd_backup_logo {
3
- max-width: 100%;
4
- }
5
- body #wd_bp_notice_cont p {
6
- padding-right: 25px !important;
7
- }
8
- }
9
-
10
- #wd_bp_logo_notice {
11
- width: 40px;
12
- float: left;
13
- margin-right: 10px;
14
- }
15
-
16
- #wd_bp_notice_cont {
17
- position: relative;
18
- }
19
-
20
- .wds_backup_install p {
21
- padding-top: 0px;
22
- margin-top: 0px;
23
- }
24
-
25
- #wd_bp_notice_cont a {
26
- margin: 0 5px;
27
- }
28
-
29
- #wd_bp_notice_cont .dashicons-dismiss:before {
30
- content: "\f153";
31
- background: 0 0;
32
- color: #72777c;
33
- display: block;
34
- font: 400 16px/20px dashicons;
35
- speak: none;
36
- height: 20px;
37
- text-align: center;
38
- width: 20px;
39
- -webkit-font-smoothing: antialiased;
40
- -moz-osx-font-smoothing: grayscale;
41
- }
42
-
43
- .wd_bp_notice_dissmiss {
44
- margin-top: 5px;
45
- }
46
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
images/backup_logo.png DELETED
Binary file
js/wd_bp_install.js DELETED
@@ -1,12 +0,0 @@
1
- jQuery(document).ready(function () {
2
- /*Ajax hide notice forever */
3
- jQuery(".wd_bp_notice_dissmiss").on("click", function () {
4
- jQuery("#wd_bp_notice_cont").hide();
5
- jQuery.post(wd_bp_url);
6
- })
7
- });
8
-
9
- // Set option status 1 - never show again during install btn click in notice
10
- function wd_bp_notice_install() {
11
- jQuery.post(wd_bp_url);
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
4
  Tags: responsive slider, slider, slideshow, wordpress slider, image slider, gallery slider, images slider, Photo Slider, post slider, slider plugin
5
  Requires at least: 3.4
6
  Tested up to: 4.8
7
- Stable tag: 1.1.90
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -129,6 +129,9 @@ After downloading the ZIP file of the slider plugin,
129
 
130
  == Changelog ==
131
 
 
 
 
132
  = 1.1.90 =
133
  * Removed: Popup to install Backup WD plugin.
134
 
4
  Tags: responsive slider, slider, slideshow, wordpress slider, image slider, gallery slider, images slider, Photo Slider, post slider, slider plugin
5
  Requires at least: 3.4
6
  Tested up to: 4.8
7
+ Stable tag: 1.1.91
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
129
 
130
  == Changelog ==
131
 
132
+ = 1.1.91 =
133
+ * Changed: Show notification to install Backup WD plugin only on plugin pages.
134
+
135
  = 1.1.90 =
136
  * Removed: Popup to install Backup WD plugin.
137
 
slider-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Slider WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-slider-plugin.html
6
  * Description: This is a responsive plugin, which allows adding sliders to your posts/pages and to custom location. It uses large number of transition effects and supports various types of layers.
7
- * Version: 1.1.90
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -13,8 +13,10 @@
13
  define('WD_S_NAME', plugin_basename(dirname(__FILE__)));
14
  define('WD_S_DIR', WP_PLUGIN_DIR . "/" . WD_S_NAME);
15
  define('WD_S_URL', plugins_url(WD_S_NAME));
 
 
16
 
17
- define('WD_S_VERSION', '1.1.90');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
@@ -219,7 +221,6 @@ function wds_preview() {
219
  }
220
 
221
  function wds_media_button($context) {
222
-
223
  global $pagenow;
224
  if (in_array($pagenow, array('post.php', 'page.php', 'post-new.php', 'post-edit.php', 'admin-ajax.php'))) {
225
  $context .= '
@@ -442,10 +443,6 @@ function wds_activate() {
442
  $wpdb->query('INSERT INTO `' . $wpdb->prefix . 'wdsslide` VALUES(2, 1, "Slide 2", "image", "' . WD_S_URL . '/demo/2.jpg", "' . WD_S_URL . '/demo/2-150x150.jpg", 1, "", 2, 0, 0, 0)');
443
  $wpdb->query('INSERT INTO `' . $wpdb->prefix . 'wdsslide` VALUES(3, 1, "Slide 3", "image", "' . WD_S_URL . '/demo/3.jpg", "' . WD_S_URL . '/demo/3-150x150.jpg", 1, "", 3, 0, 0, 0)');
444
  }
445
- // Check if notice or popup already exist for other plugins
446
- if( get_option('wds_bk_notice_status') === false ) {
447
- add_option('wds_bk_notice_status', '');
448
- }
449
  }
450
  register_activation_hook(__FILE__, 'wds_activate');
451
 
@@ -994,58 +991,89 @@ function wds_topic() {
994
  }
995
  add_action('admin_notices', 'wds_topic', 11);
996
 
997
- if (!function_exists('wd_bp_install_notice')) {
998
- $wd_bp_plugin_url = WD_S_URL;
999
- function wd_bp_script_style() {
1000
- global $wd_bp_plugin_url;
1001
- wp_enqueue_script('wd_bck_install', $wd_bp_plugin_url . '/js/wd_bp_install.js', array('jquery'));
1002
- wp_enqueue_style('wd_bck_install', $wd_bp_plugin_url . '/css/wd_bp_install.css');
 
1003
  }
1004
- add_action('admin_enqueue_scripts', 'wd_bp_script_style');
1005
 
1006
- /**
1007
- * Show notice to install backup plugin
1008
- */
1009
- function wd_bp_install_notice() {
1010
- global $wd_bp_plugin_url;
1011
- $prefix = 'wds';
1012
- $meta_value = get_option('wds_bk_notice_status');
1013
- if ($meta_value === '' || $meta_value === false) {
1014
- ob_start();
1015
- ?>
1016
- <div class="notice notice-info" id="wd_bp_notice_cont">
1017
- <p>
1018
- <img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/images/logo.png'; ?>">
1019
- <?php _e("Hey! Install brand new FREE", $prefix) ?>
1020
- <a href="https://wordpress.org/plugins/backup-wd/" title="<?php _e("More details", $prefix) ?>"
1021
- target="_blank"><?php _e("Backup WD", $prefix) ?></a>
1022
- <?php _e("plugin to keep your images and website safe.", $prefix) ?>
1023
- <a class="button button-primary"
1024
- href="<?php echo esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd')); ?>">
1025
- <span onclick="wd_bp_notice_install()"><?php _e("Install", $prefix); ?></span>
1026
- </a>
1027
- </p>
1028
- <button type="button" class="wd_bp_notice_dissmiss notice-dismiss"><span class="screen-reader-text"></span>
1029
- </button>
1030
- </div>
1031
- <script>wd_bp_url = '<?php echo add_query_arg(array('action' => 'wd_bp_dismiss',), admin_url('admin-ajax.php')); ?>'</script>
1032
- <?php
1033
- echo ob_get_clean();
1034
- }
1035
  }
1036
 
1037
- if (!is_dir(plugin_dir_path(__DIR__) . 'backup-wd')) {
1038
- add_action('admin_notices', 'wd_bp_install_notice');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1039
  }
 
1040
 
1041
- /**
1042
- * Add usermeta to db
1043
- *
1044
- * empty: notice,
1045
- * 1 : never show again
1046
- */
1047
- function wd_bp_install_notice_status() {
1048
- update_option('wds_bk_notice_status', '1', 'no');
1049
  }
1050
- add_action('wp_ajax_wd_bp_dismiss', 'wd_bp_install_notice_status');
1051
- }
4
  * Plugin Name: Slider WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-slider-plugin.html
6
  * Description: This is a responsive plugin, which allows adding sliders to your posts/pages and to custom location. It uses large number of transition effects and supports various types of layers.
7
+ * Version: 1.1.91
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
13
  define('WD_S_NAME', plugin_basename(dirname(__FILE__)));
14
  define('WD_S_DIR', WP_PLUGIN_DIR . "/" . WD_S_NAME);
15
  define('WD_S_URL', plugins_url(WD_S_NAME));
16
+ define('WD_S_PREFIX', 'wds');
17
+ define('WD_S_NICENAME', __( 'Slider WD', WD_S_PREFIX ));
18
 
19
+ define('WD_S_VERSION', '1.1.91');
20
 
21
  function wds_use_home_url() {
22
  $home_url = str_replace("http://", "", home_url());
221
  }
222
 
223
  function wds_media_button($context) {
 
224
  global $pagenow;
225
  if (in_array($pagenow, array('post.php', 'page.php', 'post-new.php', 'post-edit.php', 'admin-ajax.php'))) {
226
  $context .= '
443
  $wpdb->query('INSERT INTO `' . $wpdb->prefix . 'wdsslide` VALUES(2, 1, "Slide 2", "image", "' . WD_S_URL . '/demo/2.jpg", "' . WD_S_URL . '/demo/2-150x150.jpg", 1, "", 2, 0, 0, 0)');
444
  $wpdb->query('INSERT INTO `' . $wpdb->prefix . 'wdsslide` VALUES(3, 1, "Slide 3", "image", "' . WD_S_URL . '/demo/3.jpg", "' . WD_S_URL . '/demo/3-150x150.jpg", 1, "", 3, 0, 0, 0)');
445
  }
 
 
 
 
446
  }
447
  register_activation_hook(__FILE__, 'wds_activate');
448
 
991
  }
992
  add_action('admin_notices', 'wds_topic', 11);
993
 
994
+ /**
995
+ * Show notice to install backup plugin
996
+ */
997
+ function wds_bp_install_notice() {
998
+ // Remove old notice.
999
+ if ( get_option('wds_bk_notice_status') !== FALSE ) {
1000
+ update_option('wds_bk_notice_status', '1', 'no');
1001
  }
 
1002
 
1003
+ // Show notice only on plugin pages.
1004
+ if ( !isset($_GET['page']) || strpos(esc_html($_GET['page']), '_wds') === FALSE ) {
1005
+ return '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1006
  }
1007
 
1008
+ $meta_value = get_option('wd_bk_notice_status');
1009
+ if ( $meta_value === '' || $meta_value === FALSE ) {
1010
+ ob_start();
1011
+ $prefix = WD_S_PREFIX;
1012
+ $nicename = WD_S_NICENAME;
1013
+ $url = WD_S_URL;
1014
+ $dismiss_url = add_query_arg(array( 'action' => 'wd_bp_dismiss' ), admin_url('admin-ajax.php'));
1015
+ $install_url = esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=backup-wd'), 'install-plugin_backup-wd'));
1016
+ ?>
1017
+ <div class="notice notice-info" id="wd_bp_notice_cont">
1018
+ <p>
1019
+ <img id="wd_bp_logo_notice" src="<?php echo $url . '/images/logo.png'; ?>" />
1020
+ <?php echo sprintf(__("%s advises: Install brand new FREE %s plugin to keep your images and website safe.", $prefix), $nicename, '<a href="https://wordpress.org/plugins/backup-wd/" title="' . __("More details", $prefix) . '" target="_blank">' . __("Backup WD", $prefix) . '</a>'); ?>
1021
+ <a class="button button-primary" href="<?php echo $install_url; ?>">
1022
+ <span onclick="jQuery.post('<?php echo $dismiss_url; ?>');"><?php _e("Install", $prefix); ?></span>
1023
+ </a>
1024
+ </p>
1025
+ <button type="button" class="wd_bp_notice_dissmiss notice-dismiss" onclick="jQuery('#wd_bp_notice_cont').hide(); jQuery.post('<?php echo $dismiss_url; ?>');"><span class="screen-reader-text"></span></button>
1026
+ </div>
1027
+ <style>
1028
+ @media only screen and (max-width: 500px) {
1029
+ body #wd_backup_logo {
1030
+ max-width: 100%;
1031
+ }
1032
+ body #wd_bp_notice_cont p {
1033
+ padding-right: 25px !important;
1034
+ }
1035
+ }
1036
+ #wd_bp_logo_notice {
1037
+ width: 40px;
1038
+ float: left;
1039
+ margin-right: 10px;
1040
+ }
1041
+ #wd_bp_notice_cont {
1042
+ position: relative;
1043
+ }
1044
+ #wd_bp_notice_cont a {
1045
+ margin: 0 5px;
1046
+ }
1047
+ #wd_bp_notice_cont .dashicons-dismiss:before {
1048
+ content: "\f153";
1049
+ background: 0 0;
1050
+ color: #72777c;
1051
+ display: block;
1052
+ font: 400 16px/20px dashicons;
1053
+ speak: none;
1054
+ height: 20px;
1055
+ text-align: center;
1056
+ width: 20px;
1057
+ -webkit-font-smoothing: antialiased;
1058
+ -moz-osx-font-smoothing: grayscale;
1059
+ }
1060
+ .wd_bp_notice_dissmiss {
1061
+ margin-top: 5px;
1062
+ }
1063
+ </style>
1064
+ <?php
1065
+ echo ob_get_clean();
1066
  }
1067
+ }
1068
 
1069
+ if ( !is_dir(plugin_dir_path(__DIR__) . 'backup-wd') ) {
1070
+ add_action('admin_notices', 'wds_bp_install_notice');
1071
+ }
1072
+
1073
+ if ( !function_exists('wd_bps_install_notice_status') ) {
1074
+ // Add usermeta to db.
1075
+ function wd_bps_install_notice_status() {
1076
+ update_option('wd_bk_notice_status', '1', 'no');
1077
  }
1078
+ add_action('wp_ajax_wd_bp_dismiss', 'wd_bps_install_notice_status');
1079
+ }