Slider by WD – Responsive Slider - Version 1.1.45

Version Description

  • Added: Option whether include scripts only on necessary pages or no.
Download this release

Release Info

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

Code changes from version 1.1.44 to 1.1.45

admin/controllers/WDSControllerGoptions_wds.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WDSControllerGoptions_wds {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+
18
+ }
19
+ ////////////////////////////////////////////////////////////////////////////////////////
20
+ // Public Methods //
21
+ ////////////////////////////////////////////////////////////////////////////////////////
22
+
23
+ public function execute() {
24
+ $task = WDW_S_Library::get('task');
25
+ $id = WDW_S_Library::get('current_id', 0);
26
+ $message = WDW_S_Library::get('message');
27
+ echo WDW_S_Library::message_id($message);
28
+ if (method_exists($this, $task)) {
29
+ check_admin_referer('nonce_wd', 'nonce_wd');
30
+ $this->$task($id);
31
+ }
32
+ else {
33
+ $this->display();
34
+ }
35
+ }
36
+
37
+ public function display() {
38
+ require_once WD_S_DIR . "/admin/models/WDSModelGoptions_wds.php";
39
+ $model = new WDSModelGoptions_wds();
40
+
41
+ require_once WD_S_DIR . "/admin/views/WDSViewGoptions_wds.php";
42
+ $view = new WDSViewGoptions_wds($model);
43
+ $view->display();
44
+ }
45
+
46
+ public function save() {
47
+ $wds_register_scripts = (isset($_REQUEST['wds_register_scripts']) ? (int) $_REQUEST['wds_register_scripts'] : 0);
48
+ if (get_option("wds_register_scripts") !== false) {
49
+ update_option("wds_register_scripts", $wds_register_scripts);
50
+ }
51
+ else {
52
+ add_option("wds_register_scripts", $wds_register_scripts, 0, 'no');
53
+ }
54
+ $page = WDW_S_Library::get('page');
55
+ WDW_S_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => 1), admin_url('admin.php')));
56
+ }
57
+ }
admin/models/WDSModelGoptions_wds.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+
3
+ class WDSModelGoptions_wds {}
admin/views/WDSViewGoptions_wds.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WDSViewGoptions_wds {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ // Constructor & Destructor //
17
+ ////////////////////////////////////////////////////////////////////////////////////////
18
+ public function __construct($model) {
19
+ $this->model = $model;
20
+ }
21
+ ////////////////////////////////////////////////////////////////////////////////////////
22
+ // Public Methods //
23
+ ////////////////////////////////////////////////////////////////////////////////////////
24
+
25
+ public function display() {
26
+ $register_scripts = get_option("wds_register_scripts", 0);
27
+ ?>
28
+ <div style="clear: both; float: left; width: 99%;">
29
+ <div style="float: left; font-size: 14px; font-weight: bold;">
30
+ This section allows you to edit global options for sliders.
31
+ <a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-slider-wd/adding-images.html">Read More in User Manual</a>
32
+ </div>
33
+ </div>
34
+ <div class="clear"></div>
35
+ <form class="wrap wds_form" id="sliders_form" method="post" action="admin.php?page=goptions_wds" style="width: 99%;" enctype="multipart/form-data">
36
+ <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
37
+ <div class="wds-options-page-banner">
38
+ <div class="wds-options-logo"></div>
39
+ <div class="wds-options-logo-title">
40
+ <?php _e('Global Options', 'wds'); ?>
41
+ </div>
42
+ <div class="wds-page-actions">
43
+ <button class="wds_button-secondary wds_save_slider" onclick="spider_set_input_value('task', 'save');">
44
+ <span></span>
45
+ <?php _e('Save', 'wds'); ?>
46
+ </button>
47
+ </div>
48
+ </div>
49
+ <table>
50
+ <tbody>
51
+ <tr>
52
+ <td class="spider_label"><label><?php _e('Include scripts only on necessary pages', 'wds'); ?>:</label></td>
53
+ <td>
54
+ <input type="radio" id="wds_register_scripts1" name="wds_register_scripts" <?php echo (($register_scripts == 1)? "checked='checked'" : ""); ?> value="1" /><label <?php echo ($register_scripts ? 'class="selected_color"' : ''); ?> for="wds_register_scripts1"><?php _e('Yes', 'wds'); ?></label>
55
+ <input type="radio" id="wds_register_scripts0" name="wds_register_scripts" <?php echo (($register_scripts == 0)? "checked='checked'" : ""); ?> value="0" /><label <?php echo ($register_scripts ? '' : 'class="selected_color"'); ?> for="wds_register_scripts0"><?php _e('No', 'wds'); ?></label>
56
+ <div class="spider_description"><?php _e('Helps to decrease page load time. Might not function with some custom themes.', 'wds'); ?></div>
57
+ </td>
58
+ </tr>
59
+ </tbody>
60
+ </table>
61
+ <input id="task" name="task" type="hidden" value="" />
62
+ </form>
63
+ <?php
64
+ }
65
+ }
css/wds_tables.css CHANGED
@@ -1734,4 +1734,34 @@ th.sorted a span {
1734
 
1735
  .no-items .colspanchange {
1736
  padding: 8px 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1737
  }
1734
 
1735
  .no-items .colspanchange {
1736
  padding: 8px 10px;
1737
+ }
1738
+
1739
+ .wds-options-page-banner {
1740
+ background: #fff;
1741
+ display: block;
1742
+ height: 40px;
1743
+ padding: 10px;
1744
+ }
1745
+
1746
+ .wds-options-logo {
1747
+ display: inline-block;
1748
+ background: url("../images/sliderwdpng/goption.png");
1749
+ background-repeat: no-repeat;
1750
+ width: 42px;
1751
+ height: 38px;
1752
+ vertical-align: bottom;
1753
+ }
1754
+
1755
+ .wds-options-logo-title {
1756
+ text-transform: uppercase;
1757
+ display: inline-block;
1758
+ font-size: 16px;
1759
+ vertical-align: middle;
1760
+ margin-left: 10px;
1761
+ line-height: 40px;
1762
+ }
1763
+
1764
+ .wds-page-actions {
1765
+ float: right;
1766
+ padding: 4px 0;
1767
  }
frontend/views/WDSViewSlider.php CHANGED
@@ -23,14 +23,16 @@ class WDSViewSlider {
23
  // Public Methods //
24
  ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display($id, $from_shortcode = 0, $wds = 0) {
26
- wp_enqueue_style('wds_frontend');
27
- wp_enqueue_style('wds_effects');
28
- wp_enqueue_style('wds_font-awesome');
29
- wp_enqueue_style('wds_googlefonts');
30
-
31
- if ($wds === 0) {
32
- wp_print_scripts('wds_jquery_mobile');
33
- wp_print_scripts('wds_frontend');
 
 
34
  }
35
 
36
  require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
23
  // Public Methods //
24
  ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display($id, $from_shortcode = 0, $wds = 0) {
26
+ $wds_register_scripts = get_option("wds_register_scripts");
27
+ if ($wds_register_scripts) {
28
+ wp_enqueue_style('wds_frontend');
29
+ wp_enqueue_style('wds_effects');
30
+ wp_enqueue_style('wds_font-awesome');
31
+ wp_enqueue_style('wds_googlefonts');
32
+ if ($wds === 0) {
33
+ wp_print_scripts('wds_jquery_mobile');
34
+ wp_print_scripts('wds_frontend');
35
+ }
36
  }
37
 
38
  require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
images/sliderwdpng/goption.png ADDED
Binary file
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: webdorado
3
  Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
4
  Tags: image slider, slider, slideshow, image, images, responsive, shortcode, widget, jquery, gallery, swipe, layer
5
- Requires at least: 4.0
6
  Tested up to: 4.5
7
- Stable tag: 1.1.44
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -160,6 +160,9 @@ After downloading the ZIP file of the slider plugin,
160
 
161
  == Changelog ==
162
 
 
 
 
163
  = 1.1.44 =
164
  * Fixed: Conflict with "Yoast SEO" plugin.
165
  * Fixed: Case sensitive search by name in Filemanager bug.
2
  Contributors: webdorado
3
  Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
4
  Tags: image slider, slider, slideshow, image, images, responsive, shortcode, widget, jquery, gallery, swipe, layer
5
+ Requires at least: 3.4
6
  Tested up to: 4.5
7
+ Stable tag: 1.1.45
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
160
 
161
  == Changelog ==
162
 
163
+ = 1.1.45 =
164
+ * Added: Option whether include scripts only on necessary pages or no.
165
+
166
  = 1.1.44 =
167
  * Fixed: Conflict with "Yoast SEO" plugin.
168
  * Fixed: Case sensitive search by name in Filemanager bug.
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.44
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -14,7 +14,7 @@ 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.44');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
@@ -50,6 +50,10 @@ function wds_options_panel() {
50
  add_action('admin_print_styles-' . $sliders_page, 'wds_styles');
51
  add_action('admin_print_scripts-' . $sliders_page, 'wds_scripts');
52
 
 
 
 
 
53
  add_submenu_page('sliders_wds', 'Get Pro', 'Get Pro', 'manage_options', 'licensing_wds', 'wds_licensing');
54
  add_submenu_page('sliders_wds', 'Featured Plugins', 'Featured Plugins', 'manage_options', 'featured_plugins_wds', 'wds_featured');
55
  add_submenu_page('sliders_wds', 'Featured Themes', 'Featured Themes', 'manage_options', 'featured_themes_wds', 'wds_featured_themes');
@@ -73,7 +77,7 @@ function wd_sliders() {
73
  }
74
  require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
75
  $page = WDW_S_Library::get('page');
76
- if (($page != '') && (($page == 'sliders_wds') || ($page == 'uninstall_wds') || ($page == 'WDSShortcode'))) {
77
  require_once(WD_S_DIR . '/admin/controllers/WDSController' . (($page == 'WDSShortcode') ? $page : ucfirst(strtolower($page))) . '.php');
78
  $controller_class = 'WDSController' . ucfirst(strtolower($page));
79
  $controller = new $controller_class();
@@ -505,13 +509,6 @@ function wds_scripts() {
505
  }
506
 
507
  function wds_front_end_scripts() {
508
- wp_register_script('wds_jquery_mobile', WD_S_FRONT_URL . '/js/jquery.mobile.js', array('jquery'), WD_S_VERSION);
509
-
510
- wp_register_script('wds_frontend', WD_S_FRONT_URL . '/js/wds_frontend.js', array('jquery'), WD_S_VERSION);
511
- wp_register_style('wds_frontend', WD_S_FRONT_URL . '/css/wds_frontend.css', array(), WD_S_VERSION);
512
- wp_register_style('wds_effects', WD_S_FRONT_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
513
-
514
- wp_register_style('wds_font-awesome', WD_S_FRONT_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
515
  global $wpdb;
516
  $rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "wdslayer ORDER BY `depth` ASC");
517
  $font_array = array();
@@ -523,7 +520,35 @@ function wds_front_end_scripts() {
523
  $query = implode("|", $font_array);
524
  if ($query != '') {
525
  $url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
526
- wp_register_style('wds_googlefonts', $url, null, null);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
527
  }
528
  }
529
  add_action('wp_enqueue_scripts', 'wds_front_end_scripts');
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.45
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
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.45');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
50
  add_action('admin_print_styles-' . $sliders_page, 'wds_styles');
51
  add_action('admin_print_scripts-' . $sliders_page, 'wds_scripts');
52
 
53
+ $global_options_page = add_submenu_page('sliders_wds', 'Global Options', 'Global Options', 'manage_options', 'goptions_wds', 'wd_sliders');
54
+ add_action('admin_print_styles-' . $global_options_page, 'wds_styles');
55
+ add_action('admin_print_scripts-' . $global_options_page, 'wds_scripts');
56
+
57
  add_submenu_page('sliders_wds', 'Get Pro', 'Get Pro', 'manage_options', 'licensing_wds', 'wds_licensing');
58
  add_submenu_page('sliders_wds', 'Featured Plugins', 'Featured Plugins', 'manage_options', 'featured_plugins_wds', 'wds_featured');
59
  add_submenu_page('sliders_wds', 'Featured Themes', 'Featured Themes', 'manage_options', 'featured_themes_wds', 'wds_featured_themes');
77
  }
78
  require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
79
  $page = WDW_S_Library::get('page');
80
+ if (($page != '') && (($page == 'sliders_wds') || ($page == 'uninstall_wds') || ($page == 'WDSShortcode') || ($page == 'goptions_wds'))) {
81
  require_once(WD_S_DIR . '/admin/controllers/WDSController' . (($page == 'WDSShortcode') ? $page : ucfirst(strtolower($page))) . '.php');
82
  $controller_class = 'WDSController' . ucfirst(strtolower($page));
83
  $controller = new $controller_class();
509
  }
510
 
511
  function wds_front_end_scripts() {
 
 
 
 
 
 
 
512
  global $wpdb;
513
  $rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "wdslayer ORDER BY `depth` ASC");
514
  $font_array = array();
520
  $query = implode("|", $font_array);
521
  if ($query != '') {
522
  $url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
523
+ }
524
+
525
+ $wds_register_scripts = get_option("wds_register_scripts");
526
+
527
+ if (!$wds_register_scripts) {
528
+ wp_enqueue_script('wds_jquery_mobile', WD_S_FRONT_URL . '/js/jquery.mobile.js', array('jquery'), WD_S_VERSION);
529
+
530
+ wp_enqueue_script('wds_frontend', WD_S_FRONT_URL . '/js/wds_frontend.js', array('jquery'), WD_S_VERSION);
531
+ wp_enqueue_style('wds_frontend', WD_S_FRONT_URL . '/css/wds_frontend.css', array(), WD_S_VERSION);
532
+ wp_enqueue_style('wds_effects', WD_S_FRONT_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
533
+
534
+ wp_enqueue_style('wds_font-awesome', WD_S_FRONT_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
535
+
536
+ if ($query != '') {
537
+ wp_enqueue_style('wds_googlefonts', $url, null, null);
538
+ }
539
+ }
540
+ else {
541
+ wp_register_script('wds_jquery_mobile', WD_S_FRONT_URL . '/js/jquery.mobile.js', array('jquery'), WD_S_VERSION);
542
+
543
+ wp_register_script('wds_frontend', WD_S_FRONT_URL . '/js/wds_frontend.js', array('jquery'), WD_S_VERSION);
544
+ wp_register_style('wds_frontend', WD_S_FRONT_URL . '/css/wds_frontend.css', array(), WD_S_VERSION);
545
+ wp_register_style('wds_effects', WD_S_FRONT_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
546
+
547
+ wp_register_style('wds_font-awesome', WD_S_FRONT_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
548
+
549
+ if ($query != '') {
550
+ wp_register_style('wds_googlefonts', $url, null, null);
551
+ }
552
  }
553
  }
554
  add_action('wp_enqueue_scripts', 'wds_front_end_scripts');