Slideshow Gallery - Version 1.7.2

Version Description

  • Removing serial key management for this free version
Download this release

Release Info

Developer contrid
Plugin Icon 128x128 Slideshow Gallery
Version 1.7.2
Comparing to
See all releases

Code changes from version 1.6.12 to 1.7.2

helpers/db.php CHANGED
@@ -280,7 +280,11 @@ class GalleryDbHelper extends GalleryPlugin {
280
  break;
281
  case 'Slide' :
282
  $imagepath = $this -> Html -> uploads_path() . DS . $this -> plugin_name . DS . $record -> image;
283
- @unlink($imagepath);
 
 
 
 
284
  $query = "DELETE FROM `" . $wpdb -> prefix . strtolower($this -> pre) . "_galleriesslides` WHERE `slide_id` = '" . esc_sql($record_id) . "'";
285
  $wpdb -> query($query);
286
  break;
280
  break;
281
  case 'Slide' :
282
  $imagepath = $this -> Html -> uploads_path() . DS . $this -> plugin_name . DS . $record -> image;
283
+ try {
284
+ @unlink($imagepath);
285
+ } catch (\Throwable $e) {
286
+ // nothing to do here
287
+ }
288
  $query = "DELETE FROM `" . $wpdb -> prefix . strtolower($this -> pre) . "_galleriesslides` WHERE `slide_id` = '" . esc_sql($record_id) . "'";
289
  $wpdb -> query($query);
290
  break;
helpers/html.php CHANGED
@@ -130,7 +130,7 @@ class GalleryHtmlHelper extends GalleryPlugin {
130
  break;
131
  }
132
 
133
- return $name;
134
  }
135
 
136
  return false;
130
  break;
131
  }
132
 
133
+ return isset($name) ? $name : false;
134
  }
135
 
136
  return false;
includes/checkinit.php CHANGED
@@ -66,6 +66,8 @@ if (!class_exists('GalleryCheckinit')) {
66
  }
67
 
