Version Description
- Fixed: Minor bug depend on PHP version.
Download this release
Release Info
Developer | webdorado |
Plugin | Slider by WD – Responsive Slider |
Version | 1.2.7 |
Comparing to | |
See all releases |
Code changes from version 1.2.6 to 1.2.7
- admin/views/AdminView.php +2 -1
- readme.txt +4 -1
- slider-wd.php +39 -39
admin/views/AdminView.php
CHANGED
@@ -311,12 +311,13 @@ class AdminView_bwg {
|
|
311 |
<?php
|
312 |
foreach ( $filters as $filter_key => $filter_values ) {
|
313 |
$filter_by_key = 'filter-by-' . $filter_key;
|
|
|
314 |
?>
|
315 |
<label for="filter-by-<?php echo $filter_key ?>" class="screen-reader-text"><?php echo $filter_values['label']; ?></label>
|
316 |
<select class="wd-filter" name="filter[filter-by-<?php echo $filter_key ?>]" id="filter-by-<?php echo $filter_key ?>">
|
317 |
<?php
|
318 |
foreach ( $filter_values['items'] as $item_key => $item_value ) {
|
319 |
-
$selected =
|
320 |
?>
|
321 |
<option <?php echo $selected; ?> value="<?php echo $item_key ?>"><?php echo $item_value ?></option>
|
322 |
<?php
|
311 |
<?php
|
312 |
foreach ( $filters as $filter_key => $filter_values ) {
|
313 |
$filter_by_key = 'filter-by-' . $filter_key;
|
314 |
+
$filter_by = WDW_S_Library::get($filter_by_key, '');
|
315 |
?>
|
316 |
<label for="filter-by-<?php echo $filter_key ?>" class="screen-reader-text"><?php echo $filter_values['label']; ?></label>
|
317 |
<select class="wd-filter" name="filter[filter-by-<?php echo $filter_key ?>]" id="filter-by-<?php echo $filter_key ?>">
|
318 |
<?php
|
319 |
foreach ( $filter_values['items'] as $item_key => $item_value ) {
|
320 |
+
$selected = ($filter_by == $item_key ? 'selected' : '');
|
321 |
?>
|
322 |
<option <?php echo $selected; ?> value="<?php echo $item_key ?>"><?php echo $item_value ?></option>
|
323 |
<?php
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: responsive slider, slider, slideshow, wordpress slider, image slider, gall
|
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.2
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -405,6 +405,9 @@ The good part of this is that you can have a text slider with its picture slide,
|
|
405 |
|
406 |
== Changelog ==
|
407 |
|
|
|
|
|
|
|
408 |
= 1.2.6 =
|
409 |
* Changed: Main PHP file structure.
|
410 |
* Changed: GET variable in slider edit page.
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.2
|
7 |
+
Stable tag: 1.2.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
405 |
|
406 |
== Changelog ==
|
407 |
|
408 |
+
= 1.2.7 =
|
409 |
+
* Fixed: Minor bug depend on PHP version.
|
410 |
+
|
411 |
= 1.2.6 =
|
412 |
* Changed: Main PHP file structure.
|
413 |
* Changed: GET variable in slider edit page.
|
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.2.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -79,8 +79,8 @@ final class WDS {
|
|
79 |
$this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
|
80 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
81 |
$this->main_file = plugin_basename(__FILE__);
|
82 |
-
$this->plugin_version = '1.2.
|
83 |
-
$this->db_version = '1.2.
|
84 |
$this->prefix = 'wds';
|
85 |
$this->nicename = __('Slider WD', $this->prefix);
|
86 |
$this->use_home_url();
|
@@ -116,8 +116,8 @@ final class WDS {
|
|
116 |
* Add actions.
|
117 |
*/
|
118 |
private function add_actions() {
|
119 |
-
register_activation_hook(__FILE__, array($this, 'activate'));
|
120 |
add_action('init', array($this, 'init'), 9);
|
|
|
121 |
add_action('admin_menu', array( $this, 'admin_menu' ) );
|
122 |
|
123 |
add_action('admin_notices', array($this, 'topic'), 11);
|
@@ -157,11 +157,11 @@ final class WDS {
|
|
157 |
if ( !$this->is_free ) {
|
158 |
add_action('wp_ajax_wds_addEmbed', array($this, 'add_embed_ajax'));
|
159 |
}
|
160 |
-
|
161 |
add_action('wp_enqueue_scripts', array($this, 'front_end_scripts'));
|
162 |
add_action('admin_enqueue_scripts', array($this, 'register_admin_scripts'));
|
163 |
|
164 |
-
|
165 |
|
166 |
add_action('admin_notices', array($this, 'topic'), 11);
|
167 |
add_filter( 'media_upload_tabs', array($this, 'custom_media_upload_tab_name') );
|
@@ -180,8 +180,8 @@ final class WDS {
|
|
180 |
*/
|
181 |
public function init() {
|
182 |
ob_start();
|
|
|
183 |
add_action('init', array($this, 'language_load'));
|
184 |
-
add_action('init', array($this, 'overview'), 9);
|
185 |
add_action('init', array($this, 'register_post_types'));
|
186 |
}
|
187 |
|
@@ -198,7 +198,7 @@ final class WDS {
|
|
198 |
$sliders_page = add_submenu_page($parent_slug, __('Sliders', $this->prefix), __('Sliders', $this->prefix), 'manage_options', 'sliders_'. $this->prefix, array($this, 'admin_pages_new'));
|
199 |
add_action('admin_print_styles-' . $sliders_page, array($this, 'admin_styles'));
|
200 |
add_action('admin_print_scripts-' . $sliders_page, array($this, 'admin_scripts'));
|
201 |
-
|
202 |
|
203 |
$global_options_page = add_submenu_page($parent_slug, __('Options', $this->prefix), __('Options', $this->prefix), 'manage_options', 'goptions_wds', array($this, 'admin_pages'));
|
204 |
add_action('admin_print_styles-' . $global_options_page, array($this, 'admin_styles'));
|
@@ -220,13 +220,13 @@ final class WDS {
|
|
220 |
/**
|
221 |
* Admin pages.
|
222 |
*/
|
223 |
-
|
224 |
$allowed_pages = array(
|
225 |
'sliders_' . $this->prefix,
|
226 |
);
|
227 |
$page = WDW_S_Library::get('page');
|
228 |
if ( !empty($page) && in_array($page, $allowed_pages) ) {
|
229 |
-
|
230 |
$controller_page = $this->plugin_dir . '/admin/controllers/' . $page . '.php';
|
231 |
$model_page = $this->plugin_dir . '/admin/models/' . $page . '.php';
|
232 |
$view_page = $this->plugin_dir . '/admin/views/' . $page . '.php';
|
@@ -253,21 +253,21 @@ final class WDS {
|
|
253 |
echo wp_sprintf(__('The %s class not exist.', $this->prefix), '"<b>' . $controller_class . '</b>"');
|
254 |
return FALSE;
|
255 |
}
|
256 |
-
|
257 |
if ( class_exists($view_class) ) {
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
if ( class_exists($view_class) ) {
|
262 |
-
|
263 |
} else {
|
264 |
echo wp_sprintf(__('The %s class not exist.', $this->prefix), '"<b>' . $view_class . '</b>"');
|
265 |
return FALSE;
|
266 |
-
|
267 |
$controller = new $controller_class( array(
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
$controller->execute();
|
272 |
}
|
273 |
}
|
@@ -290,24 +290,24 @@ final class WDS {
|
|
290 |
}
|
291 |
}
|
292 |
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
/**
|
312 |
* Licensing page.
|
313 |
*/
|
@@ -459,7 +459,7 @@ final class WDS {
|
|
459 |
$page = WDW_S_Library::get('action');
|
460 |
$tab = WDW_S_Library::get('tab');
|
461 |
|
462 |
-
// $query_url = wp_nonce_url($query_url, 'addImage', $this->nonce);
|
463 |
if ( (($page != '') && (($page == 'addImage') || ($page == 'addMusic')))
|
464 |
|| $tab == 'wds_custom_uploader' ) {
|
465 |
if ( $tab != 'wds_custom_uploader' ) {
|
@@ -850,7 +850,7 @@ final class WDS {
|
|
850 |
register_post_type('wds-slider', $args);
|
851 |
}
|
852 |
|
853 |
-
function
|
854 |
if (is_admin() && !isset($_REQUEST['ajax'])) {
|
855 |
if (!class_exists("DoradoWeb")) {
|
856 |
require_once($this->plugin_dir . '/wd/start.php');
|
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.2.7
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
79 |
$this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
|
80 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
81 |
$this->main_file = plugin_basename(__FILE__);
|
82 |
+
$this->plugin_version = '1.2.7';
|
83 |
+
$this->db_version = '1.2.7';
|
84 |
$this->prefix = 'wds';
|
85 |
$this->nicename = __('Slider WD', $this->prefix);
|
86 |
$this->use_home_url();
|
116 |
* Add actions.
|
117 |
*/
|
118 |
private function add_actions() {
|
|
|
119 |
add_action('init', array($this, 'init'), 9);
|
120 |
+
register_activation_hook(__FILE__, array($this, 'activate'));
|
121 |
add_action('admin_menu', array( $this, 'admin_menu' ) );
|
122 |
|
123 |
add_action('admin_notices', array($this, 'topic'), 11);
|
157 |
if ( !$this->is_free ) {
|
158 |
add_action('wp_ajax_wds_addEmbed', array($this, 'add_embed_ajax'));
|
159 |
}
|
160 |
+
// Register scripts/styles.
|
161 |
add_action('wp_enqueue_scripts', array($this, 'front_end_scripts'));
|
162 |
add_action('admin_enqueue_scripts', array($this, 'register_admin_scripts'));
|
163 |
|
164 |
+
add_filter('set-screen-option', array($this, 'set_option_sliders'), 10, 3);
|
165 |
|
166 |
add_action('admin_notices', array($this, 'topic'), 11);
|
167 |
add_filter( 'media_upload_tabs', array($this, 'custom_media_upload_tab_name') );
|
180 |
*/
|
181 |
public function init() {
|
182 |
ob_start();
|
183 |
+
$this->wds_overview();
|
184 |
add_action('init', array($this, 'language_load'));
|
|
|
185 |
add_action('init', array($this, 'register_post_types'));
|
186 |
}
|
187 |
|
198 |
$sliders_page = add_submenu_page($parent_slug, __('Sliders', $this->prefix), __('Sliders', $this->prefix), 'manage_options', 'sliders_'. $this->prefix, array($this, 'admin_pages_new'));
|
199 |
add_action('admin_print_styles-' . $sliders_page, array($this, 'admin_styles'));
|
200 |
add_action('admin_print_scripts-' . $sliders_page, array($this, 'admin_scripts'));
|
201 |
+
add_action('load-' . $sliders_page, array($this, 'sliders_per_page_option'));
|
202 |
|
203 |
$global_options_page = add_submenu_page($parent_slug, __('Options', $this->prefix), __('Options', $this->prefix), 'manage_options', 'goptions_wds', array($this, 'admin_pages'));
|
204 |
add_action('admin_print_styles-' . $global_options_page, array($this, 'admin_styles'));
|
220 |
/**
|
221 |
* Admin pages.
|
222 |
*/
|
223 |
+
public function admin_pages_new() {
|
224 |
$allowed_pages = array(
|
225 |
'sliders_' . $this->prefix,
|
226 |
);
|
227 |
$page = WDW_S_Library::get('page');
|
228 |
if ( !empty($page) && in_array($page, $allowed_pages) ) {
|
229 |
+
$page = WDW_S_Library::clean_page_prefix($page);
|
230 |
$controller_page = $this->plugin_dir . '/admin/controllers/' . $page . '.php';
|
231 |
$model_page = $this->plugin_dir . '/admin/models/' . $page . '.php';
|
232 |
$view_page = $this->plugin_dir . '/admin/views/' . $page . '.php';
|
253 |
echo wp_sprintf(__('The %s class not exist.', $this->prefix), '"<b>' . $controller_class . '</b>"');
|
254 |
return FALSE;
|
255 |
}
|
256 |
+
$Model = new stdClass();
|
257 |
if ( class_exists($view_class) ) {
|
258 |
+
$Model = new $model_class();
|
259 |
+
}
|
260 |
+
$View = new stdClass();
|
261 |
if ( class_exists($view_class) ) {
|
262 |
+
$View = new $view_class();
|
263 |
} else {
|
264 |
echo wp_sprintf(__('The %s class not exist.', $this->prefix), '"<b>' . $view_class . '</b>"');
|
265 |
return FALSE;
|
266 |
+
}
|
267 |
$controller = new $controller_class( array(
|
268 |
+
'model' => $Model,
|
269 |
+
'view' => $View
|
270 |
+
));
|
271 |
$controller->execute();
|
272 |
}
|
273 |
}
|
290 |
}
|
291 |
}
|
292 |
|
293 |
+
/**
|
294 |
+
* Add pagination to sliders admin pages.
|
295 |
+
*/
|
296 |
+
public function sliders_per_page_option() {
|
297 |
+
$option = 'per_page';
|
298 |
+
$args = array(
|
299 |
+
'default' => 20,
|
300 |
+
'option' => 'wds_sliders_per_page',
|
301 |
+
);
|
302 |
+
add_screen_option($option, $args);
|
303 |
+
}
|
304 |
+
|
305 |
+
public function set_option_sliders( $status, $option, $value ) {
|
306 |
+
if ( 'wds_sliders_per_page' == $option ) {
|
307 |
+
return $value;
|
308 |
+
}
|
309 |
+
return $status;
|
310 |
+
}
|
311 |
/**
|
312 |
* Licensing page.
|
313 |
*/
|
459 |
$page = WDW_S_Library::get('action');
|
460 |
$tab = WDW_S_Library::get('tab');
|
461 |
|
462 |
+
// $query_url = wp_nonce_url($query_url, 'addImage', $this->nonce);
|
463 |
if ( (($page != '') && (($page == 'addImage') || ($page == 'addMusic')))
|
464 |
|| $tab == 'wds_custom_uploader' ) {
|
465 |
if ( $tab != 'wds_custom_uploader' ) {
|
850 |
register_post_type('wds-slider', $args);
|
851 |
}
|
852 |
|
853 |
+
public function wds_overview() {
|
854 |
if (is_admin() && !isset($_REQUEST['ajax'])) {
|
855 |
if (!class_exists("DoradoWeb")) {
|
856 |
require_once($this->plugin_dir . '/wd/start.php');
|