Version Description
- ADD: infoheadingcontent attribute on shortcode
- IMPROVE: Preload slideshow images on page load
- IMPROVE: Security fixes and improvements
- IMPROVE: About page update with new layout
- FIX: Debugging setting affects debugging on WordPress globally
Download this release
Release Info
Developer | contrid |
Plugin | Slideshow Gallery |
Version | 1.6.12 |
Comparing to | |
See all releases |
Code changes from version 1.6.11 to 1.6.12
- css/admin.css +2 -1
- helpers/db.php +12 -14
- helpers/form.php +1 -3
- helpers/html.php +2 -4
- helpers/metabox.php +1 -3
- images/changelog-header.png +0 -0
- images/changelog-logo.png +0 -0
- includes/class.gallery-list-table.php +3 -3
- includes/class.slide-list-table.php +6 -6
- includes/errorhandler.php +62 -0
- js/admin.js +2 -2
- js/tinymce/editor_plugin.js +3 -3
- models/gallery.php +1 -1
- models/galleryslides.php +1 -1
- models/slideshow.php +5 -5
- readme.txt +10 -3
- slideshow-gallery-plugin.php +70 -16
- slideshow-gallery.php +62 -40
- vendors/class.update.php +1 -1
- views/admin/about.php +4 -4
- views/admin/changelog.php +4 -4
- views/admin/error.php +1 -1
- views/admin/galleries/save.php +2 -2
- views/admin/head.php +1 -1
- views/admin/lite-upgrade.php +6 -6
- views/admin/metaboxes/settings-about.php +2 -2
- views/admin/metaboxes/settings-general.php +12 -5
- views/admin/metaboxes/settings-postspages.php +3 -3
- views/admin/metaboxes/settings-styles.php +3 -3
- views/admin/metaboxes/settings-submit.php +8 -3
- views/admin/settings-submitserial.php +1 -1
- views/admin/settings-updates.php +1 -1
- views/admin/slides/order-gallery.php +1 -1
- views/admin/slides/order.php +1 -1
- views/admin/slides/save-multiple.php +5 -5
- views/admin/slides/save.php +9 -9
- views/admin/submitserial.php +3 -3
- views/default/css-responsive.php +1 -1
- views/default/css.php +1 -1
- views/default/gallery.php +13 -9
css/admin.css
CHANGED
@@ -26,7 +26,8 @@
|
|
26 |
|
27 |
#adminmenu .toplevel_page_slideshow-slides div.wp-menu-image:before,
|
28 |
.mce-i-gallery:before,
|
29 |
-
.slideshow-update-nag:before
|
|
|
30 |
font-family: 'FontAwesome' !important;
|
31 |
content: "\f03e";
|
32 |
-webkit-font-smoothing: antialiased;
|
26 |
|
27 |
#adminmenu .toplevel_page_slideshow-slides div.wp-menu-image:before,
|
28 |
.mce-i-gallery:before,
|
29 |
+
.slideshow-update-nag:before,
|
30 |
+
#wpadminbar .slideshow-lite a:before {
|
31 |
font-family: 'FontAwesome' !important;
|
32 |
content: "\f03e";
|
33 |
-webkit-font-smoothing: antialiased;
|
helpers/db.php
CHANGED
@@ -52,7 +52,7 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
52 |
$c = 1;
|
53 |
|
54 |
foreach ($conditions as $ckey => $cval) {
|
55 |
-
$query .= " `" . $ckey . "` = '" . ($cval) . "'";
|
56 |
|
57 |
if ($c < count($conditions)) {
|
58 |
$query .= " AND";
|
@@ -67,7 +67,7 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
67 |
} else {
|
68 |
$order = (empty($order)) ? array('id', "DESC") : $order;
|
69 |
list($ofield, $odir) = $order;
|
70 |
-
$query .= " ORDER BY `" . $ofield . "` " . ($odir) . "";
|
71 |
}
|
72 |
|
73 |
$query .= " LIMIT 1";
|
@@ -107,7 +107,7 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
107 |
$c = 1;
|
108 |
|
109 |
foreach ($conditions as $ckey => $cval) {
|
110 |
-
$query .= " `" . $ckey . "` = '" . ($cval) . "'";
|
111 |
|
112 |
if ($c < count($conditions)) {
|
113 |
$query .= " AND";
|
@@ -124,7 +124,7 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
124 |
} else {
|
125 |
if (!is_array($order)) { $order = array('id', "DESC"); }
|
126 |
list($ofield, $odir) = $order;
|
127 |
-
$query .= " ORDER BY `" . $ofield . "` " . ($odir) . "";
|
128 |
}
|
129 |
|
130 |
$query .= (empty($limit)) ? '' : " LIMIT " . $limit . "";
|
@@ -240,14 +240,14 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
240 |
global $wpdb;
|
241 |
|
242 |
if (!empty($field)) {
|
243 |
-
$query = "UPDATE `" . $this -> table . "` SET `" . $field . "` = '" . ($value) . "'";
|
244 |
|
245 |
if (!empty($conditions) && is_array($conditions)) {
|
246 |
$query .= " WHERE";
|
247 |
$c = 1;
|
248 |
|
249 |
foreach ($conditions as $ckey => $cval) {
|
250 |
-
$query .= " `" . $ckey . "` = '" . ($cval) . "'";
|
251 |
|
252 |
if ($c < count($conditions)) {
|
253 |
$query .= " AND";
|
@@ -270,18 +270,18 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
270 |
global $wpdb;
|
271 |
|
272 |
if (!empty($record_id) && $record = $this -> find(array('id' => $record_id))) {
|
273 |
-
$query = "DELETE FROM `" . $this -> table . "` WHERE `id` = '" . ($record_id) . "' LIMIT 1";
|
274 |
|
275 |
if ($wpdb -> query($query)) {
|
276 |
switch ($this -> model) {
|
277 |
case 'Gallery' :
|
278 |
-
$query = "DELETE FROM `" . $wpdb -> prefix . strtolower($this -> pre) . "_galleriesslides` WHERE `gallery_id` = '" . $record_id . "'";
|
279 |
$wpdb -> query($query);
|
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` = '" . $record_id . "'";
|
285 |
$wpdb -> query($query);
|
286 |
break;
|
287 |
}
|
@@ -302,7 +302,7 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
302 |
$query .= " WHERE";
|
303 |
$c = 1;
|
304 |
foreach ($conditions as $ckey => $cval) {
|
305 |
-
$query .= " `" . $ckey . "` = '" . $cval . "'";
|
306 |
if ($c < count($conditions)) {
|
307 |
$query .= " AND";
|
308 |
}
|
@@ -389,7 +389,7 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
389 |
$c++;
|
390 |
}
|
391 |
|
392 |
-
$query .= " WHERE `id` = '" . $this -> data -> id . "' LIMIT 1";
|
393 |
|
394 |
return $query;
|
395 |
}
|
@@ -397,6 +397,4 @@ class GalleryDbHelper extends GalleryPlugin {
|
|
397 |
|
398 |
return false;
|
399 |
}
|
400 |
-
}
|
401 |
-
|
402 |
-
?>
|
52 |
$c = 1;
|
53 |
|
54 |
foreach ($conditions as $ckey => $cval) {
|
55 |
+
$query .= " `" . $ckey . "` = '" . esc_sql($cval) . "'";
|
56 |
|
57 |
if ($c < count($conditions)) {
|
58 |
$query .= " AND";
|
67 |
} else {
|
68 |
$order = (empty($order)) ? array('id', "DESC") : $order;
|
69 |
list($ofield, $odir) = $order;
|
70 |
+
$query .= " ORDER BY `" . $ofield . "` " . esc_sql($odir) . "";
|
71 |
}
|
72 |
|
73 |
$query .= " LIMIT 1";
|
107 |
$c = 1;
|
108 |
|
109 |
foreach ($conditions as $ckey => $cval) {
|
110 |
+
$query .= " `" . $ckey . "` = '" . esc_sql($cval) . "'";
|
111 |
|
112 |
if ($c < count($conditions)) {
|
113 |
$query .= " AND";
|
124 |
} else {
|
125 |
if (!is_array($order)) { $order = array('id', "DESC"); }
|
126 |
list($ofield, $odir) = $order;
|
127 |
+
$query .= " ORDER BY `" . $ofield . "` " . esc_sql($odir) . "";
|
128 |
}
|
129 |
|
130 |
$query .= (empty($limit)) ? '' : " LIMIT " . $limit . "";
|
240 |
global $wpdb;
|
241 |
|
242 |
if (!empty($field)) {
|
243 |
+
$query = "UPDATE `" . $this -> table . "` SET `" . $field . "` = '" . esc_sql($value) . "'";
|
244 |
|
245 |
if (!empty($conditions) && is_array($conditions)) {
|
246 |
$query .= " WHERE";
|
247 |
$c = 1;
|
248 |
|
249 |
foreach ($conditions as $ckey => $cval) {
|
250 |
+
$query .= " `" . $ckey . "` = '" . esc_sql($cval) . "'";
|
251 |
|
252 |
if ($c < count($conditions)) {
|
253 |
$query .= " AND";
|
270 |
global $wpdb;
|
271 |
|
272 |
if (!empty($record_id) && $record = $this -> find(array('id' => $record_id))) {
|
273 |
+
$query = "DELETE FROM `" . $this -> table . "` WHERE `id` = '" . esc_sql($record_id) . "' LIMIT 1";
|
274 |
|
275 |
if ($wpdb -> query($query)) {
|
276 |
switch ($this -> model) {
|
277 |
case 'Gallery' :
|
278 |
+
$query = "DELETE FROM `" . $wpdb -> prefix . strtolower($this -> pre) . "_galleriesslides` WHERE `gallery_id` = '" . esc_sql($record_id) . "'";
|
279 |
$wpdb -> query($query);
|
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;
|
287 |
}
|
302 |
$query .= " WHERE";
|
303 |
$c = 1;
|
304 |
foreach ($conditions as $ckey => $cval) {
|
305 |
+
$query .= " `" . $ckey . "` = '" . esc_sql($cval) . "'";
|
306 |
if ($c < count($conditions)) {
|
307 |
$query .= " AND";
|
308 |
}
|
389 |
$c++;
|
390 |
}
|
391 |
|
392 |
+
$query .= " WHERE `id` = '" . esc_sql($this -> data -> id) . "' LIMIT 1";
|
393 |
|
394 |
return $query;
|
395 |
}
|
397 |
|
398 |
return false;
|
399 |
}
|
400 |
+
}
|
|
|
|
helpers/form.php
CHANGED
@@ -88,6 +88,4 @@ class GalleryFormHelper extends GalleryPlugin {
|
|
88 |
$submit = ob_get_clean();
|
89 |
return $submit;
|
90 |
}
|
91 |
-
}
|
92 |
-
|
93 |
-
?>
|
88 |
$submit = ob_get_clean();
|
89 |
return $submit;
|
90 |
}
|
91 |
+
}
|
|
|
|
helpers/html.php
CHANGED
@@ -15,7 +15,7 @@ class GalleryHtmlHelper extends GalleryPlugin {
|
|
15 |
?>
|
16 |
|
17 |
<span class="galleryhelp">
|
18 |
-
<a href="" onclick="return false;" title="<?php echo esc_attr(
|
19 |
</span>
|
20 |
|
21 |
<?php
|
@@ -399,6 +399,4 @@ class GalleryHtmlHelper extends GalleryPlugin {
|
|
399 |
|
400 |
return false;
|
401 |
}
|
402 |
-
}
|
403 |
-
|
404 |
-
?>
|
15 |
?>
|
16 |
|
17 |
<span class="galleryhelp">
|
18 |
+
<a href="" onclick="return false;" title="<?php echo esc_attr(wp_unslash($help)); ?>"><i class="fa fa-question-circle"></i></a>
|
19 |
</span>
|
20 |
|
21 |
<?php
|
399 |
|
400 |
return false;
|
401 |
}
|
402 |
+
}
|
|
|
|
helpers/metabox.php
CHANGED
@@ -46,6 +46,4 @@ class GalleryMetaboxHelper extends GalleryPlugin {
|
|
46 |
function settings_tech() {
|
47 |
$this -> render('metaboxes' . DS . 'settings-tech', false, true, 'admin');
|
48 |
}
|
49 |
-
}
|
50 |
-
|
51 |
-
?>
|
46 |
function settings_tech() {
|
47 |
$this -> render('metaboxes' . DS . 'settings-tech', false, true, 'admin');
|
48 |
}
|
49 |
+
}
|
|
|
|
images/changelog-header.png
ADDED
Binary file
|
images/changelog-logo.png
ADDED
Binary file
|
includes/class.gallery-list-table.php
CHANGED
@@ -271,7 +271,7 @@ class Gallery_List_Table extends WP_List_Table {
|
|
271 |
$modified = '';
|
272 |
|
273 |
if (!empty($item['modified'])) {
|
274 |
-
$modified = '<label><abbr title="' . esc_attr(
|
275 |
}
|
276 |
|
277 |
return $modified;
|
@@ -294,13 +294,13 @@ class Gallery_List_Table extends WP_List_Table {
|
|
294 |
|
295 |
// If orderby is set, use this as the sort column
|
296 |
if(!empty($_GET['orderby'])) {
|
297 |
-
$orderby =
|
298 |
}
|
299 |
|
300 |
// If order is set use this as the order
|
301 |
if(!empty($_GET['order']))
|
302 |
{
|
303 |
-
$order =
|
304 |
}
|
305 |
|
306 |
|
271 |
$modified = '';
|
272 |
|
273 |
if (!empty($item['modified'])) {
|
274 |
+
$modified = '<label><abbr title="' . esc_attr(wp_unslash($item['modified'])) . '">' . SG() -> Html -> gen_date(false, strtotime($item['modified'])) . '</abbr></label>';
|
275 |
}
|
276 |
|
277 |
return $modified;
|
294 |
|
295 |
// If orderby is set, use this as the sort column
|
296 |
if(!empty($_GET['orderby'])) {
|
297 |
+
$orderby = sanitize_text_field($_GET['orderby']);
|
298 |
}
|
299 |
|
300 |
// If order is set use this as the order
|
301 |
if(!empty($_GET['order']))
|
302 |
{
|
303 |
+
$order = sanitize_text_field($_GET['order']);
|
304 |
}
|
305 |
|
306 |
|
includes/class.slide-list-table.php
CHANGED
@@ -261,7 +261,7 @@ class Slide_List_Table extends WP_List_Table {
|
|
261 |
|
262 |
<?php if (!empty($this -> items)) : ?>
|
263 |
<div class="alignleft actions">
|
264 |
-
<a href="<?php echo admin_url('admin.php?page=' . SG() -> sections -> slides . '&method=order' . ((!empty($_GET['id'])) ? '&gallery_id=' . esc_html($_GET['id']) : '')); ?>" class="button"><i class="fa fa-sort fa-fw"></i> <?php _e('Order Slides', 'slideshow-gallery'); ?></a>
|
265 |
</div>
|
266 |
|
267 |
<div id="action_galleries_div" style="display:none;">
|
@@ -308,7 +308,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(
|
312 |
|
313 |
return $image;
|
314 |
}
|
@@ -351,7 +351,7 @@ class Slide_List_Table extends WP_List_Table {
|
|
351 |
|
352 |
if (!empty($item['uselink']) && !empty($item['link'])) {
|
353 |
$link = '<span class="slideshow_success"><i class="fa fa-check fa-fw"></i> ' . __('Yes', 'slideshow-gallery') . '</span>';
|
354 |
-
$link .= ' (<a href="' . esc_attr(
|
355 |
}
|
356 |
|
357 |
return $link;
|
@@ -375,7 +375,7 @@ class Slide_List_Table extends WP_List_Table {
|
|
375 |
$modified = '';
|
376 |
|
377 |
if (!empty($item['modified'])) {
|
378 |
-
$modified = '<label><abbr title="' . esc_attr(
|
379 |
}
|
380 |
|
381 |
return $modified;
|
@@ -398,13 +398,13 @@ class Slide_List_Table extends WP_List_Table {
|
|
398 |
|
399 |
// If orderby is set, use this as the sort column
|
400 |
if(!empty($_GET['orderby'])) {
|
401 |
-
$orderby =
|
402 |
}
|
403 |
|
404 |
// If order is set use this as the order
|
405 |
if(!empty($_GET['order']))
|
406 |
{
|
407 |
-
$order =
|
408 |
}
|
409 |
|
410 |
|
261 |
|
262 |
<?php if (!empty($this -> items)) : ?>
|
263 |
<div class="alignleft actions">
|
264 |
+
<a href="<?php echo admin_url('admin.php?page=' . SG() -> sections -> slides . '&method=order' . ((!empty($_GET['id'])) ? '&gallery_id=' . esc_html($_GET['id']) : '')); ?>" class="button"><i class="fa fas fa-sort fa-fw"></i> <?php _e('Order Slides', 'slideshow-gallery'); ?></a>
|
265 |
</div>
|
266 |
|
267 |
<div id="action_galleries_div" style="display:none;">
|
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 |
}
|
351 |
|
352 |
if (!empty($item['uselink']) && !empty($item['link'])) {
|
353 |
$link = '<span class="slideshow_success"><i class="fa fa-check fa-fw"></i> ' . __('Yes', 'slideshow-gallery') . '</span>';
|
354 |
+
$link .= ' (<a href="' . esc_attr(wp_unslash($item['link'])) . '" target="_blank">' . __('Open', 'slideshow-gallery') . '</a>)';
|
355 |
}
|
356 |
|
357 |
return $link;
|
375 |
$modified = '';
|
376 |
|
377 |
if (!empty($item['modified'])) {
|
378 |
+
$modified = '<label><abbr title="' . esc_attr(wp_unslash($item['modified'])) . '">' . SG() -> Html -> gen_date(false, strtotime($item['modified'])) . '</abbr></label>';
|
379 |
}
|
380 |
|
381 |
return $modified;
|
398 |
|
399 |
// If orderby is set, use this as the sort column
|
400 |
if(!empty($_GET['orderby'])) {
|
401 |
+
$orderby = sanitize_text_field($_GET['orderby']);
|
402 |
}
|
403 |
|
404 |
// If order is set use this as the order
|
405 |
if(!empty($_GET['order']))
|
406 |
{
|
407 |
+
$order = sanitize_text_field($_GET['order']);
|
408 |
}
|
409 |
|
410 |
|
includes/errorhandler.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SlideshowErrorHandler extends GalleryPlugin {
|
4 |
+
|
5 |
+
var $config = array();
|
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, $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();
|
33 |
+
// Check if it is a slideshow-gallery error
|
34 |
+
if (!empty($file) && strpos($file, 'slideshow-gallery')) {
|
35 |
+
if ($this -> config["debug"] == true) {
|
36 |
+
//$this -> render_err($message, true, true);
|
37 |
+
error_log(date_i18n('[Y-m-d H:i:s] ') . $message . PHP_EOL, 3, SLIDESHOW_LOG_FILE);
|
38 |
+
|
39 |
+
restore_error_handler();
|
40 |
+
error_log($message);
|
41 |
+
}
|
42 |
+
} else {
|
43 |
+
restore_error_handler();
|
44 |
+
if (defined('WP_DEBUG') && WP_DEBUG == true) {
|
45 |
+
trigger_error($message);
|
46 |
+
error_log($message);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
set_error_handler(array($this, "log_error"));
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Checks for a fatal error, work around for set_error_handler not working on fatal errors.
|
55 |
+
*/
|
56 |
+
function check_for_fatal()
|
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 |
+
}
|
js/admin.js
CHANGED
@@ -26,7 +26,7 @@ function slideshow_submitserial(form) {
|
|
26 |
jQuery('#slideshow_submitserial_loading').show();
|
27 |
var formdata = jQuery(form).serialize();
|
28 |
|
29 |
-
jQuery.post(slideshowajax + '?action=slideshow_serialkey', formdata, function(response) {
|
30 |
jQuery('#slideshow_submitserial').html(response);
|
31 |
jQuery.colorbox.resize();
|
32 |
});
|
@@ -36,7 +36,7 @@ function slideshow_deleteserial() {
|
|
36 |
jQuery('#slideshow_submitserial_loading').show();
|
37 |
jQuery('#slideshow_deleteserial_button').prop('disabled', true);
|
38 |
|
39 |
-
jQuery.post(slideshowajax + '?action=slideshow_serialkey&delete=1', false, function(response) {
|
40 |
jQuery.colorbox.close(); parent.location.reload(1);
|
41 |
});
|
42 |
}
|
26 |
jQuery('#slideshow_submitserial_loading').show();
|
27 |
var formdata = jQuery(form).serialize();
|
28 |
|
29 |
+
jQuery.post(slideshowajax + '?action=slideshow_serialkey&security=' + slideshow.ajaxnonce.serialkey, formdata, function(response) {
|
30 |
jQuery('#slideshow_submitserial').html(response);
|
31 |
jQuery.colorbox.resize();
|
32 |
});
|
36 |
jQuery('#slideshow_submitserial_loading').show();
|
37 |
jQuery('#slideshow_deleteserial_button').prop('disabled', true);
|
38 |
|
39 |
+
jQuery.post(slideshowajax + '?action=slideshow_serialkey&delete=1&security=' + slideshow.ajaxnonce.serialkey, false, function(response) {
|
40 |
jQuery.colorbox.close(); parent.location.reload(1);
|
41 |
});
|
42 |
}
|
js/tinymce/editor_plugin.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
/**
|
2 |
* Slideshow Gallery TinyMCE Plugin
|
3 |
-
* @author Tribulant
|
4 |
*/
|
5 |
|
6 |
(function() {
|
7 |
// Load plugin specific language pack
|
8 |
-
tinymce.PluginManager.requireLangPack("gallery");
|
9 |
|
10 |
tinymce.create('tinymce.plugins.gallery', {
|
11 |
init: function(ed, url) {
|
@@ -32,7 +32,7 @@
|
|
32 |
getInfo : function() {
|
33 |
return {
|
34 |
longname : 'Slideshow Gallery TinyMCE Plugin',
|
35 |
-
author : 'Tribulant
|
36 |
authorurl : 'https://tribulant.com',
|
37 |
infourl : 'https://tribulant.com',
|
38 |
version : "1.0"
|
1 |
/**
|
2 |
* Slideshow Gallery TinyMCE Plugin
|
3 |
+
* @author Tribulant
|
4 |
*/
|
5 |
|
6 |
(function() {
|
7 |
// Load plugin specific language pack
|
8 |
+
//tinymce.PluginManager.requireLangPack("gallery");
|
9 |
|
10 |
tinymce.create('tinymce.plugins.gallery', {
|
11 |
init: function(ed, url) {
|
32 |
getInfo : function() {
|
33 |
return {
|
34 |
longname : 'Slideshow Gallery TinyMCE Plugin',
|
35 |
+
author : 'Tribulant',
|
36 |
authorurl : 'https://tribulant.com',
|
37 |
infourl : 'https://tribulant.com',
|
38 |
version : "1.0"
|
models/gallery.php
CHANGED
@@ -76,7 +76,7 @@ class GalleryGallery extends GalleryDbHelper {
|
|
76 |
$data = (empty($data[$this -> model])) ? $data : $data[$this -> model];
|
77 |
|
78 |
foreach ($data as $dkey => $dval) {
|
79 |
-
$this -> data -> {$dkey} =
|
80 |
}
|
81 |
|
82 |
extract($data, EXTR_SKIP);
|
76 |
$data = (empty($data[$this -> model])) ? $data : $data[$this -> model];
|
77 |
|
78 |
foreach ($data as $dkey => $dval) {
|
79 |
+
$this -> data -> {$dkey} = wp_unslash($dval);
|
80 |
}
|
81 |
|
82 |
extract($data, EXTR_SKIP);
|
models/galleryslides.php
CHANGED
@@ -59,7 +59,7 @@ class GalleryGallerySlides extends GalleryDbHelper {
|
|
59 |
$data = (empty($data[$this -> model])) ? $data : $data[$this -> model];
|
60 |
|
61 |
foreach ($data as $dkey => $dval) {
|
62 |
-
$this -> data -> {$dkey} =
|
63 |
}
|
64 |
|
65 |
extract($data, EXTR_SKIP);
|
59 |
$data = (empty($data[$this -> model])) ? $data : $data[$this -> model];
|
60 |
|
61 |
foreach ($data as $dkey => $dval) {
|
62 |
+
$this -> data -> {$dkey} = wp_unslash($dval);
|
63 |
}
|
64 |
|
65 |
extract($data, EXTR_SKIP);
|
models/slideshow.php
CHANGED
@@ -11,7 +11,7 @@ if (!class_exists('slideshow_lite')) {
|
|
11 |
$this -> add_filter('slideshow_sections', 'lite_sections', 10, 1);
|
12 |
$this -> sections = apply_filters('slideshow_sections', (object) $this -> sections);
|
13 |
$this -> add_action('slideshow_admin_menu', 'lite_admin_menu', 10, 1);
|
14 |
-
|
15 |
}
|
16 |
}
|
17 |
}
|
@@ -45,7 +45,7 @@ if (!class_exists('slideshow_lite')) {
|
|
45 |
|
46 |
$args = array(
|
47 |
'id' => 'slideshowlite',
|
48 |
-
'title' =>
|
49 |
'href' => admin_url('admin.php?page=' . $this -> sections -> lite_upgrade),
|
50 |
'meta' => array('class' => 'slideshow-lite'),
|
51 |
);
|
@@ -54,17 +54,17 @@ if (!class_exists('slideshow_lite')) {
|
|
54 |
|
55 |
$args = array(
|
56 |
'id' => 'slideshowlite_submitserial',
|
57 |
-
'title' =>
|
58 |
'parent' => 'slideshowlite',
|
59 |
'href' => admin_url('admin.php?page=' . $this -> sections -> submitserial),
|
60 |
-
'meta' => array('class' => 'slideshow-lite-submitserial', 'onclick' => "jQuery.colorbox({href:ajaxurl + \"?action=slideshow_serialkey\"}); return false;"),
|
61 |
);
|
62 |
|
63 |
$wp_admin_bar -> add_node($args);
|
64 |
|
65 |
$args = array(
|
66 |
'id' => 'slideshowlite_upgrade',
|
67 |
-
'title' =>
|
68 |
'parent' => 'slideshowlite',
|
69 |
'href' => admin_url('admin.php?page=' . $this -> sections -> lite_upgrade),
|
70 |
'meta' => array('class' => 'slideshow-lite-upgrade'),
|
11 |
$this -> add_filter('slideshow_sections', 'lite_sections', 10, 1);
|
12 |
$this -> sections = apply_filters('slideshow_sections', (object) $this -> sections);
|
13 |
$this -> add_action('slideshow_admin_menu', 'lite_admin_menu', 10, 1);
|
14 |
+
$this -> add_action('admin_bar_menu', 'lite_admin_bar_menu', 999, 1);
|
15 |
}
|
16 |
}
|
17 |
}
|
45 |
|
46 |
$args = array(
|
47 |
'id' => 'slideshowlite',
|
48 |
+
'title' => __('Slideshow LITE', 'slideshow-gallery'),
|
49 |
'href' => admin_url('admin.php?page=' . $this -> sections -> lite_upgrade),
|
50 |
'meta' => array('class' => 'slideshow-lite'),
|
51 |
);
|
54 |
|
55 |
$args = array(
|
56 |
'id' => 'slideshowlite_submitserial',
|
57 |
+
'title' => __('Submit Serial Key', 'slideshow-gallery'),
|
58 |
'parent' => 'slideshowlite',
|
59 |
'href' => admin_url('admin.php?page=' . $this -> sections -> submitserial),
|
60 |
+
'meta' => array('class' => 'slideshow-lite-submitserial', 'onclick' => "jQuery.colorbox({href:ajaxurl + \"?action=slideshow_serialkey&security=" . wp_create_nonce('serialkey') . "\"}); return false;"),
|
61 |
);
|
62 |
|
63 |
$wp_admin_bar -> add_node($args);
|
64 |
|
65 |
$args = array(
|
66 |
'id' => 'slideshowlite_upgrade',
|
67 |
+
'title' => __('Upgrade to PRO now!', 'slideshow-gallery'),
|
68 |
'parent' => 'slideshowlite',
|
69 |
'href' => admin_url('admin.php?page=' . $this -> sections -> lite_upgrade),
|
70 |
'meta' => array('class' => 'slideshow-lite-upgrade'),
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.
|
8 |
|
9 |
Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
|
10 |
|
@@ -48,7 +48,7 @@ To embed a slideshow with the images uploaded to a WordPress post/page through i
|
|
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
|
52 |
|
53 |
`[tribulant_slideshow products="latest"]`
|
54 |
|
@@ -126,7 +126,7 @@ This way you can customize each slideshow you embed or hardcode, despite the set
|
|
126 |
|
127 |
Thank you to these wonderful people who contributed to translating the Slideshow Gallery plugin:
|
128 |
|
129 |
-
* Afrikaans (af_ZA) by <a href="https://tribulant.com">Antonie Potgieter | Tribulant
|
130 |
* Slovak (sk_SK) by Branco Radenovich
|
131 |
|
132 |
<a href="https://tribulant.com/support/">Contact us</a> to submit your language file and be mentioned here!
|
@@ -175,6 +175,13 @@ There is an "Images Tester" utility under Slideshow > Settings on the right-hand
|
|
175 |
|
176 |
== Changelog ==
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
= 1.6.11 =
|
179 |
* ADD: Variable buttons when saving multiple slides for Alt, Caption, etc.
|
180 |
* ADD: Polylang multilingual integration
|
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 |
|
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.
|
52 |
|
53 |
`[tribulant_slideshow products="latest"]`
|
54 |
|
126 |
|
127 |
Thank you to these wonderful people who contributed to translating the Slideshow Gallery plugin:
|
128 |
|
129 |
+
* Afrikaans (af_ZA) by <a href="https://tribulant.com">Antonie Potgieter | Tribulant</a>
|
130 |
* Slovak (sk_SK) by Branco Radenovich
|
131 |
|
132 |
<a href="https://tribulant.com/support/">Contact us</a> to submit your language file and be mentioned here!
|
175 |
|
176 |
== Changelog ==
|
177 |
|
178 |
+
= 1.6.12 =
|
179 |
+
* ADD: infoheadingcontent attribute on shortcode
|
180 |
+
* IMPROVE: Preload slideshow images on page load
|
181 |
+
* IMPROVE: Security fixes and improvements
|
182 |
+
* IMPROVE: About page update with new layout
|
183 |
+
* FIX: Debugging setting affects debugging on WordPress globally
|
184 |
+
|
185 |
= 1.6.11 =
|
186 |
* ADD: Variable buttons when saving multiple slides for Alt, Caption, etc.
|
187 |
* ADD: Polylang multilingual integration
|
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.
|
8 |
var $plugin_name;
|
9 |
var $plugin_base;
|
10 |
var $pre = 'Gallery';
|
@@ -71,6 +71,8 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
71 |
$this -> plugin_file = plugin_basename($base);
|
72 |
$this -> sections = apply_filters('slideshow_sections', (object) $this -> sections);
|
73 |
$this -> initialize_classes();
|
|
|
|
|
74 |
|
75 |
global $wpdb;
|
76 |
$debugging = get_option('tridebugging');
|
@@ -79,18 +81,35 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
79 |
if ($this -> debugging == true) {
|
80 |
$wpdb -> show_errors();
|
81 |
|
82 |
-
if ($this -> debug_level == 2) {
|
83 |
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));
|
84 |
@ini_set('display_errors', 1);
|
85 |
-
}
|
86 |
} else {
|
87 |
-
|
88 |
-
error_reporting(0);
|
89 |
-
|
90 |
}
|
91 |
|
92 |
return true;
|
93 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
function after_plugin_row($plugin_name = null) {
|
96 |
$key = $this -> get_option('serialkey');
|
@@ -173,8 +192,12 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
173 |
}
|
174 |
|
175 |
function ajax_serialkey() {
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
178 |
$errors = array();
|
179 |
$success = false;
|
180 |
|
@@ -187,7 +210,8 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
187 |
|
188 |
if (empty($_REQUEST['serialkey'])) { $errors[] = __('Please fill in a serial key.', 'slideshow-gallery'); }
|
189 |
else {
|
190 |
-
$
|
|
|
191 |
|
192 |
if (!$this -> ci_serial_valid()) { $errors[] = __('Serial key is invalid, please try again.', 'slideshow-gallery'); }
|
193 |
else {
|
@@ -209,6 +233,12 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
209 |
}
|
210 |
|
211 |
function ajax_slides_order() {
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
if (!empty($_REQUEST['item'])) {
|
213 |
foreach ($_REQUEST['item'] as $order => $slide_id) {
|
214 |
if (empty($_REQUEST['gallery_id'])) {
|
@@ -226,6 +256,10 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
226 |
}
|
227 |
|
228 |
function ajax_tinymce() {
|
|
|
|
|
|
|
|
|
229 |
$this -> render('tinymce-dialog', false, true, 'admin');
|
230 |
|
231 |
exit();
|
@@ -317,10 +351,10 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
317 |
$version = "1.5.3";
|
318 |
}
|
319 |
|
320 |
-
if (version_compare($cur_version, "1.6.
|
321 |
$this -> initialize_options();
|
322 |
|
323 |
-
$version = "1.6.
|
324 |
}
|
325 |
|
326 |
//the current version is older.
|
@@ -360,6 +394,7 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
360 |
$this -> add_option('navhover', 75);
|
361 |
$this -> add_option('information', "Y");
|
362 |
$this -> add_option('infoposition', "bottom");
|
|
|
363 |
$this -> add_option('infospeed', 10);
|
364 |
$this -> add_option('infohideonmobile', 1);
|
365 |
$this -> add_option('thumbnails', "N");
|
@@ -565,7 +600,17 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
565 |
}
|
566 |
|
567 |
function ci_print_scripts() {
|
568 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
wp_enqueue_script('colorbox', $this -> render_url('js/colorbox.js'), array('jquery'), false, true);
|
570 |
}
|
571 |
|
@@ -577,8 +622,8 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
577 |
wp_enqueue_script('jquery');
|
578 |
|
579 |
if (is_admin()) {
|
580 |
-
$page = (!empty($_GET['page'])) ?
|
581 |
-
$method = (!empty($_GET['method'])) ?
|
582 |
|
583 |
if (!empty($page) && in_array($page, (array) $this -> sections)) {
|
584 |
wp_enqueue_script('iris', admin_url('js/iris.min.js'), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1);
|
@@ -613,7 +658,16 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
613 |
}
|
614 |
|
615 |
wp_enqueue_script('colorbox', $this -> render_url('js/colorbox.js', "admin"), array('jquery'), '1.6.3');
|
616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
617 |
} else {
|
618 |
wp_enqueue_script($this -> plugin_name, $this -> render_url('js/gallery.js', "default"), null, '1.0');
|
619 |
wp_enqueue_script('colorbox', $this -> render_url('js/colorbox.js', "default"), array('jquery'), '1.6.3');
|
@@ -647,7 +701,7 @@ class GalleryPlugin extends GalleryCheckinit {
|
|
647 |
if (is_admin()) {
|
648 |
wp_enqueue_style('fontawesome', $this -> render_url('css/fontawesome.css', "admin"), false, '4.4.0', "all");
|
649 |
|
650 |
-
$page =
|
651 |
if (!empty($page) && in_array($page, (array) $this -> sections)) {
|
652 |
wp_enqueue_style('wp-color-picker');
|
653 |
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.6.12';
|
8 |
var $plugin_name;
|
9 |
var $plugin_base;
|
10 |
var $pre = 'Gallery';
|
71 |
$this -> plugin_file = plugin_basename($base);
|
72 |
$this -> sections = apply_filters('slideshow_sections', (object) $this -> sections);
|
73 |
$this -> initialize_classes();
|
74 |
+
|
75 |
+
if (!defined('SLIDESHOW_LOG_FILE')) { define("SLIDESHOW_LOG_FILE", $this -> plugin_base() . DS . "slideshow.log"); }
|
76 |
|
77 |
global $wpdb;
|
78 |
$debugging = get_option('tridebugging');
|
81 |
if ($this -> debugging == true) {
|
82 |
$wpdb -> show_errors();
|
83 |
|
84 |
+
/*if ($this -> debug_level == 2) {
|
85 |
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));
|
86 |
@ini_set('display_errors', 1);
|
87 |
+
}*/
|
88 |
} else {
|
89 |
+
//$wpdb -> hide_errors();
|
90 |
+
//error_reporting(0);
|
91 |
+
//@ini_set('display_errors', 0);
|
92 |
}
|
93 |
|
94 |
return true;
|
95 |
}
|
96 |
+
|
97 |
+
function log_error($error = null) {
|
98 |
+
$debugging = get_option('tridebugging');
|
99 |
+
$this -> debugging = (empty($debugging)) ? $this -> debugging : true;
|
100 |
+
|
101 |
+
if (!empty($error)) {
|
102 |
+
if (is_array($error) || is_object($error)) {
|
103 |
+
$error = '<pre>' . print_r($error, true) . '</pre>';
|
104 |
+
}
|
105 |
+
|
106 |
+
error_log(date_i18n('[Y-m-d H:i:s] ') . $error . PHP_EOL, 3, SLIDESHOW_LOG_FILE);
|
107 |
+
|
108 |
+
return true;
|
109 |
+
}
|
110 |
+
|
111 |
+
return false;
|
112 |
+
}
|
113 |
|
114 |
function after_plugin_row($plugin_name = null) {
|
115 |
$key = $this -> get_option('serialkey');
|
192 |
}
|
193 |
|
194 |
function ajax_serialkey() {
|
195 |
+
check_ajax_referer('serialkey', 'security');
|
196 |
+
|
197 |
+
if (!current_user_can('slideshow_welcome')) {
|
198 |
+
wp_die(__('You do not have permission', 'slideshow-gallery'));
|
199 |
+
}
|
200 |
+
|
201 |
$errors = array();
|
202 |
$success = false;
|
203 |
|
210 |
|
211 |
if (empty($_REQUEST['serialkey'])) { $errors[] = __('Please fill in a serial key.', 'slideshow-gallery'); }
|
212 |
else {
|
213 |
+
$serial = sanitize_text_field($_REQUEST['serialkey']);
|
214 |
+
$this -> update_option('serialkey', $serial); //update the DB option
|
215 |
|
216 |
if (!$this -> ci_serial_valid()) { $errors[] = __('Serial key is invalid, please try again.', 'slideshow-gallery'); }
|
217 |
else {
|
233 |
}
|
234 |
|
235 |
function ajax_slides_order() {
|
236 |
+
check_ajax_referer('slides_order', 'security');
|
237 |
+
|
238 |
+
if (!current_user_can('slideshow_slides')) {
|
239 |
+
wp_die(__('You do not have permission', 'slideshow-gallery'));
|
240 |
+
}
|
241 |
+
|
242 |
if (!empty($_REQUEST['item'])) {
|
243 |
foreach ($_REQUEST['item'] as $order => $slide_id) {
|
244 |
if (empty($_REQUEST['gallery_id'])) {
|
256 |
}
|
257 |
|
258 |
function ajax_tinymce() {
|
259 |
+
if (!current_user_can('slideshow_welcome')) {
|
260 |
+
wp_die(__('You do not have permission', 'slideshow-gallery'));
|
261 |
+
}
|
262 |
+
|
263 |
$this -> render('tinymce-dialog', false, true, 'admin');
|
264 |
|
265 |
exit();
|
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.
|
394 |
$this -> add_option('navhover', 75);
|
395 |
$this -> add_option('information', "Y");
|
396 |
$this -> add_option('infoposition', "bottom");
|
397 |
+
$this -> add_option('infoheadingcontent', "title");
|
398 |
$this -> add_option('infospeed', 10);
|
399 |
$this -> add_option('infohideonmobile', 1);
|
400 |
$this -> add_option('thumbnails', "N");
|
600 |
}
|
601 |
|
602 |
function ci_print_scripts() {
|
603 |
+
wp_register_script('slideshow', $this -> render_url('js/admin.js'), array('jquery'), '1.0', true);
|
604 |
+
|
605 |
+
$params = array(
|
606 |
+
'ajaxnonce' => array(
|
607 |
+
'serialkey' => wp_create_nonce('serialkey'),
|
608 |
+
)
|
609 |
+
);
|
610 |
+
|
611 |
+
wp_localize_script('slideshow', 'slideshow', $params);
|
612 |
+
wp_enqueue_script('slideshow');
|
613 |
+
|
614 |
wp_enqueue_script('colorbox', $this -> render_url('js/colorbox.js'), array('jquery'), false, true);
|
615 |
}
|
616 |
|
622 |
wp_enqueue_script('jquery');
|
623 |
|
624 |
if (is_admin()) {
|
625 |
+
$page = (!empty($_GET['page'])) ? sanitize_text_field($_GET['page']) : false;
|
626 |
+
$method = (!empty($_GET['method'])) ? sanitize_text_field($_GET['method']) : false;
|
627 |
|
628 |
if (!empty($page) && in_array($page, (array) $this -> sections)) {
|
629 |
wp_enqueue_script('iris', admin_url('js/iris.min.js'), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1);
|
658 |
}
|
659 |
|
660 |
wp_enqueue_script('colorbox', $this -> render_url('js/colorbox.js', "admin"), array('jquery'), '1.6.3');
|
661 |
+
wp_register_script('slideshow', $this -> render_url('js/admin.js'), array('jquery'), '1.0', true);
|
662 |
+
|
663 |
+
$params = array(
|
664 |
+
'ajaxnonce' => array(
|
665 |
+
'serialkey' => wp_create_nonce('serialkey'),
|
666 |
+
)
|
667 |
+
);
|
668 |
+
|
669 |
+
wp_localize_script('slideshow', 'slideshow', $params);
|
670 |
+
wp_enqueue_script('slideshow');
|
671 |
} else {
|
672 |
wp_enqueue_script($this -> plugin_name, $this -> render_url('js/gallery.js', "default"), null, '1.0');
|
673 |
wp_enqueue_script('colorbox', $this -> render_url('js/colorbox.js', "default"), array('jquery'), '1.6.3');
|
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");
|
slideshow-gallery.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
/*
|
4 |
Plugin Name: Slideshow Gallery
|
5 |
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.
|
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
|
@@ -23,6 +23,7 @@ if (file_exists($path)) {
|
|
23 |
require_once(dirname(__FILE__) . DS . 'includes' . DS . 'checkinit.php');
|
24 |
require_once(dirname(__FILE__) . DS . 'includes' . DS . 'constants.php');
|
25 |
require_once($path);
|
|
|
26 |
require_once(dirname(__FILE__) . DS . 'vendors' . DS . 'otf_regen_thumbs.php');
|
27 |
}
|
28 |
|
@@ -36,6 +37,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
36 |
$this -> plugin_name = basename(dirname(__FILE__));
|
37 |
$this -> plugin_file = plugin_basename(__FILE__);
|
38 |
$this -> register_plugin($this -> plugin_name, __FILE__);
|
|
|
39 |
|
40 |
//WordPress action hooks
|
41 |
$this -> add_action('plugins_loaded');
|
@@ -99,7 +101,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
99 |
$this_plugin = plugin_basename(__FILE__);
|
100 |
|
101 |
if (!empty($plugin_file) && $plugin_file == $this_plugin) {
|
102 |
-
$actions[] = '<a href="" onclick="jQuery.colorbox({href:ajaxurl + \'?action=slideshow_serialkey\'}); return false;" id="slideshow_submitseriallink"><i class="fa fa-key fa-fw"></i> ' . __('Serial Key', 'slideshow-gallery') . '</a>';
|
103 |
$actions[] = '<a href="' . admin_url('admin.php?page=' . $this -> sections -> settings) . '"><i class="fa fa-cog fa-fw"></i> ' . __('Settings', 'slideshow-gallery') . '</a>';
|
104 |
|
105 |
if ($update = $this -> vendor('update')) {
|
@@ -164,7 +166,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
164 |
?><!-- Slideshow Gallery Javascript BEG --><?php
|
165 |
|
166 |
foreach ($slideshow_javascript as $javascript) {
|
167 |
-
echo
|
168 |
}
|
169 |
|
170 |
?><!-- Slideshow Gallery Javascript END --><?php
|
@@ -176,7 +178,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
176 |
?><!-- Slideshow Gallery CSS BEG --><?php
|
177 |
|
178 |
foreach ($slideshow_css as $css) {
|
179 |
-
echo
|
180 |
}
|
181 |
|
182 |
?><!-- Slideshow Gallery CSS END --><?php
|
@@ -314,9 +316,11 @@ if (!class_exists('SlideshowGallery')) {
|
|
314 |
if (!empty($_POST)) {
|
315 |
check_admin_referer($this -> sections -> submitserial);
|
316 |
|
317 |
-
|
|
|
|
|
318 |
else {
|
319 |
-
$this -> update_option('serialkey', $
|
320 |
$this -> delete_all_cache('all');
|
321 |
|
322 |
if (!$this -> ci_serial_valid()) { $errors[] = __('Serial key is invalid, please try again.', 'slideshow-gallery'); }
|
@@ -336,7 +340,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
336 |
if (is_admin()) {
|
337 |
$this -> check_uploaddir();
|
338 |
|
339 |
-
$message = (!empty($_GET[$this -> pre . 'message'])) ?
|
340 |
if (!empty($message)) {
|
341 |
$msg_type = (!empty($_GET[$this -> pre . 'updated'])) ? 'msg' : 'err';
|
342 |
call_user_func(array($this, 'render_' . $msg_type), $message);
|
@@ -347,7 +351,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
347 |
$message = sprintf(__('You have been using the %s for %s days or more. Please consider to %s it or say it %s on %s.', 'slideshow-gallery'),
|
348 |
'<a href="https://wordpress.org/plugins/slideshow-gallery/" target="_blank">Tribulant Slideshow Gallery plugin</a>',
|
349 |
$showmessage_ratereview,
|
350 |
-
'<a class="button" href="https://wordpress.org/support/
|
351 |
'<a class="button" href="https://wordpress.org/plugins/slideshow-gallery/?compatibility[version]=' . get_bloginfo('version') . '&compatibility[topic_version]=' . $this -> version . '&compatibility[compatible]=1" target="_blank"><i class="fa fa-check"></i> Works</a>',
|
352 |
'<a href="https://wordpress.org/plugins/slideshow-gallery/" target="_blank">WordPress.org</a>');
|
353 |
|
@@ -356,7 +360,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
356 |
}
|
357 |
|
358 |
/* Serial key submission message */
|
359 |
-
$page =
|
360 |
if (!$this -> ci_serial_valid() && (empty($page) || $page != $this -> sections -> submitserial)) {
|
361 |
$hidemessage_upgradetopro = $this -> get_option('hidemessage_upgradetopro');
|
362 |
|
@@ -372,7 +376,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
372 |
<script type="text/javascript">
|
373 |
jQuery(document).ready(function(e) {
|
374 |
jQuery('#<?php echo $this -> pre; ?>submitseriallink').click(function() {
|
375 |
-
jQuery.colorbox({href:ajaxurl + "?action=slideshow_serialkey"});
|
376 |
return false;
|
377 |
});
|
378 |
});
|
@@ -383,9 +387,9 @@ if (!class_exists('SlideshowGallery')) {
|
|
383 |
}
|
384 |
|
385 |
// Is an Update Available?
|
386 |
-
if (!empty($
|
387 |
if (apply_filters('slideshow_updates', true)) {
|
388 |
-
if (current_user_can('edit_plugins') && $this -> has_update() && (empty($
|
389 |
$hideupdate = $this -> get_option('hideupdate');
|
390 |
if (empty($hideupdate) || (!empty($hideupdate) && version_compare($this -> version, $hideupdate, '>'))) {
|
391 |
$update = $this -> vendor('update');
|
@@ -467,6 +471,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
467 |
'navopacity' => ($this -> get_option('navopacity')),
|
468 |
'navhoveropacity' => ($this -> get_option('navhover')),
|
469 |
'showinfo' => (($this -> get_option('information') == "Y") ? "true" : "false"),
|
|
|
470 |
'infoposition' => ($this -> get_option('infoposition')),
|
471 |
'infoonhover' => ($this -> get_option('infoonhover')),
|
472 |
'infospeed' => ($this -> get_option('infospeed')),
|
@@ -561,9 +566,9 @@ if (!class_exists('SlideshowGallery')) {
|
|
561 |
}
|
562 |
|
563 |
if ($orderf == "order") {
|
564 |
-
$orderbystring = "ORDER BY " . $this -> GallerySlides() -> table . ".order " . $orderd . "";
|
565 |
} else {
|
566 |
-
$orderbystring = "ORDER BY " . $this -> Slide() -> table . "." . $orderf . " " . $orderd . "";
|
567 |
}
|
568 |
}
|
569 |
|
@@ -666,6 +671,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
666 |
|
667 |
if ($orderby == "random") { shuffle($attachments); }
|
668 |
$slides = $attachments;
|
|
|
669 |
$slideshowtype = "post";
|
670 |
$content = $this -> render('gallery', array('slides' => $slides, 'unique' => $pid, 'options' => $s, 'frompost' => true), false, 'default');
|
671 |
} else {
|
@@ -746,7 +752,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
746 |
if (!empty($error)) {
|
747 |
$content = '';
|
748 |
$content .= '<p class="slideshow_error slideshow-gallery-error">';
|
749 |
-
$content .=
|
750 |
$content .= '</p>';
|
751 |
}
|
752 |
|
@@ -758,10 +764,10 @@ if (!class_exists('SlideshowGallery')) {
|
|
758 |
|
759 |
function admin_slides() {
|
760 |
global $wpdb;
|
761 |
-
$method = (!empty($_GET['method'])) ?
|
762 |
switch ($method) {
|
763 |
case 'delete' :
|
764 |
-
$id =
|
765 |
if (!empty($id)) {
|
766 |
if ($this -> Slide() -> delete($id)) {
|
767 |
$msg_type = 'message';
|
@@ -795,7 +801,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
795 |
}
|
796 |
} else {
|
797 |
$this -> Db -> model = $this -> Slide() -> model;
|
798 |
-
$this -> Slide() -> find(array('id' =>
|
799 |
$this -> render('slides' . DS . 'save', false, true, 'admin');
|
800 |
}
|
801 |
break;
|
@@ -806,8 +812,8 @@ if (!class_exists('SlideshowGallery')) {
|
|
806 |
$errors = array();
|
807 |
|
808 |
if (!empty($_POST['Slide']['slides'])) {
|
809 |
-
$slides = $_POST['Slide']['slides'];
|
810 |
-
$galleries = $_POST['Slide']['galleries'];
|
811 |
|
812 |
$s = 0;
|
813 |
|
@@ -845,12 +851,12 @@ if (!class_exists('SlideshowGallery')) {
|
|
845 |
$this -> render('slides' . DS . 'save-multiple', array('errors' => $errors), true, 'admin');
|
846 |
break;
|
847 |
case 'order' :
|
848 |
-
$gallery_id =
|
849 |
if (!empty($gallery_id)) {
|
850 |
-
$gallery = $this -> Gallery() -> find(array('id' =>
|
851 |
|
852 |
$slides = array();
|
853 |
-
$gsquery = "SELECT gs.slide_id FROM `" . $this -> GallerySlides() -> table . "` gs WHERE `gallery_id` = '" . $gallery -> id . "' ORDER BY gs.order ASC";
|
854 |
|
855 |
$query_hash = md5($gsquery);
|
856 |
if ($oc_gs = wp_cache_get($query_hash, 'slideshowgallery')) {
|
@@ -880,7 +886,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
880 |
|
881 |
function admin_galleries() {
|
882 |
|
883 |
-
$method =
|
884 |
switch ($method) {
|
885 |
case 'save' :
|
886 |
if (!empty($_POST)) {
|
@@ -899,16 +905,16 @@ if (!class_exists('SlideshowGallery')) {
|
|
899 |
}
|
900 |
} else {
|
901 |
$this -> Db -> model = $this -> Gallery() -> model;
|
902 |
-
$this -> Gallery() -> find(array('id' =>
|
903 |
$this -> render('galleries' . DS . 'save', false, true, 'admin');
|
904 |
}
|
905 |
break;
|
906 |
case 'view' :
|
907 |
$this -> Db -> model = $this -> Gallery() -> model;
|
908 |
-
$gallery = $this -> Gallery() -> find(array('id' =>
|
909 |
-
$perpage = (isset($_COOKIE[$this -> pre . 'slidesperpage'])) ? $_COOKIE[$this -> pre . 'slidesperpage'] : 25;
|
910 |
-
$orderfield = (empty($_GET['orderby'])) ? 'modified' :
|
911 |
-
$orderdirection = (empty($_GET['order'])) ? 'DESC' : strtoupper(
|
912 |
$order = array($orderfield, $orderdirection);
|
913 |
$data = $this -> paginate('GallerySlides', "*", $this -> sections -> galleries . '&method=view&id=' . $gallery -> id, array('gallery_id' => $gallery -> id), false, $perpage, $order);
|
914 |
|
@@ -924,13 +930,13 @@ if (!class_exists('SlideshowGallery')) {
|
|
924 |
break;
|
925 |
case 'hardcode' :
|
926 |
$this -> Db -> model = $this -> Gallery() -> model;
|
927 |
-
$gallery = $this -> Gallery() -> find(array('id' =>
|
928 |
$this -> render('galleries' . DS . 'hardcode', array('gallery' => $gallery), true, 'admin');
|
929 |
break;
|
930 |
case 'delete' :
|
931 |
-
$id =
|
932 |
if (!empty($id)) {
|
933 |
-
if ($this -> Gallery() -> delete(
|
934 |
$msg_type = 'message';
|
935 |
$message = __('Gallery has been removed', 'slideshow-gallery');
|
936 |
} else {
|
@@ -952,12 +958,28 @@ if (!class_exists('SlideshowGallery')) {
|
|
952 |
|
953 |
function admin_settings() {
|
954 |
global $wpdb;
|
955 |
-
$method =
|
956 |
|
957 |
switch ($method) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
958 |
case 'dismiss' :
|
959 |
if (!empty($_GET['dismiss'])) {
|
960 |
-
$this -> update_option('dismiss_' .
|
961 |
}
|
962 |
|
963 |
$this -> redirect($this -> referer);
|
@@ -976,7 +998,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
976 |
break;
|
977 |
case 'reset' :
|
978 |
global $wpdb;
|
979 |
-
$query = "DELETE FROM `" . $wpdb -> prefix . "options` WHERE `option_name` LIKE '" . $this -> pre . "%';";
|
980 |
|
981 |
if ($wpdb -> query($query)) {
|
982 |
$this -> initialize_options();
|
@@ -1044,7 +1066,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
1044 |
$role_names = $wp_roles -> get_names();
|
1045 |
|
1046 |
if (!empty($_POST['permissions'])) {
|
1047 |
-
$permissions = $_POST['permissions'];
|
1048 |
|
1049 |
foreach ($role_names as $role_key => $role_name) {
|
1050 |
foreach ($this -> sections as $section_key => $section_name) {
|
@@ -1090,7 +1112,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
1090 |
}
|
1091 |
|
1092 |
function admin_settings_updates() {
|
1093 |
-
$method =
|
1094 |
switch ($method) {
|
1095 |
case 'check' :
|
1096 |
delete_transient('slideshow_update_info');
|
@@ -1107,7 +1129,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
1107 |
|
1108 |
function custom_redirect() {
|
1109 |
|
1110 |
-
$method =
|
1111 |
if (!empty($method)) {
|
1112 |
switch ($method) {
|
1113 |
case 'hidemessage' :
|
@@ -1125,7 +1147,7 @@ if (!class_exists('SlideshowGallery')) {
|
|
1125 |
break;
|
1126 |
case 'hideupdate' :
|
1127 |
if (!empty($_GET['version'])) {
|
1128 |
-
$this -> update_option('hideupdate',
|
1129 |
$this -> redirect($this -> referer);
|
1130 |
}
|
1131 |
break;
|
3 |
/*
|
4 |
Plugin Name: Slideshow Gallery
|
5 |
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
|
23 |
require_once(dirname(__FILE__) . DS . 'includes' . DS . 'checkinit.php');
|
24 |
require_once(dirname(__FILE__) . DS . 'includes' . DS . 'constants.php');
|
25 |
require_once($path);
|
26 |
+
require_once(dirname(__FILE__) . DS . 'includes' . DS . 'errorhandler.php');
|
27 |
require_once(dirname(__FILE__) . DS . 'vendors' . DS . 'otf_regen_thumbs.php');
|
28 |
}
|
29 |
|
37 |
$this -> plugin_name = basename(dirname(__FILE__));
|
38 |
$this -> plugin_file = plugin_basename(__FILE__);
|
39 |
$this -> register_plugin($this -> plugin_name, __FILE__);
|
40 |
+
$this -> errorhandler = new SlideshowErrorHandler();
|
41 |
|
42 |
//WordPress action hooks
|
43 |
$this -> add_action('plugins_loaded');
|
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')) {
|
166 |
?><!-- Slideshow Gallery Javascript BEG --><?php
|
167 |
|
168 |
foreach ($slideshow_javascript as $javascript) {
|
169 |
+
echo wp_unslash($javascript);
|
170 |
}
|
171 |
|
172 |
?><!-- Slideshow Gallery Javascript END --><?php
|
178 |
?><!-- Slideshow Gallery CSS BEG --><?php
|
179 |
|
180 |
foreach ($slideshow_css as $css) {
|
181 |
+
echo wp_unslash($css);
|
182 |
}
|
183 |
|
184 |
?><!-- Slideshow Gallery CSS END --><?php
|
316 |
if (!empty($_POST)) {
|
317 |
check_admin_referer($this -> sections -> submitserial);
|
318 |
|
319 |
+
$serial = sanitize_text_field($_REQUEST['serial']);
|
320 |
+
|
321 |
+
if (empty($serial)) { $errors[] = __('Please fill in a serial key.', 'slideshow-gallery'); }
|
322 |
else {
|
323 |
+
$this -> update_option('serialkey', $serial); //update the DB option
|
324 |
$this -> delete_all_cache('all');
|
325 |
|
326 |
if (!$this -> ci_serial_valid()) { $errors[] = __('Serial key is invalid, please try again.', 'slideshow-gallery'); }
|
340 |
if (is_admin()) {
|
341 |
$this -> check_uploaddir();
|
342 |
|
343 |
+
$message = (!empty($_GET[$this -> pre . 'message'])) ? wp_kses_html_error($_GET[$this -> pre . 'message']) : false;
|
344 |
if (!empty($message)) {
|
345 |
$msg_type = (!empty($_GET[$this -> pre . 'updated'])) ? 'msg' : 'err';
|
346 |
call_user_func(array($this, 'render_' . $msg_type), $message);
|
351 |
$message = sprintf(__('You have been using the %s for %s days or more. Please consider to %s it or say it %s on %s.', 'slideshow-gallery'),
|
352 |
'<a href="https://wordpress.org/plugins/slideshow-gallery/" target="_blank">Tribulant Slideshow Gallery plugin</a>',
|
353 |
$showmessage_ratereview,
|
354 |
+
'<a class="button" href="https://wordpress.org/support/plugin/slideshow-gallery/reviews/?rate=5#new-post" target="_blank"><i class="fa fa-star"></i> Rate</a>',
|
355 |
'<a class="button" href="https://wordpress.org/plugins/slideshow-gallery/?compatibility[version]=' . get_bloginfo('version') . '&compatibility[topic_version]=' . $this -> version . '&compatibility[compatible]=1" target="_blank"><i class="fa fa-check"></i> Works</a>',
|
356 |
'<a href="https://wordpress.org/plugins/slideshow-gallery/" target="_blank">WordPress.org</a>');
|
357 |
|
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 |
|
376 |
<script type="text/javascript">
|
377 |
jQuery(document).ready(function(e) {
|
378 |
jQuery('#<?php echo $this -> pre; ?>submitseriallink').click(function() {
|
379 |
+
jQuery.colorbox({href:ajaxurl + "?action=slideshow_serialkey&security=<?php echo wp_create_nonce('serialkey'); ?>"});
|
380 |
return false;
|
381 |
});
|
382 |
});
|
387 |
}
|
388 |
|
389 |
// Is an Update Available?
|
390 |
+
if (!empty($page) && in_array($page, (array) $this -> sections)) {
|
391 |
if (apply_filters('slideshow_updates', true)) {
|
392 |
+
if (current_user_can('edit_plugins') && $this -> has_update() && (empty($page) || (!empty($page) && $page != $this -> sections -> settings_updates))) {
|
393 |
$hideupdate = $this -> get_option('hideupdate');
|
394 |
if (empty($hideupdate) || (!empty($hideupdate) && version_compare($this -> version, $hideupdate, '>'))) {
|
395 |
$update = $this -> vendor('update');
|
471 |
'navopacity' => ($this -> get_option('navopacity')),
|
472 |
'navhoveropacity' => ($this -> get_option('navhover')),
|
473 |
'showinfo' => (($this -> get_option('information') == "Y") ? "true" : "false"),
|
474 |
+
'infoheadingcontent' => "title",
|
475 |
'infoposition' => ($this -> get_option('infoposition')),
|
476 |
'infoonhover' => ($this -> get_option('infoonhover')),
|
477 |
'infospeed' => ($this -> get_option('infospeed')),
|
566 |
}
|
567 |
|
568 |
if ($orderf == "order") {
|
569 |
+
$orderbystring = "ORDER BY " . $this -> GallerySlides() -> table . ".order " . esc_sql($orderd) . "";
|
570 |
} else {
|
571 |
+
$orderbystring = "ORDER BY " . $this -> Slide() -> table . "." . esc_sql($orderf) . " " . esc_sql($orderd) . "";
|
572 |
}
|
573 |
}
|
574 |
|
671 |
|
672 |
if ($orderby == "random") { shuffle($attachments); }
|
673 |
$slides = $attachments;
|
674 |
+
|
675 |
$slideshowtype = "post";
|
676 |
$content = $this -> render('gallery', array('slides' => $slides, 'unique' => $pid, 'options' => $s, 'frompost' => true), false, 'default');
|
677 |
} else {
|
752 |
if (!empty($error)) {
|
753 |
$content = '';
|
754 |
$content .= '<p class="slideshow_error slideshow-gallery-error">';
|
755 |
+
$content .= wp_unslash($error);
|
756 |
$content .= '</p>';
|
757 |
}
|
758 |
|
764 |
|
765 |
function admin_slides() {
|
766 |
global $wpdb;
|
767 |
+
$method = (!empty($_GET['method'])) ? sanitize_text_field($_GET['method']) : false;
|
768 |
switch ($method) {
|
769 |
case 'delete' :
|
770 |
+
$id = sanitize_text_field($_GET['id']);
|
771 |
if (!empty($id)) {
|
772 |
if ($this -> Slide() -> delete($id)) {
|
773 |
$msg_type = 'message';
|
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;
|
812 |
$errors = array();
|
813 |
|
814 |
if (!empty($_POST['Slide']['slides'])) {
|
815 |
+
$slides = map_deep($_POST['Slide']['slides'], 'sanitize_text_field');
|
816 |
+
$galleries = map_deep($_POST['Slide']['galleries'], 'sanitize_text_field');
|
817 |
|
818 |
$s = 0;
|
819 |
|
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 |
|
858 |
$slides = array();
|
859 |
+
$gsquery = "SELECT gs.slide_id FROM `" . $this -> GallerySlides() -> table . "` gs WHERE `gallery_id` = '" . esc_sql($gallery -> id) . "' ORDER BY gs.order ASC";
|
860 |
|
861 |
$query_hash = md5($gsquery);
|
862 |
if ($oc_gs = wp_cache_get($query_hash, 'slideshowgallery')) {
|
886 |
|
887 |
function admin_galleries() {
|
888 |
|
889 |
+
$method = (!empty($_GET['method'])) ? sanitize_text_field($_GET['method']) : false;
|
890 |
switch ($method) {
|
891 |
case 'save' :
|
892 |
if (!empty($_POST)) {
|
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;
|
912 |
case 'view' :
|
913 |
$this -> Db -> model = $this -> Gallery() -> model;
|
914 |
+
$gallery = $this -> Gallery() -> find(array('id' => sanitize_text_field($_GET['id'])));
|
915 |
+
$perpage = (isset($_COOKIE[$this -> pre . 'slidesperpage'])) ? sanitize_text_field($_COOKIE[$this -> pre . 'slidesperpage']) : 25;
|
916 |
+
$orderfield = (empty($_GET['orderby'])) ? 'modified' : sanitize_text_field($_GET['orderby']);
|
917 |
+
$orderdirection = (empty($_GET['order'])) ? 'DESC' : strtoupper(sanitize_text_field($_GET['order']));
|
918 |
$order = array($orderfield, $orderdirection);
|
919 |
$data = $this -> paginate('GallerySlides', "*", $this -> sections -> galleries . '&method=view&id=' . $gallery -> id, array('gallery_id' => $gallery -> id), false, $perpage, $order);
|
920 |
|
930 |
break;
|
931 |
case 'hardcode' :
|
932 |
$this -> Db -> model = $this -> Gallery() -> model;
|
933 |
+
$gallery = $this -> Gallery() -> find(array('id' => sanitize_text_field($_GET['id'])));
|
934 |
$this -> render('galleries' . DS . 'hardcode', array('gallery' => $gallery), true, 'admin');
|
935 |
break;
|
936 |
case 'delete' :
|
937 |
+
$id = sanitize_text_field($_GET['id']);
|
938 |
if (!empty($id)) {
|
939 |
+
if ($this -> Gallery() -> delete($id)) {
|
940 |
$msg_type = 'message';
|
941 |
$message = __('Gallery has been removed', 'slideshow-gallery');
|
942 |
} else {
|
958 |
|
959 |
function admin_settings() {
|
960 |
global $wpdb;
|
961 |
+
$method = (!empty($_GET['method'])) ? sanitize_text_field($_GET['method']) : false;
|
962 |
|
963 |
switch ($method) {
|
964 |
+
case 'clearlog' :
|
965 |
+
|
966 |
+
check_admin_referer($this -> sections -> settings . '_clearlog');
|
967 |
+
|
968 |
+
@unlink(SLIDESHOW_LOG_FILE);
|
969 |
+
|
970 |
+
$fh = fopen(SLIDESHOW_LOG_FILE, "w");
|
971 |
+
fwrite($fh, "*** Slideshow Log File *** \r\n\r\n");
|
972 |
+
fclose($fh);
|
973 |
+
chmod(SLIDESHOW_LOG_FILE, 0777);
|
974 |
+
|
975 |
+
$msgtype = 'message';
|
976 |
+
$message = __('Log file has been cleared', 'slideshow-gallery');
|
977 |
+
$this -> redirect($this -> referer, $msgtype, $message);
|
978 |
+
|
979 |
+
break;
|
980 |
case 'dismiss' :
|
981 |
if (!empty($_GET['dismiss'])) {
|
982 |
+
$this -> update_option('dismiss_' . sanitize_text_field($_GET['dismiss']), 1);
|
983 |
}
|
984 |
|
985 |
$this -> redirect($this -> referer);
|
998 |
break;
|
999 |
case 'reset' :
|
1000 |
global $wpdb;
|
1001 |
+
$query = "DELETE FROM `" . $wpdb -> prefix . "options` WHERE `option_name` LIKE '" . esc_sql($this -> pre) . "%';";
|
1002 |
|
1003 |
if ($wpdb -> query($query)) {
|
1004 |
$this -> initialize_options();
|
1066 |
$role_names = $wp_roles -> get_names();
|
1067 |
|
1068 |
if (!empty($_POST['permissions'])) {
|
1069 |
+
$permissions = map_deep($_POST['permissions'], 'sanitize_text_field');
|
1070 |
|
1071 |
foreach ($role_names as $role_key => $role_name) {
|
1072 |
foreach ($this -> sections as $section_key => $section_name) {
|
1112 |
}
|
1113 |
|
1114 |
function admin_settings_updates() {
|
1115 |
+
$method = (!empty($_GET['method'])) ? sanitize_text_field($_GET['method']) : false;
|
1116 |
switch ($method) {
|
1117 |
case 'check' :
|
1118 |
delete_transient('slideshow_update_info');
|
1129 |
|
1130 |
function custom_redirect() {
|
1131 |
|
1132 |
+
$method = (!empty($_GET['slideshow_method'])) ? sanitize_text_field($_GET['slideshow_method']) : false;
|
1133 |
if (!empty($method)) {
|
1134 |
switch ($method) {
|
1135 |
case 'hidemessage' :
|
1147 |
break;
|
1148 |
case 'hideupdate' :
|
1149 |
if (!empty($_GET['version'])) {
|
1150 |
+
$this -> update_option('hideupdate', sanitize_text_field($_GET['version']));
|
1151 |
$this -> redirect($this -> referer);
|
1152 |
}
|
1153 |
break;
|
vendors/class.update.php
CHANGED
@@ -24,7 +24,7 @@ if (!class_exists('Galleryupdate')) {
|
|
24 |
return $text;
|
25 |
} else {
|
26 |
$changelog = $raw_response['body'];
|
27 |
-
return
|
28 |
}
|
29 |
}
|
30 |
|
24 |
return $text;
|
25 |
} else {
|
26 |
$changelog = $raw_response['body'];
|
27 |
+
return wp_unslash($changelog);
|
28 |
}
|
29 |
}
|
30 |
|
views/admin/about.php
CHANGED
@@ -60,9 +60,9 @@ $minor_features = array(
|
|
60 |
</div>
|
61 |
|
62 |
<h2>New Major Features</h2>
|
63 |
-
<div class="feature-section two-col">
|
64 |
<?php foreach ( $major_features as $feature ) : ?>
|
65 |
-
<div class="col">
|
66 |
<div class="media-container">
|
67 |
<?php
|
68 |
// Video.
|
@@ -92,9 +92,9 @@ $minor_features = array(
|
|
92 |
<hr/>
|
93 |
|
94 |
<h2>New Minor Features</h2>
|
95 |
-
<div class="feature-section three-col">
|
96 |
<?php foreach ( $minor_features as $feature ) : ?>
|
97 |
-
<div class="col">
|
98 |
<div class="minor-img-container">
|
99 |
<img src="<?php echo esc_attr( $feature['src'] ); ?>" />
|
100 |
</div>
|
60 |
</div>
|
61 |
|
62 |
<h2>New Major Features</h2>
|
63 |
+
<div class="feature-section two-col has-2-columns">
|
64 |
<?php foreach ( $major_features as $feature ) : ?>
|
65 |
+
<div class="col column">
|
66 |
<div class="media-container">
|
67 |
<?php
|
68 |
// Video.
|
92 |
<hr/>
|
93 |
|
94 |
<h2>New Minor Features</h2>
|
95 |
+
<div class="feature-section three-col has-3-columns">
|
96 |
<?php foreach ( $minor_features as $feature ) : ?>
|
97 |
+
<div class="col column">
|
98 |
<div class="minor-img-container">
|
99 |
<img src="<?php echo esc_attr( $feature['src'] ); ?>" />
|
100 |
</div>
|
views/admin/changelog.php
CHANGED
@@ -9,9 +9,9 @@
|
|
9 |
<div id="tribulant_content">
|
10 |
<h1>WordPress Slideshow Gallery plugin - Changelog</h1>
|
11 |
<?php if (!empty($changelog)) : ?>
|
12 |
-
<?php echo
|
13 |
<?php else : ?>
|
14 |
-
<?php echo __('No changelog is available for this release yet, please check back later.', '
|
15 |
<?php endif; ?>
|
16 |
</div>
|
17 |
</div>
|
@@ -36,9 +36,9 @@
|
|
36 |
body { color:#666; font-size:14px; line-height:21px; font-family:Arial, sans-serif; }
|
37 |
h3 { color:#213123; }
|
38 |
#tribulant_header_full, #tribulant_footer_full, #tribulant_content_full { width:100%; clear:both; }
|
39 |
-
#tribulant_header_full { background:url('
|
40 |
#tribulant_header, #tribulant_footer, #tribulant_content { padding:30px 32px; }
|
41 |
-
#tribulant_logo { background:url('
|
42 |
#tribulant_content_full { padding-top:20px; position:relative;}
|
43 |
#tribulant_content { position:relative; }
|
44 |
h1 { font-size:26px; padding-bottom:18px; line-height:26px; width:100%; clear:both;}
|
9 |
<div id="tribulant_content">
|
10 |
<h1>WordPress Slideshow Gallery plugin - Changelog</h1>
|
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>
|
36 |
body { color:#666; font-size:14px; line-height:21px; font-family:Arial, sans-serif; }
|
37 |
h3 { color:#213123; }
|
38 |
#tribulant_header_full, #tribulant_footer_full, #tribulant_content_full { width:100%; clear:both; }
|
39 |
+
#tribulant_header_full { background:url('<?php echo $this -> render_url('images/changelog-header.png', 'admin', false); ?>') repeat; }
|
40 |
#tribulant_header, #tribulant_footer, #tribulant_content { padding:30px 32px; }
|
41 |
+
#tribulant_logo { background:url('<?php echo $this -> render_url('images/changelog-logo.png', 'admin', false); ?>') no-repeat; text-indent:-9999px; width:251px; height:59px; display:block; }
|
42 |
#tribulant_content_full { padding-top:20px; position:relative;}
|
43 |
#tribulant_content { position:relative; }
|
44 |
h1 { font-size:26px; padding-bottom:18px; line-height:26px; width:100%; clear:both;}
|
views/admin/error.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php if (!empty($errors) && is_array($errors)) : ?>
|
2 |
<ul class="slideshow_error">
|
3 |
<?php foreach ($errors as $err) : ?>
|
4 |
-
<li><?php echo
|
5 |
<?php endforeach; ?>
|
6 |
</ul>
|
7 |
<?php endif; ?>
|
1 |
<?php if (!empty($errors) && is_array($errors)) : ?>
|
2 |
<ul class="slideshow_error">
|
3 |
<?php foreach ($errors as $err) : ?>
|
4 |
+
<li><?php echo wp_unslash($err); ?></li>
|
5 |
<?php endforeach; ?>
|
6 |
</ul>
|
7 |
<?php endif; ?>
|
views/admin/galleries/save.php
CHANGED
@@ -30,7 +30,7 @@ $languages = $this -> language_getlanguages();
|
|
30 |
</ul>
|
31 |
<?php foreach ($languages as $language) : ?>
|
32 |
<div id="gallery-title-tabs-<?php echo $language; ?>">
|
33 |
-
<input type="text" class="widefat" name="Gallery[title][<?php echo $language; ?>]" value="<?php echo esc_attr(
|
34 |
</div>
|
35 |
<?php endforeach; ?>
|
36 |
</div>
|
@@ -41,7 +41,7 @@ $languages = $this -> language_getlanguages();
|
|
41 |
});
|
42 |
</script>
|
43 |
<?php else : ?>
|
44 |
-
<input type="text" class="widefat" name="Gallery[title]" value="<?php echo esc_attr(
|
45 |
<?php endif; ?>
|
46 |
<span class="howto"><?php _e('Title of this gallery for identification purposes.', 'slideshow-gallery'); ?></span>
|
47 |
<?php echo (!empty($this -> Gallery() -> errors['title'])) ? '<span class="slideshow_error">' . $this -> Gallery() -> errors['title'] . '</span>' : ''; ?>
|
30 |
</ul>
|
31 |
<?php foreach ($languages as $language) : ?>
|
32 |
<div id="gallery-title-tabs-<?php echo $language; ?>">
|
33 |
+
<input type="text" class="widefat" name="Gallery[title][<?php echo $language; ?>]" value="<?php echo esc_attr(wp_unslash($titles[$language])); ?>" id="Gallery_title_<?php echo $language; ?>" />
|
34 |
</div>
|
35 |
<?php endforeach; ?>
|
36 |
</div>
|
41 |
});
|
42 |
</script>
|
43 |
<?php else : ?>
|
44 |
+
<input type="text" class="widefat" name="Gallery[title]" value="<?php echo esc_attr(wp_unslash($this -> Gallery() -> data -> title)); ?>" id="Gallery_title" />
|
45 |
<?php endif; ?>
|
46 |
<span class="howto"><?php _e('Title of this gallery for identification purposes.', 'slideshow-gallery'); ?></span>
|
47 |
<?php echo (!empty($this -> Gallery() -> errors['title'])) ? '<span class="slideshow_error">' . $this -> Gallery() -> errors['title'] . '</span>' : ''; ?>
|
views/admin/head.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
4 |
|
5 |
-
$page =
|
6 |
|
7 |
?>
|
8 |
|
2 |
|
3 |
if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
4 |
|
5 |
+
$page = sanitize_text_field($_GET['page']);
|
6 |
|
7 |
?>
|
8 |
|
views/admin/lite-upgrade.php
CHANGED
@@ -21,8 +21,8 @@ $plugin_link = "https://tribulant.com/plugins/view/13/wordpress-slideshow-galler
|
|
21 |
</div>
|
22 |
|
23 |
<div class="changelog slideshow-changelog">
|
24 |
-
<div class="feature-section two-col">
|
25 |
-
<div class="col">
|
26 |
<h4>Extra Features in PRO</h4>
|
27 |
<p><a href="<?php echo $plugin_link; ?>" target="_blank">Slideshow Gallery PRO</a> gives these extra features:</p>
|
28 |
<ul>
|
@@ -38,20 +38,20 @@ $plugin_link = "https://tribulant.com/plugins/view/13/wordpress-slideshow-galler
|
|
38 |
<li>And much more...</li>
|
39 |
</ul>
|
40 |
</div>
|
41 |
-
<div class="col">
|
42 |
<h4>Upgrade to PRO</h4>
|
43 |
<p>Upgrading to Slideshow Gallery PRO is quick and easy by clicking the button below:</p>
|
44 |
<p><a href="<?php echo $plugin_link; ?>" class="button button-primary button-hero" target="_blank"><i class="fa fa-mouse-pointer"></i> Buy PRO Now (only $19.99)</a></p>
|
45 |
<p><?php _e('Once you have purchased a serial key, simply submit it to activate Slideshow Gallery PRO:', 'slideshow-gallery'); ?></p>
|
46 |
-
<p><a class="button button-secondary button-large" href="<?php echo admin_url('admin.php?page=' . $this -> sections -> submitserial); ?>" onclick="jQuery.colorbox({href:ajaxurl + '?action=slideshow_serialkey'}); return false;"><i class="fa fa-key"></i> <?php _e('Submit Serial', 'slideshow-gallery'); ?></a></p>
|
47 |
</div>
|
48 |
</div>
|
49 |
</div>
|
50 |
|
51 |
<div class="changelog slideshow-changelog">
|
52 |
-
<h3>About Tribulant
|
53 |
<p><a href="https://tribulant.com" target="_blank"><img style="width:300px;" src="<?php echo $this -> url(); ?>/images/logo.png" alt="tribulant" /></a></p>
|
54 |
-
<p>At Tribulant
|
55 |
We are a full-time business developing, promoting and supporting WordPress plugins to the community.</p>
|
56 |
<p>
|
57 |
<a class="button button-primary button-large" target="_blank" href="https://tribulant.com">Visit Our Site</a>
|
21 |
</div>
|
22 |
|
23 |
<div class="changelog slideshow-changelog">
|
24 |
+
<div class="feature-section two-col has-2-columns">
|
25 |
+
<div class="col column">
|
26 |
<h4>Extra Features in PRO</h4>
|
27 |
<p><a href="<?php echo $plugin_link; ?>" target="_blank">Slideshow Gallery PRO</a> gives these extra features:</p>
|
28 |
<ul>
|
38 |
<li>And much more...</li>
|
39 |
</ul>
|
40 |
</div>
|
41 |
+
<div class="col column">
|
42 |
<h4>Upgrade to PRO</h4>
|
43 |
<p>Upgrading to Slideshow Gallery PRO is quick and easy by clicking the button below:</p>
|
44 |
<p><a href="<?php echo $plugin_link; ?>" class="button button-primary button-hero" target="_blank"><i class="fa fa-mouse-pointer"></i> Buy PRO Now (only $19.99)</a></p>
|
45 |
<p><?php _e('Once you have purchased a serial key, simply submit it to activate Slideshow Gallery PRO:', 'slideshow-gallery'); ?></p>
|
46 |
+
<p><a class="button button-secondary button-large" href="<?php echo admin_url('admin.php?page=' . $this -> sections -> submitserial); ?>" onclick="jQuery.colorbox({href:ajaxurl + '?action=slideshow_serialkey&security=<?php echo wp_create_nonce('serialkey'); ?>'}); return false;"><i class="fa fa-key"></i> <?php _e('Submit Serial', 'slideshow-gallery'); ?></a></p>
|
47 |
</div>
|
48 |
</div>
|
49 |
</div>
|
50 |
|
51 |
<div class="changelog slideshow-changelog">
|
52 |
+
<h3>About Tribulant</h3>
|
53 |
<p><a href="https://tribulant.com" target="_blank"><img style="width:300px;" src="<?php echo $this -> url(); ?>/images/logo.png" alt="tribulant" /></a></p>
|
54 |
+
<p>At Tribulant, we strive to provide the best WordPress plugins on the market.<br/>
|
55 |
We are a full-time business developing, promoting and supporting WordPress plugins to the community.</p>
|
56 |
<p>
|
57 |
<a class="button button-primary button-large" target="_blank" href="https://tribulant.com">Visit Our Site</a>
|
views/admin/metaboxes/settings-about.php
CHANGED
@@ -8,10 +8,10 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
8 |
<div id="minor-publishing">
|
9 |
<div id="misc-publishing-actions">
|
10 |
<div class="misc-pub-section">
|
11 |
-
<a href="https://wordpress.org/
|
12 |
</div>
|
13 |
<div class="misc-pub-section">
|
14 |
-
<a href="https://
|
15 |
</div>
|
16 |
<div class="misc-pub-section">
|
17 |
<a href="https://www.facebook.com/tribulantsoftware" target="_blank"><?php _e('Find Us on Facebook', 'slideshow-gallery'); ?></a>
|
8 |
<div id="minor-publishing">
|
9 |
<div id="misc-publishing-actions">
|
10 |
<div class="misc-pub-section">
|
11 |
+
<a href="https://wordpress.org/support/plugin/slideshow-gallery/reviews/?rate=5#new-post" target="_blank"><?php _e('Rate on WordPress.org, please!', 'slideshow-gallery'); ?></a>
|
12 |
</div>
|
13 |
<div class="misc-pub-section">
|
14 |
+
<a href="https://tribulant.com/docs/wordpress-slideshow-gallery/1758" target="_blank"><?php _e('Online Documentation', 'slideshow-gallery'); ?></a>
|
15 |
</div>
|
16 |
<div class="misc-pub-section">
|
17 |
<a href="https://www.facebook.com/tribulantsoftware" target="_blank"><?php _e('Find Us on Facebook', 'slideshow-gallery'); ?></a>
|
views/admin/metaboxes/settings-general.php
CHANGED
@@ -51,7 +51,7 @@ $thumbhideonmobile = $this -> get_option ('thumbhideonmobile');
|
|
51 |
|
52 |
<select name="effect" id="effect">
|
53 |
<?php foreach ($effects as $eff) : ?>
|
54 |
-
<option <?php echo (!$this -> ci_serial_valid() && $eff != "slide") ? 'disabled="disabled"' : ''; ?> <?php echo (!empty($effect) && $effect == $eff) ? 'selected="selected"' : ''; ?> value="<?php echo esc_attr(
|
55 |
<?php endforeach; ?>
|
56 |
</select>
|
57 |
<span class="howto"><?php _e('Choose the type of effect/transition you want for slides', 'slideshow-gallery'); ?></span>
|
@@ -322,6 +322,13 @@ $thumbhideonmobile = $this -> get_option ('thumbhideonmobile');
|
|
322 |
<span class="howto"><?php _e('Choose your preferred position of the information bar relative to the slideshow.', 'slideshow-gallery'); ?></span>
|
323 |
</td>
|
324 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
<tr>
|
326 |
<th><label for="infoonhover"><?php _e('Show Only On Hover', 'slideshow-gallery'); ?></label>
|
327 |
<?php echo $this -> Html -> help(__('Checking this option will only show the information bar on hover', 'slideshow-gallery')); ?></th>
|
@@ -339,7 +346,7 @@ $thumbhideonmobile = $this -> get_option ('thumbhideonmobile');
|
|
339 |
<tr>
|
340 |
<th><label for="infodelay"><?php _e('Information Delay', 'slideshow-gallery'); ?></label></th>
|
341 |
<td>
|
342 |
-
<label><input <?php echo (!$this -> ci_serial_valid()) ? 'disabled="disabled"' : ''; ?> class="widefat" style="width:65px;" type="text" name="infodelay" value="<?php echo esc_attr(
|
343 |
<span class="howto"><?php _e('Delay the information bar in seconds or leave empty/zero for immediate display.', 'slideshow-gallery'); ?></span>
|
344 |
</td>
|
345 |
</tr>
|
@@ -360,7 +367,7 @@ $thumbhideonmobile = $this -> get_option ('thumbhideonmobile');
|
|
360 |
<tr>
|
361 |
<th><label for="infofadedelay"><?php _e('Fade Delay', 'slideshow-gallery'); ?></label></th>
|
362 |
<td>
|
363 |
-
<label><input class="widefat" style="width:65px;" type="text" name="infofadedelay" value="<?php echo esc_attr(
|
364 |
<span class="howto"><?php _e('Enter time in seconds for the information bar to fade.', 'slideshow-gallery'); ?></span>
|
365 |
</td>
|
366 |
</tr>
|
@@ -438,9 +445,9 @@ $thumbhideonmobile = $this -> get_option ('thumbhideonmobile');
|
|
438 |
<th><label for="thumbheight"><?php _e('Thumbnail Dimensions', 'slideshow-gallery'); ?></label>
|
439 |
<?php echo $this -> Html -> help(__('Specify the width and height (dimensions) of the thumbnails in the thumbnail bar/slider which will show above/below the slideshow.', 'slideshow-gallery')); ?></th>
|
440 |
<td>
|
441 |
-
<input class="widefat" style="width:45px;" type="text" name="thumbwidth" value="<?php echo esc_attr(
|
442 |
<?php _e('x <!-- by -->', 'slideshow-gallery'); ?>
|
443 |
-
<input class="widefat" style="width:45px;" type="text" name="thumbheight" value="<?php echo esc_attr(
|
444 |
<?php _e('px <!-- pixels -->', 'slideshow-gallery'); ?>
|
445 |
<span class="howto"><?php _e('Width and height of the thumbnails for the slides.', 'slideshow-gallery'); ?><br/>
|
446 |
<?php _e('You may leave the height empty (not the width) to crop proportionally.', 'slideshow-gallery'); ?></span>
|
51 |
|
52 |
<select name="effect" id="effect">
|
53 |
<?php foreach ($effects as $eff) : ?>
|
54 |
+
<option <?php echo (!$this -> ci_serial_valid() && $eff != "slide") ? 'disabled="disabled"' : ''; ?> <?php echo (!empty($effect) && $effect == $eff) ? 'selected="selected"' : ''; ?> value="<?php echo esc_attr(wp_unslash($eff)); ?>"><?php echo ucfirst($eff); ?> <?php if (!$this -> ci_serial_valid() && $eff != "slide") { echo __('(Pro Version Only)', 'slideshow-gallery'); } ?></option>
|
55 |
<?php endforeach; ?>
|
56 |
</select>
|
57 |
<span class="howto"><?php _e('Choose the type of effect/transition you want for slides', 'slideshow-gallery'); ?></span>
|
322 |
<span class="howto"><?php _e('Choose your preferred position of the information bar relative to the slideshow.', 'slideshow-gallery'); ?></span>
|
323 |
</td>
|
324 |
</tr>
|
325 |
+
<?php /*<tr>
|
326 |
+
<th><label for="infoheadingcontent"><?php _e('Information Content', 'slideshow-gallery'); ?></label></th>
|
327 |
+
<td>
|
328 |
+
<label><input type="radio" name="infoheadingcontent" value="title" id="infoheadingcontent_title" /> <?php _e('Image Title', 'slideshow-gallery'); ?></label>
|
329 |
+
<label><input type="radio" name="infoheadingcontent" value="caption" id="infoheadingcontent_caption" /> <?php _e('Image Caption', 'slideshow-gallery'); ?></label>
|
330 |
+
</td>
|
331 |
+
</tr>*/ ?>
|
332 |
<tr>
|
333 |
<th><label for="infoonhover"><?php _e('Show Only On Hover', 'slideshow-gallery'); ?></label>
|
334 |
<?php echo $this -> Html -> help(__('Checking this option will only show the information bar on hover', 'slideshow-gallery')); ?></th>
|
346 |
<tr>
|
347 |
<th><label for="infodelay"><?php _e('Information Delay', 'slideshow-gallery'); ?></label></th>
|
348 |
<td>
|
349 |
+
<label><input <?php echo (!$this -> ci_serial_valid()) ? 'disabled="disabled"' : ''; ?> class="widefat" style="width:65px;" type="text" name="infodelay" value="<?php echo esc_attr(wp_unslash($infodelay)); ?>" id="infodelay" /> <?php _e('seconds', 'slideshow-gallery'); ?> <?php if (!$this -> ci_serial_valid()) { echo sprintf(__('(%s)', 'slideshow-gallery'), '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">' . __('Pro Version Only', 'slideshow-gallery') . '</a>'); } ?></label>
|
350 |
<span class="howto"><?php _e('Delay the information bar in seconds or leave empty/zero for immediate display.', 'slideshow-gallery'); ?></span>
|
351 |
</td>
|
352 |
</tr>
|
367 |
<tr>
|
368 |
<th><label for="infofadedelay"><?php _e('Fade Delay', 'slideshow-gallery'); ?></label></th>
|
369 |
<td>
|
370 |
+
<label><input class="widefat" style="width:65px;" type="text" name="infofadedelay" value="<?php echo esc_attr(wp_unslash($infofadedelay)); ?>" id="infofadedelay" /> <?php _e('seconds', 'slideshow-gallery'); ?></label>
|
371 |
<span class="howto"><?php _e('Enter time in seconds for the information bar to fade.', 'slideshow-gallery'); ?></span>
|
372 |
</td>
|
373 |
</tr>
|
445 |
<th><label for="thumbheight"><?php _e('Thumbnail Dimensions', 'slideshow-gallery'); ?></label>
|
446 |
<?php echo $this -> Html -> help(__('Specify the width and height (dimensions) of the thumbnails in the thumbnail bar/slider which will show above/below the slideshow.', 'slideshow-gallery')); ?></th>
|
447 |
<td>
|
448 |
+
<input class="widefat" style="width:45px;" type="text" name="thumbwidth" value="<?php echo esc_attr(wp_unslash($this -> get_option('thumbwidth'))); ?>" id="thumbwidth" />
|
449 |
<?php _e('x <!-- by -->', 'slideshow-gallery'); ?>
|
450 |
+
<input class="widefat" style="width:45px;" type="text" name="thumbheight" value="<?php echo esc_attr(wp_unslash($this -> get_option('thumbheight'))); ?>" id="thumbheight" />
|
451 |
<?php _e('px <!-- pixels -->', 'slideshow-gallery'); ?>
|
452 |
<span class="howto"><?php _e('Width and height of the thumbnails for the slides.', 'slideshow-gallery'); ?><br/>
|
453 |
<?php _e('You may leave the height empty (not the width) to crop proportionally.', 'slideshow-gallery'); ?></span>
|
views/admin/metaboxes/settings-postspages.php
CHANGED
@@ -42,7 +42,7 @@ $excerpt_length = $this -> get_option('excerpt_length');
|
|
42 |
</ul>
|
43 |
<?php foreach ($languages as $language) : ?>
|
44 |
<div id="readmore-tabs-<?php echo $language; ?>">
|
45 |
-
<input type="text" class="widefat" name="excerpt_readmore[<?php echo $language; ?>]" value="<?php echo esc_attr(
|
46 |
</div>
|
47 |
<?php endforeach; ?>
|
48 |
</div>
|
@@ -53,14 +53,14 @@ $excerpt_length = $this -> get_option('excerpt_length');
|
|
53 |
});
|
54 |
</script>
|
55 |
<?php else : ?>
|
56 |
-
<input type="text" class="widefat" name="excerpt_readmore" value="<?php echo esc_attr(
|
57 |
<?php endif; ?>
|
58 |
</td>
|
59 |
</tr>
|
60 |
<tr>
|
61 |
<th><label for="excerpt_length"><?php _e('Excerpt Length', 'slideshow-gallery'); ?></label></th>
|
62 |
<td>
|
63 |
-
<input type="text" class="widefat" style="width:65px;" name="excerpt_length" value="<?php echo esc_attr(
|
64 |
</td>
|
65 |
</tr>
|
66 |
</tbody>
|
42 |
</ul>
|
43 |
<?php foreach ($languages as $language) : ?>
|
44 |
<div id="readmore-tabs-<?php echo $language; ?>">
|
45 |
+
<input type="text" class="widefat" name="excerpt_readmore[<?php echo $language; ?>]" value="<?php echo esc_attr(wp_unslash($readmores[$language])); ?>" id="excerpt_readmore_<?php echo $language; ?>" />
|
46 |
</div>
|
47 |
<?php endforeach; ?>
|
48 |
</div>
|
53 |
});
|
54 |
</script>
|
55 |
<?php else : ?>
|
56 |
+
<input type="text" class="widefat" name="excerpt_readmore" value="<?php echo esc_attr(wp_unslash(__($excerpt_readmore))); ?>" id="excerpt_readmore" />
|
57 |
<?php endif; ?>
|
58 |
</td>
|
59 |
</tr>
|
60 |
<tr>
|
61 |
<th><label for="excerpt_length"><?php _e('Excerpt Length', 'slideshow-gallery'); ?></label></th>
|
62 |
<td>
|
63 |
+
<input type="text" class="widefat" style="width:65px;" name="excerpt_length" value="<?php echo esc_attr(wp_unslash($excerpt_length)); ?>" id="excerpt_length" />
|
64 |
</td>
|
65 |
</tr>
|
66 |
</tbody>
|
views/admin/metaboxes/settings-styles.php
CHANGED
@@ -50,7 +50,7 @@ $resizeimagescrop = $this -> get_option('resizeimagescrop');
|
|
50 |
<tr>
|
51 |
<th><label for="autoheight_max"><?php _e('Maximum Auto Height', 'slideshow-gallery'); ?></label></th>
|
52 |
<td>
|
53 |
-
<label><input type="text" class="widefat" style="width:65px;" name="autoheight_max" value="<?php echo esc_attr(
|
54 |
<span class="howto"><?php _e('Set the maximum height that auto height may go or leave empty/zero for no maximum', 'slideshow-gallery'); ?></span>
|
55 |
</td>
|
56 |
</tr>
|
@@ -65,7 +65,7 @@ $resizeimagescrop = $this -> get_option('resizeimagescrop');
|
|
65 |
<th><label for="resheight"><?php _e('Responsive Height', 'slideshow-gallery'); ?></label>
|
66 |
<?php echo $this -> Html -> help(__('The responsive height can be either a fixed height in pixel or a percentage height. The percentage height is a percentage of the width of the slideshow.<br/><br/><strong>Override per slideshow:</strong> Using parameters <code>resheight</code> value a value and <code>resheighttype</code> with <code>px</code> for pixels or <code>%</code> for percentage eg. <code>[tribulant_slideshow resheight="300" resheighttype="px"]</code>.', 'slideshow-gallery')); ?></th>
|
67 |
<td>
|
68 |
-
<input class="widefat" style="width:45px;" type="text" name="styles[resheight]" value="<?php echo esc_attr(
|
69 |
<select name="styles[resheighttype]">
|
70 |
<option <?php echo ($styles['resheighttype'] == "%") ? 'selected="selected"' : ''; ?> value="%"><?php _e('%', 'slideshow-gallery'); ?></option>
|
71 |
<option <?php echo ($styles['resheighttype'] == "px") ? 'selected="selected"' : ''; ?> value="px"><?php _e('px', 'slideshow-gallery'); ?></option>
|
@@ -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(
|
125 |
<span class="howto"><?php _e('Height of the slideshow gallery', 'slideshow-gallery'); ?></span>
|
126 |
</td>
|
127 |
</tr>
|
50 |
<tr>
|
51 |
<th><label for="autoheight_max"><?php _e('Maximum Auto Height', 'slideshow-gallery'); ?></label></th>
|
52 |
<td>
|
53 |
+
<label><input type="text" class="widefat" style="width:65px;" name="autoheight_max" value="<?php echo esc_attr(wp_unslash($autoheight_max)); ?>" id="autoheight_max" /> <?php _e('pixels', 'slideshow-gallery'); ?></label>
|
54 |
<span class="howto"><?php _e('Set the maximum height that auto height may go or leave empty/zero for no maximum', 'slideshow-gallery'); ?></span>
|
55 |
</td>
|
56 |
</tr>
|
65 |
<th><label for="resheight"><?php _e('Responsive Height', 'slideshow-gallery'); ?></label>
|
66 |
<?php echo $this -> Html -> help(__('The responsive height can be either a fixed height in pixel or a percentage height. The percentage height is a percentage of the width of the slideshow.<br/><br/><strong>Override per slideshow:</strong> Using parameters <code>resheight</code> value a value and <code>resheighttype</code> with <code>px</code> for pixels or <code>%</code> for percentage eg. <code>[tribulant_slideshow resheight="300" resheighttype="px"]</code>.', 'slideshow-gallery')); ?></th>
|
67 |
<td>
|
68 |
+
<input class="widefat" style="width:45px;" type="text" name="styles[resheight]" value="<?php echo esc_attr(wp_unslash($styles['resheight'])); ?>" id="resheight" />
|
69 |
<select name="styles[resheighttype]">
|
70 |
<option <?php echo ($styles['resheighttype'] == "%") ? 'selected="selected"' : ''; ?> value="%"><?php _e('%', 'slideshow-gallery'); ?></option>
|
71 |
<option <?php echo ($styles['resheighttype'] == "px") ? 'selected="selected"' : ''; ?> value="px"><?php _e('px', 'slideshow-gallery'); ?></option>
|
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>
|
views/admin/metaboxes/settings-submit.php
CHANGED
@@ -12,13 +12,18 @@ $debugging = get_option('tridebugging');
|
|
12 |
<div id="minor-publishing">
|
13 |
<div id="misc-publishing-actions">
|
14 |
<div class="misc-pub-section">
|
15 |
-
<a href="<?php echo admin_url('admin.php?page=' . $this -> sections -> settings . '&method=checkdb'); ?>"
|
16 |
</div>
|
17 |
<div class="misc-pub-section">
|
18 |
-
<a href="<?php echo $this -> url; ?>&method=reset" title="<?php _e('Reset all settings to their default values', 'slideshow-gallery'); ?>" onclick="if (!confirm('<?php _e('Are you sure you wish to reset all settings?', 'slideshow-gallery'); ?>')) { return false; }"
|
19 |
</div>
|
20 |
<div class="misc-pub-section misc-pub-section-last">
|
21 |
-
<label><input <?php echo (!empty($debugging) && $debugging == 1) ? 'checked="checked"' : ''; ?> type="checkbox" name="debugging" value="1" id="debugging"
|
|
|
|
|
|
|
|
|
|
|
22 |
</div>
|
23 |
</div>
|
24 |
</div>
|
12 |
<div id="minor-publishing">
|
13 |
<div id="misc-publishing-actions">
|
14 |
<div class="misc-pub-section">
|
15 |
+
<a href="<?php echo admin_url('admin.php?page=' . $this -> sections -> settings . '&method=checkdb'); ?>"><i class="fa fas fa-database fa-fw"></i> <?php _e('Check/optimize database tables', 'slideshow-gallery'); ?></a>
|
16 |
</div>
|
17 |
<div class="misc-pub-section">
|
18 |
+
<a href="<?php echo $this -> url; ?>&method=reset" title="<?php _e('Reset all settings to their default values', 'slideshow-gallery'); ?>" onclick="if (!confirm('<?php _e('Are you sure you wish to reset all settings?', 'slideshow-gallery'); ?>')) { return false; }"><i class="fa fas fa-refresh fa-fw"></i> <?php _e('Reset to Defaults', 'slideshow-gallery'); ?></a>
|
19 |
</div>
|
20 |
<div class="misc-pub-section misc-pub-section-last">
|
21 |
+
<label><input <?php echo (!empty($debugging) && $debugging == 1) ? 'checked="checked"' : ''; ?> type="checkbox" name="debugging" value="1" id="debugging" /><i class="fa fas fa-bug fa-fw"></i> <?php _e('Turn on debugging', 'slideshow-gallery'); ?></label>
|
22 |
+
<?php echo $this -> Html -> help(sprintf(__('Ticking/checking this setting and saving the settings will turn on debugging. It will turn on PHP error reporting and also WordPress database errors. It will help you to troubleshoot problems where something is not working as expected or a blank page is appearing. Certain things are also logged in the %s', 'slideshow-gallery'), '<a target="_blank" href="' . plugins_url() . '/' . $this -> plugin_name . '/' . basename(SLIDESHOW_LOG_FILE) . '">' . __('log file', 'slideshow-gallery') . '</a>')); ?>
|
23 |
+
<p>
|
24 |
+
<a target="_blank" href="<?php echo esc_attr(wp_unslash(plugins_url() . '/' . $this -> plugin_name . '/' . basename(SLIDESHOW_LOG_FILE))); ?>"><?php _e('View the log file', 'slideshow-gallery'); ?></a>
|
25 |
+
<a onclick="if (!confirm('<?php echo esc_attr(__('Are you sure you want to clear the log file?', 'slideshow-gallery')); ?>')) { return false; }" href="<?php echo wp_nonce_url(admin_url('admin.php?page=' . $this -> sections -> settings . '&method=clearlog'), $this -> sections -> settings . '_clearlog'); ?>" class="slideshow_error"><i class="fa fa-times fa-fw"></i></a>
|
26 |
+
</p>
|
27 |
</div>
|
28 |
</div>
|
29 |
</div>
|
views/admin/settings-submitserial.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
<tr>
|
16 |
<th><label for="serial"><?php _e('Serial Key', 'slideshow-gallery'); ?></label></th>
|
17 |
<td>
|
18 |
-
<input style="width:320px;" class="widefat" type="text" name="serial" value="<?php echo esc_attr(
|
19 |
</td>
|
20 |
</tr>
|
21 |
</tbody>
|
15 |
<tr>
|
16 |
<th><label for="serial"><?php _e('Serial Key', 'slideshow-gallery'); ?></label></th>
|
17 |
<td>
|
18 |
+
<input style="width:320px;" class="widefat" type="text" name="serial" value="<?php echo esc_attr(wp_unslash($_POST['serial'])); ?>" id="serial" />
|
19 |
</td>
|
20 |
</tr>
|
21 |
</tbody>
|
views/admin/settings-updates.php
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
<?php if (!empty($raw_response['headers']['date'])) : ?>
|
27 |
<p><?php echo sprintf(__('Last checked on <b>%s</b>', 'slideshow-gallery'), get_date_from_gmt(date("Y-m-d H:i:s", strtotime($raw_response['headers']['date'])), get_option('date_format') . ' ' . get_option('time_format'))); ?></p>
|
28 |
<p><a href="?page=<?php echo $this -> sections -> settings_updates; ?>&method=check" class="button-primary"><i class="fa fa-history fa-fw"></i> <?php _e('Check Again', 'slideshow-gallery'); ?></a>
|
29 |
-
<?php echo $Html -> help(__('The plugin checks for new versions every 24 hours. If you want to check right now, click the "Check Again" button in order to do so.', 'slideshow-gallery')); ?></p>
|
30 |
<?php endif; ?>
|
31 |
<?php endif; ?>
|
32 |
|
26 |
<?php if (!empty($raw_response['headers']['date'])) : ?>
|
27 |
<p><?php echo sprintf(__('Last checked on <b>%s</b>', 'slideshow-gallery'), get_date_from_gmt(date("Y-m-d H:i:s", strtotime($raw_response['headers']['date'])), get_option('date_format') . ' ' . get_option('time_format'))); ?></p>
|
28 |
<p><a href="?page=<?php echo $this -> sections -> settings_updates; ?>&method=check" class="button-primary"><i class="fa fa-history fa-fw"></i> <?php _e('Check Again', 'slideshow-gallery'); ?></a>
|
29 |
+
<?php echo $this -> Html -> help(__('The plugin checks for new versions every 24 hours. If you want to check right now, click the "Check Again" button in order to do so.', 'slideshow-gallery')); ?></p>
|
30 |
<?php endif; ?>
|
31 |
<?php endif; ?>
|
32 |
|
views/admin/slides/order-gallery.php
CHANGED
@@ -55,7 +55,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
55 |
jQuery("#slidemessage").slideUp();
|
56 |
},
|
57 |
stop: function(request) {
|
58 |
-
jQuery.post(slideshowajax + '?action=slideshow_slides_order<?php echo (!empty($gallery)) ? '&gallery_id=' . $gallery -> id : ''; ?>', jQuery('#slidelist').sortable('serialize'), function(response) {
|
59 |
jQuery('#slidemessage').html('<p>' + response + '</p>').fadeIn();
|
60 |
});
|
61 |
}
|
55 |
jQuery("#slidemessage").slideUp();
|
56 |
},
|
57 |
stop: function(request) {
|
58 |
+
jQuery.post(slideshowajax + '?action=slideshow_slides_order<?php echo (!empty($gallery)) ? '&gallery_id=' . $gallery -> id : ''; ?>&security=<?php echo wp_create_nonce('slides_order'); ?>', jQuery('#slidelist').sortable('serialize'), function(response) {
|
59 |
jQuery('#slidemessage').html('<p>' + response + '</p>').fadeIn();
|
60 |
});
|
61 |
}
|
views/admin/slides/order.php
CHANGED
@@ -56,7 +56,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
56 |
jQuery("#slidemessage").slideUp();
|
57 |
},
|
58 |
stop: function(request) {
|
59 |
-
jQuery.post(slideshowajax + '?action=slideshow_slides_order<?php echo (!empty($gallery)) ? '&gallery_id=' . $gallery -> id : ''; ?>', jQuery('#slidelist').sortable('serialize'), function(response) {
|
60 |
jQuery('#slidemessage').html('<p>' + response + '</p>').fadeIn();
|
61 |
});
|
62 |
}
|
56 |
jQuery("#slidemessage").slideUp();
|
57 |
},
|
58 |
stop: function(request) {
|
59 |
+
jQuery.post(slideshowajax + '?action=slideshow_slides_order<?php echo (!empty($gallery)) ? '&gallery_id=' . $gallery -> id : ''; ?>&security=<?php echo wp_create_nonce('slides_order'); ?>', jQuery('#slidelist').sortable('serialize'), function(response) {
|
60 |
jQuery('#slidemessage').html('<p>' + response + '</p>').fadeIn();
|
61 |
});
|
62 |
}
|
views/admin/slides/save-multiple.php
CHANGED
@@ -44,13 +44,13 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
|
|
44 |
</div>
|
45 |
<?php endif; ?>
|
46 |
|
47 |
-
<label><?php _e('Title:', 'slideshow-gallery'); ?> <input class="widefat" type="text" value="<?php echo esc_attr(
|
48 |
-
<label><?php _e('Description:', 'slideshow-gallery'); ?> <textarea class="widefat" rows="3" cols="100%" name="Slide[slides][<?php echo esc_attr(
|
49 |
-
<input class="widefat" readonly="readonly" type="text" value="<?php echo esc_attr(
|
50 |
-
<input type="hidden" value="<?php echo esc_attr(
|
51 |
</td>
|
52 |
<td style="vertical-align:bottom;">
|
53 |
-
<button onclick="if (confirm('<?php echo __('Are you sure you want to remove this slide?', 'slideshow-gallery'); ?>')) { jQuery('#Slide_mediaupload_row_<?php echo esc_attr(
|
54 |
<i class="fa fa-trash fa-fw"></i> <?php echo __('Remove', 'slideshow-gallery'); ?>
|
55 |
</button>
|
56 |
</td>
|
44 |
</div>
|
45 |
<?php endif; ?>
|
46 |
|
47 |
+
<label><?php _e('Title:', 'slideshow-gallery'); ?> <input class="widefat" type="text" value="<?php echo esc_attr(wp_unslash($slide['title'])); ?>" name="Slide[slides][<?php echo esc_attr(wp_unslash($slide['attachment_id'])); ?>][title]" /></label>
|
48 |
+
<label><?php _e('Description:', 'slideshow-gallery'); ?> <textarea class="widefat" rows="3" cols="100%" name="Slide[slides][<?php echo esc_attr(wp_unslash($slide['attachment_id'])); ?>][description]"><?php echo esc_attr(wp_unslash($slide['description'])); ?></textarea></label>
|
49 |
+
<input class="widefat" readonly="readonly" type="text" value="<?php echo esc_attr(wp_unslash($slide['url'])); ?>" name="Slide[slides][<?php echo esc_attr(wp_unslash($slide['attachment_id'])); ?>][url]" />
|
50 |
+
<input type="hidden" value="<?php echo esc_attr(wp_unslash($slide['attachment_id'])); ?>" name="Slide[slides][<?php echo esc_attr(wp_unslash($slide['attachment_id'])); ?>][attachment_id]" />
|
51 |
</td>
|
52 |
<td style="vertical-align:bottom;">
|
53 |
+
<button onclick="if (confirm('<?php echo __('Are you sure you want to remove this slide?', 'slideshow-gallery'); ?>')) { jQuery('#Slide_mediaupload_row_<?php echo esc_attr(wp_unslash($slide['attachment_id'])); ?>').remove(); } return false;" class="button button-secondary button-small" type="button" name="remove" value="1" id="remove<?php echo esc_attr(wp_unslash($slide['attachment_id'])); ?>">
|
54 |
<i class="fa fa-trash fa-fw"></i> <?php echo __('Remove', 'slideshow-gallery'); ?>
|
55 |
</button>
|
56 |
</td>
|
views/admin/slides/save.php
CHANGED
@@ -39,7 +39,7 @@ $expiry = $this -> Slide() -> data -> expiry;
|
|
39 |
</ul>
|
40 |
<?php foreach ($languages as $language) : ?>
|
41 |
<div id="slide-title-tabs-<?php echo $language; ?>">
|
42 |
-
<input type="text" name="Slide[title][<?php echo $language; ?>]" id="Slide_title_<?php echo $language; ?>" value="<?php echo esc_attr(
|
43 |
</div>
|
44 |
<?php endforeach; ?>
|
45 |
</div>
|
@@ -50,7 +50,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(
|
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>' : ''; ?>
|
@@ -70,7 +70,7 @@ $expiry = $this -> Slide() -> data -> expiry;
|
|
70 |
</ul>
|
71 |
<?php foreach ($languages as $language) : ?>
|
72 |
<div id="slide-description-tabs-<?php echo $language; ?>">
|
73 |
-
<textarea name="Slide[description][<?php echo $language; ?>]" cols="100%" class="widefat" rows="5"><?php echo esc_attr(
|
74 |
</div>
|
75 |
<?php endforeach; ?>
|
76 |
</div>
|
@@ -108,7 +108,7 @@ $expiry = $this -> Slide() -> data -> expiry;
|
|
108 |
<th><label for="iopacity"><?php _e('Info Opacity', 'slideshow-gallery'); ?></label>
|
109 |
<?php echo $this -> Html -> help(__('The opacity of the information bar from 0 to 100 where 0 is transparent and 100 is opague.', 'slideshow-gallery')); ?></th>
|
110 |
<td>
|
111 |
-
<input type="text" id="iopacity" class="widefat" style="width:45px;" name="Slide[iopacity]" value="<?php echo empty($this -> Slide() -> data -> iopacity) ? '' : esc_attr(
|
112 |
<span class="howto"><?php _e('A value between 0 and 100. Leave empty for default.', 'slideshow-gallery'); ?></span>
|
113 |
</td>
|
114 |
</tr>
|
@@ -164,8 +164,8 @@ $expiry = $this -> Slide() -> data -> expiry;
|
|
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(
|
168 |
-
<input type="hidden" name="Slide[attachment_id]" value="<?php echo esc_attr(
|
169 |
|
170 |
<?php echo (!empty($this -> Slide() -> errors['media_file'])) ? '<div class="slideshow_error">' . $this -> Slide() -> errors['media_file'] . '</div>' : ''; ?>
|
171 |
|
@@ -231,7 +231,7 @@ $expiry = $this -> Slide() -> data -> expiry;
|
|
231 |
if (!empty($this -> Slide() -> data -> image)) {
|
232 |
?>
|
233 |
|
234 |
-
<input type="hidden" name="Slide[image_oldfile]" value="<?php echo esc_attr(
|
235 |
<p><small><?php _e('Current image. Leave the field above blank to keep this image.', 'slideshow-gallery'); ?></small></p>
|
236 |
<p><a title="<?php echo esc_attr($this -> Slide() -> data -> title); ?>" class="colorbox" href="<?php echo $this -> Slide() -> data -> image_path; ?>"><img src="<?php echo $this -> Html -> otf_image_src($this -> Slide() -> data, 100, 100, 100); ?>" alt="" class="slideshow" /></a></p>
|
237 |
|
@@ -293,7 +293,7 @@ $expiry = $this -> Slide() -> data -> expiry;
|
|
293 |
</ul>
|
294 |
<?php foreach ($languages as $language) : ?>
|
295 |
<div id="slide-link-tabs-<?php echo $language; ?>">
|
296 |
-
<input type="text" name="Slide[link][<?php echo $language; ?>]" id="Slide_link_<?php echo $language; ?>" value="<?php echo esc_attr(
|
297 |
</div>
|
298 |
<?php endforeach; ?>
|
299 |
</div>
|
@@ -329,7 +329,7 @@ $expiry = $this -> Slide() -> data -> expiry;
|
|
329 |
<th><label for="Slide_expiry"><?php _e('Expiry Date', 'slideshow-gallery'); ?></label></th>
|
330 |
<td>
|
331 |
<?php $currentdate = date_i18n(get_option('date_format'), strtotime($expiry)); ?>
|
332 |
-
<input type="text" name="Slide[expiry]" value="<?php echo (!empty($expiry) && $expiry != "0000-00-00") ? esc_attr(
|
333 |
<span class="howto"><small><?php _e('(optional)', 'slideshow-gallery'); ?></small> <?php _e('Set an expiry date for this slide.', 'slideshow-gallery'); ?></span>
|
334 |
|
335 |
<script type="text/javascript">
|
39 |
</ul>
|
40 |
<?php foreach ($languages as $language) : ?>
|
41 |
<div id="slide-title-tabs-<?php echo $language; ?>">
|
42 |
+
<input type="text" name="Slide[title][<?php echo $language; ?>]" id="Slide_title_<?php echo $language; ?>" value="<?php echo esc_attr(wp_unslash($titles[$language])); ?>" class="widefat" />
|
43 |
</div>
|
44 |
<?php endforeach; ?>
|
45 |
</div>
|
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>' : ''; ?>
|
70 |
</ul>
|
71 |
<?php foreach ($languages as $language) : ?>
|
72 |
<div id="slide-description-tabs-<?php echo $language; ?>">
|
73 |
+
<textarea name="Slide[description][<?php echo $language; ?>]" cols="100%" class="widefat" rows="5"><?php echo esc_attr(wp_unslash($descriptions[$language])); ?></textarea>
|
74 |
</div>
|
75 |
<?php endforeach; ?>
|
76 |
</div>
|
108 |
<th><label for="iopacity"><?php _e('Info Opacity', 'slideshow-gallery'); ?></label>
|
109 |
<?php echo $this -> Html -> help(__('The opacity of the information bar from 0 to 100 where 0 is transparent and 100 is opague.', 'slideshow-gallery')); ?></th>
|
110 |
<td>
|
111 |
+
<input type="text" id="iopacity" class="widefat" style="width:45px;" name="Slide[iopacity]" value="<?php echo empty($this -> Slide() -> data -> iopacity) ? '' : esc_attr(wp_unslash($this -> Slide() -> data -> iopacity)); ?>" />
|
112 |
<span class="howto"><?php _e('A value between 0 and 100. Leave empty for default.', 'slideshow-gallery'); ?></span>
|
113 |
</td>
|
114 |
</tr>
|
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 |
|
231 |
if (!empty($this -> Slide() -> data -> image)) {
|
232 |
?>
|
233 |
|
234 |
+
<input type="hidden" name="Slide[image_oldfile]" value="<?php echo esc_attr(wp_unslash($this -> Slide() -> data -> image)); ?>" />
|
235 |
<p><small><?php _e('Current image. Leave the field above blank to keep this image.', 'slideshow-gallery'); ?></small></p>
|
236 |
<p><a title="<?php echo esc_attr($this -> Slide() -> data -> title); ?>" class="colorbox" href="<?php echo $this -> Slide() -> data -> image_path; ?>"><img src="<?php echo $this -> Html -> otf_image_src($this -> Slide() -> data, 100, 100, 100); ?>" alt="" class="slideshow" /></a></p>
|
237 |
|
293 |
</ul>
|
294 |
<?php foreach ($languages as $language) : ?>
|
295 |
<div id="slide-link-tabs-<?php echo $language; ?>">
|
296 |
+
<input type="text" name="Slide[link][<?php echo $language; ?>]" id="Slide_link_<?php echo $language; ?>" value="<?php echo esc_attr(wp_unslash($links[$language])); ?>" class="widefat" />
|
297 |
</div>
|
298 |
<?php endforeach; ?>
|
299 |
</div>
|
329 |
<th><label for="Slide_expiry"><?php _e('Expiry Date', 'slideshow-gallery'); ?></label></th>
|
330 |
<td>
|
331 |
<?php $currentdate = date_i18n(get_option('date_format'), strtotime($expiry)); ?>
|
332 |
+
<input type="text" name="Slide[expiry]" value="<?php echo (!empty($expiry) && $expiry != "0000-00-00") ? esc_attr(wp_unslash($currentdate)) : ''; ?>" id="Slide_expiry" />
|
333 |
<span class="howto"><small><?php _e('(optional)', 'slideshow-gallery'); ?></small> <?php _e('Set an expiry date for this slide.', 'slideshow-gallery'); ?></span>
|
334 |
|
335 |
<script type="text/javascript">
|
views/admin/submitserial.php
CHANGED
@@ -14,9 +14,9 @@ $version_info = $update -> get_version_info();
|
|
14 |
<?php echo sprintf(__('To remove limits, you can submit a serial key or %s.'), '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">' . __('Upgrade to PRO', 'slideshow-gallery') . '</a>'); ?>
|
15 |
</p>
|
16 |
<p style="width:400px;">
|
17 |
-
<?php _e('Please obtain a serial key from the downloads section in your Tribulant
|
18 |
<?php _e('Once in the downloads section, click the KEY icon to request a serial key.', 'slideshow-gallery'); ?>
|
19 |
-
<a href="https://tribulant.com/downloads/" title="Tribulant
|
20 |
</p>
|
21 |
|
22 |
<div class="slideshow_error">
|
@@ -26,7 +26,7 @@ $version_info = $update -> get_version_info();
|
|
26 |
<form onsubmit="slideshow_submitserial(this); return false;" action="<?php echo admin_url('admin.php?page=' . $this -> sections -> submitserial); ?>" method="post">
|
27 |
<?php wp_nonce_field($this -> sections -> submitserial); ?>
|
28 |
<p>
|
29 |
-
<input type="text" class="widefat" style="width:400px;" name="serialkey" value="<?php echo esc_attr(
|
30 |
</p>
|
31 |
<p class="submit">
|
32 |
<button type="button" class="button-secondary" name="close" onclick="jQuery.colorbox.close();" value="1">
|
14 |
<?php echo sprintf(__('To remove limits, you can submit a serial key or %s.'), '<a href="' . admin_url('admin.php?page=' . $this -> sections -> lite_upgrade) . '">' . __('Upgrade to PRO', 'slideshow-gallery') . '</a>'); ?>
|
15 |
</p>
|
16 |
<p style="width:400px;">
|
17 |
+
<?php _e('Please obtain a serial key from the downloads section in your Tribulant account.', 'slideshow-gallery'); ?>
|
18 |
<?php _e('Once in the downloads section, click the KEY icon to request a serial key.', 'slideshow-gallery'); ?>
|
19 |
+
<a href="https://tribulant.com/downloads/" title="Tribulant Downloads" target="_blank"><?php _e('Downloads Section', 'slideshow-gallery'); ?></a>
|
20 |
</p>
|
21 |
|
22 |
<div class="slideshow_error">
|
26 |
<form onsubmit="slideshow_submitserial(this); return false;" action="<?php echo admin_url('admin.php?page=' . $this -> sections -> submitserial); ?>" method="post">
|
27 |
<?php wp_nonce_field($this -> sections -> submitserial); ?>
|
28 |
<p>
|
29 |
+
<input type="text" class="widefat" style="width:400px;" name="serialkey" value="<?php echo esc_attr(wp_unslash($_POST['serialkey'])); ?>" /><br/>
|
30 |
</p>
|
31 |
<p class="submit">
|
32 |
<button type="button" class="button-secondary" name="close" onclick="jQuery.colorbox.close();" value="1">
|
views/default/css-responsive.php
CHANGED
@@ -4,7 +4,7 @@ $absolute_path = explode('wp-content', $_SERVER['SCRIPT_FILENAME']);
|
|
4 |
$wp_load = $absolute_path[0] . 'wp-load.php';
|
5 |
require_once($wp_load);
|
6 |
|
7 |
-
$id =
|
8 |
$styles = maybe_unserialize(get_transient('slideshow-css-' . $id));
|
9 |
|
10 |
header('Content-type: text/css');
|
4 |
$wp_load = $absolute_path[0] . 'wp-load.php';
|
5 |
require_once($wp_load);
|
6 |
|
7 |
+
$id = sanitize_text_field($_GET['id']);
|
8 |
$styles = maybe_unserialize(get_transient('slideshow-css-' . $id));
|
9 |
|
10 |
header('Content-type: text/css');
|
views/default/css.php
CHANGED
@@ -4,7 +4,7 @@ $absolute_path = explode('wp-content', $_SERVER['SCRIPT_FILENAME']);
|
|
4 |
$wp_load = $absolute_path[0] . 'wp-load.php';
|
5 |
require_once($wp_load);
|
6 |
|
7 |
-
$id =
|
8 |
$styles = maybe_unserialize(get_transient('slideshow-css-' . $id));
|
9 |
|
10 |
header('Content-type: text/css');
|
4 |
$wp_load = $absolute_path[0] . 'wp-load.php';
|
5 |
require_once($wp_load);
|
6 |
|
7 |
+
$id = sanitize_text_field($_GET['id']);
|
8 |
$styles = maybe_unserialize(get_transient('slideshow-css-' . $id));
|
9 |
|
10 |
header('Content-type: text/css');
|
views/default/gallery.php
CHANGED
@@ -13,7 +13,11 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
13 |
<?php foreach ($slides as $slide) : ?>
|
14 |
<?php setup_postdata($slide -> ID); ?>
|
15 |
<li>
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
<?php
|
18 |
|
19 |
$full_image_href = wp_get_attachment_image_src($slide -> ID, 'full', false);
|
@@ -46,7 +50,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
46 |
|
47 |
?>
|
48 |
<li>
|
49 |
-
<h3 style="opacity:70;"><a target="_self" href="<?php echo get_permalink($slide -> ID); ?>"><?php echo
|
50 |
<?php $full_image_href = wp_get_attachment_image_src(get_post_thumbnail_id($slide -> ID), 'full', false); ?>
|
51 |
<?php $full_image_url = wp_get_attachment_url(get_post_thumbnail_id($slide -> ID)); ?>
|
52 |
<?php if ($options['layout'] != "responsive" && $options['resizeimages'] == "true" && $options['width'] != "auto") : ?>
|
@@ -54,7 +58,7 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
54 |
<?php else : ?>
|
55 |
<span data-alt="<?php echo $this -> Html() -> sanitize(__($slide -> post_title)); ?>"><?php echo $full_image_href[0]; ?></span>
|
56 |
<?php endif; ?>
|
57 |
-
<p><?php echo
|
58 |
<?php $thumbnail_link = wp_get_attachment_image_src(get_post_thumbnail_id($slide -> ID), 'thumbnail', false); ?>
|
59 |
<?php if ($options['showthumbs'] == "true") : ?>
|
60 |
<?php if (!empty($slide -> guid)) : ?>
|
@@ -72,13 +76,13 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
72 |
<!-- Shopping Cart plugin products https://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin -->
|
73 |
<?php foreach ($slides as $slide) : ?>
|
74 |
<li>
|
75 |
-
<h3 style="opacity:70;"><?php echo
|
76 |
<?php if ($options['layout'] != "responsive" && $options['resizeimages'] == "true" && $options['width'] != "auto") : ?>
|
77 |
<span data-alt="<?php echo $this -> Html() -> sanitize(__($slide -> title)); ?>"><?php echo $this -> Html -> otf_image_src($slide, $options['width'], $options['height'], 100); ?></span>
|
78 |
<?php else : ?>
|
79 |
<span data-alt="<?php echo $this -> Html() -> sanitize(__($slide -> title)); ?>"><?php echo site_url() . '/' . $slide -> image_url; ?></span>
|
80 |
<?php endif; ?>
|
81 |
-
<p><?php echo substr(
|
82 |
<?php if ($options['showthumbs'] == "true") : ?>
|
83 |
<?php if (!empty($slide -> post_id)) : ?>
|
84 |
<a href="<?php echo get_permalink($slide -> post_id); ?>" target="_self" title="<?php echo esc_attr(__($slide -> title)); ?>"><img class="skip-lazy" src="<?php echo $this -> Html -> otf_image_src($slide, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
|
@@ -148,8 +152,8 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
148 |
<?php endif; ?>
|
149 |
<div id="image<?php echo $unique; ?>" class="slideshow-image"></div>
|
150 |
<div class="slideshow-information info<?php echo $options['infoposition']; ?>" id="information<?php echo $unique; ?>">
|
151 |
-
<h3 class="slideshow-info-heading"
|
152 |
-
<p class="slideshow-info-content"
|
153 |
</div>
|
154 |
</div>
|
155 |
|
@@ -271,11 +275,11 @@ $thumbopacity = $this -> get_option('thumbopacity');
|
|
271 |
$jsoutput = $this -> get_option('jsoutput');
|
272 |
if (empty($jsoutput) || $jsoutput == "perslideshow") {
|
273 |
echo '<!-- Slideshow Gallery Javascript BEG -->';
|
274 |
-
echo
|
275 |
echo '<!-- Slideshow Gallery Javascript END -->';
|
276 |
|
277 |
echo '<!-- Slideshow Gallery CSS BEG -->';
|
278 |
-
echo
|
279 |
echo '<!-- Slideshow Gallery CSS END -->';
|
280 |
}
|
281 |
|
13 |
<?php foreach ($slides as $slide) : ?>
|
14 |
<?php setup_postdata($slide -> ID); ?>
|
15 |
<li>
|
16 |
+
<?php if (empty($options['infoheadingcontent']) || $options['infoheadingcontent'] == "title") : ?>
|
17 |
+
<h3 style="opacity:70;"><?php echo __($slide -> post_title); ?></h3>
|
18 |
+
<?php else : ?>
|
19 |
+
<h3 style="opacity:70;"><?php echo __($slide -> post_excerpt); ?></h3>
|
20 |
+
<?php endif; ?>
|
21 |
<?php
|
22 |
|
23 |
$full_image_href = wp_get_attachment_image_src($slide -> ID, 'full', false);
|
50 |
|
51 |
?>
|
52 |
<li>
|
53 |
+
<h3 style="opacity:70;"><a target="_self" href="<?php echo get_permalink($slide -> ID); ?>"><?php echo wp_unslash(__($slide -> post_title)); ?></a></h3>
|
54 |
<?php $full_image_href = wp_get_attachment_image_src(get_post_thumbnail_id($slide -> ID), 'full', false); ?>
|
55 |
<?php $full_image_url = wp_get_attachment_url(get_post_thumbnail_id($slide -> ID)); ?>
|
56 |
<?php if ($options['layout'] != "responsive" && $options['resizeimages'] == "true" && $options['width'] != "auto") : ?>
|
58 |
<?php else : ?>
|
59 |
<span data-alt="<?php echo $this -> Html() -> sanitize(__($slide -> post_title)); ?>"><?php echo $full_image_href[0]; ?></span>
|
60 |
<?php endif; ?>
|
61 |
+
<p><?php echo wp_unslash(__(get_the_excerpt())); ?></p>
|
62 |
<?php $thumbnail_link = wp_get_attachment_image_src(get_post_thumbnail_id($slide -> ID), 'thumbnail', false); ?>
|
63 |
<?php if ($options['showthumbs'] == "true") : ?>
|
64 |
<?php if (!empty($slide -> guid)) : ?>
|
76 |
<!-- Shopping Cart plugin products https://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin -->
|
77 |
<?php foreach ($slides as $slide) : ?>
|
78 |
<li>
|
79 |
+
<h3 style="opacity:70;"><?php echo wp_unslash(__($slide -> title)); ?></h3>
|
80 |
<?php if ($options['layout'] != "responsive" && $options['resizeimages'] == "true" && $options['width'] != "auto") : ?>
|
81 |
<span data-alt="<?php echo $this -> Html() -> sanitize(__($slide -> title)); ?>"><?php echo $this -> Html -> otf_image_src($slide, $options['width'], $options['height'], 100); ?></span>
|
82 |
<?php else : ?>
|
83 |
<span data-alt="<?php echo $this -> Html() -> sanitize(__($slide -> title)); ?>"><?php echo site_url() . '/' . $slide -> image_url; ?></span>
|
84 |
<?php endif; ?>
|
85 |
+
<p><?php echo substr(wp_unslash(__($slide -> description)), 0, 255); ?></p>
|
86 |
<?php if ($options['showthumbs'] == "true") : ?>
|
87 |
<?php if (!empty($slide -> post_id)) : ?>
|
88 |
<a href="<?php echo get_permalink($slide -> post_id); ?>" target="_self" title="<?php echo esc_attr(__($slide -> title)); ?>"><img class="skip-lazy" src="<?php echo $this -> Html -> otf_image_src($slide, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize(__($slide -> title)); ?>" /></a>
|
152 |
<?php endif; ?>
|
153 |
<div id="image<?php echo $unique; ?>" class="slideshow-image"></div>
|
154 |
<div class="slideshow-information info<?php echo $options['infoposition']; ?>" id="information<?php echo $unique; ?>">
|
155 |
+
<h3 class="slideshow-info-heading"><?php _e('info heading', 'slideshow-gallery'); ?></h3>
|
156 |
+
<p class="slideshow-info-content"><?php _e('info content', 'slideshow-gallery'); ?></p>
|
157 |
</div>
|
158 |
</div>
|
159 |
|
275 |
$jsoutput = $this -> get_option('jsoutput');
|
276 |
if (empty($jsoutput) || $jsoutput == "perslideshow") {
|
277 |
echo '<!-- Slideshow Gallery Javascript BEG -->';
|
278 |
+
echo wp_unslash($javascript);
|
279 |
echo '<!-- Slideshow Gallery Javascript END -->';
|
280 |
|
281 |
echo '<!-- Slideshow Gallery CSS BEG -->';
|
282 |
+
echo wp_unslash($css);
|
283 |
echo '<!-- Slideshow Gallery CSS END -->';
|
284 |
}
|
285 |
|