68
  function ci_get_serial() {
 
 
69
  if ($serial = $this -> get_option('serialkey')) {
70
  return $serial;
71
  }
@@ -74,7 +76,10 @@ if (!class_exists('GalleryCheckinit')) {
74
  }
75
 
76
  function ci_serial_valid() {
77
- $host = $_SERVER['HTTP_HOST'];
 
 
 
78
  $result = false;
79
 
80
  $existing = $this -> get_option('existing');
@@ -87,12 +92,16 @@ if (!class_exists('GalleryCheckinit')) {
87
  $nonwwwhost = $host;
88
  $wwwhost = "www." . $host;
89
  }
90
-
91
- if ($_SERVER['HTTP_HOST'] == "localhost" || $_SERVER['HTTP_HOST'] == "localhost:" . $_SERVER['SERVER_PORT']) {
 
 
 
 
92
  $result = true;
93
  } else {
94
  if ($serial = $this -> ci_get_serial()) {
95
- if ($serial == strtoupper(md5($_SERVER['HTTP_HOST'] . "gallery" . "mymasesoetkoekiesisfokkenlekker"))) {
96
  $result = true;
97
  } elseif (strtoupper(md5($wwwhost . "gallery" . "mymasesoetkoekiesisfokkenlekker")) == $serial ||
98
  strtoupper(md5($nonwwwhost . "gallery" . "mymasesoetkoekiesisfokkenlekker")) == $serial) {
66
  }
67
 
68
  function ci_get_serial() {
69
+ return true;
70
+
71
  if ($serial = $this -> get_option('serialkey')) {
72
  return $serial;
73
  }
76
  }
77
 
78
  function ci_serial_valid() {
79
+ return true;
80
+
81
+ $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
82
+ $port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : 80;
83
  $result = false;
84
 
85
  $existing = $this -> get_option('existing');
92
  $nonwwwhost = $host;
93
  $wwwhost = "www." . $host;
94
  }
95
+
96
+ if (preg_match('/tribulant.net/i', $nonwwwhost)) {
97
+ return true;
98
+ }
99
+
100
+ if ($host == "localhost" || $host == "localhost:" . $port) {
101
  $result = true;
102
  } else {
103
  if ($serial = $this -> ci_get_serial()) {
104
+ if ($serial == strtoupper(md5($host . "gallery" . "mymasesoetkoekiesisfokkenlekker"))) {
105
  $result = true;
106
  } elseif (strtoupper(md5($wwwhost . "gallery" . "mymasesoetkoekiesisfokkenlekker")) == $serial ||
107
  strtoupper(md5($nonwwwhost . "gallery" . "mymasesoetkoekiesisfokkenlekker")) == $serial) {
includes/class.gallery-list-table.php CHANGED
@@ -89,7 +89,12 @@ class Gallery_List_Table extends WP_List_Table {
89
  $query = '';
90
  $conditions = array();
91
 
92
- $search = esc_html($_REQUEST['s']);
 
 
 
 
 
93
  if (!empty($search)) {
94
  $conditions['s'] = $search;
95
  }
89
  $query = '';
90
  $conditions = array();
91
 
92
+ if (isset($_REQUEST['s'])) {
93
+ $search = esc_html($_REQUEST['s']);
94
+ } else {
95
+ $search = "";
96
+ }
97
+
98
  if (!empty($search)) {
99
  $conditions['s'] = $search;
100
  }
includes/class.slide-list-table.php CHANGED
@@ -93,13 +93,23 @@ class Slide_List_Table extends WP_List_Table {
93
  function add_conditions() {
94
  $query = '';
95
  $conditions = array();
96
-
97
- $search = esc_html($_REQUEST['s']);
 
 
 
 
 
98
  if (!empty($search)) {
99
  $conditions['s'] = $search;
100
  }
101
-
102
- $gallery_id = esc_html($_REQUEST['id']);
 
 
 
 
 
103
  if (!empty($gallery_id)) {
104
  $conditions['gallery_id'] = $gallery_id;
105
  }
@@ -308,7 +318,7 @@ class Slide_List_Table extends WP_List_Table {
308
 
309
  function column_image($item) {
310
 
311
- $image = '<a href="' . $item['image_path'] . '" title="' . esc_attr(wp_unslash(__($item['title']))) . '" class="colorbox" rel="slides"><img style="width:50px; height:50px;" class="img-rounded" src="' . SG() -> Html -> otf_image_src((object) $item, 50, 50, 100) . '" alt="' . esc_attr(SG() -> Html -> sanitize(__($slide -> title))) . '" /></a>';
312
 
313
  return $image;
314
  }
93
  function add_conditions() {
94
  $query = '';
95
  $conditions = array();
96
+
97
+ if (isset($_REQUEST['s'])) {
98
+ $search = esc_html($_REQUEST['s']);
99
+ } else {
100
+ $search = "";
101
+ }
102
+
103
  if (!empty($search)) {
104
  $conditions['s'] = $search;
105
  }
106
+
107
+ if (isset($_REQUEST['id'])) {
108
+ $gallery_id = esc_html($_REQUEST['id']);
109
+ } else {
110
+ $gallery_id = "";
111
+ }
112
+
113
  if (!empty($gallery_id)) {
114
  $conditions['gallery_id'] = $gallery_id;
115
  }
318
 
319
  function column_image($item) {
320
 
321
+ $image = '<a href="' . $item['image_path'] . '" title="' . esc_attr(wp_unslash(__($item['title']))) . '" class="colorbox" rel="slides"><img style="width:50px; height:50px;" class="img-rounded" src="' . SG() -> Html -> otf_image_src((object) $item, 50, 50, 100) . '" alt="' . esc_attr(SG() -> Html -> sanitize(__($item['title']))) . '" /></a>';
322
 
323
  return $image;
324
  }
includes/errorhandler.php CHANGED
@@ -19,14 +19,23 @@ class SlideshowErrorHandler extends GalleryPlugin {
19
  /**
20
  * Error handler, passes flow over the exception logger with new ErrorException.
21
  */
22
- function log_error( $num, $str, $file, $line, $context = null ) {
23
  $this -> log_exception(new ErrorException($str, 0, $num, $file, $line));
24
  }
25
 
 
 
 
 
26
  /**
27
  * Uncaught exception handler.
28
  */
29
- function log_exception( Exception $e ) {
 
 
 
 
 
30
  $message = "Type: " . get_class( $e ) . "; Message: {$e->getMessage()}; File: {$e->getFile()}; Line: {$e->getLine()};";
31
 
32
  $file = $e -> getFile();
@@ -57,6 +66,6 @@ class SlideshowErrorHandler extends GalleryPlugin {
57
  {
58
  $error = error_get_last();
59
  if ( $error["type"] == E_ERROR )
60
- $this -> log_error( $error["type"], $error["message"], $error["file"], $error["line"] );
61
  }
62
- }
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;
37
+ }
38
+
39
  $message = "Type: " . get_class( $e ) . "; Message: {$e->getMessage()}; File: {$e->getFile()}; Line: {$e->getLine()};";
40
 
41
  $file = $e -> getFile();
66
  {
67
  $error = error_get_last();
68
  if ( $error["type"] == E_ERROR )
69
+ $this -> log_error1( $error["type"], $error["message"], $error["file"], $error["line"] );
70
  }
71
+ }
readme.txt CHANGED
@@ -3,14 +3,14 @@ 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: 5.2.1
7
- Stable tag: 1.6.12
8
 
9
  Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
10
 
11
  == Description ==
12
 
13
- Feature content in beatiful and fast JavaScript powered slideshow gallery showcases on your WordPress website.
14
 
15
  You can easily display multiple galleries throughout your WordPress website displaying your custom added slides, slide galleries or showing slides from WordPress posts/pages.
16
 
@@ -105,7 +105,7 @@ This way you can customize each slideshow you embed or hardcode, despite the set
105
  * `orderby` [ random ] = Set to 'random' to randomly order the slides. Leave this shortcode parameter to order by the order set on the slides.
106
  * `width` [ width | auto ] = (only with layout="specific") Width of the slideshow in pixels. Don't specify 'px' part, just the numeric value for the height.
107
  * `resheight` [ resheight ] = (only with layout="responsive") Numeric/integer value such as "30" to be used with 'resheighttype' below
108
- * `resheighttype [ resheighttype ] = (only with layout="responsive") "px" (pixels) or "%" (percent) as the value eg. resheighttype="%"
109
  * `height` [ height ] (only with layout="specific"; default: setting) = Height of the slideshow in pixels. Don't specify the 'px' part, just the numeric value for the height.
110
  * `autoheight` [ true | false ] = Should the gallery adjust it's height for each slide?
111
  * `auto` [ true | false ] (default: setting) = Set this to 'true' to automatically slide the slides in the slideshow.
@@ -146,7 +146,7 @@ Installing the WordPress slideshow gallery plugin is very easy. Simply follow th
146
 
147
  = Can I display/embed multiple instances of the slideshow gallery? =
148
 
149
- Yes, you can and you can put multiple slideshows on the same page as well.
150
 
151
  = How can I display specific slides in a slideshow gallery instance? =
152
 
@@ -175,6 +175,28 @@ There is an "Images Tester" utility under Slideshow > Settings on the right-hand
175
 
176
  == Changelog ==
177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  = 1.6.12 =
179
  * ADD: infoheadingcontent attribute on shortcode
180
  * IMPROVE: Preload slideshow images on page load
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: 5.6.2
7
+ Stable tag: 1.7.2
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.
14
 
15
  You can easily display multiple galleries throughout your WordPress website displaying your custom added slides, slide galleries or showing slides from WordPress posts/pages.
16
 
105
  * `orderby` [ random ] = Set to 'random' to randomly order the slides. Leave this shortcode parameter to order by the order set on the slides.
106
  * `width` [ width | auto ] = (only with layout="specific") Width of the slideshow in pixels. Don't specify 'px' part, just the numeric value for the height.
107
  * `resheight` [ resheight ] = (only with layout="responsive") Numeric/integer value such as "30" to be used with 'resheighttype' below
108
+ * `resheighttype [ resheighttype ] = (only with layout="responsive") "px" (pixels) or "%" (percent) as the value e.g., resheighttype="%"
109
  * `height` [ height ] (only with layout="specific"; default: setting) = Height of the slideshow in pixels. Don't specify the 'px' part, just the numeric value for the height.
110
  * `autoheight` [ true | false ] = Should the gallery adjust it's height for each slide?
111
  * `auto` [ true | false ] (default: setting) = Set this to 'true' to automatically slide the slides in the slideshow.
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
 
175
 
176
  == Changelog ==
177
 
178
+ = 1.7.2 =
179
+ * Removing serial key management for this free version
180
+
181
+ = 1.7.1 =
182
+ * FIX: Colorbox updates and fixes.
183
+
184
+ = 1.7 =
185
+ * FIX: Error Handler.
186
+ * FIX: Undefined $_SERVER variable indexes, while executing WP Cron.
187
+ * PHP Errors and Notices Fixes for current and future versions of PHP.
188
+
189
+ = 1.6.15 =
190
+ * FIX: Additional errors related to errorhandler.php.
191
+
192
+ = 1.6.14 =
193
+ * FIX: Errors related to errorhandler.php.
194
+ * FIX: Errors in recent PHP versions.
195
+ * FIX: Incompatibility with the Avada theme and potentially other WordPress themes.
196
+
197
+ = 1.6.13 =
198
+ * FIX: Undefined variable and other errors.
199
+
200
  = 1.6.12 =
201
  * ADD: infoheadingcontent attribute on shortcode
202
  * IMPROVE: Preload slideshow images on page load
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.6.12';
8
  var $plugin_name;
9
  var $plugin_base;
10
  var $pre = 'Gallery';
@@ -351,12 +351,42 @@ class GalleryPlugin extends GalleryCheckinit {
351
  $version = "1.5.3";
352
  }
353
 
354
- if (version_compare($cur_version, "1.6.12") < 0) {
355
  $this -> initialize_options();
356
 
357
- $version = "1.6.12";
358
  }
359
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  //the current version is older.
361
  //lets update the database
362
  $this -> update_option('version', $version);
@@ -701,7 +731,12 @@ class GalleryPlugin extends GalleryCheckinit {
701
  if (is_admin()) {
702
  wp_enqueue_style('fontawesome', $this -> render_url('css/fontawesome.css', "admin"), false, '4.4.0', "all");
703
 
704
- $page = sanitize_text_field($_GET['page']);
 
 
 
 
 
705
  if (!empty($page) && in_array($page, (array) $this -> sections)) {
706
  wp_enqueue_style('wp-color-picker');
707
  wp_enqueue_style('jquery-ui', $this -> render_url('css/jquery-ui.css', "admin"), null, "1.0", "all");
4
 
5
  class GalleryPlugin extends GalleryCheckinit {
6
 
7
+ var $version = '1.7.2';
8
  var $plugin_name;
9
  var $plugin_base;
10
  var $pre = 'Gallery';
351
  $version = "1.5.3";
352
  }
353
 
354
+ if (version_compare($cur_version, "1.6.15") < 0) {
355
  $this -> initialize_options();
356
 
357
+ $version = "1.6.15";
358
  }
359
 
360
+ if (version_compare($cur_version, "1.6.16") < 0) {
361
+ $this -> initialize_options();
362
+
363
+ $version = "1.6.16";
364
+ }
365
+
366
+ if (version_compare($cur_version, "1.6.17") < 0) {
367
+ $this -> initialize_options();
368
+
369
+ $version = "1.6.17";
370
+ }
371
+
372
+ if (version_compare($cur_version, "1.7") < 0) {
373
+ $this -> initialize_options();
374
+
375
+ $version = "1.7";
376
+ }
377
+
378
+ if (version_compare($cur_version, "1.7.1") < 0) {
379
+ $this -> initialize_options();
380
+
381
+ $version = "1.7.1";
382
+ }
383
+
384
+ if (version_compare($cur_version, "1.7.2") < 0) {
385
+ $this -> initialize_options();
386
+
387
+ $version = "1.7.2";
388
+ }
389
+
390
  //the current version is older.
391
  //lets update the database
392
  $this -> update_option('version', $version);
731
  if (is_admin()) {
732
  wp_enqueue_style('fontawesome', $this -> render_url('css/fontawesome.css', "admin"), false, '4.4.0', "all");
733
 
734
+ if (isset($_GET['page'])) {
735
+ $page = sanitize_text_field($_GET['page']);
736
+ } else {
737
+ $page = "";
738
+ }
739
+
740
  if (!empty($page) && in_array($page, (array) $this -> sections)) {
741
  wp_enqueue_style('wp-color-picker');
742
  wp_enqueue_style('jquery-ui', $this -> render_url('css/jquery-ui.css', "admin"), null, "1.0", "all");
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.
9
- Version: 1.6.12
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
@@ -101,7 +101,7 @@ if (!class_exists('SlideshowGallery')) {
101
  $this_plugin = plugin_basename(__FILE__);
102
 
103
  if (!empty($plugin_file) && $plugin_file == $this_plugin) {
104
- $actions[] = '<a href="" onclick="jQuery.colorbox({href:ajaxurl + \'?action=slideshow_serialkey&security=' . wp_create_nonce('serialkey') . '\'}); return false;" id="slideshow_submitseriallink"><i class="fa fa-key fa-fw"></i> ' . __('Serial Key', 'slideshow-gallery') . '</a>';
105
  $actions[] = '<a href="' . admin_url('admin.php?page=' . $this -> sections -> settings) . '"><i class="fa fa-cog fa-fw"></i> ' . __('Settings', 'slideshow-gallery') . '</a>';
106
 
107
  if ($update = $this -> vendor('update')) {
@@ -197,7 +197,7 @@ if (!class_exists('SlideshowGallery')) {
197
  $this -> menus['slideshow-settings-updates'] = add_submenu_page($this -> sections -> slides, __('Updates', 'slideshow-gallery'), __('Updates', 'slideshow-gallery') . $update_icon, 'slideshow_settings_updates', $this -> sections -> settings_updates, array($this, 'admin_settings_updates'));
198
 
199
  if (!$this -> ci_serial_valid()) {
200
- $this -> menus['slideshow-submitserial'] = add_submenu_page($this -> sections -> slides, __('Submit Serial Key', 'slideshow-gallery'), __('Submit Serial Key', 'slideshow-gallery'), 'slideshow_submitserial', $this -> sections -> submitserial, array($this, 'admin_submitserial'));
201
  }
202
 
203
  add_action("load-" . $this -> menus['slideshow-slides'], array($this, 'screen_options_slides'));
@@ -306,8 +306,9 @@ if (!class_exists('SlideshowGallery')) {
306
  add_meta_box('techdiv', __('Technical Settings', 'slideshow-gallery'), array($this -> Metabox, "settings_tech"), $this -> menus['slideshow-settings'], 'normal', 'core');
307
  add_meta_box('wprelateddiv', __('WordPress Related', 'slideshow-gallery') . $this -> Html -> help(__('Settings specifically related to WordPress', 'slideshow-gallery')), array($this -> Metabox, "settings_wprelated"), $this -> menus['slideshow-settings'], 'normal', 'core');
308
 
309
- do_action('do_meta_boxes', $this -> menus['slideshow-settings'], 'normal');
310
- do_action('do_meta_boxes', $this -> menus['slideshow-settings'], 'side');
 
311
  }
312
 
313
  function admin_submitserial() {
@@ -360,7 +361,12 @@ if (!class_exists('SlideshowGallery')) {
360
  }
361
 
362
  /* Serial key submission message */
363
- $page = sanitize_text_field($_GET['page']);
 
 
 
 
 
364
  if (!$this -> ci_serial_valid() && (empty($page) || $page != $this -> sections -> submitserial)) {
365
  $hidemessage_upgradetopro = $this -> get_option('hidemessage_upgradetopro');
366
 
@@ -788,7 +794,7 @@ if (!class_exists('SlideshowGallery')) {
788
  check_admin_referer($this -> sections -> slides . '_save');
789
 
790
  if ($this -> Slide() -> save($_POST, true)) {
791
- $message = __('Slide has been saved', 'slideshow-gallery');
792
 
793
  if (!empty($_POST['continueediting'])) {
794
  $this -> redirect(admin_url('admin.php?page=' . $this -> sections -> slides . '&method=save&id=' . $this -> Slide() -> insertid . '&continueediting=1'), 'message', $message);
@@ -801,7 +807,8 @@ if (!class_exists('SlideshowGallery')) {
801
  }
802
  } else {
803
  $this -> Db -> model = $this -> Slide() -> model;
804
- $this -> Slide() -> find(array('id' => sanitize_text_field($_GET['id'])));
 
805
  $this -> render('slides' . DS . 'save', false, true, 'admin');
806
  }
807
  break;
@@ -851,7 +858,12 @@ if (!class_exists('SlideshowGallery')) {
851
  $this -> render('slides' . DS . 'save-multiple', array('errors' => $errors), true, 'admin');
852
  break;
853
  case 'order' :
854
- $gallery_id = sanitize_text_field($_GET['gallery_id']);
 
 
 
 
 
855
  if (!empty($gallery_id)) {
856
  $gallery = $this -> Gallery() -> find(array('id' => $gallery_id));
857
 
@@ -893,7 +905,7 @@ if (!class_exists('SlideshowGallery')) {
893
  check_admin_referer($this -> sections -> galleries . '_save');
894
 
895
  if ($this -> Gallery() -> save($_POST, true)) {
896
- $message = __('Gallery has been saved', 'slideshow-gallery');
897
 
898
  if (!empty($_POST['continueediting'])) {
899
  $this -> redirect(admin_url('admin.php?page=' . $this -> sections -> galleries . '&method=save&id=' . $this -> Gallery() -> insertid . '&continueediting=1'), 'message', $message);
@@ -905,7 +917,8 @@ if (!class_exists('SlideshowGallery')) {
905
  }
906
  } else {
907
  $this -> Db -> model = $this -> Gallery() -> model;
908
- $this -> Gallery() -> find(array('id' => sanitize_text_field($_GET['id'])));
 
909
  $this -> render('galleries' . DS . 'save', false, true, 'admin');
910
  }
911
  break;
@@ -1192,4 +1205,4 @@ if (!function_exists('slideshow')) {
1192
  }
1193
  }
1194
 
1195
- ?>
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.
9
+ Version: 1.7.2
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
101
  $this_plugin = plugin_basename(__FILE__);
102
 
103
  if (!empty($plugin_file) && $plugin_file == $this_plugin) {
104
+ //$actions[] = '<a href="" onclick="jQuery.colorbox({href:ajaxurl + \'?action=slideshow_serialkey&security=' . wp_create_nonce('serialkey') . '\'}); return false;" id="slideshow_submitseriallink"><i class="fa fa-key fa-fw"></i> ' . __('Serial Key', 'slideshow-gallery') . '</a>';
105
  $actions[] = '<a href="' . admin_url('admin.php?page=' . $this -> sections -> settings) . '"><i class="fa fa-cog fa-fw"></i> ' . __('Settings', 'slideshow-gallery') . '</a>';
106
 
107
  if ($update = $this -> vendor('update')) {
197
  $this -> menus['slideshow-settings-updates'] = add_submenu_page($this -> sections -> slides, __('Updates', 'slideshow-gallery'), __('Updates', 'slideshow-gallery') . $update_icon, 'slideshow_settings_updates', $this -> sections -> settings_updates, array($this, 'admin_settings_updates'));
198
 
199
  if (!$this -> ci_serial_valid()) {
200
+ //$this -> menus['slideshow-submitserial'] = add_submenu_page($this -> sections -> slides, __('Submit Serial Key', 'slideshow-gallery'), __('Submit Serial Key', 'slideshow-gallery'), 'slideshow_submitserial', $this -> sections -> submitserial, array($this, 'admin_submitserial'));
201
  }
202
 
203
  add_action("load-" . $this -> menus['slideshow-slides'], array($this, 'screen_options_slides'));
306
  add_meta_box('techdiv', __('Technical Settings', 'slideshow-gallery'), array($this -> Metabox, "settings_tech"), $this -> menus['slideshow-settings'], 'normal', 'core');
307
  add_meta_box('wprelateddiv', __('WordPress Related', 'slideshow-gallery') . $this -> Html -> help(__('Settings specifically related to WordPress', 'slideshow-gallery')), array($this -> Metabox, "settings_wprelated"), $this -> menus['slideshow-settings'], 'normal', 'core');
308
 
309
+ global $post;
310
+ do_action('do_meta_boxes', $this -> menus['slideshow-settings'], 'normal', $post);
311
+ do_action('do_meta_boxes', $this -> menus['slideshow-settings'], 'side', $post);
312
  }
313
 
314
  function admin_submitserial() {
361
  }
362
 
363
  /* Serial key submission message */
364
+ if (isset($_GET['page'])) {
365
+ $page = sanitize_text_field($_GET['page']);
366
+ } else {
367
+ $page = "";
368
+ }
369
+
370
  if (!$this -> ci_serial_valid() && (empty($page) || $page != $this -> sections -> submitserial)) {
371
  $hidemessage_upgradetopro = $this -> get_option('hidemessage_upgradetopro');
372
 
794
  check_admin_referer($this -> sections -> slides . '_save');
795
 
796
  if ($this -> Slide() -> save($_POST, true)) {
797
+ $message = __('Slide item has been saved', 'slideshow-gallery');
798
 
799
  if (!empty($_POST['continueediting'])) {
800
  $this -> redirect(admin_url('admin.php?page=' . $this -> sections -> slides . '&method=save&id=' . $this -> Slide() -> insertid . '&continueediting=1'), 'message', $message);
807
  }
808
  } else {
809
  $this -> Db -> model = $this -> Slide() -> model;
810
+ $slideId = (isset($_GET['id'])) ? $_GET['id'] : 0;
811
+ $this -> Slide() -> find(array('id' => sanitize_text_field($slideId)));
812
  $this -> render('slides' . DS . 'save', false, true, 'admin');
813
  }
814
  break;
858
  $this -> render('slides' . DS . 'save-multiple', array('errors' => $errors), true, 'admin');
859
  break;
860
  case 'order' :
861
+ if (isset($_GET['gallery_id'])) {
862
+ $gallery_id = sanitize_text_field($_GET['gallery_id']);
863
+ } else {
864
+ $gallery_id = "";
865
+ }
866
+
867
  if (!empty($gallery_id)) {
868
  $gallery = $this -> Gallery() -> find(array('id' => $gallery_id));
869
 
905
  check_admin_referer($this -> sections -> galleries . '_save');
906
 
907
  if ($this -> Gallery() -> save($_POST, true)) {
908
+ $message = __('Gallery item has been saved', 'slideshow-gallery');
909
 
910
  if (!empty($_POST['continueediting'])) {
911
  $this -> redirect(admin_url('admin.php?page=' . $this -> sections -> galleries . '&method=save&id=' . $this -> Gallery() -> insertid . '&continueediting=1'), 'message', $message);
917
  }
918
  } else {
919
  $this -> Db -> model = $this -> Gallery() -> model;
920
+ $galleryId = (isset($_GET['id'])) ? $_GET['id'] : 0;
921
+ $this -> Gallery() -> find(array('id' => sanitize_text_field($galleryId)));
922
  $this -> render('galleries' . DS . 'save', false, true, 'admin');
923
  }
924
  break;
1205
  }
1206
  }
1207
 
1208
+ ?>
views/admin/changelog.php CHANGED
@@ -11,7 +11,7 @@
11
  <?php if (!empty($changelog)) : ?>
12
  <?php echo wp_unslash($changelog); ?>
13
  <?php else : ?>
14
- <?php echo __('No changelog is available for this release yet, please check back later.', 'wp-mailinglist'); ?>
15
  <?php endif; ?>
16
  </div>
17
  </div>
11
  <?php if (!empty($changelog)) : ?>
12
  <?php echo wp_unslash($changelog); ?>
13
  <?php else : ?>
14
+ <?php echo __('No changelog is available for this release yet, please check back later.', 'slideshow-gallery'); ?>
15
  <?php endif; ?>
16
  </div>
17
  </div>
views/admin/galleries/save.php CHANGED
@@ -3,6 +3,14 @@
3
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
4
  $languages = $this -> language_getlanguages();
5
 
 
 
 
 
 
 
 
 
6
  ?>
7
 
8
  <div class="wrap <?php echo $this -> pre; ?> slideshow-gallery slideshow">
@@ -12,7 +20,7 @@ $languages = $this -> language_getlanguages();
12
 
13
  <?php wp_nonce_field($this -> sections -> galleries . '_save'); ?>
14
 
15
- <input type="hidden" name="Gallery[id]" value="<?php echo $this -> Gallery() -> data -> id; ?>" />
16
 
17
  <table class="form-table">
18
  <tbody>
@@ -21,7 +29,7 @@ $languages = $this -> language_getlanguages();
21
  <?php echo $this -> Html -> help(__('Give this gallery a title/name for your own reference.', 'slideshow-gallery')); ?></th>
22
  <td>
23
  <?php if ($this -> language_do()) : ?>
24
- <?php $titles = $this -> language_split($this -> Gallery() -> data -> title); ?>
25
  <div id="gallery-title-tabs">
26
  <ul>
27
  <?php foreach ($languages as $language) : ?>
3
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
4
  $languages = $this -> language_getlanguages();
5
 
6
+ $id = null;
7
+ $title = null;
8
+
9
+ if (is_object($this->Gallery()->data)) {
10
+ $id = $this->Gallery()->data->id;
11
+ $title = $this->Gallery()->data->title;
12
+ }
13
+
14
  ?>
15
 
16
  <div class="wrap <?php echo $this -> pre; ?> slideshow-gallery slideshow">
20
 
21
  <?php wp_nonce_field($this -> sections -> galleries . '_save'); ?>
22
 
23
+ <input type="hidden" name="Gallery[id]" value="<?php echo $id; ?>" />
24
 
25
  <table class="form-table">
26
  <tbody>
29
  <?php echo $this -> Html -> help(__('Give this gallery a title/name for your own reference.', 'slideshow-gallery')); ?></th>
30
  <td>
31
  <?php if ($this -> language_do()) : ?>
32
+ <?php $titles = $this -> language_split($title); ?>
33
  <div id="gallery-title-tabs">
34
  <ul>
35
  <?php foreach ($languages as $language) : ?>
views/admin/head.php CHANGED
@@ -2,7 +2,11 @@
2
 
3
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
4
 
5
- $page = sanitize_text_field($_GET['page']);
 
 
 
 
6
 
7
  ?>
8
 
2
 
3
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
4
 
5
+ if (isset($_GET['page'])) {
6
+ $page = sanitize_text_field($_GET['page']);
7
+ } else {
8
+ $page = "";
9
+ }
10
 
11
  ?>
12
 
views/admin/metaboxes/settings-styles.php CHANGED
@@ -121,7 +121,7 @@ $resizeimagescrop = $this -> get_option('resizeimagescrop');
121
  <th><label for="styles_height"><?php _e('Gallery Height', 'slideshow-gallery'); ?></label>
122
  <?php echo $this -> Html -> help(__('The height of the slideshow in pixels.', 'slideshow-gallery')); ?></th>
123
  <td>
124
- <input <?php echo (!empty($autoheight)) ? 'disabled="disabled"' : ''; ?> style="width:45px;" id="styles_height" type="text" name="styles[height]" value="<?php echo esc_attr(wp_unslash($styles['height'])); ?>" /> <?php _e('px', 'slideshow-gallery'); ?>
125
  <span class="howto"><?php _e('Height of the slideshow gallery', 'slideshow-gallery'); ?></span>
126
  </td>
127
  </tr>
121
  <th><label for="styles_height"><?php _e('Gallery Height', 'slideshow-gallery'); ?></label>
122
  <?php echo $this -> Html -> help(__('The height of the slideshow in pixels.', 'slideshow-gallery')); ?></th>
123
  <td>
124
+ <input <?php echo (!empty($autoheight)) ? 'disabled="disabled"' : ''; ?> style="width:45px;" id="styles_height" type="text" name="styles[height]" value="<?php echo esc_attr(wp_unslash((isset($styles['height'])) ? $styles['height'] : '')); ?>" /> <?php _e('px', 'slideshow-gallery'); ?>
125
  <span class="howto"><?php _e('Height of the slideshow gallery', 'slideshow-gallery'); ?></span>
126
  </td>
127
  </tr>
views/admin/metaboxes/settings-tech.php CHANGED
@@ -11,7 +11,7 @@ $jsoutput = $this -> get_option('jsoutput');
11
  <table class="form-table">
12
  <tbody>
13
  <tr>
14
- <th><label for="jsoutput_perslideshow"><?php _e('Javascript Output', 'slideshow-gallery'); ?></label></th>
15
  <td>
16
  <label><input <?php echo (empty($jsoutput) || (!empty($jsoutput) && $jsoutput == "perslideshow")) ? 'checked="checked"' : ''; ?> type="radio" name="jsoutput" value="perslideshow" id="jsoutput_perslideshow" /> <?php _e('Per Slideshow', 'slideshow-gallery'); ?></label>
17
  <label><input <?php echo (!empty($jsoutput) && $jsoutput == "footerglobal") ? 'checked="checked"' : ''; ?> type="radio" name="jsoutput" value="footerglobal" id="jsoutput_footerglobal" /> <?php _e('All in Footer', 'slideshow-gallery'); ?></label>
11
  <table class="form-table">
12
  <tbody>
13
  <tr>
14
+ <th><label for="jsoutput_perslideshow"><?php _e('JavaScript Output', 'slideshow-gallery'); ?></label></th>
15
  <td>
16
  <label><input <?php echo (empty($jsoutput) || (!empty($jsoutput) && $jsoutput == "perslideshow")) ? 'checked="checked"' : ''; ?> type="radio" name="jsoutput" value="perslideshow" id="jsoutput_perslideshow" /> <?php _e('Per Slideshow', 'slideshow-gallery'); ?></label>
17
  <label><input <?php echo (!empty($jsoutput) && $jsoutput == "footerglobal") ? 'checked="checked"' : ''; ?> type="radio" name="jsoutput" value="footerglobal" id="jsoutput_footerglobal" /> <?php _e('All in Footer', 'slideshow-gallery'); ?></label>
views/admin/slides/save.php CHANGED
@@ -4,14 +4,36 @@
4
 
5
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
6
 
7
- $showinfo = $this -> Slide() -> data -> showinfo;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  if ($this -> language_do()) {
10
  $languages = $this -> language_getlanguages();
11
  }
12
 
13
- $expiry = $this -> Slide() -> data -> expiry;
14
-
15
  ?>
16
 
17
  <div class="wrap <?php echo $this -> pre; ?> slideshow-gallery slideshow">
@@ -20,8 +42,8 @@ $expiry = $this -> Slide() -> data -> expiry;
20
  <form action="<?php echo $this -> url; ?>&amp;method=save" method="post" enctype="multipart/form-data">
21
  <?php wp_nonce_field($this -> sections -> slides . '_save'); ?>
22
 
23
- <input type="hidden" name="Slide[id]" value="<?php echo $this -> Slide() -> data -> id; ?>" />
24
- <input type="hidden" name="Slide[order]" value="<?php echo $this -> Slide() -> data -> order; ?>" />
25
 
26
  <table class="form-table">
27
  <tbody>
@@ -30,7 +52,7 @@ $expiry = $this -> Slide() -> data -> expiry;
30
  <?php echo $this -> Html -> help(__('This title is for your reference in management and it will also be used to display the title of the slide in the information bar if you have that turned on.', 'slideshow-gallery')); ?></th>
31
  <td>
32
  <?php if ($this -> language_do()) : ?>
33
- <?php $titles = $this -> language_split($this -> Slide() -> data -> title); ?>
34
  <div id="slide-title-tabs">
35
  <ul>
36
  <?php foreach ($languages as $language) : ?>
@@ -50,7 +72,7 @@ $expiry = $this -> Slide() -> data -> expiry;
50
  });
51
  </script>
52
  <?php else : ?>
53
- <input class="widefat" type="text" name="Slide[title]" value="<?php echo esc_attr(wp_unslash($this -> Slide() -> data -> title)); ?>" id="Slide.title" />
54
  <?php endif; ?>
55
  <span class="howto"><?php _e('Title/name of your slide as it will be displayed to your users.', 'slideshow-gallery'); ?></span>
56
  <?php echo (!empty($this -> Slide() -> errors['title'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['title'] . '</div>' : ''; ?>
@@ -61,7 +83,7 @@ $expiry = $this -> Slide() -> data -> expiry;
61
  <?php echo $this -> Html -> help(__('The description is specifically used for the information bar if you have that turned on.', 'slideshow-gallery')); ?></th>
62
  <td>
63
  <?php if ($this -> language_do()) : ?>
64
- <?php $descriptions = $this -> language_split($this -> Slide() -> data -> description); ?>
65
  <div id="slide-description-tabs">
66
  <ul>
67
  <?php foreach ($languages as $language) : ?>
@@ -137,9 +159,9 @@ $expiry = $this -> Slide() -> data -> expiry;
137
  <th><label for="Slide.type.media"><?php _e('Image Type', 'slideshow-gallery'); ?></label>
138
  <?php echo $this -> Html -> help(__('Do you want to specify a URL to your image or upload the image file manually? Specifying a URL will still copy the image file remotely from the location to your server so uploading is recommended to prevent any restrictions or errors.', 'slideshow-gallery')); ?></th>
139
  <td>
140
- <label><input onclick="jQuery('#typediv_media').show(); jQuery('#typediv_file').hide(); jQuery('#typediv_url').hide();" <?php echo (empty($this -> Slide() -> data -> type) || $this -> Slide() -> data -> type == "media") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="media" id="Slide.type.media" /> <?php _e('Media Upload', 'slideshow-gallery'); ?></label>
141
- <label><input onclick="jQuery('#typediv_file').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_url').hide();" <?php echo ($this -> Slide() -> data -> type == "file") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="file" id="Slide.type.file" /> <?php _e('Upload File', 'slideshow-gallery'); ?></label>
142
- <label><input onclick="jQuery('#typediv_url').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_file').hide();" <?php echo ($this -> Slide() -> data -> type == "url") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="url" id="Slide.type.url" /> <?php _e('Specify URL', 'slideshow-gallery'); ?></label>
143
  <?php echo (!empty($this -> Slide() -> errors['type'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['type'] . '</div>' : ''; ?>
144
  <span class="howto"><?php _e('Do you want to upload an image or specify a local/remote image URL?', 'slideshow-gallery'); ?></span>
145
  </td>
@@ -148,7 +170,7 @@ $expiry = $this -> Slide() -> data -> expiry;
148
  </table>
149
 
150
  <!-- Choose/upload file with the WordPress media uploader -->
151
- <div id="typediv_media" style="display:<?php echo (empty($this -> Slide() -> data -> type) || $this -> Slide() -> data -> type == "media") ? 'block' : 'none'; ?>;">
152
  <table class="form-table">
153
  <tbody>
154
  <tr>
@@ -156,16 +178,16 @@ $expiry = $this -> Slide() -> data -> expiry;
156
  <td>
157
  <div id="Slide_mediaupload_image">
158
  <!-- image goes here -->
159
- <?php if (!empty($this -> Slide() -> data -> image_url)) : ?>
160
- <a href="<?php echo $this -> Slide() -> data -> image_url; ?>" title="<?php echo __($this -> Slide() -> data -> title); ?>" class="colorbox"><img class="img-rounded" src="<?php echo $this -> Html -> otf_image_src($this -> Slide() -> data, 100, 100, 100); ?>" /></a>
161
  <?php endif; ?>
162
  </div>
163
 
164
  <button type="button" name="Slide_mediaupload" value="1" id="Slide_mediaupload" class="button button-secondary">
165
  <i class="fa fa-image fa-fw"></i> <?php _e('Choose Image', 'slideshow-gallery'); ?>
166
  </button>
167
- <input type="text" name="Slide[media_file]" readonly="readonly" style="width:50%;" id="Slide_image_file" value="<?php echo esc_attr(wp_unslash($this -> Slide() -> data -> image_url)); ?>" />
168
- <input type="hidden" name="Slide[attachment_id]" value="<?php echo esc_attr(wp_unslash($this -> Slide() -> data -> attachment_id)); ?>" id="Slide_attachment_id" />
169
 
170
  <?php echo (!empty($this -> Slide() -> errors['media_file'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['media_file'] . '</div>' : ''; ?>
171
 
@@ -214,7 +236,7 @@ $expiry = $this -> Slide() -> data -> expiry;
214
  </table>
215
  </div>
216
 
217
- <div id="typediv_file" style="display:<?php echo (!empty($this -> Slide() -> data -> type) && $this -> Slide() -> data -> type == "file") ? 'block' : 'none'; ?>;">
218
  <table class="form-table">
219
  <tbody>
220
  <tr>
@@ -227,7 +249,7 @@ $expiry = $this -> Slide() -> data -> expiry;
227
 
228
  <?php
229
 
230
- if (!empty($this -> Slide() -> data -> type) && $this -> Slide() -> data -> type == "file") {
231
  if (!empty($this -> Slide() -> data -> image)) {
232
  ?>
233
 
@@ -246,14 +268,14 @@ $expiry = $this -> Slide() -> data -> expiry;
246
  </table>
247
  </div>
248
 
249
- <div id="typediv_url" style="display:<?php echo ($this -> Slide() -> data -> type == "url") ? 'block' : 'none'; ?>;">
250
  <table class="form-table">
251
  <tbody>
252
  <tr>
253
  <th><label for="Slide.image_url"><?php _e('Image URL', 'slideshow-gallery'); ?></label>
254
  <?php echo $this -> Html -> help(__('Specify an absolute URL to an image file to use for this slide. The image will be copied from the location to your server.', 'slideshow-gallery')); ?></th>
255
  <td>
256
- <input class="widefat" type="text" name="Slide[image_url]" value="<?php echo esc_attr($this -> Slide() -> data -> image_url); ?>" id="Slide.image_url" />
257
  <span class="howto"><?php _e('Local or remote image location eg. https://domain.com/path/to/image.jpg', 'slideshow-gallery'); ?></span>
258
  <?php echo (!empty($this -> Slide() -> errors['image_url'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['image_url'] . '</div>' : ''; ?>
259
  </td>
@@ -268,15 +290,15 @@ $expiry = $this -> Slide() -> data -> expiry;
268
  <th><label for="Slide_uselink_N"><?php _e('Use Link', 'slideshow-gallery'); ?></label>
269
  <?php echo $this -> Html -> help(__('Turn this on to specify a link/URL for this slide to link to when it is clicked.', 'slideshow-gallery')); ?></th>
270
  <td>
271
- <label><input onclick="jQuery('#Slide_uselink_div').show();" <?php echo ($this -> Slide() -> data -> uselink == "Y") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="Y" id="Slide_uselink_Y" /> <?php _e('Yes', 'slideshow-gallery'); ?></label>
272
- <label><input onclick="jQuery('#Slide_uselink_div').hide();" <?php echo (empty($this -> Slide() -> data -> uselink) || $this -> Slide() -> data -> uselink == "N") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="N" id="Slide_uselink_N" /> <?php _e('No', 'slideshow-gallery'); ?></label>
273
  <span class="howto"><?php _e('Set this to Yes to link this slide to a link/URL of your choice.', 'slideshow-gallery'); ?></span>
274
  </td>
275
  </tr>
276
  </tbody>
277
  </table>
278
 
279
- <div id="Slide_uselink_div" style="display:<?php echo ($this -> Slide() -> data -> uselink == "Y") ? 'block' : 'none'; ?>;">
280
  <table class="form-table">
281
  <tbody>
282
  <tr>
@@ -284,7 +306,7 @@ $expiry = $this -> Slide() -> data -> expiry;
284
  <?php echo $this -> Html -> help(__('The absolute URL to take the user to when the slide is clicked.', 'slideshow-gallery')); ?></th>
285
  <td>
286
  <?php if ($this -> language_do()) : ?>
287
- <?php $links = $this -> language_split($this -> Slide() -> data -> link); ?>
288
  <div id="slide-link-tabs">
289
  <ul>
290
  <?php foreach ($languages as $language) : ?>
@@ -304,7 +326,7 @@ $expiry = $this -> Slide() -> data -> expiry;
304
  });
305
  </script>
306
  <?php else : ?>
307
- <input class="widefat" type="text" name="Slide[link]" value="<?php echo esc_attr($this -> Slide() -> data -> link); ?>" id="Slide.link" />
308
  <?php endif; ?>
309
 
310
  <span class="howto"><?php _e('Link/URL to go to when a user clicks the slide eg. https://www.domain.com/mypage/', 'slideshow-gallery'); ?></span>
@@ -314,8 +336,8 @@ $expiry = $this -> Slide() -> data -> expiry;
314
  <th><label for="Slide_linktarget_self"><?php _e('Link Target', 'slideshow-gallery'); ?></label>
315
  <?php echo $this -> Html -> help(__('Depending on the purpose of specifying this link, you may want it to open in the same window or in a new window.', 'slideshow-gallery')); ?></th>
316
  <td>
317
- <label><input <?php echo (empty($this -> Slide() -> data -> linktarget) || (!empty($this -> Slide() -> data -> linktarget) && $this -> Slide() -> data -> linktarget == "self")) ? 'checked="checked"' : ''; ?> type="radio" name="Slide[linktarget]" value="self" id="Slide_linktarget_self" /> <?php _e('Current Window', 'slideshow-gallery'); ?></label>
318
- <label><input <?php echo (!empty($this -> Slide() -> data -> linktarget) && $this -> Slide() -> data -> linktarget == "blank") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[linktarget]" value="blank" id="Slide_linktarget_blank" /> <?php _e('New/Blank Window', 'slideshow-gallery'); ?></label>
319
  <span class="howto"><?php _e('Should this link open in the current window or a new window?', 'slideshow-gallery'); ?></span>
320
  </td>
321
  </tr>
4
 
5
  if (!defined('ABSPATH')) exit; // Exit if accessed directly
6
 
7
+ $showinfo = null;
8
+ $expiry = null;
9
+ $id = null;
10
+ $order = null;
11
+ $title = null;
12
+ $description = null;
13
+ $type = null;
14
+ $image_url = null;
15
+ $attachment_id = null;
16
+ $uselink = null;
17
+ $link = null;
18
+
19
+ if (is_object($this->Slide()->data)) {
20
+ $showinfo = $this -> Slide() -> data -> showinfo;
21
+ $expiry = $this -> Slide() -> data -> expiry;
22
+ $id = $this -> Slide() -> data -> id;
23
+ $order = $this -> Slide() -> data -> order;
24
+ $title = $this -> Slide() -> data -> title;
25
+ $description = $this -> Slide() -> data -> description;
26
+ $type = $this -> Slide() -> data -> type;
27
+ $image_url = $this -> Slide() -> data -> image_url;
28
+ $attachment_id = $this -> Slide() -> data -> attachment_id;
29
+ $uselink = $this -> Slide() -> data -> uselink;
30
+ $link = $this -> Slide() -> data -> link;
31
+ }
32
 
33
  if ($this -> language_do()) {
34
  $languages = $this -> language_getlanguages();
35
  }
36
 
 
 
37
  ?>
38
 
39
  <div class="wrap <?php echo $this -> pre; ?> slideshow-gallery slideshow">
42
  <form action="<?php echo $this -> url; ?>&amp;method=save" method="post" enctype="multipart/form-data">
43
  <?php wp_nonce_field($this -> sections -> slides . '_save'); ?>
44
 
45
+ <input type="hidden" name="Slide[id]" value="<?php echo $id; ?>" />
46
+ <input type="hidden" name="Slide[order]" value="<?php echo $order; ?>" />
47
 
48
  <table class="form-table">
49
  <tbody>
52
  <?php echo $this -> Html -> help(__('This title is for your reference in management and it will also be used to display the title of the slide in the information bar if you have that turned on.', 'slideshow-gallery')); ?></th>
53
  <td>
54
  <?php if ($this -> language_do()) : ?>
55
+ <?php $titles = $this -> language_split($title); ?>
56
  <div id="slide-title-tabs">
57
  <ul>
58
  <?php foreach ($languages as $language) : ?>
72
  });
73
  </script>
74
  <?php else : ?>
75
+ <input class="widefat" type="text" name="Slide[title]" value="<?php echo esc_attr(wp_unslash($title)); ?>" id="Slide.title" />
76
  <?php endif; ?>
77
  <span class="howto"><?php _e('Title/name of your slide as it will be displayed to your users.', 'slideshow-gallery'); ?></span>
78
  <?php echo (!empty($this -> Slide() -> errors['title'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['title'] . '</div>' : ''; ?>
83
  <?php echo $this -> Html -> help(__('The description is specifically used for the information bar if you have that turned on.', 'slideshow-gallery')); ?></th>
84
  <td>
85
  <?php if ($this -> language_do()) : ?>
86
+ <?php $descriptions = $this -> language_split($description); ?>
87
  <div id="slide-description-tabs">
88
  <ul>
89
  <?php foreach ($languages as $language) : ?>
159
  <th><label for="Slide.type.media"><?php _e('Image Type', 'slideshow-gallery'); ?></label>
160
  <?php echo $this -> Html -> help(__('Do you want to specify a URL to your image or upload the image file manually? Specifying a URL will still copy the image file remotely from the location to your server so uploading is recommended to prevent any restrictions or errors.', 'slideshow-gallery')); ?></th>
161
  <td>
162
+ <label><input onclick="jQuery('#typediv_media').show(); jQuery('#typediv_file').hide(); jQuery('#typediv_url').hide();" <?php echo (empty($type) || $type == "media") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="media" id="Slide.type.media" /> <?php _e('Media Upload', 'slideshow-gallery'); ?></label>
163
+ <label><input onclick="jQuery('#typediv_file').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_url').hide();" <?php echo ($type == "file") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="file" id="Slide.type.file" /> <?php _e('Upload File', 'slideshow-gallery'); ?></label>
164
+ <label><input onclick="jQuery('#typediv_url').show(); jQuery('#typediv_media').hide(); jQuery('#typediv_file').hide();" <?php echo ($type == "url") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[type]" value="url" id="Slide.type.url" /> <?php _e('Specify URL', 'slideshow-gallery'); ?></label>
165
  <?php echo (!empty($this -> Slide() -> errors['type'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['type'] . '</div>' : ''; ?>
166
  <span class="howto"><?php _e('Do you want to upload an image or specify a local/remote image URL?', 'slideshow-gallery'); ?></span>
167
  </td>
170
  </table>
171
 
172
  <!-- Choose/upload file with the WordPress media uploader -->
173
+ <div id="typediv_media" style="display:<?php echo (empty($type) || $type == "media") ? 'block' : 'none'; ?>;">
174
  <table class="form-table">
175
  <tbody>
176
  <tr>
178
  <td>
179
  <div id="Slide_mediaupload_image">
180
  <!-- image goes here -->
181
+ <?php if (!empty($image_url)) : ?>
182
+ <a href="<?php echo $image_url; ?>" title="<?php echo __($this -> Slide() -> data -> title); ?>" class="colorbox"><img class="img-rounded" src="<?php echo $this -> Html -> otf_image_src($this -> Slide() -> data, 100, 100, 100); ?>" /></a>
183
  <?php endif; ?>
184
  </div>
185
 
186
  <button type="button" name="Slide_mediaupload" value="1" id="Slide_mediaupload" class="button button-secondary">
187
  <i class="fa fa-image fa-fw"></i> <?php _e('Choose Image', 'slideshow-gallery'); ?>
188
  </button>
189
+ <input type="text" name="Slide[media_file]" readonly="readonly" style="width:50%;" id="Slide_image_file" value="<?php echo esc_attr(wp_unslash($image_url)); ?>" />
190
+ <input type="hidden" name="Slide[attachment_id]" value="<?php echo esc_attr(wp_unslash($attachment_id)); ?>" id="Slide_attachment_id" />
191
 
192
  <?php echo (!empty($this -> Slide() -> errors['media_file'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['media_file'] . '</div>' : ''; ?>
193
 
236
  </table>
237
  </div>
238
 
239
+ <div id="typediv_file" style="display:<?php echo (!empty($type) && $type == "file") ? 'block' : 'none'; ?>;">
240
  <table class="form-table">
241
  <tbody>
242
  <tr>
249
 
250
  <?php
251
 
252
+ if (!empty($type) && $type == "file") {
253
  if (!empty($this -> Slide() -> data -> image)) {
254
  ?>
255
 
268
  </table>
269
  </div>
270
 
271
+ <div id="typediv_url" style="display:<?php echo ($type == "url") ? 'block' : 'none'; ?>;">
272
  <table class="form-table">
273
  <tbody>
274
  <tr>
275
  <th><label for="Slide.image_url"><?php _e('Image URL', 'slideshow-gallery'); ?></label>
276
  <?php echo $this -> Html -> help(__('Specify an absolute URL to an image file to use for this slide. The image will be copied from the location to your server.', 'slideshow-gallery')); ?></th>
277
  <td>
278
+ <input class="widefat" type="text" name="Slide[image_url]" value="<?php echo esc_attr($image_url); ?>" id="Slide.image_url" />
279
  <span class="howto"><?php _e('Local or remote image location eg. https://domain.com/path/to/image.jpg', 'slideshow-gallery'); ?></span>
280
  <?php echo (!empty($this -> Slide() -> errors['image_url'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['image_url'] . '</div>' : ''; ?>
281
  </td>
290
  <th><label for="Slide_uselink_N"><?php _e('Use Link', 'slideshow-gallery'); ?></label>
291
  <?php echo $this -> Html -> help(__('Turn this on to specify a link/URL for this slide to link to when it is clicked.', 'slideshow-gallery')); ?></th>
292
  <td>
293
+ <label><input onclick="jQuery('#Slide_uselink_div').show();" <?php echo ($uselink == "Y") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="Y" id="Slide_uselink_Y" /> <?php _e('Yes', 'slideshow-gallery'); ?></label>
294
+ <label><input onclick="jQuery('#Slide_uselink_div').hide();" <?php echo (empty($uselink) || $uselink == "N") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[uselink]" value="N" id="Slide_uselink_N" /> <?php _e('No', 'slideshow-gallery'); ?></label>
295
  <span class="howto"><?php _e('Set this to Yes to link this slide to a link/URL of your choice.', 'slideshow-gallery'); ?></span>
296
  </td>
297
  </tr>
298
  </tbody>
299
  </table>
300
 
301
+ <div id="Slide_uselink_div" style="display:<?php echo ($uselink == "Y") ? 'block' : 'none'; ?>;">
302
  <table class="form-table">
303
  <tbody>
304
  <tr>
306
  <?php echo $this -> Html -> help(__('The absolute URL to take the user to when the slide is clicked.', 'slideshow-gallery')); ?></th>
307
  <td>
308
  <?php if ($this -> language_do()) : ?>
309
+ <?php $links = $this -> language_split($link); ?>
310
  <div id="slide-link-tabs">
311
  <ul>
312
  <?php foreach ($languages as $language) : ?>
326
  });
327
  </script>
328
  <?php else : ?>
329
+ <input class="widefat" type="text" name="Slide[link]" value="<?php echo esc_attr($link); ?>" id="Slide.link" />
330
  <?php endif; ?>
331
 
332
  <span class="howto"><?php _e('Link/URL to go to when a user clicks the slide eg. https://www.domain.com/mypage/', 'slideshow-gallery'); ?></span>
336
  <th><label for="Slide_linktarget_self"><?php _e('Link Target', 'slideshow-gallery'); ?></label>
337
  <?php echo $this -> Html -> help(__('Depending on the purpose of specifying this link, you may want it to open in the same window or in a new window.', 'slideshow-gallery')); ?></th>
338
  <td>
339
+ <label><input <?php echo (empty($linktarget) || (!empty($linktarget) && $linktarget == "self")) ? 'checked="checked"' : ''; ?> type="radio" name="Slide[linktarget]" value="self" id="Slide_linktarget_self" /> <?php _e('Current Window', 'slideshow-gallery'); ?></label>
340
+ <label><input <?php echo (!empty($linktarget) && $linktarget == "blank") ? 'checked="checked"' : ''; ?> type="radio" name="Slide[linktarget]" value="blank" id="Slide_linktarget_blank" /> <?php _e('New/Blank Window', 'slideshow-gallery'); ?></label>
341
  <span class="howto"><?php _e('Should this link open in the current window or a new window?', 'slideshow-gallery'); ?></span>
342
  </td>
343
  </tr>
views/default/gallery.php CHANGED
@@ -1,12 +1,12 @@
1
  <?php
2
 
3
  $wrapperid = "slideshow-wrapper" . $unique;
4
- if (!$products) $slides = stripslashes_deep($slides);
5
  $thumbopacity = $this -> get_option('thumbopacity');
6
 
7
  ?>
8
 
9
- <?php if (!empty($slides)) : ?>
10
  <ul id="slideshow<?php echo $unique; ?>" class="slideshow<?php echo $unique; ?>" style="display:none;">
11
  <?php if ($frompost) : ?>
12
  <!-- From a WordPress post/page -->
@@ -39,7 +39,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
39
  </li>
40
  <?php wp_reset_postdata(); ?>
41
  <?php endforeach; ?>
42
- <?php elseif ($featured) : ?>
43
  <!-- Featured images from posts -->
44
  <?php foreach ($slides as $slide) : ?>
45
  <?php
@@ -72,7 +72,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
72
  </li>
73
  <?php wp_reset_postdata(); ?>
74
  <?php endforeach; ?>
75
- <?php elseif ($products) : ?>
76
  <!-- Shopping Cart plugin products https://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin -->
77
  <?php foreach ($slides as $slide) : ?>
78
  <li>
1
  <?php
2
 
3
  $wrapperid = "slideshow-wrapper" . $unique;
4
+ if (!isset($products) || !$products) $slides = stripslashes_deep($slides);
5
  $thumbopacity = $this -> get_option('thumbopacity');
6
 
7
  ?>
8
 
9
+ <?php if (isset($slides) && !empty($slides)) : ?>
10
  <ul id="slideshow<?php echo $unique; ?>" class="slideshow<?php echo $unique; ?>" style="display:none;">
11
  <?php if ($frompost) : ?>
12
  <!-- From a WordPress post/page -->
39
  </li>
40
  <?php wp_reset_postdata(); ?>
41
  <?php endforeach; ?>
42
+ <?php elseif (isset($featured) && $featured) : ?>
43
  <!-- Featured images from posts -->
44
  <?php foreach ($slides as $slide) : ?>
45
  <?php
72
  </li>
73
  <?php wp_reset_postdata(); ?>
74
  <?php endforeach; ?>
75
+ <?php elseif (isset($products) && $products) : ?>
76
  <!-- Shopping Cart plugin products https://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin -->
77
  <?php foreach ($slides as $slide) : ?>
78
  <li>