Slideshow Gallery - Version 1.7.6

Version Description

  • IMPROVE: Disabled error handler as it was causing issues needlessly. WordPress error logging is sufficient.
  • IMPROVE: PHP 8 and 8.1 compatibility.
  • FIX: Some PHP warnings and errors that were causing problems.
Download this release

Release Info

Developer mohsenr1
Plugin Icon 128x128 Slideshow Gallery
Version 1.7.6
Comparing to
See all releases

Code changes from version 1.7.5 to 1.7.6

helpers/db.php CHANGED
@@ -338,7 +338,7 @@ class GalleryDbHelper extends GalleryPlugin {
338
  unset($this -> fields['key']);
339
 
340
  foreach (array_keys($this -> fields) as $field) {
341
- if (!empty($this -> data -> {$field}) || $this -> data -> {$field} == "0") {
342
  if (is_array($this -> data -> {$field}) || is_object($this -> data -> {$field})) {
343
  $value = serialize($this -> data -> {$field});
344
  } else {
338
  unset($this -> fields['key']);
339
 
340
  foreach (array_keys($this -> fields) as $field) {
341
+ if ((isset($this -> data) && !empty($this -> data -> {$field})) || $this -> data -> {$field} == "0") {
342
  if (is_array($this -> data -> {$field}) || is_object($this -> data -> {$field})) {
343
  $value = serialize($this -> data -> {$field});
344
  } else {
includes/errorhandler.php CHANGED
@@ -6,31 +6,32 @@ class SlideshowErrorHandler extends GalleryPlugin {
6
 
7
  function __construct() {
8
 
9
- $debugging = get_option('tridebugging');
10
- $this -> config = array(
11
- 'debug' => ((!empty($debugging)) ? true : $this -> debugging),
12
- );
13
 
14
- register_shutdown_function(array($this, "check_for_fatal"));
15
- set_error_handler(array($this, "log_error"));
16
- set_exception_handler(array($this, "log_exception"));
17
  }
18
 
19
  /**
20
  * Error handler, passes flow over the exception logger with new ErrorException.
21
  */
22
  function log_error( $num = null, $str = null, $file = null, $line = null, $context = null ) {
23
- $this -> log_exception(new ErrorException($str, 0, $num, $file, $line));
24
  }
25
 
26
  function log_error1( $context = null ) {
27
- $this -> log_exception(new ErrorException($context, 0, "", "", null));
28
  }
29
 
30
  /**
31
  * Uncaught exception handler.
32
  */
33
  function log_exception( $e ) {
 
34
  if ($e instanceof Error) {
35
  $this->log_error($e->getCode(), $e->getCode(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
36
  return;
@@ -64,8 +65,8 @@ class SlideshowErrorHandler extends GalleryPlugin {
64
  */
65
  function check_for_fatal()
66
  {
67
- $error = error_get_last();
68
- if ( !empty($error) && $error["type"] == E_ERROR )
69
- $this -> log_error1( $error["type"], $error["message"], $error["file"], $error["line"] );
70
  }
71
  }
6
 
7
  function __construct() {
8
 
9
+ // $debugging = get_option('tridebugging');
10
+ // $this -> config = array(
11
+ // 'debug' => ((!empty($debugging)) ? true : $this -> debugging),
12
+ // );
13
 
14
+ // register_shutdown_function(array($this, "check_for_fatal"));
15
+ // set_error_handler(array($this, "log_error"));
16
+ // set_exception_handler(array($this, "log_exception"));
17
  }
18
 
19
  /**
20
  * Error handler, passes flow over the exception logger with new ErrorException.
21
  */
22
  function log_error( $num = null, $str = null, $file = null, $line = null, $context = null ) {
23
+ // $this -> log_exception(new ErrorException($str, 0, $num, $file, $line));
24
  }
25
 
26
  function log_error1( $context = null ) {
27
+ // $this -> log_exception(new ErrorException($context, 0, "", "", null));
28
  }
29
 
30
  /**
31
  * Uncaught exception handler.
32
  */
33
  function log_exception( $e ) {
34
+ return;
35
  if ($e instanceof Error) {
36
  $this->log_error($e->getCode(), $e->getCode(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
37
  return;
65
  */
66
  function check_for_fatal()
67
  {
68
+ // $error = error_get_last();
69
+ // if ( !empty($error) && $error["type"] == E_ERROR )
70
+ // $this -> log_error1( $error["type"], $error["message"], $error["file"], $error["line"] );
71
  }
72
  }
readme.txt CHANGED
@@ -3,11 +3,12 @@ Contributors: contrid
3
  Donate link: https://tribulant.com/
4
  Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
5
  Requires at least: 3.1
6
- Tested up to: 6.0.2
7
- Stable tag: 1.7.5
8
 
9
  Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
10
 
 
11
  == Description ==
12
 
13
  Feature content in beautiful and fast JavaScript powered slideshow gallery showcases on your WordPress website.
@@ -18,14 +19,17 @@ The slideshow is flexible, all aspects can easily be configured and embedding/ha
18
 
19
  See the <a href="https://tribulant.net/slideshowgallery/">online demonstration</a>.
20
 
 
21
  Here are several ways to display a slideshow:
22
 
 
23
  = Shortcode for all slides =
24
 
25
  To embed a slideshow with all slides under **Slideshow > Manage Slides** in the plugin, simply insert the shortcode below into the content of a post/page.
26
 
27
  `[tribulant_slideshow]`
28
 
 
29
  = Shortcode for featured posts =
30
 
31
  You can create a slideshow from featured posts, each post being a slide and it's featured image used as the slide image. The link of the slide will be the link of the post so clicking on the slide will take users to that post.
@@ -34,18 +38,21 @@ Here is a sample shortcode that you can use for this:
34
 
35
  `[tribulant_slideshow featured="true" featurednumber="10" featuredtype="post"]`
36
 
 
37
  = Shortcode for a gallery's slides =
38
 
39
  To embed a slideshow with slides from a specific gallery under **Slideshow > Manage Galleries** in the plugin, simply insert the shortcode below (where X is the ID value of the gallery) into the content of a post/page.
40
 
41
  `[tribulant_slideshow gallery_id="X"]`
42
 
 
43
  = Shortcode for the images of a WordPress post/page =
44
 
45
  To embed a slideshow with the images uploaded to a WordPress post/page through it's media gallery, simply insert the shortcode below (where X is the ID value of the post). Whether you want to display the images from a post or a page, the parameter remains `post_id`.
46
 
47
  `[tribulant_slideshow post_id="X"]`
48
 
 
49
  = Shortcode for latest/featured products =
50
 
51
  In order to display latest or featured products in a slideshow, you need the <a href="https://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin" title="WordPress Shopping Cart">Shopping Cart plugin</a> from Tribulant. Once you have this installed and activated, you can easily display recent or featured products. To display recent products use the shortcode below.
@@ -60,34 +67,33 @@ For both, you can use the `productsnumber` parameter to limit the number of prod
60
 
61
  `[tribulant_slideshow products="latest" productsnumber="5"]`
62
 
 
63
  = Hardcode into any plugin/theme with PHP =
64
 
65
  To hardcode into any PHP file of your WordPress theme, simply use
66
 
67
  `<?php if (function_exists('slideshow')) { slideshow($output = true, $gallery_id = false, $post_id = false, $params = array()); } ?>`.
68
 
 
69
  = Parameters for shortcode/hardcode to customize each slideshow =
70
 
71
  You can use any of the following parameters with both the hardcoding and shortcode to customize each slideshow gallery:
72
 
73
  Shortcode example 1:
74
-
75
  `[tribulant_slideshow layout="responsive" gallery_id="3" auto="true" navopacity="0" showthumbs="true"]`
76
 
77
  Shortcode example 2:
78
-
79
  `[tribulant_slideshow layout="specific" post_id="379" width="600" height="300" auto="false" showinfo="false"]`
80
 
81
  Hardcode example 1:
82
-
83
  `<?php slideshow(true, 3, false, array('layout' => "responsive", 'auto' => "true", 'navopacity' => "0", 'showthumbs' => "true")); ?>`
84
 
85
  Hardcode example 2:
86
-
87
  `<?php slideshow(true, false, 379, array('layout' => "specific", 'width' => "600", 'height' => "300", 'auto' => "false", 'showinfo' => "false")); ?>`
88
 
89
  This way you can customize each slideshow you embed or hardcode, despite the settings you saved under **Slideshow > Settings**.
90
 
 
91
  * `effect` [ fade | slide ] = Choose the transition effect of the slideshow. Either fade or slide
92
  * `slide_direction` [ lr | tb ] = If you're using `slide` for the `effect`, you can choose left/right or top/bottom sliding
93
  * `easing` [ swing ] = Choose the easing effect you'd like. The default is `swing`
@@ -122,6 +128,7 @@ This way you can customize each slideshow you embed or hardcode, despite the set
122
  * `thumbsspeed` [ speed> ] (default: setting) = Speed of the thumbnail bar scrolling. Lower is slower. Between 1 and 20 is recommended.
123
  * `thumbsspacing` [ spacing ] (default: setting) = An integer value in pixels to space the thumbnails apart. Don’t include the 'px' part, just the number. Between 0 and 10 is recommended.
124
 
 
125
  = Languages =
126
 
127
  Thank you to these wonderful people who contributed to translating the Slideshow Gallery plugin:
@@ -131,39 +138,37 @@ Thank you to these wonderful people who contributed to translating the Slideshow
131
 
132
  <a href="https://tribulant.com/support/">Contact us</a> to submit your language file and be mentioned here!
133
 
 
134
  == Installation ==
135
 
136
  Installing the WordPress slideshow gallery plugin is very easy. Simply follow the steps below.
137
 
138
- 1. Extract the package to obtain the `slideshow-gallery` folder
139
- 1. Upload the `slideshow-gallery` folder to the `/wp-content/plugins/` directory
140
- 1. Activate the plugin through the 'Plugins' menu in WordPress
141
- 1. Configure the settings according to your needs through the **Slideshow > Settings** menu
142
- 1. Add and manage your slides in the 'Slideshow' section
143
- 1. Put `[tribulant_slideshow post_id="X"]` to embed a slideshow with the images of a post into your posts/pages or use `[tribulant_slideshow gallery_id="X"]` to display the slides of a specific gallery by ID or use `[tribulant_slideshow]` to embed a slideshow with your custom added slides under **Slideshow > Manage Slides** or `<?php if (function_exists('slideshow')) { slideshow($output = true, $gallery_id = false, $post_id = false, $params = array()); } ?>` into your WordPress theme using PHP code.
 
144
 
145
  == Frequently Asked Questions ==
146
 
147
  = Can I display/embed multiple instances of the slideshow gallery? =
148
-
149
  Yes, you can and you can add multiple slideshows on the same page as well.
150
 
151
  = How can I display specific slides in a slideshow gallery instance? =
152
-
153
  You can organize slides either into multiple galleries according to your needs or you can upload images to WordPress posts and display the images uploaded to a post.
154
 
155
  = How do I display the images uploaded to a post? =
156
-
157
  You can embed a slideshow and show the images uploaded to a post with the `post_id` parameter. Like this `[tribulant_slideshow post_id="123"]`.
158
 
159
  = Can I exclude certain images from a post in the slideshow? =
160
-
161
  Yes, you can use the `exclude` parameter to exclude post images by their order in the gallery (comma separated) like this `[tribulant_slideshow post_id="123" exclude="2,4,8"]`.
162
 
163
  = How can I fix slide images or thumbnails not displaying? =
164
-
165
  There is an "Images Tester" utility under Slideshow > Settings on the right-hand side. Use that to determine the problem.
166
 
 
167
  == Screenshots ==
168
 
169
  1. Slideshow gallery with thumbnails at the bottom.
@@ -173,8 +178,14 @@ There is an "Images Tester" utility under Slideshow > Settings on the right-hand
173
  5. TinyMCE editor button to insert shortcodes.
174
  6. Turn on Thickbox to show enlarged images in an overlay.
175
 
 
176
  == Changelog ==
177
 
 
 
 
 
 
178
  = 1.7.5 =
179
  * FIX: Null safe checker is added to some places.
180
 
@@ -657,4 +668,4 @@ There is an "Images Tester" utility under Slideshow > Settings on the right-hand
657
  * IMPROVED: Directory separator constant DS from DIRECTORY_SEPARATOR.
658
 
659
  = 1.0 =
660
- * Initial release of the WordPress Slideshow Gallery plugin
3
  Donate link: https://tribulant.com/
4
  Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
5
  Requires at least: 3.1
6
+ Tested up to: 6.0.3
7
+ Stable tag: 1.7.6
8
 
9
  Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
10
 
11
+
12
  == Description ==
13
 
14
  Feature content in beautiful and fast JavaScript powered slideshow gallery showcases on your WordPress website.
19
 
20
  See the <a href="https://tribulant.net/slideshowgallery/">online demonstration</a>.
21
 
22
+
23
  Here are several ways to display a slideshow:
24
 
25
+
26
  = Shortcode for all slides =
27
 
28
  To embed a slideshow with all slides under **Slideshow > Manage Slides** in the plugin, simply insert the shortcode below into the content of a post/page.
29
 
30
  `[tribulant_slideshow]`
31
 
32
+
33
  = Shortcode for featured posts =
34
 
35
  You can create a slideshow from featured posts, each post being a slide and it's featured image used as the slide image. The link of the slide will be the link of the post so clicking on the slide will take users to that post.
38
 
39
  `[tribulant_slideshow featured="true" featurednumber="10" featuredtype="post"]`
40
 
41
+
42
  = Shortcode for a gallery's slides =
43
 
44
  To embed a slideshow with slides from a specific gallery under **Slideshow > Manage Galleries** in the plugin, simply insert the shortcode below (where X is the ID value of the gallery) into the content of a post/page.
45
 
46
  `[tribulant_slideshow gallery_id="X"]`
47
 
48
+
49
  = Shortcode for the images of a WordPress post/page =
50
 
51
  To embed a slideshow with the images uploaded to a WordPress post/page through it's media gallery, simply insert the shortcode below (where X is the ID value of the post). Whether you want to display the images from a post or a page, the parameter remains `post_id`.
52
 
53
  `[tribulant_slideshow post_id="X"]`
54
 
55
+
56
  = Shortcode for latest/featured products =
57
 
58
  In order to display latest or featured products in a slideshow, you need the <a href="https://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin" title="WordPress Shopping Cart">Shopping Cart plugin</a> from Tribulant. Once you have this installed and activated, you can easily display recent or featured products. To display recent products use the shortcode below.
67
 
68
  `[tribulant_slideshow products="latest" productsnumber="5"]`
69
 
70
+
71
  = Hardcode into any plugin/theme with PHP =
72
 
73
  To hardcode into any PHP file of your WordPress theme, simply use
74
 
75
  `<?php if (function_exists('slideshow')) { slideshow($output = true, $gallery_id = false, $post_id = false, $params = array()); } ?>`.
76
 
77
+
78
  = Parameters for shortcode/hardcode to customize each slideshow =
79
 
80
  You can use any of the following parameters with both the hardcoding and shortcode to customize each slideshow gallery:
81
 
82
  Shortcode example 1:
 
83
  `[tribulant_slideshow layout="responsive" gallery_id="3" auto="true" navopacity="0" showthumbs="true"]`
84
 
85
  Shortcode example 2:
 
86
  `[tribulant_slideshow layout="specific" post_id="379" width="600" height="300" auto="false" showinfo="false"]`
87
 
88
  Hardcode example 1:
 
89
  `<?php slideshow(true, 3, false, array('layout' => "responsive", 'auto' => "true", 'navopacity' => "0", 'showthumbs' => "true")); ?>`
90
 
91
  Hardcode example 2:
 
92
  `<?php slideshow(true, false, 379, array('layout' => "specific", 'width' => "600", 'height' => "300", 'auto' => "false", 'showinfo' => "false")); ?>`
93
 
94
  This way you can customize each slideshow you embed or hardcode, despite the settings you saved under **Slideshow > Settings**.
95
 
96
+
97
  * `effect` [ fade | slide ] = Choose the transition effect of the slideshow. Either fade or slide
98
  * `slide_direction` [ lr | tb ] = If you're using `slide` for the `effect`, you can choose left/right or top/bottom sliding
99
  * `easing` [ swing ] = Choose the easing effect you'd like. The default is `swing`
128
  * `thumbsspeed` [ speed> ] (default: setting) = Speed of the thumbnail bar scrolling. Lower is slower. Between 1 and 20 is recommended.
129
  * `thumbsspacing` [ spacing ] (default: setting) = An integer value in pixels to space the thumbnails apart. Don’t include the 'px' part, just the number. Between 0 and 10 is recommended.
130
 
131
+
132
  = Languages =
133
 
134
  Thank you to these wonderful people who contributed to translating the Slideshow Gallery plugin:
138
 
139
  <a href="https://tribulant.com/support/">Contact us</a> to submit your language file and be mentioned here!
140
 
141
+
142
  == Installation ==
143
 
144
  Installing the WordPress slideshow gallery plugin is very easy. Simply follow the steps below.
145
 
146
+ 1. In WordPress, navigate to Plugins > Add New and upload it there (or search and install it there), and then skip to step 6. Or, for manual installation, extract the package to obtain the `slideshow-gallery` folder and continue below.
147
+ 2. Upload the `slideshow-gallery` folder to the `/wp-content/plugins/` directory.
148
+ 3. Activate the plugin through the 'Plugins' menu in WordPress.
149
+ 4. Configure the settings according to your needs through the **Slideshow > Settings** menu.
150
+ 5. Add and manage your slides in the 'Slideshow' section.
151
+ 6. Use `[tribulant_slideshow post_id="X"]` to embed a slideshow with the images of a post into your posts/pages or use `[tribulant_slideshow gallery_id="X"]` to display the slides of a specific gallery by ID or use `[tribulant_slideshow]` to embed a slideshow with your custom added slides under **Slideshow > Manage Slides** or `<?php if (function_exists('slideshow')) { slideshow($output = true, $gallery_id = false, $post_id = false, $params = array()); } ?>` into your WordPress theme using PHP code.
152
+
153
 
154
  == Frequently Asked Questions ==
155
 
156
  = Can I display/embed multiple instances of the slideshow gallery? =
 
157
  Yes, you can and you can add multiple slideshows on the same page as well.
158
 
159
  = How can I display specific slides in a slideshow gallery instance? =
 
160
  You can organize slides either into multiple galleries according to your needs or you can upload images to WordPress posts and display the images uploaded to a post.
161
 
162
  = How do I display the images uploaded to a post? =
 
163
  You can embed a slideshow and show the images uploaded to a post with the `post_id` parameter. Like this `[tribulant_slideshow post_id="123"]`.
164
 
165
  = Can I exclude certain images from a post in the slideshow? =
 
166
  Yes, you can use the `exclude` parameter to exclude post images by their order in the gallery (comma separated) like this `[tribulant_slideshow post_id="123" exclude="2,4,8"]`.
167
 
168
  = How can I fix slide images or thumbnails not displaying? =
 
169
  There is an "Images Tester" utility under Slideshow > Settings on the right-hand side. Use that to determine the problem.
170
 
171
+
172
  == Screenshots ==
173
 
174
  1. Slideshow gallery with thumbnails at the bottom.
178
  5. TinyMCE editor button to insert shortcodes.
179
  6. Turn on Thickbox to show enlarged images in an overlay.
180
 
181
+
182
  == Changelog ==
183
 
184
+ = 1.7.6 =
185
+ * IMPROVE: Disabled error handler as it was causing issues needlessly. WordPress error logging is sufficient.
186
+ * IMPROVE: PHP 8 and 8.1 compatibility.
187
+ * FIX: Some PHP warnings and errors that were causing problems.
188
+
189
  = 1.7.5 =
190
  * FIX: Null safe checker is added to some places.
191
 
668
  * IMPROVED: Directory separator constant DS from DIRECTORY_SEPARATOR.
669
 
670
  = 1.0 =
671
+ * Initial release of the WordPress Slideshow Gallery plugin
slideshow-gallery-plugin.php CHANGED
@@ -4,7 +4,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
4
 
5
  class GalleryPlugin extends GalleryCheckinit {
6
 
7
- var $version = '1.7.5';
8
  var $plugin_name;
9
  var $plugin_base;
10
  var $pre = 'Gallery';
4
 
5
  class GalleryPlugin extends GalleryCheckinit {
6
 
7
+ var $version = '1.7.6';
8
  var $plugin_name;
9
  var $plugin_base;
10
  var $pre = 'Gallery';
slideshow-gallery.php CHANGED
@@ -6,7 +6,7 @@ Plugin URI: https://tribulant.com/plugins/view/13/wordpress-slideshow-gallery
6
  Author: Tribulant
7
  Author URI: https://tribulant.com
8
  Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. See the <a href="https://tribulant.com/docs/wordpress-slideshow-gallery/1758/wordpress-slideshow-gallery-plugin/" target="_blank">online documentation</a> for instructions on using and embedding slideshow galleries. Upgrade to the premium version to remove all limitations.
9
- Version: 1.7.5
10
  License: GNU General Public License v2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
  Tags: slideshow gallery, slideshow, gallery, slider, jquery, bfithumb, galleries, photos, images
@@ -489,7 +489,7 @@ if (!class_exists('SlideshowGallery')) {
489
  'infofadedelay' => ($this -> get_option ('infofadedelay')),
490
  'showthumbs' => (($this -> get_option('thumbnails') == "Y") ? "true" : "false"),
491
  'thumbsposition' => ($this -> get_option('thumbposition')),
492
- 'thumbsborder' => ($styles['thumbactive']),
493
  'thumbsspeed' => ($this -> get_option('thumbscrollspeed')),
494
  'thumbsspacing' => ($this -> get_option('thumbspacing')),
495
  'post_id' => null,
@@ -774,6 +774,7 @@ if (!class_exists('SlideshowGallery')) {
774
  function admin_slides() {
775
  global $wpdb;
776
  $method = (!empty($_GET['method'])) ? sanitize_text_field($_GET['method']) : false;
 
777
  switch ($method) {
778
  case 'delete' :
779
  $id = sanitize_text_field($_GET['id']);
@@ -819,11 +820,11 @@ if (!class_exists('SlideshowGallery')) {
819
  if (!empty($_POST)) {
820
  check_admin_referer($this -> sections -> slides . '_save-multiple');
821
 
822
- $errors = array();
823
 
824
  if (!empty($_POST['Slide']['slides'])) {
825
  $slides = map_deep($_POST['Slide']['slides'], 'sanitize_text_field');
826
- $galleries = map_deep($_POST['Slide']['galleries'], 'sanitize_text_field');
827
 
828
  $s = 0;
829
 
6
  Author: Tribulant
7
  Author URI: https://tribulant.com
8
  Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. See the <a href="https://tribulant.com/docs/wordpress-slideshow-gallery/1758/wordpress-slideshow-gallery-plugin/" target="_blank">online documentation</a> for instructions on using and embedding slideshow galleries. Upgrade to the premium version to remove all limitations.
9
+ Version: 1.7.6
10
  License: GNU General Public License v2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
  Tags: slideshow gallery, slideshow, gallery, slider, jquery, bfithumb, galleries, photos, images
489
  'infofadedelay' => ($this -> get_option ('infofadedelay')),
490
  'showthumbs' => (($this -> get_option('thumbnails') == "Y") ? "true" : "false"),
491
  'thumbsposition' => ($this -> get_option('thumbposition')),
492
+ 'thumbsborder' => (isset($styles['thumbactive']) ? (empty($styles['thumbactive'] ) ? "#ffffff" : $styles['thumbactive'] ) : "#ffffff" ),
493
  'thumbsspeed' => ($this -> get_option('thumbscrollspeed')),
494
  'thumbsspacing' => ($this -> get_option('thumbspacing')),
495
  'post_id' => null,
774
  function admin_slides() {
775
  global $wpdb;
776
  $method = (!empty($_GET['method'])) ? sanitize_text_field($_GET['method']) : false;
777
+ $errors = array();
778
  switch ($method) {
779
  case 'delete' :
780
  $id = sanitize_text_field($_GET['id']);
820
  if (!empty($_POST)) {
821
  check_admin_referer($this -> sections -> slides . '_save-multiple');
822
 
823
+
824
 
825
  if (!empty($_POST['Slide']['slides'])) {
826
  $slides = map_deep($_POST['Slide']['slides'], 'sanitize_text_field');
827
+ $galleries = map_deep((empty($_POST['Slide']['galleries']) ? array() : $_POST['Slide']['galleries']) , 'sanitize_text_field');
828
 
829
  $s = 0;
830
 
views/admin/galleries/save.php CHANGED
@@ -49,7 +49,7 @@ if (is_object($this->Gallery()->data)) {
49
  });
50
  </script>
51
  <?php else : ?>
52
- <input type="text" class="widefat" name="Gallery[title]" value="<?php echo esc_attr(wp_unslash($this -> Gallery() -> data -> title)); ?>" id="Gallery_title" />
53
  <?php endif; ?>
54
  <span class="howto"><?php _e('Title of this gallery for identification purposes.', 'slideshow-gallery'); ?></span>
55
  <?php echo (!empty($this -> Gallery() -> errors['title'])) ? '<span class="slideshow_error">' . $this -> Gallery() -> errors['title'] . '</span>' : ''; ?>
49
  });
50
  </script>
51
  <?php else : ?>
52
+ <input type="text" class="widefat" name="Gallery[title]" value="<?php echo (!empty($this -> Gallery() -> data -> title) ? (esc_attr(wp_unslash($this -> Gallery() -> data -> title))) : '' ); ?>" id="Gallery_title" />
53
  <?php endif; ?>
54
  <span class="howto"><?php _e('Title of this gallery for identification purposes.', 'slideshow-gallery'); ?></span>
55
  <?php echo (!empty($this -> Gallery() -> errors['title'])) ? '<span class="slideshow_error">' . $this -> Gallery() -> errors['title'] . '</span>' : ''; ?>
views/admin/metaboxes/settings-styles.php CHANGED
@@ -8,6 +8,7 @@ $styles = $this -> get_option('styles');
8
  $autoheight = $this -> get_option('autoheight');
9
  $autoheight_max = $this -> get_option('autoheight_max');
10
  $resizeimagescrop = $this -> get_option('resizeimagescrop');
 
11
 
12
  ?>
13
 
@@ -195,9 +196,9 @@ $resizeimagescrop = $this -> get_option('resizeimagescrop');
195
  <fieldset>
196
  <legend class="screen-reader-text"><span><?php _e('Thumbnail Active Border', 'slideshow-gallery'); ?></span></legend>
197
  <div class="wp-picker-container">
198
- <a tabindex="0" id="stylesthumbactivebutton" class="wp-color-result" style="background-color:<?php echo esc_attr($styles['thumbactive']); ?>;" title="Select Color"></a>
199
  <span class="wp-picker-input-wrap">
200
- <input type="text" name="styles[thumbactive]" id="stylesthumbactive" value="<?php echo esc_attr($styles['thumbactive']); ?>" class="color-picker" style="" />
201
  </span>
202
  </div>
203
  </fieldset>
@@ -205,4 +206,4 @@ $resizeimagescrop = $this -> get_option('resizeimagescrop');
205
  </td>
206
  </tr>
207
  </tbody>
208
- </table>
8
  $autoheight = $this -> get_option('autoheight');
9
  $autoheight_max = $this -> get_option('autoheight_max');
10
  $resizeimagescrop = $this -> get_option('resizeimagescrop');
11
+ $thumbactive = (isset($styles['thumbactive']) ? (empty($styles['thumbactive'] ) ? "#ffffff" : $styles['thumbactive'] ) : "#ffffff" );
12
 
13
  ?>
14
 
196
  <fieldset>
197
  <legend class="screen-reader-text"><span><?php _e('Thumbnail Active Border', 'slideshow-gallery'); ?></span></legend>
198
  <div class="wp-picker-container">
199
+ <a tabindex="0" id="stylesthumbactivebutton" class="wp-color-result" style="<?php echo (!empty($styles['thumbactive']) ? ( 'background-color: ' . esc_attr($styles['thumbactive']) ) : '' ); ?>;" title="Select Color"></a>
200
  <span class="wp-picker-input-wrap">
201
+ <input type="text" name="styles[thumbactive]" id="stylesthumbactive" value="<?php echo $thumbactive; ?>" class="color-picker" style="" />
202
  </span>
203
  </div>
204
  </fieldset>
206
  </td>
207
  </tr>
208
  </tbody>
209
+ </table>
views/admin/slides/save.php CHANGED
@@ -103,7 +103,7 @@ if ($this -> language_do()) {
103
  });
104
  </script>
105
  <?php else : ?>
106
- <textarea class="widefat" rows="5" cols="100%" name="Slide[description]"><?php echo esc_attr($this -> Slide() -> data -> description); ?></textarea>
107
  <?php endif; ?>
108
  <span class="howto"><?php _e('Description of your slide as it will be displayed to your users below the title.', 'slideshow-gallery'); ?></span>
109
  <?php echo (!empty($this -> Slide() -> errors['description'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['description'] . '</div>' : ''; ?>
@@ -350,7 +350,7 @@ if ($this -> language_do()) {
350
  <tr>
351
  <th><label for="Slide_expiry"><?php _e('Expiry Date', 'slideshow-gallery'); ?></label></th>
352
  <td>
353
- <?php $currentdate = date_i18n(get_option('date_format'), strtotime($expiry)); ?>
354
  <input type="text" name="Slide[expiry]" value="<?php echo (!empty($expiry) && $expiry != "0000-00-00") ? esc_attr(wp_unslash($currentdate)) : ''; ?>" id="Slide_expiry" />
355
  <span class="howto"><small><?php _e('(optional)', 'slideshow-gallery'); ?></small> <?php _e('Set an expiry date for this slide.', 'slideshow-gallery'); ?></span>
356
 
103
  });
104
  </script>
105
  <?php else : ?>
106
+ <textarea class="widefat" rows="5" cols="100%" name="Slide[description]"><?php echo (!empty($this -> Slide() -> data -> description) ? esc_attr($this -> Slide() -> data -> description) : '' ); ?></textarea>
107
  <?php endif; ?>
108
  <span class="howto"><?php _e('Description of your slide as it will be displayed to your users below the title.', 'slideshow-gallery'); ?></span>
109
  <?php echo (!empty($this -> Slide() -> errors['description'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['description'] . '</div>' : ''; ?>
350
  <tr>
351
  <th><label for="Slide_expiry"><?php _e('Expiry Date', 'slideshow-gallery'); ?></label></th>
352
  <td>
353
+ <?php $currentdate = date_i18n(get_option('date_format'), strtotime((!empty($expiry) ? $expiry : "0000-00-00" ))); ?>
354
  <input type="text" name="Slide[expiry]" value="<?php echo (!empty($expiry) && $expiry != "0000-00-00") ? esc_attr(wp_unslash($currentdate)) : ''; ?>" id="Slide_expiry" />
355
  <span class="howto"><small><?php _e('(optional)', 'slideshow-gallery'); ?></small> <?php _e('Set an expiry date for this slide.', 'slideshow-gallery'); ?></span>
356