Version Description
- Changed: Add scripts and styles only on pages where necessary.
Download this release
Release Info
Developer | webdorado |
Plugin | Slider by WD – Responsive Slider |
Version | 1.1.37 |
Comparing to | |
See all releases |
Code changes from version 1.1.36 to 1.1.37
- admin/views/WDSViewUninstall_wds.php +2 -3
- frontend/views/WDSViewSlider.php +9 -0
- readme.txt +5 -2
- slider-wd.php +27 -30
admin/views/WDSViewUninstall_wds.php
CHANGED
@@ -93,9 +93,8 @@ class WDSViewUninstall_wds {
|
|
93 |
global $wpdb;
|
94 |
$this->model->delete_db_tables();
|
95 |
$prefix = $wpdb->prefix;
|
96 |
-
$
|
97 |
-
$deactivate_url =
|
98 |
-
$deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_' . $plugin_dir_name . '/slider-wd.php');
|
99 |
?>
|
100 |
<div id="message" class="wd_updated fade">
|
101 |
<p>The following Database Tables successfully deleted:</p>
|
93 |
global $wpdb;
|
94 |
$this->model->delete_db_tables();
|
95 |
$prefix = $wpdb->prefix;
|
96 |
+
$deactivate_url = add_query_arg(array('action' => 'deactivate', 'plugin' => WD_S_NAME . '/slider-wd.php'), admin_url('plugins.php'));
|
97 |
+
$deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_' . WD_S_NAME . '/slider-wd.php');
|
|
|
98 |
?>
|
99 |
<div id="message" class="wd_updated fade">
|
100 |
<p>The following Database Tables successfully deleted:</p>
|
frontend/views/WDSViewSlider.php
CHANGED
@@ -23,6 +23,15 @@ class WDSViewSlider {
|
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display($id, $from_shortcode = 0, $wds = 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
|
27 |
$slider_row = $this->model->get_slider_row_data($id);
|
28 |
if (!$slider_row) {
|
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 |
+
wp_enqueue_script('jquery');
|
32 |
+
wp_enqueue_script('wds_jquery_mobile');
|
33 |
+
wp_enqueue_script('wds_frontend');
|
34 |
+
|
35 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
|
36 |
$slider_row = $this->model->get_slider_row_data($id);
|
37 |
if (!$slider_row) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -160,8 +160,11 @@ After downloading the ZIP file of the slider plugin,
|
|
160 |
|
161 |
== Changelog ==
|
162 |
|
|
|
|
|
|
|
163 |
= 1.1.36 =
|
164 |
-
* Changed: Save
|
165 |
|
166 |
= 1.1.35 =
|
167 |
* Fixed: Save slider with big amount of slides.
|
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.37
|
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.37 =
|
164 |
+
* Changed: Add scripts and styles only on pages where necessary.
|
165 |
+
|
166 |
= 1.1.36 =
|
167 |
+
* Changed: Save relative urls in database instead of absolute urls.
|
168 |
|
169 |
= 1.1.35 =
|
170 |
* Fixed: Save slider with big amount of slides.
|
slider-wd.php
CHANGED
@@ -4,14 +4,17 @@
|
|
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.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
*/
|
12 |
|
13 |
-
define('
|
14 |
-
define('
|
|
|
|
|
|
|
15 |
|
16 |
function wds_use_home_url() {
|
17 |
$home_url = str_replace("http://", "", home_url());
|
@@ -87,7 +90,7 @@ function wds_licensing() {
|
|
87 |
else {
|
88 |
die('Access Denied');
|
89 |
}
|
90 |
-
wp_register_style('wds_licensing', WD_S_URL . '/licensing/style.css', array(),
|
91 |
wp_print_styles('wds_licensing');
|
92 |
require_once(WD_S_DIR . '/licensing/licensing.php');
|
93 |
}
|
@@ -102,7 +105,7 @@ function wds_featured() {
|
|
102 |
die('Access Denied');
|
103 |
}
|
104 |
require_once(WD_S_DIR . '/featured/featured.php');
|
105 |
-
wp_register_style('wds_featured', WD_S_URL . '/featured/style.css', array(),
|
106 |
wp_print_styles('wds_featured');
|
107 |
spider_featured('slider_wd');
|
108 |
}
|
@@ -117,7 +120,7 @@ function wds_featured_themes() {
|
|
117 |
die('Access Denied');
|
118 |
}
|
119 |
require_once(WD_S_DIR . '/featured/featured_themes.php');
|
120 |
-
wp_register_style('wds_featured_themes', WD_S_URL . '/featured/themes_style.css', array(),
|
121 |
wp_print_styles('wds_featured_themes');
|
122 |
spider_featured_themes();
|
123 |
}
|
@@ -132,7 +135,7 @@ function wds_demo_sliders() {
|
|
132 |
die('Access Denied');
|
133 |
}
|
134 |
require_once(WD_S_DIR . '/demo_sliders/demo_sliders.php');
|
135 |
-
wp_register_style('wds_demo_sliders', WD_S_URL . '/demo_sliders/style.css', array(),
|
136 |
wp_print_styles('wds_demo_sliders');
|
137 |
spider_demo_sliders();
|
138 |
}
|
@@ -195,17 +198,16 @@ function wds_preview() {
|
|
195 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
|
196 |
$page = WDW_S_Library::get('action');
|
197 |
if ($page != '' && $page == 'WDSPreview') {
|
198 |
-
$version = get_option("wds_version");
|
199 |
wp_print_scripts('jquery');
|
200 |
-
wp_register_script('wds_jquery_mobile', WD_S_URL . '/js/jquery.mobile.js', array(),
|
201 |
wp_print_scripts('wds_jquery_mobile');
|
202 |
-
wp_register_style('wds_frontend', WD_S_URL . '/css/wds_frontend.css', array(),
|
203 |
wp_print_styles('wds_frontend');
|
204 |
-
wp_register_style('wds_effects', WD_S_URL . '/css/wds_effects.css', array(),
|
205 |
wp_print_styles('wds_effects');
|
206 |
wp_register_style('wds_font-awesome', WD_S_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
|
207 |
wp_print_styles('wds_font-awesome');
|
208 |
-
wp_register_script('wds_frontend', WD_S_URL . '/js/wds_frontend.js', array(),
|
209 |
wp_print_scripts('wds_frontend');
|
210 |
$google_fonts = WDW_S_Library::get_google_fonts(); $query = implode("|", str_replace(' ', '+', $google_fonts));
|
211 |
?>
|
@@ -435,7 +437,7 @@ register_activation_hook(__FILE__, 'wds_activate');
|
|
435 |
|
436 |
function wds_install() {
|
437 |
$version = get_option("wds_version");
|
438 |
-
$new_version =
|
439 |
if ($version && version_compare($version, $new_version, '<')) {
|
440 |
require_once WD_S_DIR . "/sliders-update.php";
|
441 |
wds_update($version);
|
@@ -455,11 +457,10 @@ if (!isset($_GET['action']) || $_GET['action'] != 'deactivate') {
|
|
455 |
|
456 |
// Plugin styles.
|
457 |
function wds_styles() {
|
458 |
-
$version = get_option("wds_version");
|
459 |
wp_admin_css('thickbox');
|
460 |
-
wp_enqueue_style('wds_tables', WD_S_URL . '/css/wds_tables.css', array(),
|
461 |
-
wp_enqueue_style('wds_tables_640', WD_S_URL . '/css/wds_tables_640.css', array(),
|
462 |
-
wp_enqueue_style('wds_tables_320', WD_S_URL . '/css/wds_tables_320.css', array(),
|
463 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php'); $google_fonts = WDW_S_Library::get_google_fonts(); $query = implode("|", str_replace(' ', '+', $google_fonts));
|
464 |
$url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
|
465 |
wp_enqueue_style('wds_googlefonts', $url, null, null);
|
@@ -467,33 +468,29 @@ function wds_styles() {
|
|
467 |
|
468 |
// Plugin scripts.
|
469 |
function wds_scripts() {
|
470 |
-
$version = get_option("wds_version");
|
471 |
wp_enqueue_media();
|
472 |
wp_enqueue_script('thickbox');
|
473 |
wp_enqueue_script('jquery');
|
474 |
wp_enqueue_script('jquery-ui-sortable');
|
475 |
wp_enqueue_script('jquery-ui-draggable');
|
476 |
wp_enqueue_script('jquery-ui-tooltip');
|
477 |
-
wp_enqueue_script('wds_admin', WD_S_URL . '/js/wds.js', array(),
|
478 |
wp_enqueue_script('jscolor', WD_S_URL . '/js/jscolor/jscolor.js', array(), '1.3.9');
|
479 |
wp_enqueue_style('wds_font-awesome', WD_S_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
|
480 |
-
wp_enqueue_style('wds_effects', WD_S_URL . '/css/wds_effects.css', array(),
|
481 |
-
wp_enqueue_style('wds_tooltip', WD_S_URL . '/css/jquery-ui-1.10.3.custom.css', array(),
|
482 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
|
483 |
wp_localize_script('wds_admin', 'wds_objectGGF', WDW_S_Library::get_google_fonts());
|
484 |
}
|
485 |
|
486 |
function wds_front_end_scripts() {
|
487 |
-
|
488 |
-
wp_enqueue_script('jquery');
|
489 |
-
|
490 |
-
wp_enqueue_script('wds_jquery_mobile', WD_S_FRONT_URL . '/js/jquery.mobile.js', array(), $version);
|
491 |
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
|
496 |
-
|
497 |
global $wpdb;
|
498 |
$rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "wdslayer ORDER BY `depth` ASC");
|
499 |
$font_array = array();
|
@@ -505,7 +502,7 @@ function wds_front_end_scripts() {
|
|
505 |
$query = implode("|", $font_array);
|
506 |
if ($query != '') {
|
507 |
$url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
|
508 |
-
|
509 |
}
|
510 |
}
|
511 |
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.37
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
*/
|
12 |
|
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.37');
|
18 |
|
19 |
function wds_use_home_url() {
|
20 |
$home_url = str_replace("http://", "", home_url());
|
90 |
else {
|
91 |
die('Access Denied');
|
92 |
}
|
93 |
+
wp_register_style('wds_licensing', WD_S_URL . '/licensing/style.css', array(), WD_S_VERSION);
|
94 |
wp_print_styles('wds_licensing');
|
95 |
require_once(WD_S_DIR . '/licensing/licensing.php');
|
96 |
}
|
105 |
die('Access Denied');
|
106 |
}
|
107 |
require_once(WD_S_DIR . '/featured/featured.php');
|
108 |
+
wp_register_style('wds_featured', WD_S_URL . '/featured/style.css', array(), WD_S_VERSION);
|
109 |
wp_print_styles('wds_featured');
|
110 |
spider_featured('slider_wd');
|
111 |
}
|
120 |
die('Access Denied');
|
121 |
}
|
122 |
require_once(WD_S_DIR . '/featured/featured_themes.php');
|
123 |
+
wp_register_style('wds_featured_themes', WD_S_URL . '/featured/themes_style.css', array(), WD_S_VERSION);
|
124 |
wp_print_styles('wds_featured_themes');
|
125 |
spider_featured_themes();
|
126 |
}
|
135 |
die('Access Denied');
|
136 |
}
|
137 |
require_once(WD_S_DIR . '/demo_sliders/demo_sliders.php');
|
138 |
+
wp_register_style('wds_demo_sliders', WD_S_URL . '/demo_sliders/style.css', array(), WD_S_VERSION);
|
139 |
wp_print_styles('wds_demo_sliders');
|
140 |
spider_demo_sliders();
|
141 |
}
|
198 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
|
199 |
$page = WDW_S_Library::get('action');
|
200 |
if ($page != '' && $page == 'WDSPreview') {
|
|
|
201 |
wp_print_scripts('jquery');
|
202 |
+
wp_register_script('wds_jquery_mobile', WD_S_URL . '/js/jquery.mobile.js', array(), WD_S_VERSION);
|
203 |
wp_print_scripts('wds_jquery_mobile');
|
204 |
+
wp_register_style('wds_frontend', WD_S_URL . '/css/wds_frontend.css', array(), WD_S_VERSION);
|
205 |
wp_print_styles('wds_frontend');
|
206 |
+
wp_register_style('wds_effects', WD_S_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
|
207 |
wp_print_styles('wds_effects');
|
208 |
wp_register_style('wds_font-awesome', WD_S_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
|
209 |
wp_print_styles('wds_font-awesome');
|
210 |
+
wp_register_script('wds_frontend', WD_S_URL . '/js/wds_frontend.js', array(), WD_S_VERSION);
|
211 |
wp_print_scripts('wds_frontend');
|
212 |
$google_fonts = WDW_S_Library::get_google_fonts(); $query = implode("|", str_replace(' ', '+', $google_fonts));
|
213 |
?>
|
437 |
|
438 |
function wds_install() {
|
439 |
$version = get_option("wds_version");
|
440 |
+
$new_version = WD_S_VERSION;
|
441 |
if ($version && version_compare($version, $new_version, '<')) {
|
442 |
require_once WD_S_DIR . "/sliders-update.php";
|
443 |
wds_update($version);
|
457 |
|
458 |
// Plugin styles.
|
459 |
function wds_styles() {
|
|
|
460 |
wp_admin_css('thickbox');
|
461 |
+
wp_enqueue_style('wds_tables', WD_S_URL . '/css/wds_tables.css', array(), WD_S_VERSION);
|
462 |
+
wp_enqueue_style('wds_tables_640', WD_S_URL . '/css/wds_tables_640.css', array(), WD_S_VERSION);
|
463 |
+
wp_enqueue_style('wds_tables_320', WD_S_URL . '/css/wds_tables_320.css', array(), WD_S_VERSION);
|
464 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php'); $google_fonts = WDW_S_Library::get_google_fonts(); $query = implode("|", str_replace(' ', '+', $google_fonts));
|
465 |
$url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
|
466 |
wp_enqueue_style('wds_googlefonts', $url, null, null);
|
468 |
|
469 |
// Plugin scripts.
|
470 |
function wds_scripts() {
|
|
|
471 |
wp_enqueue_media();
|
472 |
wp_enqueue_script('thickbox');
|
473 |
wp_enqueue_script('jquery');
|
474 |
wp_enqueue_script('jquery-ui-sortable');
|
475 |
wp_enqueue_script('jquery-ui-draggable');
|
476 |
wp_enqueue_script('jquery-ui-tooltip');
|
477 |
+
wp_enqueue_script('wds_admin', WD_S_URL . '/js/wds.js', array(), WD_S_VERSION);
|
478 |
wp_enqueue_script('jscolor', WD_S_URL . '/js/jscolor/jscolor.js', array(), '1.3.9');
|
479 |
wp_enqueue_style('wds_font-awesome', WD_S_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
|
480 |
+
wp_enqueue_style('wds_effects', WD_S_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
|
481 |
+
wp_enqueue_style('wds_tooltip', WD_S_URL . '/css/jquery-ui-1.10.3.custom.css', array(), WD_S_VERSION);
|
482 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
|
483 |
wp_localize_script('wds_admin', 'wds_objectGGF', WDW_S_Library::get_google_fonts());
|
484 |
}
|
485 |
|
486 |
function wds_front_end_scripts() {
|
487 |
+
wp_register_script('wds_jquery_mobile', WD_S_FRONT_URL . '/js/jquery.mobile.js', array('jquery'), WD_S_VERSION);
|
|
|
|
|
|
|
488 |
|
489 |
+
wp_register_script('wds_frontend', WD_S_FRONT_URL . '/js/wds_frontend.js', array('jquery'), WD_S_VERSION);
|
490 |
+
wp_register_style('wds_frontend', WD_S_FRONT_URL . '/css/wds_frontend.css', array(), WD_S_VERSION);
|
491 |
+
wp_register_style('wds_effects', WD_S_FRONT_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
|
492 |
|
493 |
+
wp_register_style('wds_font-awesome', WD_S_FRONT_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
|
494 |
global $wpdb;
|
495 |
$rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "wdslayer ORDER BY `depth` ASC");
|
496 |
$font_array = array();
|
502 |
$query = implode("|", $font_array);
|
503 |
if ($query != '') {
|
504 |
$url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
|
505 |
+
wp_register_style('wds_googlefonts', $url, null, null);
|
506 |
}
|
507 |
}
|
508 |
add_action('wp_enqueue_scripts', 'wds_front_end_scripts');
|