Version Description
- New: Add lightbox to widgets content
- New: Add lightbox to WordPress comments
- New: Gallery widget
- New: Single image widget
- New: Visual Composer compatibility
- New: WooCommerce 3.0 compatibility
- New: Fancybox Pro premium extension
- New: Expander Gallery premium extension
- New: Hidden Gallery premium extension
- Tweak: Attachment ID query optimization
- Tweak: Revamped lightbox settings screen
- Tweak: Improved custom galleries compatibility
Download this release
Release Info
Developer | dfactory |
Plugin | Responsive Lightbox & Gallery |
Version | 1.7.0 |
Comparing to | |
See all releases |
Code changes from version 1.6.12 to 1.7.0
- css/admin.css +111 -13
- includes/class-frontend.php +275 -74
- includes/class-settings.php +178 -93
- includes/class-widgets.php +570 -0
- js/admin-widgets.js +246 -0
- js/admin.js +11 -10
- js/front.js +22 -6
- languages/responsive-lightbox.pot +501 -300
- readme.txt +31 -4
- responsive-lightbox.php +74 -20
css/admin.css
CHANGED
@@ -194,35 +194,35 @@
|
|
194 |
cursor:default
|
195 |
}
|
196 |
.cb-checkbox.disabled {
|
197 |
-
color:#
|
198 |
}
|
199 |
.cb-checkbox.disabled .cb-inner {
|
200 |
-
color:#
|
201 |
}
|
202 |
.cb-checkbox.disabled:hover .cb-inner {
|
203 |
-
border-color
|
204 |
}
|
205 |
.cb-checkbox.disabled.checked .cb-inner {
|
206 |
-
background-color
|
207 |
-
border-color
|
208 |
}
|
209 |
.cb-radio.disabled {
|
210 |
-
color:#
|
211 |
}
|
212 |
.cb-radio.disabled .cb-inner {
|
213 |
-
border-color:#
|
214 |
}
|
215 |
.cb-radio.disabled i {
|
216 |
background-color:transparent
|
217 |
}
|
218 |
.cb-radio.disabled.checked .cb-inner {
|
219 |
-
border-color:#
|
220 |
}
|
221 |
.cb-radio.disabled.checked .cb-inner i {
|
222 |
-
background-color:#
|
223 |
}
|
224 |
.cb-radio.disabled:hover .cb-inner {
|
225 |
-
border-color:#
|
226 |
}
|
227 |
.cb-checkbox .cb-inner {
|
228 |
float:left;
|
@@ -336,12 +336,12 @@
|
|
336 |
bottom:6px;
|
337 |
left:11px
|
338 |
}
|
339 |
-
.cb-checkbox.checked .cb-inner {
|
340 |
border-color:#0073aa;
|
341 |
background-color:#00a0d2;
|
342 |
box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
|
343 |
}
|
344 |
-
.cb-checkbox.checked:hover .cb-inner {
|
345 |
background-color:#0091cd
|
346 |
}
|
347 |
.cb-checkbox.checked.cb-sm i:before {
|
@@ -390,7 +390,7 @@
|
|
390 |
transform:scale(1.1, 1.1);
|
391 |
background-color:#00a0d2
|
392 |
}
|
393 |
-
.cb-checkbox:hover .cb-inner, .cb-radio:hover .cb-inner {
|
394 |
border-color:#0073aa
|
395 |
}
|
396 |
.cb-switcher {
|
@@ -505,4 +505,102 @@ output {
|
|
505 |
text-align: center;
|
506 |
margin: 30px 0;
|
507 |
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
}
|
194 |
cursor:default
|
195 |
}
|
196 |
.cb-checkbox.disabled {
|
197 |
+
color:#aaa
|
198 |
}
|
199 |
.cb-checkbox.disabled .cb-inner {
|
200 |
+
color:#aaa
|
201 |
}
|
202 |
.cb-checkbox.disabled:hover .cb-inner {
|
203 |
+
border-color: inherit;
|
204 |
}
|
205 |
.cb-checkbox.disabled.checked .cb-inner {
|
206 |
+
background-color: inherit;
|
207 |
+
border-color: inherit;
|
208 |
}
|
209 |
.cb-radio.disabled {
|
210 |
+
color:#aaa
|
211 |
}
|
212 |
.cb-radio.disabled .cb-inner {
|
213 |
+
border-color:#aaa
|
214 |
}
|
215 |
.cb-radio.disabled i {
|
216 |
background-color:transparent
|
217 |
}
|
218 |
.cb-radio.disabled.checked .cb-inner {
|
219 |
+
border-color:#aaa
|
220 |
}
|
221 |
.cb-radio.disabled.checked .cb-inner i {
|
222 |
+
background-color:#aaa
|
223 |
}
|
224 |
.cb-radio.disabled:hover .cb-inner {
|
225 |
+
border-color:#aaa
|
226 |
}
|
227 |
.cb-checkbox .cb-inner {
|
228 |
float:left;
|
336 |
bottom:6px;
|
337 |
left:11px
|
338 |
}
|
339 |
+
.cb-checkbox.checked:not(.disabled) .cb-inner {
|
340 |
border-color:#0073aa;
|
341 |
background-color:#00a0d2;
|
342 |
box-shadow: 0 1px 0 rgba(120, 200, 230, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.15);
|
343 |
}
|
344 |
+
.cb-checkbox.checked:hover:not(.disabled) .cb-inner {
|
345 |
background-color:#0091cd
|
346 |
}
|
347 |
.cb-checkbox.checked.cb-sm i:before {
|
390 |
transform:scale(1.1, 1.1);
|
391 |
background-color:#00a0d2
|
392 |
}
|
393 |
+
.cb-checkbox:hover:not(.disabled) .cb-inner, .cb-radio:hover:not(.disabled) .cb-inner {
|
394 |
border-color:#0073aa
|
395 |
}
|
396 |
.cb-switcher {
|
505 |
text-align: center;
|
506 |
margin: 30px 0;
|
507 |
width: 100%;
|
508 |
+
}
|
509 |
+
|
510 |
+
/* Gallery widget */
|
511 |
+
.rl-gallery-widget .rl-gallery-widget-content {
|
512 |
+
text-align: left;
|
513 |
+
border: 1px dashed #aaa;
|
514 |
+
padding: 0 0 9px 9px;
|
515 |
+
min-height: 180px;
|
516 |
+
}
|
517 |
+
.rl-gallery-widget .button {
|
518 |
+
margin-bottom: 10px;
|
519 |
+
}
|
520 |
+
.rl-gallery-images {
|
521 |
+
margin: 0;
|
522 |
+
text-align: left;
|
523 |
+
}
|
524 |
+
.rl-gallery-images .rl-gallery-image {
|
525 |
+
display: inline-block;
|
526 |
+
width: 85px;
|
527 |
+
cursor: move;
|
528 |
+
margin: 9px 9px 0 0;
|
529 |
+
background: #f7f7f7;
|
530 |
+
border-radius: 2px;
|
531 |
+
position: relative;
|
532 |
+
box-sizing: border-box;
|
533 |
+
border: 1px dashed transparent;
|
534 |
+
}
|
535 |
+
.rl-gallery-sortable-placeholder {
|
536 |
+
width: 85px;
|
537 |
+
border: 1px dashed #ddd;
|
538 |
+
margin: 9px 9px 0 0;
|
539 |
+
display: inline-block;
|
540 |
+
}
|
541 |
+
.rl-gallery-images .rl-gallery-image img {
|
542 |
+
display: block;
|
543 |
+
height: auto;
|
544 |
+
max-width: 100%;
|
545 |
+
width: auto;
|
546 |
+
}
|
547 |
+
.rl-gallery-images .rl-gallery-image .inner {
|
548 |
+
padding: 2px;
|
549 |
+
}
|
550 |
+
.rl-gallery-images .rl-gallery-image .rl-gallery-actions {
|
551 |
+
position: absolute;
|
552 |
+
top: -10px;
|
553 |
+
right: -10px;
|
554 |
+
}
|
555 |
+
.rl-gallery-images .rl-gallery-image .rl-gallery-actions a {
|
556 |
+
color: #777;
|
557 |
+
cursor: pointer;
|
558 |
+
overflow: visible;
|
559 |
+
text-align: center;
|
560 |
+
text-decoration: none;
|
561 |
+
font-size: 14px;
|
562 |
+
line-height: 16px;
|
563 |
+
width: 14px;
|
564 |
+
height: 14px;
|
565 |
+
padding: 3px;
|
566 |
+
background: #fff;
|
567 |
+
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
568 |
+
border-radius: 50%;
|
569 |
+
opacity: 0;
|
570 |
+
-webkit-transition: opacity 0.3s ease-in-out;
|
571 |
+
-moz-transition: opacity 0.3s ease-in-out;
|
572 |
+
-ms-transition: opacity 0.3s ease-in-out;
|
573 |
+
-o-transition: opacity 0.3s ease-in-out;
|
574 |
+
transition: opacity 0.3s ease-in-out;
|
575 |
+
}
|
576 |
+
.rl-gallery-images .rl-gallery-image:hover .rl-gallery-actions a {
|
577 |
+
opacity: 1;
|
578 |
+
}
|
579 |
+
.rl-gallery-images .rl-gallery-image .rl-gallery-actions a:hover {
|
580 |
+
color: #333;
|
581 |
+
}
|
582 |
+
#widgets-right .rl-gallery-widget-container .description {
|
583 |
+
padding-left: 0;
|
584 |
+
padding-right: 0;
|
585 |
+
font-style: italic;
|
586 |
+
}
|
587 |
+
|
588 |
+
/* Image widget */
|
589 |
+
.rl-image-widget .rl-image-widget-content {
|
590 |
+
border: 1px dashed #aaa;
|
591 |
+
padding: 9px;
|
592 |
+
text-align: left;
|
593 |
+
min-height: 100px;
|
594 |
+
}
|
595 |
+
.rl-image-widget .rl-image-widget-content img {
|
596 |
+
max-width: 100%;
|
597 |
+
height: auto;
|
598 |
+
}
|
599 |
+
.rl-image-widget .button {
|
600 |
+
margin-bottom: 10px;
|
601 |
+
}
|
602 |
+
#widgets-right .rl-image-widget-container .description {
|
603 |
+
padding-left: 0;
|
604 |
+
padding-right: 0;
|
605 |
+
font-style: italic;
|
606 |
}
|
includes/class-frontend.php
CHANGED
@@ -19,56 +19,18 @@ class Responsive_Lightbox_Frontend {
|
|
19 |
|
20 |
// filters
|
21 |
add_filter( 'post_gallery', array( $this, 'gallery_attributes' ), 1000 );
|
22 |
-
add_filter( 'post_gallery', array( $this, 'add_custom_gallery_lightbox_selector' ), 2000, 2 );
|
23 |
-
add_filter( 'wp_get_attachment_link', array( $this, 'add_gallery_lightbox_selector' ), 1000, 6 );
|
24 |
-
add_filter( 'the_content', array( $this, 'add_videos_lightbox_selector' ) );
|
25 |
add_filter( 'the_content', array( $this, 'add_links_lightbox_selector' ) );
|
|
|
|
|
|
|
26 |
add_filter( 'woocommerce_single_product_image_html', array( $this, 'woocommerce_single_product_image_html' ), 100 );
|
27 |
add_filter( 'woocommerce_single_product_image_thumbnail_html', array( $this, 'woocommerce_single_product_image_thumbnail_html' ), 100 );
|
|
|
|
|
|
|
28 |
|
29 |
// actions
|
30 |
-
add_action( 'wp_enqueue_scripts', array( $this, '
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Add lightbox to videos
|
35 |
-
*
|
36 |
-
* @param mixed $content
|
37 |
-
* @return mixed
|
38 |
-
*/
|
39 |
-
public function add_videos_lightbox_selector( $content ) {
|
40 |
-
if ( Responsive_Lightbox()->options['settings']['videos'] ) {
|
41 |
-
// search for video-links
|
42 |
-
preg_match_all('/<a(.*?)href=(?:\'|")((?:http|https)(?::\/\/|)(?:www\.)?(?:(?:(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=))(?:[\w\-]{11})[a-z0-9;:@#?&%=+\/\$_.-]*)|(?:vimeo\.com\/[0-9]+[a-z0-9;:@#?&%=+\/\$_.-]*)))(?:\'|")(.*?)>/i', $content, $links );
|
43 |
-
|
44 |
-
// found?
|
45 |
-
if ( ! empty ( $links[0] ) ) {
|
46 |
-
foreach ( $links[0] as $id => $link ) {
|
47 |
-
if ( preg_match( '/<a.*?(?:data-rel)=(?:\'|")(.*?)(?:\'|").*?>/', $link, $result ) === 1 ) {
|
48 |
-
|
49 |
-
// do not modify this link
|
50 |
-
if ( $result[1] === 'norl' )
|
51 |
-
continue;
|
52 |
-
|
53 |
-
// swipebox video fix
|
54 |
-
if ( Responsive_Lightbox()->options['settings']['script'] === 'swipebox' && strpos( $links[2][$id], 'vimeo.com') !== false )
|
55 |
-
$content = str_replace( $link, str_replace( $links[2][$id], $links[2][$id] . '?width=' . Responsive_Lightbox()->options['configuration']['swipebox']['video_max_width'], $link ), $content );
|
56 |
-
|
57 |
-
// replace data-rel
|
58 |
-
$content = str_replace( $link, preg_replace( '/(?:data-rel)=(?:\'|")(.*?)(?:\'|")/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-video-' . $id . '"', $link ), $content );
|
59 |
-
} else {
|
60 |
-
// swipebox video fix
|
61 |
-
if ( Responsive_Lightbox()->options['settings']['script'] === 'swipebox' && strpos( $links[2][$id], 'vimeo.com') !== false )
|
62 |
-
$links[2][$id] = $links[2][$id] . '?width=' . Responsive_Lightbox()->options['configuration']['swipebox']['video_max_width'];
|
63 |
-
|
64 |
-
// replace data-rel
|
65 |
-
$content = str_replace( $link, '<a' . $links[1][$id] . 'href="' . $links[2][$id] . '" data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-video-' . $id . '"' . $links[3][$id] . '>', $content );
|
66 |
-
}
|
67 |
-
}
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
return $content;
|
72 |
}
|
73 |
|
74 |
/**
|
@@ -114,10 +76,10 @@ class Responsive_Lightbox_Frontend {
|
|
114 |
|
115 |
// single images gallery
|
116 |
if ( Responsive_Lightbox()->options['settings']['images_as_gallery'] )
|
117 |
-
$content = str_replace( $link, preg_replace( '/(?:data-rel)=(?:\'|")(?:.*?)(?:\'|")/s', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . $
|
118 |
// single image
|
119 |
else {
|
120 |
-
$content = str_replace( $link, preg_replace( '/(?:data-rel)=(?:\'|")(?:.*?)(?:\'|")/s', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-' . $
|
121 |
}
|
122 |
// link without data-rel
|
123 |
} else {
|
@@ -176,7 +138,7 @@ class Responsive_Lightbox_Frontend {
|
|
176 |
* @param array $attr
|
177 |
* @return mixed
|
178 |
*/
|
179 |
-
public function add_custom_gallery_lightbox_selector( $content
|
180 |
if ( Responsive_Lightbox()->options['settings']['force_custom_gallery'] ) {
|
181 |
|
182 |
preg_match_all( '/<a(.*?)href=(?:\'|")([^<]*?).(bmp|gif|jpeg|jpg|png)(?:\'|")(.*?)>/i', $content, $links );
|
@@ -206,9 +168,17 @@ class Responsive_Lightbox_Frontend {
|
|
206 |
}
|
207 |
|
208 |
if ( preg_match( '/<a.*?(?:data-rel)=(?:\'|")(.*?)(?:\'|").*?>/', $link, $result ) === 1 ) {
|
209 |
-
|
210 |
-
|
211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
}
|
213 |
}
|
214 |
}
|
@@ -219,23 +189,129 @@ class Responsive_Lightbox_Frontend {
|
|
219 |
}
|
220 |
|
221 |
/**
|
222 |
-
*
|
|
|
|
|
|
|
223 |
*/
|
224 |
-
public function
|
225 |
-
if ( Responsive_Lightbox()->options['settings']['
|
226 |
-
//
|
227 |
-
|
228 |
-
|
229 |
-
//
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
}
|
235 |
}
|
236 |
|
237 |
/**
|
238 |
-
* Apply lightbox to WooCommerce
|
239 |
*
|
240 |
* @param mixed $html
|
241 |
* @return mixed
|
@@ -244,11 +320,12 @@ class Responsive_Lightbox_Frontend {
|
|
244 |
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
245 |
$html = preg_replace( '/data-rel=\"(.*?)\"/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . $this->gallery_no . '"', $html );
|
246 |
}
|
|
|
247 |
return $html;
|
248 |
}
|
249 |
|
250 |
/**
|
251 |
-
* Apply lightbox to WooCommerce
|
252 |
*
|
253 |
* @param mixed $html
|
254 |
* @return mixed
|
@@ -256,7 +333,19 @@ class Responsive_Lightbox_Frontend {
|
|
256 |
public function woocommerce_single_product_image_thumbnail_html( $html ) {
|
257 |
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
258 |
$html = preg_replace( '/data-rel=\"(.*?)\"/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . $this->gallery_no . '"', $html );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
}
|
|
|
260 |
return $html;
|
261 |
}
|
262 |
|
@@ -296,24 +385,46 @@ class Responsive_Lightbox_Frontend {
|
|
296 |
}
|
297 |
|
298 |
/**
|
299 |
-
* Get attachment id by url function, adjusted to work cropped images
|
300 |
*
|
301 |
* @param string $url
|
302 |
* @return int
|
303 |
*/
|
304 |
public function get_attachment_id_by_url( $url ) {
|
305 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
|
311 |
-
|
312 |
-
|
313 |
|
314 |
-
|
315 |
-
|
316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
|
318 |
return (int) $post_id;
|
319 |
}
|
@@ -346,5 +457,95 @@ class Responsive_Lightbox_Frontend {
|
|
346 |
|
347 |
return $content;
|
348 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
|
350 |
}
|
19 |
|
20 |
// filters
|
21 |
add_filter( 'post_gallery', array( $this, 'gallery_attributes' ), 1000 );
|
|
|
|
|
|
|
22 |
add_filter( 'the_content', array( $this, 'add_links_lightbox_selector' ) );
|
23 |
+
add_filter( 'the_content', array( $this, 'add_videos_lightbox_selector' ) );
|
24 |
+
add_filter( 'the_content', array( $this, 'add_custom_gallery_lightbox_selector' ), 2000, 2 );
|
25 |
+
add_filter( 'wp_get_attachment_link', array( $this, 'add_gallery_lightbox_selector' ), 1000, 6 );
|
26 |
add_filter( 'woocommerce_single_product_image_html', array( $this, 'woocommerce_single_product_image_html' ), 100 );
|
27 |
add_filter( 'woocommerce_single_product_image_thumbnail_html', array( $this, 'woocommerce_single_product_image_thumbnail_html' ), 100 );
|
28 |
+
add_filter( 'get_comment_text', array( $this, 'get_comment_text' ) );
|
29 |
+
add_filter( 'dynamic_sidebar_params', array( $this, 'dynamic_sidebar_params' ) );
|
30 |
+
add_filter( 'rl_widget_output', array( $this, 'widget_output' ), 10, 3 );
|
31 |
|
32 |
// actions
|
33 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 100 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
/**
|
76 |
|
77 |
// single images gallery
|
78 |
if ( Responsive_Lightbox()->options['settings']['images_as_gallery'] )
|
79 |
+
$content = str_replace( $link, preg_replace( '/(?:data-rel)=(?:\'|")(?:.*?)(?:\'|")/s', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . base64_encode( $result[1] ) . '"' . ( Responsive_Lightbox()->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $id . '"' : '' ) . ' title="' . esc_attr( $title ) . '"', $link ), $content );
|
80 |
// single image
|
81 |
else {
|
82 |
+
$content = str_replace( $link, preg_replace( '/(?:data-rel)=(?:\'|")(?:.*?)(?:\'|")/s', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-' . base64_encode( $result[1] ) . '"' . ( Responsive_Lightbox()->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $id . '"' : '' ) . ' title="' . esc_attr( $title ) . '"', $link ), $content );
|
83 |
}
|
84 |
// link without data-rel
|
85 |
} else {
|
138 |
* @param array $attr
|
139 |
* @return mixed
|
140 |
*/
|
141 |
+
public function add_custom_gallery_lightbox_selector( $content ) {
|
142 |
if ( Responsive_Lightbox()->options['settings']['force_custom_gallery'] ) {
|
143 |
|
144 |
preg_match_all( '/<a(.*?)href=(?:\'|")([^<]*?).(bmp|gif|jpeg|jpg|png)(?:\'|")(.*?)>/i', $content, $links );
|
168 |
}
|
169 |
|
170 |
if ( preg_match( '/<a.*?(?:data-rel)=(?:\'|")(.*?)(?:\'|").*?>/', $link, $result ) === 1 ) {
|
171 |
+
// do not modify this link
|
172 |
+
if ( $result[1] === 'norl' )
|
173 |
+
continue;
|
174 |
+
|
175 |
+
$content = str_replace( $link, preg_replace( '/(?:data-rel)=(?:\'|")(.*?)(?:\'|")/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . base64_encode( $result[1] ) . '"' . ( ! empty ( $title ) ? ' title="' . esc_attr( $title ) . '"' : '' ) . ( Responsive_Lightbox()->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $id . '"' : '' ), $link ), $content );
|
176 |
+
} elseif ( preg_match( '/<a.*?(?:rel)=(?:\'|")(.*?)(?:\'|").*?>/', $link, $result ) === 1 ) {
|
177 |
+
// do not modify this link
|
178 |
+
if ( $result[1] === 'norl' )
|
179 |
+
continue;
|
180 |
+
|
181 |
+
$content = str_replace( $link, preg_replace( '/(?:rel)=(?:\'|")(.*?)(?:\'|")/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . base64_encode( $result[1] ) . '"' . ( ! empty ( $title ) ? ' title="' . esc_attr( $title ) . '"' : '' ) . ( Responsive_Lightbox()->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $id . '"' : '' ), $link ), $content );
|
182 |
}
|
183 |
}
|
184 |
}
|
189 |
}
|
190 |
|
191 |
/**
|
192 |
+
* Add lightbox to videos
|
193 |
+
*
|
194 |
+
* @param mixed $content
|
195 |
+
* @return mixed
|
196 |
*/
|
197 |
+
public function add_videos_lightbox_selector( $content ) {
|
198 |
+
if ( Responsive_Lightbox()->options['settings']['videos'] ) {
|
199 |
+
// search for video-links
|
200 |
+
preg_match_all('/<a(.*?)href=(?:\'|")((?:http|https)(?::\/\/|)(?:www\.)?(?:(?:(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=))(?:[\w\-]{11})[a-z0-9;:@#?&%=+\/\$_.-]*)|(?:vimeo\.com\/[0-9]+[a-z0-9;:@#?&%=+\/\$_.-]*)))(?:\'|")(.*?)>/i', $content, $links );
|
201 |
+
|
202 |
+
// found?
|
203 |
+
if ( ! empty ( $links[0] ) ) {
|
204 |
+
foreach ( $links[0] as $id => $link ) {
|
205 |
+
if ( preg_match( '/<a.*?(?:data-rel)=(?:\'|")(.*?)(?:\'|").*?>/', $link, $result ) === 1 ) {
|
206 |
+
|
207 |
+
// do not modify this link
|
208 |
+
if ( $result[1] === 'norl' )
|
209 |
+
continue;
|
210 |
+
|
211 |
+
// swipebox video fix
|
212 |
+
if ( Responsive_Lightbox()->options['settings']['script'] === 'swipebox' && strpos( $links[2][$id], 'vimeo.com') !== false )
|
213 |
+
$content = str_replace( $link, str_replace( $links[2][$id], $links[2][$id] . '?width=' . Responsive_Lightbox()->options['configuration']['swipebox']['video_max_width'], $link ), $content );
|
214 |
+
|
215 |
+
// replace data-rel
|
216 |
+
$content = str_replace( $link, preg_replace( '/(?:data-rel)=(?:\'|")(.*?)(?:\'|")/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-video-' . $id . '"', $link ), $content );
|
217 |
+
} else {
|
218 |
+
// swipebox video fix
|
219 |
+
if ( Responsive_Lightbox()->options['settings']['script'] === 'swipebox' && strpos( $links[2][$id], 'vimeo.com') !== false )
|
220 |
+
$links[2][$id] = $links[2][$id] . '?width=' . Responsive_Lightbox()->options['configuration']['swipebox']['video_max_width'];
|
221 |
+
|
222 |
+
// replace data-rel
|
223 |
+
$content = str_replace( $link, '<a' . $links[1][$id] . 'href="' . $links[2][$id] . '" data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-video-' . $id . '"' . $links[3][$id] . '>', $content );
|
224 |
+
}
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
return $content;
|
230 |
+
}
|
231 |
+
|
232 |
+
// zaktualizuj photo swipe
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Remove WooCommerce prettyPhoto lightbox styles and scripts.
|
236 |
+
*/
|
237 |
+
public function wp_enqueue_scripts() {
|
238 |
+
if ( class_exists( 'WooCommerce' ) ) {
|
239 |
+
global $woocommerce;
|
240 |
+
|
241 |
+
// specific WooCommerce gallery?
|
242 |
+
if ( ! empty( Responsive_Lightbox()->options['settings']['default_woocommerce_gallery'] ) && Responsive_Lightbox()->options['settings']['default_woocommerce_gallery'] !== 'default' ) {
|
243 |
+
// replace default WooCommerce lightbox?
|
244 |
+
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
245 |
+
if ( version_compare( $woocommerce->version, '3.0', ">=" ) ) {
|
246 |
+
// dequeue scripts
|
247 |
+
wp_dequeue_script( 'flexslider' );
|
248 |
+
wp_dequeue_script( 'photoswipe' );
|
249 |
+
wp_dequeue_script( 'photoswipe-ui-default' );
|
250 |
+
|
251 |
+
// dequeue styles
|
252 |
+
wp_dequeue_style( 'photoswipe' );
|
253 |
+
wp_dequeue_style( 'photoswipe-default-skin' );
|
254 |
+
|
255 |
+
// remove theme supports
|
256 |
+
remove_theme_support( 'wc-product-gallery-lightbox' );
|
257 |
+
// remove_theme_support( 'wc-product-gallery-zoom' );
|
258 |
+
remove_theme_support( 'wc-product-gallery-slider' );
|
259 |
+
} else {
|
260 |
+
// remove styles
|
261 |
+
wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
|
262 |
+
|
263 |
+
// remove scripts
|
264 |
+
wp_dequeue_script( 'prettyPhoto' );
|
265 |
+
wp_dequeue_script( 'prettyPhoto-init' );
|
266 |
+
wp_dequeue_script( 'fancybox' );
|
267 |
+
wp_dequeue_script( 'enable-lightbox' );
|
268 |
+
}
|
269 |
+
} else {
|
270 |
+
if ( version_compare( $woocommerce->version, '3.0', ">=" ) ) {
|
271 |
+
// dequeue scripts
|
272 |
+
wp_dequeue_script( 'flexslider' );
|
273 |
+
}
|
274 |
+
}
|
275 |
+
// default gallery?
|
276 |
+
} else {
|
277 |
+
// replace default WooCommerce lightbox?
|
278 |
+
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
279 |
+
if ( version_compare( $woocommerce->version, '3.0', ">=" ) ) {
|
280 |
+
// dequeue scripts
|
281 |
+
wp_dequeue_script( 'photoswipe' );
|
282 |
+
wp_dequeue_script( 'photoswipe-ui-default' );
|
283 |
+
|
284 |
+
// dequeue styles
|
285 |
+
wp_dequeue_style( 'photoswipe' );
|
286 |
+
wp_dequeue_style( 'photoswipe-default-skin' );
|
287 |
+
|
288 |
+
// remove theme supports
|
289 |
+
remove_theme_support( 'wc-product-gallery-lightbox' );
|
290 |
+
} else {
|
291 |
+
// remove styles
|
292 |
+
wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
|
293 |
+
|
294 |
+
// remove scripts
|
295 |
+
wp_dequeue_script( 'prettyPhoto' );
|
296 |
+
wp_dequeue_script( 'prettyPhoto-init' );
|
297 |
+
wp_dequeue_script( 'fancybox' );
|
298 |
+
wp_dequeue_script( 'enable-lightbox' );
|
299 |
+
}
|
300 |
+
}
|
301 |
+
}
|
302 |
+
}
|
303 |
+
|
304 |
+
// Visual Composer lightbox
|
305 |
+
if ( class_exists( 'Vc_Manager' ) ) {
|
306 |
+
wp_dequeue_script( 'prettyphoto' );
|
307 |
+
wp_deregister_script( 'prettyphoto' );
|
308 |
+
wp_dequeue_style( 'prettyphoto' );
|
309 |
+
wp_deregister_style( 'prettyphoto' );
|
310 |
}
|
311 |
}
|
312 |
|
313 |
/**
|
314 |
+
* Apply lightbox to WooCommerce product image.
|
315 |
*
|
316 |
* @param mixed $html
|
317 |
* @return mixed
|
320 |
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
321 |
$html = preg_replace( '/data-rel=\"(.*?)\"/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . $this->gallery_no . '"', $html );
|
322 |
}
|
323 |
+
|
324 |
return $html;
|
325 |
}
|
326 |
|
327 |
/**
|
328 |
+
* Apply lightbox to WooCommerce product gallery.
|
329 |
*
|
330 |
* @param mixed $html
|
331 |
* @return mixed
|
333 |
public function woocommerce_single_product_image_thumbnail_html( $html ) {
|
334 |
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
335 |
$html = preg_replace( '/data-rel=\"(.*?)\"/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . $this->gallery_no . '"', $html );
|
336 |
+
|
337 |
+
preg_match( '/<a(.*?)((?:data-rel)=(?:\'|").*?(?:\'|"))(.*?)>/', $html, $result );
|
338 |
+
|
339 |
+
// no data-rel?
|
340 |
+
if ( empty( $result ) ) {
|
341 |
+
preg_match( '/^(.*?)<a(.*?)((?:href)=(?:\'|").*?(?:\'|"))(.*?)>(.*?)$/', $html, $result );
|
342 |
+
|
343 |
+
// found valid link?
|
344 |
+
if ( ! empty( $result ) )
|
345 |
+
$html = $result[1] . '<a' . $result[2] . ' data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . $this->gallery_no . '" ' . $result[3] . $result[4] . '>' . $result[5];
|
346 |
+
}
|
347 |
}
|
348 |
+
|
349 |
return $html;
|
350 |
}
|
351 |
|
385 |
}
|
386 |
|
387 |
/**
|
388 |
+
* Get attachment id by url function, adjusted to work for cropped images
|
389 |
*
|
390 |
* @param string $url
|
391 |
* @return int
|
392 |
*/
|
393 |
public function get_attachment_id_by_url( $url ) {
|
394 |
+
$url = ! empty( $url ) ? esc_url( $url ) : '';
|
395 |
+
|
396 |
+
// get cached data
|
397 |
+
// $post_id = wp_cache_get( md5( $url ), 'rl-attachment_id_by_url' );
|
398 |
+
$post_ids = get_transient( 'rl-attachment_ids' );
|
399 |
+
$post_id = 0;
|
400 |
+
|
401 |
+
// cached url not found?
|
402 |
+
if ( $post_ids === false || ! in_array( $url, array_keys( $post_ids ) ) ) {
|
403 |
+
$post_id = attachment_url_to_postid( $url );
|
404 |
|
405 |
+
if ( ! $post_id ) {
|
406 |
+
$dir = wp_upload_dir();
|
407 |
+
$path = $url;
|
408 |
|
409 |
+
if ( strpos( $path, $dir['baseurl'] . '/' ) === 0 )
|
410 |
+
$path = substr( $path, strlen( $dir['baseurl'] . '/' ) );
|
411 |
|
412 |
+
if ( preg_match( '/^(.*)(\-\d*x\d*)(\.\w{1,})/i', $path, $matches ) )
|
413 |
+
$post_id = attachment_url_to_postid( $dir['baseurl'] . '/' . $matches[1] . $matches[3] );
|
414 |
+
}
|
415 |
+
|
416 |
+
// set the cache expiration, 24 hours by default
|
417 |
+
$expire = absint( apply_filters( 'rl_object_cache_expire', DAY_IN_SECONDS ) );
|
418 |
+
|
419 |
+
// wp_cache_add( md5( $url ), $post_id, 'rl-attachment_id_by_url', $expire );
|
420 |
+
|
421 |
+
$post_ids[$url] = $post_id;
|
422 |
+
|
423 |
+
set_transient( 'rl-attachment_ids', $post_ids, $expire );
|
424 |
+
// cached url found
|
425 |
+
} elseif ( ! empty( $post_ids[$url] ) ) {
|
426 |
+
$post_id = absint( $post_ids[$url] );
|
427 |
+
}
|
428 |
|
429 |
return (int) $post_id;
|
430 |
}
|
457 |
|
458 |
return $content;
|
459 |
}
|
460 |
+
|
461 |
+
/**
|
462 |
+
* Replace widget callback function.
|
463 |
+
*
|
464 |
+
* @global array $wp_registered_widgets
|
465 |
+
* @param array $sidebar_params
|
466 |
+
* @return type
|
467 |
+
*/
|
468 |
+
public function dynamic_sidebar_params( $sidebar_params ) {
|
469 |
+
if ( ( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) || Responsive_Lightbox()->options['settings']['widgets'] != true ) {
|
470 |
+
return $sidebar_params;
|
471 |
+
}
|
472 |
+
|
473 |
+
global $wp_registered_widgets;
|
474 |
+
|
475 |
+
$widget_id = $sidebar_params[0]['widget_id'];
|
476 |
+
|
477 |
+
$wp_registered_widgets[ $widget_id ]['original_callback'] = $wp_registered_widgets[ $widget_id ]['callback'];
|
478 |
+
$wp_registered_widgets[ $widget_id ]['callback'] = array( $this, 'widget_callback_function' );
|
479 |
+
|
480 |
+
return $sidebar_params;
|
481 |
+
}
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Widget callback function.
|
485 |
+
*
|
486 |
+
* @global array $wp_registered_widgets
|
487 |
+
*/
|
488 |
+
public function widget_callback_function() {
|
489 |
+
|
490 |
+
global $wp_registered_widgets;
|
491 |
+
$original_callback_params = func_get_args();
|
492 |
+
$widget_id = $original_callback_params[0]['widget_id'];
|
493 |
+
|
494 |
+
$original_callback = $wp_registered_widgets[ $widget_id ]['original_callback'];
|
495 |
+
$wp_registered_widgets[ $widget_id ]['callback'] = $original_callback;
|
496 |
+
|
497 |
+
$widget_id_base = $wp_registered_widgets[ $widget_id ]['callback'][0]->id_base;
|
498 |
+
|
499 |
+
if ( is_callable( $original_callback ) ) {
|
500 |
+
|
501 |
+
ob_start();
|
502 |
+
call_user_func_array( $original_callback, $original_callback_params );
|
503 |
+
$widget_output = ob_get_clean();
|
504 |
+
|
505 |
+
echo apply_filters( 'rl_widget_output', $widget_output, $widget_id_base, $widget_id );
|
506 |
+
|
507 |
+
}
|
508 |
+
|
509 |
+
}
|
510 |
+
|
511 |
+
/**
|
512 |
+
* Filter widget output.
|
513 |
+
*
|
514 |
+
* @param mixed $widget_output
|
515 |
+
* @param string $widget_id_base
|
516 |
+
* @param id $widget_id
|
517 |
+
* @return mixed
|
518 |
+
*/
|
519 |
+
public function widget_output( $widget_output, $widget_id_base, $widget_id ) {
|
520 |
+
// filter galleries
|
521 |
+
$widget_output = $this->add_custom_gallery_lightbox_selector( $widget_output );
|
522 |
+
// filter image links
|
523 |
+
$widget_output = $this->add_links_lightbox_selector( $widget_output );
|
524 |
+
// filter videos
|
525 |
+
$widget_output = $this->add_videos_lightbox_selector( $widget_output );
|
526 |
+
|
527 |
+
return $widget_output;
|
528 |
+
}
|
529 |
+
|
530 |
+
/**
|
531 |
+
* Filter comment content.
|
532 |
+
*
|
533 |
+
* @param mixed $comment_content
|
534 |
+
* @return mixed
|
535 |
+
*/
|
536 |
+
public function get_comment_text( $comment_content ) {
|
537 |
+
if ( ( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) || Responsive_Lightbox()->options['settings']['comments'] != true ) {
|
538 |
+
return $comment_content;
|
539 |
+
}
|
540 |
+
|
541 |
+
// filter galleries
|
542 |
+
$comment_content = $this->add_custom_gallery_lightbox_selector( $comment_content );
|
543 |
+
// filter image links
|
544 |
+
$comment_content = $this->add_links_lightbox_selector( $comment_content );
|
545 |
+
// filter videos
|
546 |
+
$comment_content = $this->add_videos_lightbox_selector( $comment_content );
|
547 |
+
|
548 |
+
return $comment_content;
|
549 |
+
}
|
550 |
|
551 |
}
|
includes/class-settings.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
if ( ! defined( 'ABSPATH' ) )
|
3 |
exit;
|
4 |
|
@@ -37,6 +38,13 @@ class Responsive_Lightbox_Settings {
|
|
37 |
public function load_defaults() {
|
38 |
|
39 |
$this->scripts = apply_filters( 'rl_settings_scripts', array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
'prettyphoto' => array(
|
41 |
'name' => __( 'prettyPhoto', 'responsive-lightbox' ),
|
42 |
'animation_speeds' => array(
|
@@ -60,13 +68,6 @@ class Responsive_Lightbox_Settings {
|
|
60 |
'gpu' => __( 'gpu', 'responsive-lightbox' )
|
61 |
)
|
62 |
),
|
63 |
-
'swipebox' => array(
|
64 |
-
'name' => __( 'SwipeBox', 'responsive-lightbox' ),
|
65 |
-
'animations' => array(
|
66 |
-
'css' => __( 'CSS', 'responsive-lightbox' ),
|
67 |
-
'jquery' => __( 'jQuery', 'responsive-lightbox' )
|
68 |
-
)
|
69 |
-
),
|
70 |
'fancybox' => array(
|
71 |
'name' => __( 'FancyBox', 'responsive-lightbox' ),
|
72 |
'transitions' => array(
|
@@ -154,7 +155,7 @@ class Responsive_Lightbox_Settings {
|
|
154 |
'fields' => array(
|
155 |
'script' => array(
|
156 |
// 'name' => '',
|
157 |
-
'title' => __( '
|
158 |
// 'callback' => '',
|
159 |
// 'page' => '',
|
160 |
'section' => 'responsive_lightbox_settings',
|
@@ -173,10 +174,10 @@ class Responsive_Lightbox_Settings {
|
|
173 |
'description' => __( 'Enter the rel selector lightbox effect will be applied to.', 'responsive-lightbox' ),
|
174 |
),
|
175 |
'image_links' => array(
|
176 |
-
'title' => __( '
|
177 |
'section' => 'responsive_lightbox_settings',
|
178 |
'type' => 'boolean',
|
179 |
-
'label' => __( '
|
180 |
),
|
181 |
'image_title' => array(
|
182 |
'title' => __( 'Single image title', 'responsive-lightbox' ),
|
@@ -195,7 +196,7 @@ class Responsive_Lightbox_Settings {
|
|
195 |
'title' => __( 'Galleries', 'responsive-lightbox' ),
|
196 |
'section' => 'responsive_lightbox_settings',
|
197 |
'type' => 'boolean',
|
198 |
-
'label' => __( '
|
199 |
),
|
200 |
'gallery_image_size' => array(
|
201 |
'title' => __( 'Gallery image size', 'responsive-lightbox' ),
|
@@ -211,23 +212,36 @@ class Responsive_Lightbox_Settings {
|
|
211 |
'description' => __( 'Select title for images in native WordPress galleries.', 'responsive-lightbox' ),
|
212 |
'options' => $this->image_titles,
|
213 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
'force_custom_gallery' => array(
|
215 |
-
'title' => __( 'Force
|
216 |
'section' => 'responsive_lightbox_settings',
|
217 |
'type' => 'boolean',
|
218 |
-
'label' => __( 'Try to force lightbox for custom WP gallery replacements, like Jetpack
|
219 |
),
|
220 |
'woocommerce_gallery_lightbox' => array(
|
221 |
'title' => __( 'WooCommerce lightbox', 'responsive-lightbox' ),
|
222 |
'section' => 'responsive_lightbox_settings',
|
223 |
'type' => 'boolean',
|
224 |
'label' => __( 'Replace WooCommerce product gallery lightbox.', 'responsive-lightbox' ),
|
225 |
-
|
226 |
-
'videos' => array(
|
227 |
-
'title' => __( 'Video links', 'responsive-lightbox' ),
|
228 |
-
'section' => 'responsive_lightbox_settings',
|
229 |
-
'type' => 'boolean',
|
230 |
-
'label' => __( 'Add lightbox to YouTube and Vimeo video links by default.', 'responsive-lightbox' ),
|
231 |
),
|
232 |
'enable_custom_events' => array(
|
233 |
'title' => __( 'Custom events', 'responsive-lightbox' ),
|
@@ -271,9 +285,9 @@ class Responsive_Lightbox_Settings {
|
|
271 |
// 'callback' => array( $this, 'validate_options' ),
|
272 |
'sections' => array(
|
273 |
'responsive_lightbox_configuration' => array(
|
274 |
-
'title' => __( '
|
275 |
// 'callback' => '',
|
276 |
-
// 'page' => ''
|
277 |
),
|
278 |
),
|
279 |
'prefix' => 'rl',
|
@@ -282,7 +296,99 @@ class Responsive_Lightbox_Settings {
|
|
282 |
)
|
283 |
);
|
284 |
|
285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
|
287 |
case ( 'swipebox' ) :
|
288 |
|
@@ -938,32 +1044,16 @@ class Responsive_Lightbox_Settings {
|
|
938 |
|
939 |
default :
|
940 |
|
941 |
-
$this->settings['configuration'] = apply_filters( 'rl_settings_' . Responsive_Lightbox()->options['settings']['script'] . '_script_configuration', $this->settings['configuration'] );
|
942 |
|
943 |
break;
|
944 |
}
|
945 |
|
946 |
-
$this->tabs
|
947 |
-
'settings'
|
948 |
-
|
949 |
-
|
950 |
-
'submit' => 'save_rl_settings',
|
951 |
-
'reset' => 'reset_rl_settings',
|
952 |
-
),
|
953 |
-
'configuration' => array(
|
954 |
-
'name' => __( 'Lightbox settings', 'responsive-lightbox' ),
|
955 |
-
'key' => 'responsive_lightbox_configuration',
|
956 |
-
'submit' => 'save_' . $this->settings['configuration']['prefix'] . '_configuration',
|
957 |
-
'reset' => 'reset_' . $this->settings['configuration']['prefix'] . '_configuration'
|
958 |
-
)
|
959 |
-
) );
|
960 |
|
961 |
-
$this->tabs['addons'] = array(
|
962 |
-
'name' => __( 'Add-ons', 'responsive-lightbox' ),
|
963 |
-
'key' => 'responsive_lightbox_configuration',
|
964 |
-
'callback' => array( $this, 'addons_tab_cb' )
|
965 |
-
);
|
966 |
-
|
967 |
}
|
968 |
|
969 |
/**
|
@@ -983,16 +1073,17 @@ class Responsive_Lightbox_Settings {
|
|
983 |
* @return void
|
984 |
*/
|
985 |
public function options_page() {
|
986 |
-
$tab_key =
|
|
|
987 |
|
988 |
echo '
|
989 |
<div class="wrap">' . screen_icon() . '
|
990 |
<h2>' . __( 'Responsive Lightbox', 'responsive-lightbox' ) . '</h2>
|
991 |
<h2 class="nav-tab-wrapper">';
|
992 |
|
993 |
-
foreach ( $this->tabs as $key => $
|
994 |
echo '
|
995 |
-
<a class="nav-tab ' . ($tab_key == $key ? 'nav-tab-active' : '') . '" href="' . esc_url( admin_url( 'options-general.php?page=responsive-lightbox&tab=' . $key ) ) . '">' . $
|
996 |
}
|
997 |
|
998 |
echo '
|
@@ -1016,30 +1107,45 @@ class Responsive_Lightbox_Settings {
|
|
1016 |
</div>
|
1017 |
|
1018 |
<form action="options.php" method="post">';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1019 |
|
1020 |
// tab content callback
|
1021 |
-
if ( ! empty( $this->tabs[$tab_key]['callback'] ) )
|
1022 |
call_user_func( $this->tabs[$tab_key]['callback'] );
|
1023 |
-
|
1024 |
wp_nonce_field( 'update-options' );
|
1025 |
settings_fields( $this->tabs[$tab_key]['key'] );
|
1026 |
do_settings_sections( $this->tabs[$tab_key]['key'] );
|
1027 |
}
|
1028 |
|
1029 |
if ( ! empty( $this->tabs[$tab_key]['submit'] ) || ! empty( $this->tabs[$tab_key]['reset'] ) ) {
|
|
|
1030 |
|
1031 |
-
echo ' <p class="submit">';
|
1032 |
if ( ! empty( $this->tabs[$tab_key]['submit'] ) ) {
|
1033 |
submit_button( '', array( 'primary', 'save-' . $tab_key ), $this->tabs[$tab_key]['submit'], false );
|
1034 |
echo ' ';
|
1035 |
}
|
1036 |
-
|
|
|
1037 |
submit_button( __( 'Reset to defaults', 'responsive-lightbox' ), array( 'secondary', 'reset-' . $tab_key ), $this->tabs[$tab_key]['reset'], false );
|
1038 |
-
|
1039 |
-
echo '
|
1040 |
-
|
1041 |
}
|
1042 |
-
|
1043 |
echo '
|
1044 |
</form>
|
1045 |
</div>
|
@@ -1099,6 +1205,7 @@ class Responsive_Lightbox_Settings {
|
|
1099 |
'type' => ! empty( $field['type'] ) ? $field['type'] : 'text',
|
1100 |
'label' => ! empty( $field['label'] ) ? $field['label'] : '',
|
1101 |
'description' => ! empty( $field['description'] ) ? $field['description'] : '',
|
|
|
1102 |
'append' => ! empty( $field['append'] ) ? esc_html( $field['append'] ) : '',
|
1103 |
'prepend' => ! empty( $field['prepend'] ) ? esc_html( $field['prepend'] ) : '',
|
1104 |
'min' => ! empty( $field['min'] ) ? (int) $field['min'] : '',
|
@@ -1188,20 +1295,20 @@ class Responsive_Lightbox_Settings {
|
|
1188 |
|
1189 |
case ( 'boolean' ) :
|
1190 |
|
1191 |
-
$html .= '<label class="cb-checkbox"><input id="' . $args['id'] . '" type="checkbox" name="' . $args['name'] . '" value="1" ' . checked( (bool) $args['value'], true, false ) . ' />' . $args['label'] . '</label>';
|
1192 |
break;
|
1193 |
|
1194 |
case ( 'radio' ) :
|
1195 |
|
1196 |
foreach ( $args['options'] as $key => $name ) {
|
1197 |
-
$html .= '<label class="cb-radio"><input id="' . $args['id'] . '-' . $key . '" type="radio" name="' . $args['name'] . '" value="' . $key . '" ' . checked( $key, $args['value'], false ) . ' />' . $name . '</label> ';
|
1198 |
}
|
1199 |
break;
|
1200 |
|
1201 |
case ( 'checkbox' ) :
|
1202 |
|
1203 |
foreach ( $args['options'] as $key => $name ) {
|
1204 |
-
$html .= '<label class="cb-checkbox"><input id="' . $args['id'] . '-' . $key . '" type="checkbox" name="' . $args['name'] . '[' . $key . ']" value="1" ' . checked( in_array( $key, $args['value'] ), true, false ) . ' />' . $name . '</label> ';
|
1205 |
}
|
1206 |
break;
|
1207 |
|
@@ -1345,80 +1452,57 @@ class Responsive_Lightbox_Settings {
|
|
1345 |
*/
|
1346 |
public function validate_settings( $input ) {
|
1347 |
// check cap
|
1348 |
-
if ( ! current_user_can( apply_filters( 'rl_lightbox_settings_capability', 'manage_options' ) ) )
|
1349 |
return $input;
|
1350 |
-
}
|
1351 |
|
1352 |
// check page
|
1353 |
if ( ! ( $option_page = esc_attr( $_POST['option_page'] ) ) )
|
1354 |
return $input;
|
1355 |
-
|
1356 |
foreach ( $this->settings as $id => $setting ) {
|
1357 |
-
|
1358 |
$key = array_search( $option_page, $setting );
|
1359 |
-
|
1360 |
if ( $key ) {
|
1361 |
// set key
|
1362 |
$setting_id = $id;
|
1363 |
-
|
1364 |
}
|
1365 |
}
|
1366 |
-
|
1367 |
// check setting id
|
1368 |
if ( ! $setting_id )
|
1369 |
return $input;
|
1370 |
-
|
1371 |
// save settings
|
1372 |
if ( isset( $_POST['save' . '_' . $this->settings[$setting_id]['prefix'] . '_' . $setting_id] ) ) {
|
1373 |
-
|
1374 |
if ( $this->settings[$setting_id]['fields'] ) {
|
1375 |
-
|
1376 |
foreach ( $this->settings[$setting_id]['fields'] as $field_id => $field ) {
|
1377 |
-
|
1378 |
if ( $field['type'] === 'multiple' ) {
|
1379 |
-
|
1380 |
if ( $field['fields'] ) {
|
1381 |
-
|
1382 |
foreach ( $field['fields'] as $subfield_id => $subfield ) {
|
1383 |
-
|
1384 |
// if subfield has parent
|
1385 |
if ( ! empty( $this->settings[$setting_id]['fields'][$field_id]['fields'][$subfield_id]['parent'] ) ) {
|
1386 |
-
|
1387 |
$field_parent = $this->settings[$setting_id]['fields'][$field_id]['fields'][$subfield_id]['parent'];
|
1388 |
-
|
1389 |
$input[$field_parent][$subfield_id] = isset( $input[$field_parent][$subfield_id] ) ? $this->sanitize_field( $input[$field_parent][$subfield_id], $subfield['type'] ) : ( $subfield['type'] === 'boolean' ? false : Responsive_Lightbox()->defaults[$setting_id][$field_parent][$subfield_id] );
|
1390 |
-
|
1391 |
} else {
|
1392 |
-
|
1393 |
$input[$subfield_id] = isset( $input[$subfield_id] ) ? $this->sanitize_field( $input[$subfield_id], $subfield['type'] ) : ( $subfield['type'] === 'boolean' ? false : Responsive_Lightbox()->defaults[$setting_id][$field_id][$subfield_id] );
|
1394 |
-
|
1395 |
}
|
1396 |
-
|
1397 |
}
|
1398 |
-
|
1399 |
}
|
1400 |
-
|
1401 |
} else {
|
1402 |
-
|
1403 |
// if field has parent
|
1404 |
if ( ! empty( $this->settings[$setting_id]['fields'][$field_id]['parent'] ) ) {
|
1405 |
-
|
1406 |
$field_parent = $this->settings[$setting_id]['fields'][$field_id]['parent'];
|
1407 |
-
|
1408 |
$input[$field_parent][$field_id] = isset( $input[$field_parent][$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_parent][$field_id], $field['type'] ) ) : $this->sanitize_field( $input[$field_parent][$field_id], $field['type'] ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : Responsive_Lightbox()->defaults[$setting_id][$field_parent][$field_id] );
|
1409 |
-
|
1410 |
} else {
|
1411 |
-
|
1412 |
$input[$field_id] = isset( $input[$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_id], $field['type'] ) ) : $this->sanitize_field( $input[$field_id], $field['type'] ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : Responsive_Lightbox()->defaults[$setting_id][$field_id] );
|
1413 |
-
|
1414 |
}
|
1415 |
-
|
1416 |
}
|
1417 |
-
|
1418 |
}
|
1419 |
-
|
1420 |
}
|
1421 |
-
|
1422 |
if ( $setting_id === 'settings' ) {
|
1423 |
// merge scripts settings
|
1424 |
$input = array_merge( Responsive_Lightbox()->options['settings'], $input );
|
@@ -1432,8 +1516,10 @@ class Responsive_Lightbox_Settings {
|
|
1432 |
} elseif ( isset( $_POST['reset' . '_' . $this->settings[$setting_id]['prefix'] . '_' . $setting_id] ) ) {
|
1433 |
|
1434 |
if ( $setting_id === 'configuration' ) {
|
|
|
|
|
1435 |
// merge scripts settings
|
1436 |
-
$input[
|
1437 |
$input = array_merge( Responsive_Lightbox()->options['configuration'], $input );
|
1438 |
} elseif ( $setting_id === 'settings' ) {
|
1439 |
$input = Responsive_Lightbox()->defaults[$setting_id];
|
@@ -1442,9 +1528,8 @@ class Responsive_Lightbox_Settings {
|
|
1442 |
} else {
|
1443 |
$input = Responsive_Lightbox()->defaults[$setting_id];
|
1444 |
}
|
1445 |
-
|
1446 |
add_settings_error( 'reset' . '_' . $this->settings[$setting_id]['prefix'] . '_' . $setting_id, 'settings_restored', __( 'Settings restored to defaults.', 'responsive-lightbox' ), 'updated' );
|
1447 |
-
|
1448 |
}
|
1449 |
|
1450 |
return $input;
|
@@ -1552,7 +1637,7 @@ class Responsive_Lightbox_Settings {
|
|
1552 |
// request
|
1553 |
$response = $this->license_request( $request_args );
|
1554 |
|
1555 |
-
|
1556 |
|
1557 |
// validate request
|
1558 |
if ( is_wp_error( $response ) ) {
|
1 |
<?php
|
2 |
+
// exit if accessed directly
|
3 |
if ( ! defined( 'ABSPATH' ) )
|
4 |
exit;
|
5 |
|
38 |
public function load_defaults() {
|
39 |
|
40 |
$this->scripts = apply_filters( 'rl_settings_scripts', array(
|
41 |
+
'swipebox' => array(
|
42 |
+
'name' => __( 'SwipeBox', 'responsive-lightbox' ),
|
43 |
+
'animations' => array(
|
44 |
+
'css' => __( 'CSS', 'responsive-lightbox' ),
|
45 |
+
'jquery' => __( 'jQuery', 'responsive-lightbox' )
|
46 |
+
)
|
47 |
+
),
|
48 |
'prettyphoto' => array(
|
49 |
'name' => __( 'prettyPhoto', 'responsive-lightbox' ),
|
50 |
'animation_speeds' => array(
|
68 |
'gpu' => __( 'gpu', 'responsive-lightbox' )
|
69 |
)
|
70 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
'fancybox' => array(
|
72 |
'name' => __( 'FancyBox', 'responsive-lightbox' ),
|
73 |
'transitions' => array(
|
155 |
'fields' => array(
|
156 |
'script' => array(
|
157 |
// 'name' => '',
|
158 |
+
'title' => __( 'Default lightbox', 'responsive-lightbox' ),
|
159 |
// 'callback' => '',
|
160 |
// 'page' => '',
|
161 |
'section' => 'responsive_lightbox_settings',
|
174 |
'description' => __( 'Enter the rel selector lightbox effect will be applied to.', 'responsive-lightbox' ),
|
175 |
),
|
176 |
'image_links' => array(
|
177 |
+
'title' => __( 'Images', 'responsive-lightbox' ),
|
178 |
'section' => 'responsive_lightbox_settings',
|
179 |
'type' => 'boolean',
|
180 |
+
'label' => __( 'Enable lightbox for WordPress image links.', 'responsive-lightbox' ),
|
181 |
),
|
182 |
'image_title' => array(
|
183 |
'title' => __( 'Single image title', 'responsive-lightbox' ),
|
196 |
'title' => __( 'Galleries', 'responsive-lightbox' ),
|
197 |
'section' => 'responsive_lightbox_settings',
|
198 |
'type' => 'boolean',
|
199 |
+
'label' => __( 'Enable lightbox foor WordPress image galleries.', 'responsive-lightbox' ),
|
200 |
),
|
201 |
'gallery_image_size' => array(
|
202 |
'title' => __( 'Gallery image size', 'responsive-lightbox' ),
|
212 |
'description' => __( 'Select title for images in native WordPress galleries.', 'responsive-lightbox' ),
|
213 |
'options' => $this->image_titles,
|
214 |
),
|
215 |
+
'videos' => array(
|
216 |
+
'title' => __( 'Videos', 'responsive-lightbox' ),
|
217 |
+
'section' => 'responsive_lightbox_settings',
|
218 |
+
'type' => 'boolean',
|
219 |
+
'label' => __( 'Enable lightbox for YouTube and Vimeo video links.', 'responsive-lightbox' ),
|
220 |
+
),
|
221 |
+
'widgets' => array(
|
222 |
+
'title' => __( 'Widgets', 'responsive-lightbox' ),
|
223 |
+
'section' => 'responsive_lightbox_settings',
|
224 |
+
'type' => 'boolean',
|
225 |
+
'label' => __( 'Enable lightbox for widgets content.', 'responsive-lightbox' ),
|
226 |
+
),
|
227 |
+
'comments' => array(
|
228 |
+
'title' => __( 'Comments', 'responsive-lightbox' ),
|
229 |
+
'section' => 'responsive_lightbox_settings',
|
230 |
+
'type' => 'boolean',
|
231 |
+
'label' => __( 'Enable lightbox for comments content.', 'responsive-lightbox' ),
|
232 |
+
),
|
233 |
'force_custom_gallery' => array(
|
234 |
+
'title' => __( 'Force lightbox', 'responsive-lightbox' ),
|
235 |
'section' => 'responsive_lightbox_settings',
|
236 |
'type' => 'boolean',
|
237 |
+
'label' => __( 'Try to force lightbox for custom WP gallery replacements, like Jetpack or Visual Composer galleries.', 'responsive-lightbox' ),
|
238 |
),
|
239 |
'woocommerce_gallery_lightbox' => array(
|
240 |
'title' => __( 'WooCommerce lightbox', 'responsive-lightbox' ),
|
241 |
'section' => 'responsive_lightbox_settings',
|
242 |
'type' => 'boolean',
|
243 |
'label' => __( 'Replace WooCommerce product gallery lightbox.', 'responsive-lightbox' ),
|
244 |
+
'disabled' => ! class_exists( 'WooCommerce' )
|
|
|
|
|
|
|
|
|
|
|
245 |
),
|
246 |
'enable_custom_events' => array(
|
247 |
'title' => __( 'Custom events', 'responsive-lightbox' ),
|
285 |
// 'callback' => array( $this, 'validate_options' ),
|
286 |
'sections' => array(
|
287 |
'responsive_lightbox_configuration' => array(
|
288 |
+
'title' => sprintf( __( '%s settings', 'responsive-lightbox' ), ( isset( $this->scripts[Responsive_Lightbox()->options['settings']['script']]['name'] ) ? $this->scripts[Responsive_Lightbox()->options['settings']['script']]['name'] : $this->scripts[Responsive_Lightbox()->defaults['settings']['script']]['name'] ) ),
|
289 |
// 'callback' => '',
|
290 |
+
// 'page' => ''
|
291 |
),
|
292 |
),
|
293 |
'prefix' => 'rl',
|
296 |
)
|
297 |
);
|
298 |
|
299 |
+
$this->tabs = apply_filters( 'rl_settings_tabs', array(
|
300 |
+
'settings' => array(
|
301 |
+
'name' => __( 'General', 'responsive-lightbox' ),
|
302 |
+
'key' => 'responsive_lightbox_settings',
|
303 |
+
'submit' => 'save_rl_settings',
|
304 |
+
'reset' => 'reset_rl_settings',
|
305 |
+
),
|
306 |
+
'configuration' => array(
|
307 |
+
'name' => __( 'Lightbox', 'responsive-lightbox' ),
|
308 |
+
'key' => 'responsive_lightbox_configuration',
|
309 |
+
'submit' => 'save_' . $this->settings['configuration']['prefix'] . '_configuration',
|
310 |
+
'reset' => 'reset_' . $this->settings['configuration']['prefix'] . '_configuration',
|
311 |
+
'sections' => $scripts,
|
312 |
+
'default_section' => Responsive_Lightbox()->options['settings']['script']
|
313 |
+
)
|
314 |
+
) );
|
315 |
+
|
316 |
+
$tabs_copy = $this->tabs;
|
317 |
+
$tab_key = '';
|
318 |
+
$section_key = '';
|
319 |
+
|
320 |
+
// set current tab and section
|
321 |
+
if ( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
322 |
+
global $pagenow;
|
323 |
+
|
324 |
+
if ( $pagenow == 'options-general.php' || $pagenow == 'options.php' ) {
|
325 |
+
$tab_key = isset( $_GET['tab'] ) ? $_GET['tab'] : 'settings';
|
326 |
+
$section_key = isset( $_REQUEST['section'] ) ? esc_attr( $_REQUEST['section'] ) : ( ! empty( $this->tabs[$tab_key]['default_section'] ) ? $this->tabs[$tab_key]['default_section'] : '' );
|
327 |
+
}
|
328 |
+
}
|
329 |
+
|
330 |
+
// get available galleries
|
331 |
+
$gallery_types = apply_filters( 'rl_gallery_types', array() );
|
332 |
+
|
333 |
+
if ( $gallery_types ) {
|
334 |
+
foreach ( $gallery_types as $key => $name ) {
|
335 |
+
unset( $gallery_types[$key] );
|
336 |
+
$gallery_types[$key . '_gallery'] = $name;
|
337 |
+
}
|
338 |
+
}
|
339 |
+
|
340 |
+
// backward compatibility, remove from tabs
|
341 |
+
$gallery_tabs = array_intersect( array_keys( $this->tabs ), array_keys( $gallery_types ) );
|
342 |
+
$galleries = array();
|
343 |
+
|
344 |
+
if ( ! empty( $gallery_tabs ) ) {
|
345 |
+
// unset tabs if exist
|
346 |
+
foreach ( $gallery_tabs as $gallery_tab ) {
|
347 |
+
$galleries[$gallery_tab] = $this->tabs[$gallery_tab];
|
348 |
+
unset( $this->tabs[$gallery_tab] );
|
349 |
+
}
|
350 |
+
|
351 |
+
foreach ( $galleries as $key => $gallery ) {
|
352 |
+
$gallery_sections[$key] = $gallery['name'];
|
353 |
+
}
|
354 |
+
|
355 |
+
if ( $tab_key == 'gallery' ) {
|
356 |
+
$section_key = isset( $_REQUEST['section'] ) ? esc_attr( $_REQUEST['section'] ) : ( in_array( Responsive_Lightbox()->options['settings']['default_gallery'], array_keys( $gallery_sections ) ) ? Responsive_Lightbox()->options['settings']['default_gallery'] : key( $gallery_sections ) );
|
357 |
+
}
|
358 |
+
|
359 |
+
$this->tabs['gallery'] = array(
|
360 |
+
'name' => __( 'Gallery', 'responsive-lightbox' ),
|
361 |
+
'key' => 'responsive_lightbox_' . $section_key,
|
362 |
+
'submit' => array_key_exists( $section_key, $tabs_copy ) ? $tabs_copy[$section_key]['submit'] : 'save_' . $section_key . '_configuration',
|
363 |
+
'reset' => array_key_exists( $section_key, $tabs_copy ) ? $tabs_copy[$section_key]['reset'] : 'reset_rl_' . $section_key,
|
364 |
+
'sections' => $gallery_sections,
|
365 |
+
'default_section' => $section_key
|
366 |
+
);
|
367 |
+
}
|
368 |
+
|
369 |
+
// push licenses just beofre the addons
|
370 |
+
if ( isset( $this->tabs['licenses'] ) ) {
|
371 |
+
unset( $this->tabs['licenses'] );
|
372 |
+
|
373 |
+
$this->tabs['licenses'] = array(
|
374 |
+
'name' => __( 'Licenses', 'responsive-lightbox' ),
|
375 |
+
'key' => 'responsive_lightbox_licenses',
|
376 |
+
'submit' => 'save_rl_licenses',
|
377 |
+
'reset' => 'reset_rl_licenses',
|
378 |
+
);
|
379 |
+
}
|
380 |
+
|
381 |
+
$this->tabs['addons'] = array(
|
382 |
+
'name' => __( 'Add-ons', 'responsive-lightbox' ),
|
383 |
+
'key' => 'responsive_lightbox_configuration',
|
384 |
+
'callback' => array( $this, 'addons_tab_cb' )
|
385 |
+
);
|
386 |
+
|
387 |
+
if ( ! empty( $this->tabs[$tab_key]['sections'] ) && isset( $this->tabs[$tab_key]['sections'][$section_key] ) ) {
|
388 |
+
$this->settings[$tab_key]['sections']['responsive_lightbox_' . $tab_key]['title'] = sprintf( __( '%s settings', 'responsive-lightbox' ), $this->tabs[$tab_key]['sections'][$section_key] );
|
389 |
+
}
|
390 |
+
|
391 |
+
switch ( ! empty( $section_key ) ? $section_key : Responsive_Lightbox()->options['settings']['script'] ) {
|
392 |
|
393 |
case ( 'swipebox' ) :
|
394 |
|
1044 |
|
1045 |
default :
|
1046 |
|
1047 |
+
$this->settings['configuration'] = apply_filters( 'rl_settings_' . ( ! empty( $section_key ) ? $section_key : Responsive_Lightbox()->options['settings']['script'] ) . '_script_configuration', $this->settings['configuration'] );
|
1048 |
|
1049 |
break;
|
1050 |
}
|
1051 |
|
1052 |
+
if ( isset( $this->tabs[$tab_key]['submit'], $this->tabs[$tab_key]['reset'] ) && ! empty( $this->settings[$tab_key]['prefix'] ) ) {
|
1053 |
+
$this->tabs[$tab_key]['submit'] = 'save_' . $this->settings[$tab_key]['prefix'] . '_' . $tab_key;
|
1054 |
+
$this->tabs[$tab_key]['reset'] = 'reset_' . $this->settings[$tab_key]['prefix'] . '_' . $tab_key;
|
1055 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1056 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1057 |
}
|
1058 |
|
1059 |
/**
|
1073 |
* @return void
|
1074 |
*/
|
1075 |
public function options_page() {
|
1076 |
+
$tab_key = isset( $_GET['tab'] ) ? $_GET['tab'] : 'settings';
|
1077 |
+
$section_key = isset( $_GET['section'] ) ? $_GET['section'] : ( ! empty( $this->tabs[$tab_key]['default_section'] ) ? $this->tabs[$tab_key]['default_section'] : '' );
|
1078 |
|
1079 |
echo '
|
1080 |
<div class="wrap">' . screen_icon() . '
|
1081 |
<h2>' . __( 'Responsive Lightbox', 'responsive-lightbox' ) . '</h2>
|
1082 |
<h2 class="nav-tab-wrapper">';
|
1083 |
|
1084 |
+
foreach ( $this->tabs as $key => $options ) {
|
1085 |
echo '
|
1086 |
+
<a class="nav-tab ' . ($tab_key == $key ? 'nav-tab-active' : '') . '" href="' . esc_url( admin_url( 'options-general.php?page=responsive-lightbox&tab=' . $key ) ) . '">' . $options['name'] . '</a>';
|
1087 |
}
|
1088 |
|
1089 |
echo '
|
1107 |
</div>
|
1108 |
|
1109 |
<form action="options.php" method="post">';
|
1110 |
+
|
1111 |
+
// views
|
1112 |
+
if ( ! empty( $this->tabs[$tab_key]['sections'] ) ) {
|
1113 |
+
$views = $this->tabs[$tab_key]['sections'];
|
1114 |
+
|
1115 |
+
echo '<ul class="subsubsub">';
|
1116 |
+
|
1117 |
+
foreach ( $views as $key => $name ) {
|
1118 |
+
$view = '<a href="' . esc_url( admin_url( 'options-general.php?page=responsive-lightbox&tab=' . $tab_key . '§ion=' . $key ) ) . '" class="' . ( $key == $section_key ? 'current' : '' ) . '">' . $name . '</a>';
|
1119 |
+
$views[$key] = "\t<li class='$key'>$view";
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
echo implode( " |</li>\n", $views ) . "</li>\n";
|
1123 |
+
echo '</ul><input type="hidden" name="section" value="' . $section_key . '" /><br class="clear">';
|
1124 |
+
}
|
1125 |
|
1126 |
// tab content callback
|
1127 |
+
if ( ! empty( $this->tabs[$tab_key]['callback'] ) )
|
1128 |
call_user_func( $this->tabs[$tab_key]['callback'] );
|
1129 |
+
else {
|
1130 |
wp_nonce_field( 'update-options' );
|
1131 |
settings_fields( $this->tabs[$tab_key]['key'] );
|
1132 |
do_settings_sections( $this->tabs[$tab_key]['key'] );
|
1133 |
}
|
1134 |
|
1135 |
if ( ! empty( $this->tabs[$tab_key]['submit'] ) || ! empty( $this->tabs[$tab_key]['reset'] ) ) {
|
1136 |
+
echo '<p class="submit">';
|
1137 |
|
|
|
1138 |
if ( ! empty( $this->tabs[$tab_key]['submit'] ) ) {
|
1139 |
submit_button( '', array( 'primary', 'save-' . $tab_key ), $this->tabs[$tab_key]['submit'], false );
|
1140 |
echo ' ';
|
1141 |
}
|
1142 |
+
|
1143 |
+
if ( ! empty( $this->tabs[$tab_key]['reset'] ) )
|
1144 |
submit_button( __( 'Reset to defaults', 'responsive-lightbox' ), array( 'secondary', 'reset-' . $tab_key ), $this->tabs[$tab_key]['reset'], false );
|
1145 |
+
|
1146 |
+
echo '</p>';
|
|
|
1147 |
}
|
1148 |
+
|
1149 |
echo '
|
1150 |
</form>
|
1151 |
</div>
|
1205 |
'type' => ! empty( $field['type'] ) ? $field['type'] : 'text',
|
1206 |
'label' => ! empty( $field['label'] ) ? $field['label'] : '',
|
1207 |
'description' => ! empty( $field['description'] ) ? $field['description'] : '',
|
1208 |
+
'disabled' => isset( $field['disabled'] ) ? (bool) $field['disabled'] : false,
|
1209 |
'append' => ! empty( $field['append'] ) ? esc_html( $field['append'] ) : '',
|
1210 |
'prepend' => ! empty( $field['prepend'] ) ? esc_html( $field['prepend'] ) : '',
|
1211 |
'min' => ! empty( $field['min'] ) ? (int) $field['min'] : '',
|
1295 |
|
1296 |
case ( 'boolean' ) :
|
1297 |
|
1298 |
+
$html .= '<label class="cb-checkbox"><input id="' . $args['id'] . '" type="checkbox" name="' . $args['name'] . '" value="1" ' . checked( (bool) $args['value'], true, false ) . ( isset( $args['disabled'] ) && $args['disabled'] == true ? ' disabled="disabled"' : '' ) . ' />' . $args['label'] . '</label>';
|
1299 |
break;
|
1300 |
|
1301 |
case ( 'radio' ) :
|
1302 |
|
1303 |
foreach ( $args['options'] as $key => $name ) {
|
1304 |
+
$html .= '<label class="cb-radio"><input id="' . $args['id'] . '-' . $key . '" type="radio" name="' . $args['name'] . '" value="' . $key . '" ' . checked( $key, $args['value'], false ) . ( isset( $args['disabled'] ) && $args['disabled'] == true ? ' disabled="disabled"' : '' ) . ' />' . $name . '</label> ';
|
1305 |
}
|
1306 |
break;
|
1307 |
|
1308 |
case ( 'checkbox' ) :
|
1309 |
|
1310 |
foreach ( $args['options'] as $key => $name ) {
|
1311 |
+
$html .= '<label class="cb-checkbox"><input id="' . $args['id'] . '-' . $key . '" type="checkbox" name="' . $args['name'] . '[' . $key . ']" value="1" ' . checked( in_array( $key, $args['value'] ), true, false ) . ( isset( $args['disabled'] ) && $args['disabled'] == true ? ' disabled="disabled"' : '' ) . ' />' . $name . '</label> ';
|
1312 |
}
|
1313 |
break;
|
1314 |
|
1452 |
*/
|
1453 |
public function validate_settings( $input ) {
|
1454 |
// check cap
|
1455 |
+
if ( ! current_user_can( apply_filters( 'rl_lightbox_settings_capability', 'manage_options' ) ) )
|
1456 |
return $input;
|
|
|
1457 |
|
1458 |
// check page
|
1459 |
if ( ! ( $option_page = esc_attr( $_POST['option_page'] ) ) )
|
1460 |
return $input;
|
1461 |
+
|
1462 |
foreach ( $this->settings as $id => $setting ) {
|
|
|
1463 |
$key = array_search( $option_page, $setting );
|
1464 |
+
|
1465 |
if ( $key ) {
|
1466 |
// set key
|
1467 |
$setting_id = $id;
|
1468 |
+
break;
|
1469 |
}
|
1470 |
}
|
1471 |
+
|
1472 |
// check setting id
|
1473 |
if ( ! $setting_id )
|
1474 |
return $input;
|
1475 |
+
|
1476 |
// save settings
|
1477 |
if ( isset( $_POST['save' . '_' . $this->settings[$setting_id]['prefix'] . '_' . $setting_id] ) ) {
|
|
|
1478 |
if ( $this->settings[$setting_id]['fields'] ) {
|
|
|
1479 |
foreach ( $this->settings[$setting_id]['fields'] as $field_id => $field ) {
|
|
|
1480 |
if ( $field['type'] === 'multiple' ) {
|
|
|
1481 |
if ( $field['fields'] ) {
|
|
|
1482 |
foreach ( $field['fields'] as $subfield_id => $subfield ) {
|
|
|
1483 |
// if subfield has parent
|
1484 |
if ( ! empty( $this->settings[$setting_id]['fields'][$field_id]['fields'][$subfield_id]['parent'] ) ) {
|
|
|
1485 |
$field_parent = $this->settings[$setting_id]['fields'][$field_id]['fields'][$subfield_id]['parent'];
|
1486 |
+
|
1487 |
$input[$field_parent][$subfield_id] = isset( $input[$field_parent][$subfield_id] ) ? $this->sanitize_field( $input[$field_parent][$subfield_id], $subfield['type'] ) : ( $subfield['type'] === 'boolean' ? false : Responsive_Lightbox()->defaults[$setting_id][$field_parent][$subfield_id] );
|
|
|
1488 |
} else {
|
|
|
1489 |
$input[$subfield_id] = isset( $input[$subfield_id] ) ? $this->sanitize_field( $input[$subfield_id], $subfield['type'] ) : ( $subfield['type'] === 'boolean' ? false : Responsive_Lightbox()->defaults[$setting_id][$field_id][$subfield_id] );
|
|
|
1490 |
}
|
|
|
1491 |
}
|
|
|
1492 |
}
|
|
|
1493 |
} else {
|
|
|
1494 |
// if field has parent
|
1495 |
if ( ! empty( $this->settings[$setting_id]['fields'][$field_id]['parent'] ) ) {
|
|
|
1496 |
$field_parent = $this->settings[$setting_id]['fields'][$field_id]['parent'];
|
1497 |
+
|
1498 |
$input[$field_parent][$field_id] = isset( $input[$field_parent][$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_parent][$field_id], $field['type'] ) ) : $this->sanitize_field( $input[$field_parent][$field_id], $field['type'] ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : Responsive_Lightbox()->defaults[$setting_id][$field_parent][$field_id] );
|
|
|
1499 |
} else {
|
|
|
1500 |
$input[$field_id] = isset( $input[$field_id] ) ? ( $field['type'] === 'checkbox' ? array_keys( $this->sanitize_field( $input[$field_id], $field['type'] ) ) : $this->sanitize_field( $input[$field_id], $field['type'] ) ) : ( in_array( $field['type'], array( 'boolean', 'checkbox' ) ) ? false : Responsive_Lightbox()->defaults[$setting_id][$field_id] );
|
|
|
1501 |
}
|
|
|
1502 |
}
|
|
|
1503 |
}
|
|
|
1504 |
}
|
1505 |
+
|
1506 |
if ( $setting_id === 'settings' ) {
|
1507 |
// merge scripts settings
|
1508 |
$input = array_merge( Responsive_Lightbox()->options['settings'], $input );
|
1516 |
} elseif ( isset( $_POST['reset' . '_' . $this->settings[$setting_id]['prefix'] . '_' . $setting_id] ) ) {
|
1517 |
|
1518 |
if ( $setting_id === 'configuration' ) {
|
1519 |
+
$script = key( $input );
|
1520 |
+
|
1521 |
// merge scripts settings
|
1522 |
+
$input[$script] = Responsive_Lightbox()->defaults['configuration'][$script];
|
1523 |
$input = array_merge( Responsive_Lightbox()->options['configuration'], $input );
|
1524 |
} elseif ( $setting_id === 'settings' ) {
|
1525 |
$input = Responsive_Lightbox()->defaults[$setting_id];
|
1528 |
} else {
|
1529 |
$input = Responsive_Lightbox()->defaults[$setting_id];
|
1530 |
}
|
1531 |
+
|
1532 |
add_settings_error( 'reset' . '_' . $this->settings[$setting_id]['prefix'] . '_' . $setting_id, 'settings_restored', __( 'Settings restored to defaults.', 'responsive-lightbox' ), 'updated' );
|
|
|
1533 |
}
|
1534 |
|
1535 |
return $input;
|
1637 |
// request
|
1638 |
$response = $this->license_request( $request_args );
|
1639 |
|
1640 |
+
echo '<pre>'; print_r( $response ); echo '</pre>';
|
1641 |
|
1642 |
// validate request
|
1643 |
if ( is_wp_error( $response ) ) {
|
includes/class-widgets.php
ADDED
@@ -0,0 +1,570 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) )
|
4 |
+
exit;
|
5 |
+
|
6 |
+
new Responsive_Lightbox_Widgets();
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Responsive Lightbox Widgets class.
|
10 |
+
*
|
11 |
+
* @class Responsive_Lightbox_Widgets
|
12 |
+
*/
|
13 |
+
class Responsive_Lightbox_Widgets {
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
// actions
|
17 |
+
add_action( 'widgets_init', array( $this, 'register_widgets' ) );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Register widgets.
|
22 |
+
*/
|
23 |
+
public function register_widgets() {
|
24 |
+
register_widget( 'Responsive_Lightbox_Gallery_Widget' );
|
25 |
+
register_widget( 'Responsive_Lightbox_Image_Widget' );
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Responsive Lightbox Gallery Widget class.
|
31 |
+
*
|
32 |
+
* @class Responsive_Lightbox_Gallery_Widget
|
33 |
+
*/
|
34 |
+
class Responsive_Lightbox_Gallery_Widget extends WP_Widget {
|
35 |
+
|
36 |
+
private $rlg_defaults = array();
|
37 |
+
private $rlg_orders = array();
|
38 |
+
private $rlg_order_types = array();
|
39 |
+
private $rlg_image_sizes = array();
|
40 |
+
private $rlg_gallery_types = array();
|
41 |
+
|
42 |
+
public function __construct() {
|
43 |
+
parent::__construct(
|
44 |
+
'Responsive_Lightbox_Gallery_Widget',
|
45 |
+
__( 'Gallery', 'responsive-lightbox' ),
|
46 |
+
array(
|
47 |
+
'description' => __( 'Displays an image gallery.', 'responsive-lightbox' ),
|
48 |
+
'classname' => 'rl-gallery-widget'
|
49 |
+
)
|
50 |
+
);
|
51 |
+
|
52 |
+
$this->rlg_defaults = array(
|
53 |
+
'title' => __( 'Gallery', 'responsive-lightbox' ),
|
54 |
+
'orderby' => 'menu_order',
|
55 |
+
'order' => 'asc',
|
56 |
+
'columns' => 3,
|
57 |
+
'size' => 'thumbnail',
|
58 |
+
'type' => 'none',
|
59 |
+
'atts' => '',
|
60 |
+
'ids' => ''
|
61 |
+
);
|
62 |
+
|
63 |
+
$this->rlg_orders = array(
|
64 |
+
'menu_order' => __( 'Menu order', 'responsive-lightbox' ),
|
65 |
+
'title' => __( 'Title', 'responsive-lightbox' ),
|
66 |
+
'post_date' => __( 'Image date', 'responsive-lightbox' ),
|
67 |
+
'ID' => __( 'ID', 'responsive-lightbox' ),
|
68 |
+
'rand' => __( 'Random', 'responsive-lightbox' )
|
69 |
+
);
|
70 |
+
|
71 |
+
$this->rlg_order_types = array(
|
72 |
+
'asc' => __( 'Ascending', 'responsive-lightbox' ),
|
73 |
+
'desc' => __( 'Descending', 'responsive-lightbox' )
|
74 |
+
);
|
75 |
+
|
76 |
+
$gallery_types = apply_filters( 'rl_gallery_types', array() );
|
77 |
+
|
78 |
+
if ( ! empty( $gallery_types ) ) {
|
79 |
+
$this->rlg_gallery_types = array_merge(
|
80 |
+
array(
|
81 |
+
'none' => __( 'None', 'responsive-lightbox' ),
|
82 |
+
'default' => __( 'Default', 'responsive-lightbox' )
|
83 |
+
),
|
84 |
+
$gallery_types
|
85 |
+
);
|
86 |
+
}
|
87 |
+
|
88 |
+
$this->rlg_image_sizes = array_merge( array( 'full' ), get_intermediate_image_sizes() );
|
89 |
+
|
90 |
+
sort( $this->rlg_image_sizes, SORT_STRING );
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Display widget.
|
95 |
+
*
|
96 |
+
* @param array $args
|
97 |
+
* @param object $instance
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
+
public function widget( $args, $instance ) {
|
101 |
+
$instance['title'] = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
|
102 |
+
|
103 |
+
$html = $args['before_widget'] . $args['before_title'] . ( $instance['title'] !== '' ? $instance['title'] : '' ) . $args['after_title'];
|
104 |
+
$html .= do_shortcode( '[gallery link="file" columns="' . $instance['columns'] . '" size="' . $instance['size'] . '" ' . ( $instance['type'] !== 'none' ? 'type="' . $instance['type'] . '"' : '' ) . ' ids="' . ( ! empty( $instance['ids'] ) ? esc_attr( $instance['ids'] ) : '' ) . '" orderby="' . $instance['orderby'] . '" order="' . $instance['order'] . '"' . ( $instance['atts'] !== '' ? ' ' . $instance['atts'] : '' ) . ']' );
|
105 |
+
$html .= $args['after_widget'];
|
106 |
+
|
107 |
+
echo apply_filters( 'rl_gallery_widget_html', $html, $instance );
|
108 |
+
}
|
109 |
+
|
110 |
+
/** Render widget form.
|
111 |
+
*
|
112 |
+
* @param object $instance
|
113 |
+
* @return void
|
114 |
+
*/
|
115 |
+
public function form( $instance ) {
|
116 |
+
$attachments = ! empty( $instance['ids'] ) ? array_filter( explode( ',', $instance['ids'] ) ) : array();
|
117 |
+
|
118 |
+
$html = '
|
119 |
+
<div class="rl-gallery-widget-container">
|
120 |
+
<p>
|
121 |
+
<label for="' . $this->get_field_id( 'title' ) . '">' . __( 'Title', 'responsive-lightbox' ) . ':</label>
|
122 |
+
<input id="' . $this->get_field_id( 'title' ) . '" class="widefat" name="' . $this->get_field_name( 'title' ) . '" type="text" value="' . esc_attr( isset( $instance['title'] ) ? $instance['title'] : $this->rlg_defaults['title'] ) . '" />
|
123 |
+
</p>
|
124 |
+
<div id="' . $this->get_field_id( 'gallery' ) . '" class="rl-gallery-widget' . ( ! empty( $attachments ) ? ' has-image' : '' ) . '">
|
125 |
+
<input type="hidden" class="rl-gallery-ids" id="' . $this->get_field_id( 'ids' ) . '" name="' . $this->get_field_name( 'ids' ) . '" value="' . ( ! empty( $instance['ids'] ) ? esc_attr( $instance['ids'] ) : '' ) . '">';
|
126 |
+
|
127 |
+
$html .= '
|
128 |
+
<a href="#" class="rl-gallery-widget-select button button-secondary">' . __( 'Select images', 'responsive-lightbox' ) . '</a>
|
129 |
+
<div class="rl-gallery-widget-content">
|
130 |
+
<ul id="' . $this->get_field_id( 'gallery-images' ) . '" class="rl-gallery-images">';
|
131 |
+
|
132 |
+
if ( $attachments ) {
|
133 |
+
foreach ( $attachments as $attachment_id ) {
|
134 |
+
if ( ! $attachment_id || ! wp_attachment_is_image( $attachment_id ) )
|
135 |
+
continue;
|
136 |
+
|
137 |
+
$html .= '
|
138 |
+
<li class="rl-gallery-image" data-attachment_id="' . absint( $attachment_id ) . '">
|
139 |
+
<div class="rl-gallery-inner">' . wp_get_attachment_image( $attachment_id, 'thumbnail' ) . '</div>
|
140 |
+
<div class="rl-gallery-actions"><a href="#" class="rl-gallery-image-remove dashicons dashicons-no" title="' . __( 'Delete image', 'responsive-lightbox' ) . '"></a></div>
|
141 |
+
</li>';
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
$html .= '
|
146 |
+
</ul>
|
147 |
+
</div>
|
148 |
+
</div>
|
149 |
+
<p>';
|
150 |
+
|
151 |
+
if ( ! empty( $this->rlg_gallery_types ) ) {
|
152 |
+
$html .= '
|
153 |
+
<label for="' . $this->get_field_id( 'type' ) . '">' . __( 'Gallery type', 'responsive-lightbox' ) . ':</label>
|
154 |
+
<select id="' . $this->get_field_id( 'type' ) . '" class="widefat" name="' . $this->get_field_name( 'type' ) . '">';
|
155 |
+
|
156 |
+
foreach ( $this->rlg_gallery_types as $id => $type ) {
|
157 |
+
$html .= '
|
158 |
+
<option value="' . esc_attr( $id ) . '" ' . selected( $id, ( isset( $instance['type'] ) ? $instance['type'] : $this->rlg_defaults['type'] ), false ) . '>' . esc_html( $type ) . '</option>';
|
159 |
+
}
|
160 |
+
|
161 |
+
$html .= '
|
162 |
+
</select>
|
163 |
+
</p>
|
164 |
+
<p>';
|
165 |
+
}
|
166 |
+
|
167 |
+
$html .= '
|
168 |
+
<label for="' . $this->get_field_id( 'orderby' ) . '">' . __( 'Order by', 'responsive-lightbox' ) . ':</label>
|
169 |
+
<select id="' . $this->get_field_id( 'orderby' ) . '" class="widefat" name="' . $this->get_field_name( 'orderby' ) . '">';
|
170 |
+
|
171 |
+
foreach ( $this->rlg_orders as $id => $orderby ) {
|
172 |
+
$html .= '
|
173 |
+
<option value="' . esc_attr( $id ) . '" ' . selected( $id, ( isset( $instance['orderby'] ) ? $instance['orderby'] : $this->rlg_defaults['orderby'] ), false ) . '>' . esc_html( $orderby ) . '</option>';
|
174 |
+
}
|
175 |
+
|
176 |
+
$html .= '
|
177 |
+
</select>
|
178 |
+
</p>
|
179 |
+
<p>
|
180 |
+
<label for="' . $this->get_field_id( 'order' ) . '">' . __( 'Order', 'responsive-lightbox' ) . ':</label>
|
181 |
+
<select id="' . $this->get_field_id( 'order' ) . '" class="widefat" name="' . $this->get_field_name( 'order' ) . '">';
|
182 |
+
|
183 |
+
foreach ( $this->rlg_order_types as $id => $order ) {
|
184 |
+
$html .= '
|
185 |
+
<option value="' . esc_attr( $id ) . '" ' . selected( $id, ( isset( $instance['order'] ) ? $instance['order'] : $this->rlg_defaults['order'] ), false ) . '>' . esc_html( $order ) . '</option>';
|
186 |
+
}
|
187 |
+
|
188 |
+
$html .= '
|
189 |
+
</select>
|
190 |
+
</p>
|
191 |
+
<p>
|
192 |
+
<label for="' . $this->get_field_id( 'size' ) . '">' . __( 'Image size', 'responsive-lightbox' ) . ':</label>
|
193 |
+
<select id="' . $this->get_field_id( 'size' ) . '" class="widefat" name="' . $this->get_field_name( 'size' ) . '">';
|
194 |
+
|
195 |
+
foreach ( $this->rlg_image_sizes as $size ) {
|
196 |
+
$html .= '
|
197 |
+
<option value="' . esc_attr( $size ) . '" ' . selected( $size, ( isset( $instance['size'] ) ? $instance['size'] : $this->rlg_defaults['size'] ), false ) . '>' . esc_html( $size ) . '</option>';
|
198 |
+
}
|
199 |
+
|
200 |
+
$html .= '
|
201 |
+
</select>
|
202 |
+
</p>
|
203 |
+
<p>
|
204 |
+
<label for="' . $this->get_field_id( 'columns' ) . '">' . __( 'Number of columns', 'responsive-lightbox' ) . ':</label>
|
205 |
+
<input id="' . $this->get_field_id( 'columns' ) . '" class="small-text" name="' . $this->get_field_name( 'columns' ) . '" type="number" min="0" value="' . esc_attr( isset( $instance['columns'] ) ? $instance['columns'] : $this->rlg_defaults['columns'] ) . '" />
|
206 |
+
</p>
|
207 |
+
<p>
|
208 |
+
<label for="' . $this->get_field_id( 'atts' ) . '">' . __( 'Custom attributes', 'responsive-lightbox' ) . ':</label>
|
209 |
+
<br />
|
210 |
+
<textarea id="' . $this->get_field_id( 'atts' ) . '" class="widefat" name="' . $this->get_field_name( 'atts' ) . '">' . esc_textarea( isset( $instance['atts'] ) ? $instance['atts'] : $this->rlg_defaults['atts'] ) . '</textarea><span class="description">' . __( 'Custom gallery shortcode attributes (optional).', 'responsive-lightbox' ) . '</span>
|
211 |
+
</p>
|
212 |
+
</div>';
|
213 |
+
|
214 |
+
echo $html;
|
215 |
+
}
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Save widget form.
|
219 |
+
*
|
220 |
+
* @param array $new_instance
|
221 |
+
* @param array $old_instance
|
222 |
+
* @return array
|
223 |
+
*/
|
224 |
+
public function update( $new_instance, $old_instance ) {
|
225 |
+
// title
|
226 |
+
$old_instance['title'] = array_key_exists( 'title', $new_instance ) ? trim( $new_instance['title'] ) : $this->rlg_defaults['title'];
|
227 |
+
|
228 |
+
// order by
|
229 |
+
$old_instance['orderby'] = array_key_exists( 'orderby', $new_instance ) && array_key_exists( $new_instance['orderby'], $this->rlg_orders ) ? $new_instance['orderby'] : $this->rlg_defaults['orderby'];
|
230 |
+
|
231 |
+
// order
|
232 |
+
$old_instance['order'] = array_key_exists( 'order', $new_instance ) && array_key_exists( $new_instance['order'], $this->rlg_order_types ) ? $new_instance['order'] : $this->rlg_defaults['order'];
|
233 |
+
|
234 |
+
// image size
|
235 |
+
$old_instance['size'] = array_key_exists( 'size', $new_instance ) && in_array( $new_instance['size'], $this->rlg_image_sizes, true ) ? $new_instance['size'] : $this->rlg_defaults['size'];
|
236 |
+
|
237 |
+
// gallery type
|
238 |
+
$old_instance['type'] = array_key_exists( 'type', $new_instance ) && array_key_exists( $new_instance['type'], $this->rlg_gallery_types ) ? $new_instance['type'] : $this->rlg_defaults['type'];
|
239 |
+
|
240 |
+
// number of columns
|
241 |
+
$old_instance['columns'] = array_key_exists( 'columns', $new_instance ) ? ( ( $columns = (int) $new_instance['columns'] ) > 0 ? $columns : $this->rlg_defaults['columns'] ) : $this->rlg_defaults['columns'];
|
242 |
+
|
243 |
+
// image ids
|
244 |
+
if ( array_key_exists( 'ids', $new_instance ) && ! empty( $new_instance['ids'] ) ) {
|
245 |
+
// get unique and non empty attachment ids only
|
246 |
+
$attachment_ids = array_unique( array_filter( array_map( 'intval', explode( ',', $new_instance['ids'] ) ) ) );
|
247 |
+
|
248 |
+
$old_instance['ids'] = implode( ',', $attachment_ids );
|
249 |
+
} else
|
250 |
+
$old_instance['ids'] = $this->rlg_defaults['ids'];
|
251 |
+
|
252 |
+
// custom attributes
|
253 |
+
$atts = preg_replace( '/\s+/', ' ', trim( str_replace( array( "\r\n", "\n\r", "\n", "\r" ), '', array_key_exists( 'atts', $new_instance ) ? $new_instance['atts'] : $this->rlg_defaults['atts'] ) ) );
|
254 |
+
|
255 |
+
$new_atts = array();
|
256 |
+
|
257 |
+
if ( $atts !== '' ) {
|
258 |
+
$atts_exp = explode( '" ', $atts );
|
259 |
+
|
260 |
+
if ( ! empty( $atts_exp ) ) {
|
261 |
+
end( $atts_exp );
|
262 |
+
|
263 |
+
$last = key( $atts_exp );
|
264 |
+
|
265 |
+
reset( $atts_exp );
|
266 |
+
|
267 |
+
foreach ( $atts_exp as $id => $attribute ) {
|
268 |
+
$check = $attribute . ( $last === $id ? '' : '"' );
|
269 |
+
|
270 |
+
if ( preg_match( '/^[a-z0-9_-]+=\"(.+)\"$/', $check ) === 1 )
|
271 |
+
$new_atts[] = $check;
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
if ( ! empty( $new_atts ) )
|
277 |
+
$old_instance['atts'] = implode( ' ', $new_atts );
|
278 |
+
else
|
279 |
+
$old_instance['atts'] = '';
|
280 |
+
|
281 |
+
return $old_instance;
|
282 |
+
}
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Responsive Lightbox Gallery Widget class.
|
287 |
+
*
|
288 |
+
* @class Responsive_Lightbox_Gallery_Widget
|
289 |
+
*/
|
290 |
+
class Responsive_Lightbox_Image_Widget extends WP_Widget {
|
291 |
+
|
292 |
+
private $rli_defaults = array();
|
293 |
+
private $rli_text_positions = array();
|
294 |
+
private $rli_link_to = array();
|
295 |
+
private $rli_aligns = array();
|
296 |
+
private $rli_image_sizes = array();
|
297 |
+
|
298 |
+
public function __construct() {
|
299 |
+
parent::__construct(
|
300 |
+
'Responsive_Lightbox_Image_Widget',
|
301 |
+
__( 'Image', 'responsive-lightbox' ),
|
302 |
+
array(
|
303 |
+
'description' => __( 'Displays a single image.', 'responsive-lightbox' ),
|
304 |
+
'classname' => 'rl-image-widget'
|
305 |
+
)
|
306 |
+
);
|
307 |
+
|
308 |
+
$this->rli_defaults = array(
|
309 |
+
'title' => __( 'Image', 'responsive-lightbox' ),
|
310 |
+
'image_id' => 0,
|
311 |
+
'responsive' => true,
|
312 |
+
'size' => 'thumbnail',
|
313 |
+
'link_to' => 'file',
|
314 |
+
'link_custom_url' => '',
|
315 |
+
'image_align' => 'none',
|
316 |
+
'text' => '',
|
317 |
+
'autobr' => false,
|
318 |
+
'text_position' => 'below_image',
|
319 |
+
'text_align' => 'none',
|
320 |
+
);
|
321 |
+
|
322 |
+
$this->rli_text_positions = array(
|
323 |
+
'below_image' => __( 'Below the image', 'responsive-lightbox' ),
|
324 |
+
'above_image' => __( 'Above the image', 'responsive-lightbox' )
|
325 |
+
);
|
326 |
+
|
327 |
+
$this->rli_link_to = array(
|
328 |
+
'none' => __( 'None', 'responsive-lightbox' ),
|
329 |
+
'file' => __( 'Media File', 'responsive-lightbox' ),
|
330 |
+
'post' => __( 'Attachment Page', 'responsive-lightbox' ),
|
331 |
+
'custom' => __( 'Custom URL', 'responsive-lightbox' )
|
332 |
+
);
|
333 |
+
|
334 |
+
$this->rli_aligns = array(
|
335 |
+
'none' => __( 'None', 'responsive-lightbox' ),
|
336 |
+
'left' => __( 'Left', 'responsive-lightbox' ),
|
337 |
+
'center' => __( 'Center', 'responsive-lightbox' ),
|
338 |
+
'right' => __( 'Right', 'responsive-lightbox' ),
|
339 |
+
'justify' => __( 'Justify', 'responsive-lightbox' )
|
340 |
+
);
|
341 |
+
|
342 |
+
$this->rli_image_sizes = array_merge( array( 'full' ), get_intermediate_image_sizes() );
|
343 |
+
sort( $this->rli_image_sizes, SORT_STRING );
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Display widget.
|
348 |
+
*
|
349 |
+
* @param array $args
|
350 |
+
* @param object $instance
|
351 |
+
* @return void
|
352 |
+
*/
|
353 |
+
public function widget( $args, $instance ) {
|
354 |
+
$instance['title'] = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
|
355 |
+
$title = $args['before_widget'] . $args['before_title'] . ( $instance['title'] !== '' ? $instance['title'] : '' ) . $args['after_title'];
|
356 |
+
|
357 |
+
if ( $instance['autobr'] === true ) {
|
358 |
+
$text = wpautop( $instance['text'] );
|
359 |
+
} else {
|
360 |
+
$text = html_entity_decode( $instance['text'], ENT_QUOTES, 'UTF-8' );
|
361 |
+
}
|
362 |
+
|
363 |
+
$image = wp_get_attachment_image_src( $instance['image_id'], $instance['size'], false );
|
364 |
+
|
365 |
+
switch ( $instance['link_to'] ) {
|
366 |
+
case 'file' :
|
367 |
+
$file = wp_get_attachment_image_src( $instance['image_id'], 'full', false );
|
368 |
+
$href = $file[0];
|
369 |
+
break;
|
370 |
+
|
371 |
+
case 'post' :
|
372 |
+
$href = get_permalink( $instance['image_id'] );
|
373 |
+
break;
|
374 |
+
|
375 |
+
case 'custom' :
|
376 |
+
$href = $instance['link_custom_url'];
|
377 |
+
break;
|
378 |
+
|
379 |
+
case 'none' :
|
380 |
+
default :
|
381 |
+
$href = '';
|
382 |
+
break;
|
383 |
+
}
|
384 |
+
|
385 |
+
if ( $instance['image_align'] === 'left' )
|
386 |
+
$image_align = ' style="float: left;"';
|
387 |
+
elseif ( $instance['image_align'] === 'center' )
|
388 |
+
$image_align = ' style="margin-left: auto; margin-right: auto; display: block;"';
|
389 |
+
elseif ( $instance['image_align'] === 'right' )
|
390 |
+
$image_align = ' style="float: right;"';
|
391 |
+
else
|
392 |
+
$image_align = '';
|
393 |
+
|
394 |
+
if ( $instance['text_align'] === 'left' )
|
395 |
+
$text_align = ' style="text-align: left; display: block;"';
|
396 |
+
elseif ( $instance['text_align'] === 'center' )
|
397 |
+
$text_align = ' style="text-align: center; display: block;"';
|
398 |
+
elseif ( $instance['text_align'] === 'right' )
|
399 |
+
$text_align = ' style="text-align: right; display: block;"';
|
400 |
+
elseif ( $instance['text_align'] === 'justify' )
|
401 |
+
$text_align = ' style="text-align: justify; display: block;"';
|
402 |
+
else
|
403 |
+
$text_align = '';
|
404 |
+
|
405 |
+
|
406 |
+
$text_position = $instance['text_position'];
|
407 |
+
$width = $instance['responsive'] === false ? $image[1] : '100%';
|
408 |
+
$height = $instance['responsive'] === false ? $image[2] : 'auto';
|
409 |
+
$post = get_post( $instance['image_id'] );
|
410 |
+
$image_title = isset( $post->post_title ) ? $post->post_title : '';
|
411 |
+
$alt = (string) get_post_meta( $instance['image_id'], '_wp_attachment_image_alt', true );
|
412 |
+
|
413 |
+
$html = $title;
|
414 |
+
|
415 |
+
if ( $text_position === 'below_image' ) {
|
416 |
+
$html .= ($href !== '' ? '<a href="' . $href . '" class="rl-image-widget-link">' : '') . '<img class="rl-image-widget-image" src="' . $image[0] . '" width="' . $width . '" height="' . $height . '" title="' . $image_title . '" alt="' . $alt . '"' . $image_align . ' />' . ($href !== '' ? '</a>' : '');
|
417 |
+
$html .= '<div class="rl-image-widget-text"' . $text_align . '>' . $text . '</div>';
|
418 |
+
} else {
|
419 |
+
$html .= '<div class="rl-image-widget-text"' . $text_align . '>' . $text . '</div>';
|
420 |
+
$html .= ($href !== '' ? '<a href="' . $href . '" class="rl-image-widget-link">' : '') . '<img class="rl-image-widget-image" src="' . $image[0] . '" width="' . $width . '" height="' . $height . '" title="' . $image_title . '" alt="' . $alt . '"' . $image_align . ' />' . ($href !== '' ? '</a>' : '');
|
421 |
+
}
|
422 |
+
$html .= $args['after_widget'];
|
423 |
+
|
424 |
+
echo apply_filters( 'rl_image_widget_html', $html, $instance );
|
425 |
+
}
|
426 |
+
|
427 |
+
/** Render widget form.
|
428 |
+
*
|
429 |
+
* @param object $instance
|
430 |
+
* @return void
|
431 |
+
*/
|
432 |
+
public function form( $instance ) {
|
433 |
+
$image_id = (int) (isset( $instance['image_id'] ) ? $instance['image_id'] : $this->rli_defaults['image_id']);
|
434 |
+
$image = '';
|
435 |
+
|
436 |
+
if ( ! empty( $image_id ) )
|
437 |
+
$image = wp_get_attachment_image( $image_id, 'medium', false );
|
438 |
+
|
439 |
+
if ( ! $image )
|
440 |
+
$image = wp_get_attachment_image( $image_id, 'full', false );
|
441 |
+
|
442 |
+
$html = '
|
443 |
+
<div class="rl-image-widget-container">
|
444 |
+
<p>
|
445 |
+
<label for="' . $this->get_field_id( 'title' ) . '">' . __( 'Title', 'responsive-lightbox' ) . '</label>
|
446 |
+
<input id="' . $this->get_field_id( 'title' ) . '" class="widefat" name="' . $this->get_field_name( 'title' ) . '" type="text" value="' . esc_attr( isset( $instance['title'] ) ? $instance['title'] : $this->rli_defaults['title'] ) . '" />
|
447 |
+
</p>
|
448 |
+
<div class="rl-image-widget' . ( ! empty( $image_id ) ? ' has-image' : '' ) . '">
|
449 |
+
<input class="rl-image-widget-image-id" type="hidden" name="' . $this->get_field_name( 'image_id' ) . '" value="' . $image_id . '" />
|
450 |
+
<a href="#" class="rl-image-widget-select button button-secondary">' . __( 'Select image', 'responsive-lightbox' ) . '</a>
|
451 |
+
<div class="rl-image-widget-content">';
|
452 |
+
if ( ! empty( $image ) ) {
|
453 |
+
$html .= $image;
|
454 |
+
}
|
455 |
+
$html .= '
|
456 |
+
</div>
|
457 |
+
</div>
|
458 |
+
<p>
|
459 |
+
<input id="' . $this->get_field_id( 'responsive' ) . '" type="checkbox" name="' . $this->get_field_name( 'responsive' ) . '" value="" ' . checked( true, (isset( $instance['responsive'] ) ? $instance['responsive'] : $this->rli_defaults['responsive'] ), false ) . ' /> <label for="' . $this->get_field_id( 'responsive' ) . '">' . __( 'Force responsive', 'responsive-lightbox' ) . '</label>
|
460 |
+
</p>';
|
461 |
+
|
462 |
+
$html .= '
|
463 |
+
<p>
|
464 |
+
<label for="' . $this->get_field_id( 'size' ) . '">' . __( 'Size', 'responsive-lightbox' ) . '</label>
|
465 |
+
<select class="rl-image-size-select widefat" id="' . $this->get_field_id( 'size' ) . '" name="' . $this->get_field_name( 'size' ) . '">';
|
466 |
+
|
467 |
+
$size_type = (isset( $instance['size'] ) ? $instance['size'] : $this->rli_defaults['size']);
|
468 |
+
|
469 |
+
foreach ( $this->rli_image_sizes as $size ) {
|
470 |
+
$html .= '
|
471 |
+
<option value="' . esc_attr( $size ) . '" ' . selected( $size, $size_type, false ) . '>' . $size . '</option>';
|
472 |
+
}
|
473 |
+
|
474 |
+
$html .= '
|
475 |
+
</select>
|
476 |
+
</p>
|
477 |
+
<p>
|
478 |
+
<label for="' . $this->get_field_id( 'link_to' ) . '">' . __( 'Link to', 'responsive-lightbox' ) . '</label>
|
479 |
+
<select class="rl-image-link-to widefat" id="' . $this->get_field_id( 'link_to' ) . '" name="' . $this->get_field_name( 'link_to' ) . '">';
|
480 |
+
|
481 |
+
$link_type = (isset( $instance['link_to'] ) ? $instance['link_to'] : $this->rli_defaults['link_to']);
|
482 |
+
|
483 |
+
foreach ( $this->rli_link_to as $id => $type ) {
|
484 |
+
$html .= '
|
485 |
+
<option value="' . esc_attr( $id ) . '" ' . selected( $id, $link_type, false ) . '>' . $type . '</option>';
|
486 |
+
}
|
487 |
+
|
488 |
+
$html .= '
|
489 |
+
</select>
|
490 |
+
</p>
|
491 |
+
<p class="rl-image-link-url"' . ($link_type === 'custom' ? '' : ' style="display: none;"') . '>
|
492 |
+
<label for="' . $this->get_field_id( 'link_custom_url' ) . '">' . __( 'URL', 'responsive-lightbox' ) . '</label>
|
493 |
+
<input id="' . $this->get_field_id( 'link_custom_url' ) . '" class="widefat" name="' . $this->get_field_name( 'link_custom_url' ) . '" type="text" value="' . esc_attr( isset( $instance['link_custom_url'] ) ? $instance['link_custom_url'] : $this->rli_defaults['link_custom_url'] ) . '" />
|
494 |
+
</p>';
|
495 |
+
|
496 |
+
$html .= '
|
497 |
+
<p>
|
498 |
+
<label for="' . $this->get_field_id( 'image_align' ) . '">' . __( 'Image align', 'responsive-lightbox' ) . '</label>
|
499 |
+
<select id="' . $this->get_field_id( 'image_align' ) . '" class="widefat" name="' . $this->get_field_name( 'image_align' ) . '">';
|
500 |
+
|
501 |
+
foreach ( $this->rli_aligns as $id => $image_align ) {
|
502 |
+
if ( $id != 'justify' )
|
503 |
+
$html .= '
|
504 |
+
<option value="' . esc_attr( $id ) . '" ' . selected( $id, (isset( $instance['image_align'] ) ? $instance['image_align'] : $this->rli_defaults['image_align'] ), false ) . '>' . $image_align . '</option>';
|
505 |
+
}
|
506 |
+
|
507 |
+
$html .= '
|
508 |
+
</select>
|
509 |
+
</p>
|
510 |
+
<p>
|
511 |
+
<label for="' . $this->get_field_id( 'text' ) . '">' . __( 'Text', 'responsive-lightbox' ) . '</label>
|
512 |
+
<textarea id="' . $this->get_field_id( 'text' ) . '" class="widefat" name="' . $this->get_field_name( 'text' ) . '" rows="4">' . (isset( $instance['text'] ) ? $instance['text'] : $this->rli_defaults['text']) . '</textarea>
|
513 |
+
</p>
|
514 |
+
<p>
|
515 |
+
<input id="' . $this->get_field_id( 'autobr' ) . '" type="checkbox" name="' . $this->get_field_name( 'autobr' ) . '" value="" ' . checked( true, (isset( $instance['autobr'] ) ? $instance['autobr'] : $this->rli_defaults['autobr'] ), false ) . ' /> <label for="' . $this->get_field_id( 'autobr' ) . '">' . __( 'Automatically add paragraphs', 'responsive-lightbox' ) . '</label>
|
516 |
+
</p>';
|
517 |
+
|
518 |
+
$html .= '
|
519 |
+
<p>
|
520 |
+
<label for="' . $this->get_field_id( 'text_position' ) . '">' . __( 'Text position', 'responsive-lightbox' ) . '</label>
|
521 |
+
<select id="' . $this->get_field_id( 'text_position' ) . '" class="widefat" name="' . $this->get_field_name( 'text_position' ) . '">';
|
522 |
+
|
523 |
+
foreach ( $this->rli_text_positions as $id => $text_position ) {
|
524 |
+
$html .= '
|
525 |
+
<option value="' . esc_attr( $id ) . '" ' . selected( $id, (isset( $instance['text_position'] ) ? $instance['text_position'] : $this->rli_defaults['text_position'] ), false ) . '>' . $text_position . '</option>';
|
526 |
+
}
|
527 |
+
|
528 |
+
$html .= '
|
529 |
+
</select>
|
530 |
+
</p>
|
531 |
+
<label for="' . $this->get_field_id( 'text_align' ) . '">' . __( 'Text align', 'responsive-lightbox' ) . '</label>
|
532 |
+
<select id="' . $this->get_field_id( 'text_align' ) . '" class="widefat" name="' . $this->get_field_name( 'text_align' ) . '">';
|
533 |
+
|
534 |
+
foreach ( $this->rli_aligns as $id => $text_align ) {
|
535 |
+
$html .= '
|
536 |
+
<option value="' . esc_attr( $id ) . '" ' . selected( $id, (isset( $instance['text_align'] ) ? $instance['text_align'] : $this->rli_defaults['text_align'] ), false ) . '>' . $text_align . '</option>';
|
537 |
+
}
|
538 |
+
|
539 |
+
$html .= '
|
540 |
+
</select>
|
541 |
+
|
542 |
+
</div>';
|
543 |
+
|
544 |
+
echo $html;
|
545 |
+
}
|
546 |
+
|
547 |
+
/**
|
548 |
+
* Save widget form.
|
549 |
+
*
|
550 |
+
* @param array $new_instance
|
551 |
+
* @param array $old_instance
|
552 |
+
* @return array
|
553 |
+
*/
|
554 |
+
public function update( $new_instance, $old_instance ) {
|
555 |
+
$old_instance['title'] = sanitize_text_field( isset( $new_instance['title'] ) ? $new_instance['title'] : $this->rli_defaults['title'] );
|
556 |
+
$old_instance['image_id'] = (int) (isset( $new_instance['image_id'] ) ? $new_instance['image_id'] : $this->rli_defaults['image_id']);
|
557 |
+
$old_instance['responsive'] = isset( $new_instance['responsive'] ) ? true : false;
|
558 |
+
$old_instance['size'] = (isset( $new_instance['size'] ) && in_array( $new_instance['size'], $this->rli_image_sizes, true ) ? $new_instance['size'] : $this->rli_defaults['size']);
|
559 |
+
$old_instance['link_to'] = (isset( $new_instance['link_to'] ) && in_array( $new_instance['link_to'], array_keys( $this->rli_link_to ), true ) ? $new_instance['link_to'] : $this->rli_defaults['link_to']);
|
560 |
+
$old_instance['link_custom_url'] = esc_url( isset( $new_instance['link_custom_url'] ) ? $new_instance['link_custom_url'] : $this->rli_defaults['link_custom_url'] );
|
561 |
+
$old_instance['image_align'] = (isset( $new_instance['image_align'] ) && in_array( $new_instance['image_align'], array_keys( $this->rli_aligns ), true ) ? $new_instance['image_align'] : $this->rli_defaults['image_align']);
|
562 |
+
$old_instance['text'] = wp_kses_post( isset( $new_instance['text'] ) ? $new_instance['text'] : $this->rli_defaults['text'] );
|
563 |
+
$old_instance['autobr'] = isset( $new_instance['autobr'] ) ? true : false;
|
564 |
+
$old_instance['text_position'] = (isset( $new_instance['text_position'] ) && in_array( $new_instance['text_position'], array_keys( $this->rli_text_positions ), true ) ? $new_instance['text_position'] : $this->rli_defaults['text_position']);
|
565 |
+
$old_instance['text_align'] = (isset( $new_instance['text_align'] ) && in_array( $new_instance['text_align'], array_keys( $this->rli_aligns ), true ) ? $new_instance['text_align'] : $this->rli_defaults['text_align']);
|
566 |
+
|
567 |
+
return $old_instance;
|
568 |
+
}
|
569 |
+
|
570 |
+
}
|
js/admin-widgets.js
ADDED
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function ( window, $ ) {
|
2 |
+
|
3 |
+
/* Gallery widget */
|
4 |
+
|
5 |
+
var rl_galleries = [ ],
|
6 |
+
rl_gallery_frames = [ ],
|
7 |
+
rl_gallery_ids = [ ],
|
8 |
+
rl_gallery_images = [ ];
|
9 |
+
|
10 |
+
$( document ).on( 'ready widget-updated widget-added', function () {
|
11 |
+
|
12 |
+
rl_galleries = $( '.rl-gallery-widget' );
|
13 |
+
|
14 |
+
if ( rl_galleries.length > 0 ) {
|
15 |
+
$.each( rl_galleries, function ( index, gallery ) {
|
16 |
+
var gallery_id_attr = $( gallery ).attr( 'id' ),
|
17 |
+
gallery_id_arr = gallery_id_attr.match( /\-\d*\-/ );
|
18 |
+
|
19 |
+
if ( gallery_id_arr != null ) {
|
20 |
+
var gallery_id = gallery_id_arr.shift().replace( /-/g, '' );
|
21 |
+
|
22 |
+
rl_gallery_frames[gallery_id] = [ ];
|
23 |
+
rl_gallery_ids[gallery_id] = $( gallery ).find( '.rl-gallery-ids' );
|
24 |
+
rl_gallery_images[gallery_id] = $( gallery ).find( '.rl-gallery-images' );
|
25 |
+
|
26 |
+
// image ordering
|
27 |
+
rl_gallery_images[gallery_id].sortable( {
|
28 |
+
items: 'li.rl-gallery-image',
|
29 |
+
cursor: 'move',
|
30 |
+
scrollSensitivity: 40,
|
31 |
+
forcePlaceholderSize: true,
|
32 |
+
forceHelperSize: false,
|
33 |
+
helper: 'clone',
|
34 |
+
opacity: 0.65,
|
35 |
+
placeholder: 'rl-gallery-sortable-placeholder',
|
36 |
+
start: function ( event, ui ) {
|
37 |
+
ui.item.css( 'border-color', '#f6f6f6' );
|
38 |
+
},
|
39 |
+
stop: function ( event, ui ) {
|
40 |
+
ui.item.removeAttr( 'style' );
|
41 |
+
},
|
42 |
+
update: function ( event, ui ) {
|
43 |
+
var attachment_ids = [ ];
|
44 |
+
|
45 |
+
$( rl_gallery_images[gallery_id] ).find( 'li.rl-gallery-image' ).each( function () {
|
46 |
+
var attachment_id = jQuery( this ).attr( 'data-attachment_id' );
|
47 |
+
attachment_ids.push( attachment_id );
|
48 |
+
} );
|
49 |
+
|
50 |
+
rl_gallery_ids[gallery_id].val( attachment_ids.join( ',' ) );
|
51 |
+
}
|
52 |
+
} );
|
53 |
+
|
54 |
+
// removing images
|
55 |
+
$( rl_gallery_images[gallery_id] ).on( 'click', '.rl-gallery-image-remove', function () {
|
56 |
+
var li = $( this ).closest( 'li.rl-gallery-image' ),
|
57 |
+
attachment_ids = rl_gallery_ids[gallery_id].val().split( ',' ).map( function ( el ) {
|
58 |
+
return parseInt( el )
|
59 |
+
} );
|
60 |
+
|
61 |
+
// remove id
|
62 |
+
attachment_ids = _.without( attachment_ids, parseInt( li.data( 'attachment_id' ) ) );
|
63 |
+
|
64 |
+
// remove attachment
|
65 |
+
li.remove();
|
66 |
+
|
67 |
+
// update attachment ids
|
68 |
+
rl_gallery_ids[gallery_id].val( attachment_ids.join( ',' ) );
|
69 |
+
|
70 |
+
return false;
|
71 |
+
} );
|
72 |
+
}
|
73 |
+
} );
|
74 |
+
}
|
75 |
+
;
|
76 |
+
|
77 |
+
// open the modal on click
|
78 |
+
$( '.rl-gallery-widget-select' ).on( 'click', function ( event ) {
|
79 |
+
event.preventDefault();
|
80 |
+
|
81 |
+
var gallery = $( this ).closest( '.rl-gallery-widget' ),
|
82 |
+
gallery_id = 0,
|
83 |
+
gallery_id_attr = $( gallery ).attr( 'id' ),
|
84 |
+
gallery_id_arr = gallery_id_attr.match( /\-\d*\-/ );
|
85 |
+
|
86 |
+
if ( gallery_id_arr != null ) {
|
87 |
+
gallery_id = gallery_id_arr.shift().replace( /-/g, '' );
|
88 |
+
|
89 |
+
var attachment_ids = rl_gallery_ids[gallery_id].val();
|
90 |
+
|
91 |
+
// if the media frame already exists, reopen it.
|
92 |
+
if ( rl_gallery_frames[gallery_id].length != 0 ) {
|
93 |
+
rl_gallery_frames[gallery_id].open();
|
94 |
+
|
95 |
+
return;
|
96 |
+
}
|
97 |
+
|
98 |
+
// create the media frame.
|
99 |
+
rl_gallery_frames[gallery_id] = wp.media( {
|
100 |
+
// Set the title of the modal.
|
101 |
+
title: rlArgs.textSelectImages,
|
102 |
+
multiple: true,
|
103 |
+
button: {
|
104 |
+
text: rlArgs.textUseImages
|
105 |
+
},
|
106 |
+
library: { type: 'image' },
|
107 |
+
multiple: true
|
108 |
+
} );
|
109 |
+
|
110 |
+
rl_gallery_frames[gallery_id].on( 'open', function () {
|
111 |
+
var selection = rl_gallery_frames[gallery_id].state().get( 'selection' ),
|
112 |
+
attachment_ids = rl_gallery_ids[gallery_id].val().split( ',' );
|
113 |
+
|
114 |
+
$.each( attachment_ids, function () {
|
115 |
+
if ( $.isNumeric( this ) ) {
|
116 |
+
attachment = wp.media.attachment( this );
|
117 |
+
attachment.fetch();
|
118 |
+
selection.add( attachment ? [ attachment ] : [ ] );
|
119 |
+
}
|
120 |
+
} );
|
121 |
+
} );
|
122 |
+
|
123 |
+
// when an image is selected, run a callback.
|
124 |
+
rl_gallery_frames[gallery_id].on( 'select', function () {
|
125 |
+
var selection = rl_gallery_frames[gallery_id].state().get( 'selection' ),
|
126 |
+
selected_ids = [ ],
|
127 |
+
attachment_ids = rl_gallery_ids[gallery_id].val().split( ',' ).map( function ( el ) {
|
128 |
+
return parseInt( el )
|
129 |
+
} );
|
130 |
+
|
131 |
+
if ( selection ) {
|
132 |
+
selection.map( function ( attachment ) {
|
133 |
+
if ( attachment.id ) {
|
134 |
+
selected_ids.push( attachment.id );
|
135 |
+
|
136 |
+
// is image already in gallery?
|
137 |
+
if ( $.inArray( attachment.id, attachment_ids ) !== -1 ) {
|
138 |
+
return;
|
139 |
+
}
|
140 |
+
|
141 |
+
attachment_ids.push( attachment.id );
|
142 |
+
attachment = attachment.toJSON();
|
143 |
+
|
144 |
+
// is preview size available?
|
145 |
+
if ( attachment.sizes && attachment.sizes['thumbnail'] ) {
|
146 |
+
attachment.url = attachment.sizes['thumbnail'].url;
|
147 |
+
}
|
148 |
+
|
149 |
+
rl_gallery_images[gallery_id].append( '\
|
150 |
+
<li class="rl-gallery-image" data-attachment_id="' + attachment.id + '">\
|
151 |
+
<div class="rl-gallery-inner"><img src="' + attachment.url + '" /></div>\
|
152 |
+
<div class="rl-gallery-actions"><a href="#" class="rl-gallery-image-remove dashicons dashicons-no" title="' + rlArgs.textRemoveImage + '"></a></div>\
|
153 |
+
</li>'
|
154 |
+
);
|
155 |
+
}
|
156 |
+
} );
|
157 |
+
}
|
158 |
+
|
159 |
+
// assign copy of attachments ids
|
160 |
+
var copy = attachment_ids;
|
161 |
+
|
162 |
+
for ( var i = 0; i < attachment_ids.length; i++ ) {
|
163 |
+
// unselected image?
|
164 |
+
if ( $.inArray( attachment_ids[i], selected_ids ) === -1 ) {
|
165 |
+
$( rl_gallery_images[gallery_id] ).find( 'li.rl-gallery-image[data-attachment_id="' + attachment_ids[i] + '"]' ).remove();
|
166 |
+
|
167 |
+
copy = _.without( copy, attachment_ids[i] )
|
168 |
+
}
|
169 |
+
}
|
170 |
+
|
171 |
+
rl_gallery_ids[gallery_id].val( $.unique( copy ).join( ',' ) );
|
172 |
+
} );
|
173 |
+
|
174 |
+
// finally, open the modal.
|
175 |
+
rl_gallery_frames[gallery_id].open();
|
176 |
+
}
|
177 |
+
;
|
178 |
+
} );
|
179 |
+
|
180 |
+
} );
|
181 |
+
|
182 |
+
/* Single image widget */
|
183 |
+
|
184 |
+
var rl_image_frame,
|
185 |
+
rl_image_container,
|
186 |
+
rl_image_input;
|
187 |
+
|
188 |
+
$( document ).on( 'ready widget-updated widget-added', function () {
|
189 |
+
|
190 |
+
$( '.rl-image-widget-select' ).on( 'click', function ( event ) {
|
191 |
+
|
192 |
+
var $this = $( this );
|
193 |
+
rl_image_container = $this.parent().find( '.rl-image-widget-content' );
|
194 |
+
rl_image_input = $this.parent().find( '.rl-image-widget-image-id' );
|
195 |
+
|
196 |
+
event.preventDefault();
|
197 |
+
|
198 |
+
// create a new media frame
|
199 |
+
rl_image_frame = wp.media( {
|
200 |
+
title: rlArgs.textSelectImage,
|
201 |
+
button: {
|
202 |
+
text: rlArgs.textUseImage
|
203 |
+
},
|
204 |
+
library: { type: 'image' },
|
205 |
+
multiple: false
|
206 |
+
} );
|
207 |
+
|
208 |
+
// when an image is selected in the media frame...
|
209 |
+
rl_image_frame.on( 'select', function () {
|
210 |
+
// get media attachment details from the frame state
|
211 |
+
var attachment = rl_image_frame.state().get( 'selection' ).first().toJSON();
|
212 |
+
|
213 |
+
// send the attachment URL to our custom image input field.
|
214 |
+
rl_image_container.html( '<img src="' + attachment.url + '" alt="" />' );
|
215 |
+
|
216 |
+
// send the attachment id to our hidden input
|
217 |
+
rl_image_input.val( attachment.id );
|
218 |
+
} );
|
219 |
+
|
220 |
+
// when an image is already selected in the media frame...
|
221 |
+
rl_image_frame.on( 'open', function () {
|
222 |
+
var selection = rl_image_frame.state().get( 'selection' );
|
223 |
+
|
224 |
+
// get current image
|
225 |
+
var attachment = wp.media.attachment( rl_image_input.val() );
|
226 |
+
attachment.fetch();
|
227 |
+
|
228 |
+
// preselect in media frame
|
229 |
+
selection.add( attachment ? [ attachment ] : [ ] );
|
230 |
+
} );
|
231 |
+
|
232 |
+
rl_image_frame.open();
|
233 |
+
|
234 |
+
} );
|
235 |
+
|
236 |
+
$( '.rl-image-link-to' ).on( 'change', function() {
|
237 |
+
if ( $( this ).val() == 'custom' ) {
|
238 |
+
$( this ).parent().next().slideDown( 'fast' );
|
239 |
+
} else {
|
240 |
+
$( this ).parent().next().slideUp( 'fast' );
|
241 |
+
}
|
242 |
+
} );
|
243 |
+
|
244 |
+
} );
|
245 |
+
|
246 |
+
} )( this, jQuery );
|
js/admin.js
CHANGED
@@ -1,19 +1,20 @@
|
|
1 |
( function ( $ ) {
|
2 |
|
3 |
$( document ).ready( function () {
|
|
|
|
|
4 |
|
5 |
-
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
return confirm( rlArgs.resetScriptToDefaults );
|
11 |
-
} );
|
12 |
-
|
13 |
-
$( '.responsive-lightbox-settings input.reset-settings' ).on( 'click', function ( event ) {
|
14 |
-
return confirm( rlArgs.resetSettingsToDefaults );
|
15 |
-
} );
|
16 |
|
|
|
|
|
|
|
17 |
} );
|
18 |
|
19 |
} )( jQuery );
|
1 |
( function ( $ ) {
|
2 |
|
3 |
$( document ).ready( function () {
|
4 |
+
$( '.responsive-lightbox-settings .color-picker' ).wpColorPicker();
|
5 |
+
$( '.responsive-lightbox-settings' ).checkBo();
|
6 |
|
7 |
+
$( '.responsive-lightbox-settings input.reset-configuration' ).on( 'click', function() {
|
8 |
+
return confirm( rlArgs.resetScriptToDefaults );
|
9 |
+
} );
|
10 |
|
11 |
+
$( '.responsive-lightbox-settings input.reset-settings' ).on( 'click', function() {
|
12 |
+
return confirm( rlArgs.resetSettingsToDefaults );
|
13 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
+
$( '.responsive-lightbox-settings input.reset-gallery' ).on( 'click', function() {
|
16 |
+
return confirm( rlArgs.resetGalleryToDefaults );
|
17 |
+
} );
|
18 |
} );
|
19 |
|
20 |
} )( jQuery );
|
js/front.js
CHANGED
@@ -53,20 +53,36 @@
|
|
53 |
|
54 |
rl_view_image = function ( script, url ) {
|
55 |
$.event.trigger( {
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
} );
|
60 |
}
|
61 |
|
62 |
rl_hide_image = function ( script, url ) {
|
63 |
$.event.trigger( {
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
} );
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
switch ( script ) {
|
71 |
|
72 |
case 'swipebox':
|
53 |
|
54 |
rl_view_image = function ( script, url ) {
|
55 |
$.event.trigger( {
|
56 |
+
type: 'doLightboxViewImage',
|
57 |
+
script: script,
|
58 |
+
url: url
|
59 |
} );
|
60 |
}
|
61 |
|
62 |
rl_hide_image = function ( script, url ) {
|
63 |
$.event.trigger( {
|
64 |
+
type: 'doLightboxHideImage',
|
65 |
+
script: script,
|
66 |
+
url: url
|
67 |
} );
|
68 |
}
|
69 |
|
70 |
+
// WooCommerce 3.0+ compatibility
|
71 |
+
setTimeout( function() {
|
72 |
+
var flex = $( '.flex-viewport' );
|
73 |
+
|
74 |
+
if ( rlArgs.woocommerce_gallery === '1' && flex.length ) {
|
75 |
+
$( '.zoomImg' ).css( 'cursor', 'pointer' );
|
76 |
+
|
77 |
+
$( document ).on( 'click', '.flex-active-slide .zoomImg', function ( e ) {
|
78 |
+
e.preventDefault();
|
79 |
+
e.stopPropagation();
|
80 |
+
|
81 |
+
flex.find( '.flex-active-slide a[data-rel]' ).trigger( 'click' );
|
82 |
+
} );
|
83 |
+
}
|
84 |
+
}, 10 );
|
85 |
+
|
86 |
switch ( script ) {
|
87 |
|
88 |
case 'swipebox':
|
languages/responsive-lightbox.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Responsive Lightbox\n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
"PO-Revision-Date: 2015-05-12 12:06+0100\n"
|
7 |
"Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
|
8 |
"Language-Team: dFactory <info@dfactory.eu>\n"
|
@@ -10,958 +10,992 @@ msgstr ""
|
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Generator: Poedit 1.8.
|
14 |
"X-Poedit-KeywordsList: gettext;gettext_noop;__;_e\n"
|
15 |
"X-Poedit-Basepath: .\n"
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"X-Poedit-SearchPath-0: ..\n"
|
18 |
|
19 |
-
#: ../includes/class-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
msgid "prettyPhoto"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: ../includes/class-settings.php:
|
24 |
msgid "slow"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: ../includes/class-settings.php:
|
28 |
msgid "normal"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: ../includes/class-settings.php:
|
32 |
msgid "fast"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: ../includes/class-settings.php:
|
36 |
msgid "default"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: ../includes/class-settings.php:
|
40 |
msgid "light rounded"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: ../includes/class-settings.php:
|
44 |
msgid "dark rounded"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: ../includes/class-settings.php:
|
48 |
msgid "light square"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: ../includes/class-settings.php:
|
52 |
msgid "dark square"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: ../includes/class-settings.php:
|
56 |
msgid "facebook"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: ../includes/class-settings.php:
|
60 |
msgid "window"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: ../includes/class-settings.php:
|
64 |
msgid "transparent"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: ../includes/class-settings.php:
|
68 |
msgid "opaque"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: ../includes/class-settings.php:
|
72 |
msgid "direct"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: ../includes/class-settings.php:
|
76 |
msgid "gpu"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: ../includes/class-settings.php:
|
80 |
-
msgid "SwipeBox"
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
#: ../includes/class-settings.php:66
|
84 |
-
msgid "CSS"
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
#: ../includes/class-settings.php:67
|
88 |
-
msgid "jQuery"
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: ../includes/class-settings.php:71
|
92 |
msgid "FancyBox"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: ../includes/class-settings.php:
|
96 |
msgid "elastic"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: ../includes/class-settings.php:
|
100 |
-
#: ../includes/class-settings.php:
|
101 |
msgid "fade"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: ../includes/class-settings.php:
|
105 |
msgid "none"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: ../includes/class-settings.php:
|
109 |
msgid "auto"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: ../includes/class-settings.php:
|
113 |
msgid "yes"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: ../includes/class-settings.php:
|
117 |
msgid "no"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: ../includes/class-settings.php:
|
121 |
msgid "swing"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: ../includes/class-settings.php:
|
125 |
msgid "linear"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: ../includes/class-settings.php:
|
129 |
msgid "outside"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: ../includes/class-settings.php:
|
133 |
msgid "inside"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: ../includes/class-settings.php:
|
137 |
msgid "over"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: ../includes/class-settings.php:
|
141 |
msgid "Nivo Lightbox"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: ../includes/class-settings.php:
|
145 |
msgid "fade scale"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: ../includes/class-settings.php:
|
149 |
msgid "slide left"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: ../includes/class-settings.php:
|
153 |
msgid "slide right"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: ../includes/class-settings.php:
|
157 |
msgid "slide up"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: ../includes/class-settings.php:
|
161 |
msgid "slide down"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: ../includes/class-settings.php:
|
165 |
msgid "fall"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: ../includes/class-settings.php:
|
169 |
msgid "Image Lightbox"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: ../includes/class-settings.php:
|
173 |
msgid "TosRUs"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: ../includes/class-settings.php:
|
177 |
msgid "Featherlight"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: ../includes/class-settings.php:
|
181 |
msgid "None (default)"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: ../includes/class-settings.php:
|
185 |
msgid "Image Title"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: ../includes/class-settings.php:
|
189 |
msgid "Image Caption"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: ../includes/class-settings.php:
|
193 |
msgid "Image Alt Text"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: ../includes/class-settings.php:
|
197 |
msgid "Image Description"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: ../includes/class-settings.php:
|
201 |
msgid "Header"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: ../includes/class-settings.php:
|
205 |
msgid "Footer"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: ../includes/class-settings.php:
|
209 |
msgid "Thumbnail"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: ../includes/class-settings.php:
|
213 |
msgid "Medium"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: ../includes/class-settings.php:
|
217 |
msgid "Large"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: ../includes/class-settings.php:
|
221 |
msgid "Full Size (default)"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: ../includes/class-settings.php:
|
225 |
msgid "General settings"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: ../includes/class-settings.php:
|
229 |
-
msgid "
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: ../includes/class-settings.php:
|
233 |
#, php-format
|
234 |
msgid ""
|
235 |
"Select your preffered ligthbox effect script or get our <a href=\"%s"
|
236 |
"\">premium extensions</a>."
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: ../includes/class-settings.php:
|
240 |
msgid "Selector"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: ../includes/class-settings.php:
|
244 |
msgid "Enter the rel selector lightbox effect will be applied to."
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: ../includes/class-settings.php:
|
248 |
-
msgid "
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: ../includes/class-settings.php:
|
252 |
-
msgid "
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: ../includes/class-settings.php:
|
256 |
msgid "Single image title"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: ../includes/class-settings.php:
|
260 |
msgid "Select title for single images."
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: ../includes/class-settings.php:
|
264 |
msgid "Single images as gallery"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: ../includes/class-settings.php:
|
268 |
msgid "Display single post images as a gallery."
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: ../includes/class-settings.php:
|
272 |
msgid "Galleries"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: ../includes/class-settings.php:
|
276 |
-
msgid "
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: ../includes/class-settings.php:
|
280 |
msgid "Gallery image size"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: ../includes/class-settings.php:
|
284 |
msgid "Select image size for gallery image links."
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: ../includes/class-settings.php:
|
288 |
msgid "Gallery image title"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: ../includes/class-settings.php:
|
292 |
msgid "Select title for images in native WordPress galleries."
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: ../includes/class-settings.php:
|
296 |
-
msgid "
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: ../includes/class-settings.php:
|
300 |
-
msgid ""
|
301 |
-
"Try to force lightbox for custom WP gallery replacements, like Jetpack tiled "
|
302 |
-
"galleries."
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: ../includes/class-settings.php:
|
306 |
-
msgid "
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: ../includes/class-settings.php:
|
310 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: ../includes/class-settings.php:
|
314 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: ../includes/class-settings.php:
|
318 |
-
msgid "
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: ../includes/class-settings.php:
|
322 |
msgid "Custom events"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: ../includes/class-settings.php:
|
326 |
msgid "Enable triggering lightbox on custom jQuery events."
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: ../includes/class-settings.php:
|
330 |
msgid "Enter a space separated list of events."
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: ../includes/class-settings.php:
|
334 |
msgid "Loading place"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: ../includes/class-settings.php:
|
338 |
msgid "Select where all the lightbox scripts should be placed."
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: ../includes/class-settings.php:
|
342 |
msgid "Conditional loading"
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: ../includes/class-settings.php:
|
346 |
msgid ""
|
347 |
"Enable to load scripts and styles only on pages that have images or "
|
348 |
"galleries in post content."
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: ../includes/class-settings.php:
|
352 |
msgid "Delete data"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: ../includes/class-settings.php:
|
356 |
msgid "Delete all plugin settings on deactivation."
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: ../includes/class-settings.php:
|
360 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: ../includes/class-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
msgid "Animation type"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: ../includes/class-settings.php:
|
368 |
msgid "Select a method of applying a lightbox effect."
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: ../includes/class-settings.php:
|
372 |
msgid "Force PNG icons"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: ../includes/class-settings.php:
|
376 |
msgid ""
|
377 |
"Enable this if you're having problems with navigation icons not visible on "
|
378 |
"some devices."
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: ../includes/class-settings.php:
|
382 |
msgid "Hide close on mobile"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: ../includes/class-settings.php:
|
386 |
msgid "Hide the close button on mobile devices."
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: ../includes/class-settings.php:
|
390 |
msgid "Remove bars on mobile"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: ../includes/class-settings.php:
|
394 |
msgid "Hide the top and bottom bars on mobile devices."
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: ../includes/class-settings.php:
|
398 |
msgid "Top and bottom bars"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: ../includes/class-settings.php:
|
402 |
msgid "Hide top and bottom bars after a period of time."
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: ../includes/class-settings.php:
|
406 |
msgid ""
|
407 |
"Enter the time after which the top and bottom bars will be hidden (when "
|
408 |
"hiding is enabled)."
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: ../includes/class-settings.php:
|
412 |
msgid "Video max width"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: ../includes/class-settings.php:
|
416 |
msgid "Enter the max video width in a lightbox."
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: ../includes/class-settings.php:
|
420 |
msgid "Loop at end"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: ../includes/class-settings.php:
|
424 |
msgid "True will return to the first image after the last image is reached."
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: ../includes/class-settings.php:
|
428 |
msgid "Animation speed"
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: ../includes/class-settings.php:
|
432 |
msgid "Select animation speed for lightbox effect."
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: ../includes/class-settings.php:
|
436 |
msgid "Slideshow"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: ../includes/class-settings.php:
|
440 |
msgid "Display images as slideshow"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: ../includes/class-settings.php:
|
444 |
msgid "Enter time (in miliseconds)."
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: ../includes/class-settings.php:
|
448 |
msgid "Slideshow autoplay"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: ../includes/class-settings.php:
|
452 |
msgid "Automatically start slideshow."
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: ../includes/class-settings.php:
|
456 |
msgid "Opacity"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: ../includes/class-settings.php:
|
460 |
msgid "Value between 0 and 100, 100 for no opacity."
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: ../includes/class-settings.php:
|
464 |
msgid "Show title"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: ../includes/class-settings.php:
|
468 |
msgid "Display image title."
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: ../includes/class-settings.php:
|
472 |
msgid "Allow resize big images"
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: ../includes/class-settings.php:
|
476 |
msgid "Resize the photos bigger than viewport."
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: ../includes/class-settings.php:
|
480 |
msgid "Allow expand"
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: ../includes/class-settings.php:
|
484 |
msgid "Allow expanding images."
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: ../includes/class-settings.php:
|
488 |
msgid "Video width"
|
489 |
msgstr ""
|
490 |
|
491 |
-
#: ../includes/class-settings.php:
|
492 |
msgid "Video height"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: ../includes/class-settings.php:
|
496 |
msgid "Theme"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: ../includes/class-settings.php:
|
500 |
msgid "Select the theme for lightbox effect."
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: ../includes/class-settings.php:
|
504 |
msgid "Horizontal padding"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: ../includes/class-settings.php:
|
508 |
msgid "Hide Flash"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: ../includes/class-settings.php:
|
512 |
msgid ""
|
513 |
"Hide all the flash objects on a page. Enable this if flash appears over "
|
514 |
"prettyPhoto."
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: ../includes/class-settings.php:
|
518 |
msgid "Flash Window Mode (wmode)"
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: ../includes/class-settings.php:
|
522 |
msgid "Select flash window mode."
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: ../includes/class-settings.php:
|
526 |
msgid "Video autoplay"
|
527 |
msgstr ""
|
528 |
|
529 |
-
#: ../includes/class-settings.php:
|
530 |
msgid "Automatically start videos."
|
531 |
msgstr ""
|
532 |
|
533 |
-
#: ../includes/class-settings.php:
|
534 |
msgid "Modal"
|
535 |
msgstr ""
|
536 |
|
537 |
-
#: ../includes/class-settings.php:
|
538 |
msgid "If set to true, only the close button will close the window."
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: ../includes/class-settings.php:
|
542 |
msgid "Deeplinking"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: ../includes/class-settings.php:
|
546 |
msgid "Allow prettyPhoto to update the url to enable deeplinking."
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: ../includes/class-settings.php:
|
550 |
msgid "Overlay gallery"
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: ../includes/class-settings.php:
|
554 |
msgid "If enabled, a gallery will overlay the fullscreen image on mouse over."
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: ../includes/class-settings.php:
|
558 |
msgid "Keyboard shortcuts"
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: ../includes/class-settings.php:
|
562 |
msgid "Set to false if you open forms inside prettyPhoto."
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: ../includes/class-settings.php:
|
566 |
msgid "Social (Twitter, Facebook)"
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: ../includes/class-settings.php:
|
570 |
msgid "Display links to Facebook and Twitter."
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: ../includes/class-settings.php:
|
574 |
msgid ""
|
575 |
"When true, \"overlayShow\" is set to true and \"hideOnOverlayClick\", "
|
576 |
"\"hideOnContentClick\", \"enableEscapeButton\", \"showCloseButton\" are set "
|
577 |
"to false."
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: ../includes/class-settings.php:
|
581 |
msgid "Show overlay"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#: ../includes/class-settings.php:
|
585 |
msgid "Toggle overlay."
|
586 |
msgstr ""
|
587 |
|
588 |
-
#: ../includes/class-settings.php:
|
589 |
msgid "Show close button"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: ../includes/class-settings.php:
|
593 |
msgid "Toggle close button."
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: ../includes/class-settings.php:
|
597 |
msgid "Enable escape button"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: ../includes/class-settings.php:
|
601 |
msgid "Toggle if pressing Esc button closes lightbox."
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: ../includes/class-settings.php:
|
605 |
msgid "Hide on overlay click"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: ../includes/class-settings.php:
|
609 |
msgid "Toggle if clicking the overlay should close FancyBox."
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: ../includes/class-settings.php:
|
613 |
msgid "Hide on content click"
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: ../includes/class-settings.php:
|
617 |
msgid "Toggle if clicking the content should close FancyBox."
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: ../includes/class-settings.php:
|
621 |
msgid "Cyclic"
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: ../includes/class-settings.php:
|
625 |
msgid ""
|
626 |
"When true, galleries will be cyclic, allowing you to keep pressing next/back."
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: ../includes/class-settings.php:
|
630 |
msgid "Show nav arrows"
|
631 |
msgstr ""
|
632 |
|
633 |
-
#: ../includes/class-settings.php:
|
634 |
msgid "Toggle navigation arrows."
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: ../includes/class-settings.php:
|
638 |
msgid "Auto scale"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: ../includes/class-settings.php:
|
642 |
msgid "If true, FancyBox is scaled to fit in viewport."
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: ../includes/class-settings.php:
|
646 |
msgid "Scrolling (in/out)"
|
647 |
msgstr ""
|
648 |
|
649 |
-
#: ../includes/class-settings.php:
|
650 |
msgid "Set the overflow CSS property to create or hide scrollbars."
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: ../includes/class-settings.php:
|
654 |
msgid "Center on scroll"
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: ../includes/class-settings.php:
|
658 |
msgid "When true, FancyBox is centered while scrolling page."
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: ../includes/class-settings.php:
|
662 |
msgid "When true, transparency of content is changed for elastic transitions."
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: ../includes/class-settings.php:
|
666 |
msgid "Overlay opacity"
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: ../includes/class-settings.php:
|
670 |
msgid "Opacity of the overlay."
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: ../includes/class-settings.php:
|
674 |
msgid "Overlay color"
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: ../includes/class-settings.php:
|
678 |
msgid "Color of the overlay."
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: ../includes/class-settings.php:
|
682 |
msgid "Title show"
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: ../includes/class-settings.php:
|
686 |
msgid "Toggle title."
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: ../includes/class-settings.php:
|
690 |
msgid "Title position"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: ../includes/class-settings.php:
|
694 |
msgid "The position of title."
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: ../includes/class-settings.php:
|
698 |
msgid "Transition (in/out)"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: ../includes/class-settings.php:
|
702 |
msgid "The transition type."
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: ../includes/class-settings.php:
|
706 |
msgid "Easings (in/out)"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: ../includes/class-settings.php:
|
710 |
msgid "Easing used for elastic animations."
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: ../includes/class-settings.php:
|
714 |
msgid "Speed (in/out)"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: ../includes/class-settings.php:
|
718 |
msgid "Speed of the fade and elastic transitions, in milliseconds."
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: ../includes/class-settings.php:
|
722 |
msgid "Change speed"
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: ../includes/class-settings.php:
|
726 |
msgid "Speed of resizing when changing gallery items, in milliseconds."
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: ../includes/class-settings.php:
|
730 |
msgid "Change fade"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: ../includes/class-settings.php:
|
734 |
msgid "Speed of the content fading while changing gallery items."
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: ../includes/class-settings.php:
|
738 |
msgid "Padding"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: ../includes/class-settings.php:
|
742 |
msgid "Space between FancyBox wrapper and content."
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: ../includes/class-settings.php:
|
746 |
msgid "Margin"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: ../includes/class-settings.php:
|
750 |
msgid "Space between viewport and FancyBox wrapper."
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: ../includes/class-settings.php:
|
754 |
msgid "Width of the video."
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: ../includes/class-settings.php:
|
758 |
msgid "Height of the video."
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: ../includes/class-settings.php:
|
762 |
msgid "Effect"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: ../includes/class-settings.php:
|
766 |
msgid "The effect to use when showing the lightbox."
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: ../includes/class-settings.php:
|
770 |
msgid "Keyboard navigation"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: ../includes/class-settings.php:
|
774 |
msgid "Enable keyboard navigation (left/right/escape)."
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: ../includes/class-settings.php:
|
778 |
msgid "Click overlay to close"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: ../includes/class-settings.php:
|
782 |
msgid "Enable to close lightbox on overlay click."
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: ../includes/class-settings.php:
|
786 |
msgid "Error message"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: ../includes/class-settings.php:
|
790 |
msgid "Error message if the content cannot be loaded."
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: ../includes/class-settings.php:
|
794 |
msgid "Animation speed."
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: ../includes/class-settings.php:
|
798 |
msgid "Preload next image"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: ../includes/class-settings.php:
|
802 |
msgid "Silently preload the next image."
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: ../includes/class-settings.php:
|
806 |
msgid "Enable keyboard keys"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: ../includes/class-settings.php:
|
810 |
msgid "Enable keyboard shortcuts (arrows Left/Right and Esc)."
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: ../includes/class-settings.php:
|
814 |
msgid "Quit after last image"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: ../includes/class-settings.php:
|
818 |
msgid "Quit after viewing the last image."
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: ../includes/class-settings.php:
|
822 |
msgid "Quit on image click"
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: ../includes/class-settings.php:
|
826 |
msgid "Quit when the viewed image is clicked."
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: ../includes/class-settings.php:
|
830 |
msgid "Quit on anything click"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: ../includes/class-settings.php:
|
834 |
msgid "Quit when anything but the viewed image is clicked."
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: ../includes/class-settings.php:
|
838 |
msgid "Transition effect"
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: ../includes/class-settings.php:
|
842 |
msgid "What effect to use for the transition."
|
843 |
msgstr ""
|
844 |
|
845 |
-
#: ../includes/class-settings.php:
|
846 |
msgid "slide"
|
847 |
msgstr ""
|
848 |
|
849 |
-
#: ../includes/class-settings.php:
|
850 |
msgid "Infinite loop"
|
851 |
msgstr ""
|
852 |
|
853 |
-
#: ../includes/class-settings.php:
|
854 |
msgid ""
|
855 |
"Whether or not to slide back to the first slide when the last has been "
|
856 |
"reached."
|
857 |
msgstr ""
|
858 |
|
859 |
-
#: ../includes/class-settings.php:
|
860 |
msgid "Autoplay"
|
861 |
msgstr ""
|
862 |
|
863 |
-
#: ../includes/class-settings.php:
|
864 |
msgid "The timeout between sliding to the next slide in milliseconds."
|
865 |
msgstr ""
|
866 |
|
867 |
-
#: ../includes/class-settings.php:
|
868 |
msgid "Pause on hover"
|
869 |
msgstr ""
|
870 |
|
871 |
-
#: ../includes/class-settings.php:
|
872 |
msgid "Whether or not to pause on hover."
|
873 |
msgstr ""
|
874 |
|
875 |
-
#: ../includes/class-settings.php:
|
876 |
msgid "Pagination"
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: ../includes/class-settings.php:
|
880 |
msgid "Whether or not to add a pagination."
|
881 |
msgstr ""
|
882 |
|
883 |
-
#: ../includes/class-settings.php:
|
884 |
msgid "What type of pagination to use."
|
885 |
msgstr ""
|
886 |
|
887 |
-
#: ../includes/class-settings.php:
|
888 |
msgid "Bullets"
|
889 |
msgstr ""
|
890 |
|
891 |
-
#: ../includes/class-settings.php:
|
892 |
msgid "Thumbnails"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: ../includes/class-settings.php:
|
896 |
msgid "Opening speed"
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: ../includes/class-settings.php:
|
900 |
msgid "Duration of opening animation."
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: ../includes/class-settings.php:
|
904 |
msgid "Closing speed"
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: ../includes/class-settings.php:
|
908 |
msgid "Duration of closing animation."
|
909 |
msgstr ""
|
910 |
|
911 |
-
#: ../includes/class-settings.php:
|
912 |
msgid "Close on click"
|
913 |
msgstr ""
|
914 |
|
915 |
-
#: ../includes/class-settings.php:
|
916 |
msgid "Select how to close lightbox."
|
917 |
msgstr ""
|
918 |
|
919 |
-
#: ../includes/class-settings.php:
|
920 |
msgid "background"
|
921 |
msgstr ""
|
922 |
|
923 |
-
#: ../includes/class-settings.php:
|
924 |
msgid "anywhere"
|
925 |
msgstr ""
|
926 |
|
927 |
-
#: ../includes/class-settings.php:
|
928 |
msgid "false"
|
929 |
msgstr ""
|
930 |
|
931 |
-
#: ../includes/class-settings.php:
|
932 |
msgid "Close on Esc"
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: ../includes/class-settings.php:
|
936 |
msgid "Gallery fade in"
|
937 |
msgstr ""
|
938 |
|
939 |
-
#: ../includes/class-settings.php:
|
940 |
msgid "Animation speed when image is loaded."
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: ../includes/class-settings.php:
|
944 |
msgid "Gallery fade out"
|
945 |
msgstr ""
|
946 |
|
947 |
-
#: ../includes/class-settings.php:
|
948 |
msgid "Animation speed before image is loaded."
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: ../includes/class-settings.php:
|
952 |
-
|
953 |
-
msgstr ""
|
954 |
-
|
955 |
-
#: ../includes/class-settings.php:976 ../includes/class-settings.php:990
|
956 |
-
#: ../includes/class-settings.php:1003
|
957 |
msgid "Responsive Lightbox"
|
958 |
msgstr ""
|
959 |
|
960 |
-
#: ../includes/class-settings.php:
|
961 |
msgid "Need support?"
|
962 |
msgstr ""
|
963 |
|
964 |
-
#: ../includes/class-settings.php:
|
965 |
#, php-format
|
966 |
msgid ""
|
967 |
"If you are having problems with this plugin, please browse it's <a href=\"%s"
|
@@ -969,105 +1003,272 @@ msgid ""
|
|
969 |
"\" target=\"_blank\">Support forum</a>"
|
970 |
msgstr ""
|
971 |
|
972 |
-
#: ../includes/class-settings.php:
|
973 |
msgid "Do you like this plugin?"
|
974 |
msgstr ""
|
975 |
|
976 |
-
#: ../includes/class-settings.php:
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
#: ../includes/class-settings.php:1009
|
981 |
-
msgid "on WordPress.org"
|
982 |
-
msgstr ""
|
983 |
-
|
984 |
-
#: ../includes/class-settings.php:1010
|
985 |
-
msgid "Blog about it & link to the"
|
986 |
-
msgstr ""
|
987 |
-
|
988 |
-
#: ../includes/class-settings.php:1010
|
989 |
-
msgid "plugin page"
|
990 |
msgstr ""
|
991 |
|
992 |
-
#: ../includes/class-settings.php:
|
993 |
-
|
|
|
|
|
994 |
msgstr ""
|
995 |
|
996 |
-
#: ../includes/class-settings.php:
|
997 |
-
|
|
|
|
|
998 |
msgstr ""
|
999 |
|
1000 |
-
#: ../includes/class-settings.php:
|
1001 |
msgid "Reset to defaults"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
-
#: ../includes/class-settings.php:
|
1005 |
-
msgid "Licenses"
|
1006 |
-
msgstr ""
|
1007 |
-
|
1008 |
-
#: ../includes/class-settings.php:1446
|
1009 |
msgid "Settings restored to defaults."
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: ../includes/class-settings.php:
|
1013 |
msgid "Add-ons / Extensions"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: ../includes/class-settings.php:
|
1017 |
msgid ""
|
1018 |
"Enhance your website with these beautiful, easy to use extensions, designed "
|
1019 |
"with Responsive Lightbox integration in mind."
|
1020 |
msgstr ""
|
1021 |
|
1022 |
-
#: ../includes/class-settings.php:
|
1023 |
msgid ""
|
1024 |
"There was an error retrieving the extensions list from the server. Please "
|
1025 |
"try again later."
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: ../includes/class-settings.php:
|
1029 |
msgid "A list of licenses for your Responsive Lightbox extensions."
|
1030 |
msgstr ""
|
1031 |
|
1032 |
-
#: ../includes/class-settings.php:
|
1033 |
#, php-format
|
1034 |
msgid ""
|
1035 |
"Enter your license key to activate %s extension and enable automatic upgrade "
|
1036 |
"notices."
|
1037 |
msgstr ""
|
1038 |
|
1039 |
-
#: ../includes/class-settings.php:
|
1040 |
-
#: ../includes/class-settings.php:
|
1041 |
msgid "License activation failed."
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: ../includes/class-settings.php:
|
1045 |
msgid "License successfully activated."
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: ../includes/class-settings.php:
|
1049 |
msgid "License successfully deactivated."
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: ../
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1053 |
#, php-format
|
1054 |
msgid ""
|
1055 |
"Thank you for installing Responsive Lightbox version %s. <a href=\"%s"
|
1056 |
"\">Click here</a> to check out our latest extensions!"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
-
#: ../responsive-lightbox.php:
|
1060 |
msgid "Support"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
-
#: ../responsive-lightbox.php:
|
1064 |
msgid "Settings"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
-
#: ../responsive-lightbox.php:
|
1068 |
msgid "Are you sure you want to reset these settings to defaults?"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
-
#: ../responsive-lightbox.php:
|
1072 |
msgid "Are you sure you want to reset this script settings to defaults?"
|
1073 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Responsive Lightbox\n"
|
5 |
+
"POT-Creation-Date: 2017-05-15 16:13+0200\n"
|
6 |
"PO-Revision-Date: 2015-05-12 12:06+0100\n"
|
7 |
"Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
|
8 |
"Language-Team: dFactory <info@dfactory.eu>\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 1.8.12\n"
|
14 |
"X-Poedit-KeywordsList: gettext;gettext_noop;__;_e\n"
|
15 |
"X-Poedit-Basepath: .\n"
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"X-Poedit-SearchPath-0: ..\n"
|
18 |
|
19 |
+
#: ../includes/class-settings.php:42
|
20 |
+
msgid "SwipeBox"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: ../includes/class-settings.php:44
|
24 |
+
msgid "CSS"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: ../includes/class-settings.php:45
|
28 |
+
msgid "jQuery"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: ../includes/class-settings.php:49
|
32 |
msgid "prettyPhoto"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../includes/class-settings.php:51
|
36 |
msgid "slow"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../includes/class-settings.php:52
|
40 |
msgid "normal"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: ../includes/class-settings.php:53
|
44 |
msgid "fast"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: ../includes/class-settings.php:56
|
48 |
msgid "default"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: ../includes/class-settings.php:57
|
52 |
msgid "light rounded"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: ../includes/class-settings.php:58
|
56 |
msgid "dark rounded"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: ../includes/class-settings.php:59
|
60 |
msgid "light square"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: ../includes/class-settings.php:60
|
64 |
msgid "dark square"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: ../includes/class-settings.php:61
|
68 |
msgid "facebook"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: ../includes/class-settings.php:64
|
72 |
msgid "window"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: ../includes/class-settings.php:65
|
76 |
msgid "transparent"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: ../includes/class-settings.php:66
|
80 |
msgid "opaque"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: ../includes/class-settings.php:67
|
84 |
msgid "direct"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: ../includes/class-settings.php:68
|
88 |
msgid "gpu"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: ../includes/class-settings.php:72
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
msgid "FancyBox"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: ../includes/class-settings.php:74
|
96 |
msgid "elastic"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: ../includes/class-settings.php:75 ../includes/class-settings.php:96
|
100 |
+
#: ../includes/class-settings.php:918
|
101 |
msgid "fade"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: ../includes/class-settings.php:76
|
105 |
msgid "none"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: ../includes/class-settings.php:79
|
109 |
msgid "auto"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: ../includes/class-settings.php:80
|
113 |
msgid "yes"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: ../includes/class-settings.php:81
|
117 |
msgid "no"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: ../includes/class-settings.php:84
|
121 |
msgid "swing"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: ../includes/class-settings.php:85
|
125 |
msgid "linear"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: ../includes/class-settings.php:88
|
129 |
msgid "outside"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: ../includes/class-settings.php:89
|
133 |
msgid "inside"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: ../includes/class-settings.php:90
|
137 |
msgid "over"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: ../includes/class-settings.php:94
|
141 |
msgid "Nivo Lightbox"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: ../includes/class-settings.php:97
|
145 |
msgid "fade scale"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: ../includes/class-settings.php:98
|
149 |
msgid "slide left"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: ../includes/class-settings.php:99
|
153 |
msgid "slide right"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: ../includes/class-settings.php:100
|
157 |
msgid "slide up"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: ../includes/class-settings.php:101
|
161 |
msgid "slide down"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: ../includes/class-settings.php:102
|
165 |
msgid "fall"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: ../includes/class-settings.php:106
|
169 |
msgid "Image Lightbox"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: ../includes/class-settings.php:109
|
173 |
msgid "TosRUs"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: ../includes/class-settings.php:112
|
177 |
msgid "Featherlight"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: ../includes/class-settings.php:117
|
181 |
msgid "None (default)"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: ../includes/class-settings.php:118
|
185 |
msgid "Image Title"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: ../includes/class-settings.php:119
|
189 |
msgid "Image Caption"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: ../includes/class-settings.php:120
|
193 |
msgid "Image Alt Text"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: ../includes/class-settings.php:121
|
197 |
msgid "Image Description"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: ../includes/class-settings.php:125
|
201 |
msgid "Header"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: ../includes/class-settings.php:126
|
205 |
msgid "Footer"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: ../includes/class-settings.php:136
|
209 |
msgid "Thumbnail"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: ../includes/class-settings.php:137
|
213 |
msgid "Medium"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: ../includes/class-settings.php:138
|
217 |
msgid "Large"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: ../includes/class-settings.php:139
|
221 |
msgid "Full Size (default)"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: ../includes/class-settings.php:149
|
225 |
msgid "General settings"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: ../includes/class-settings.php:158
|
229 |
+
msgid "Default lightbox"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: ../includes/class-settings.php:164
|
233 |
#, php-format
|
234 |
msgid ""
|
235 |
"Select your preffered ligthbox effect script or get our <a href=\"%s"
|
236 |
"\">premium extensions</a>."
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: ../includes/class-settings.php:171
|
240 |
msgid "Selector"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: ../includes/class-settings.php:174
|
244 |
msgid "Enter the rel selector lightbox effect will be applied to."
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: ../includes/class-settings.php:177
|
248 |
+
msgid "Images"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: ../includes/class-settings.php:180
|
252 |
+
msgid "Enable lightbox for WordPress image links."
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: ../includes/class-settings.php:183
|
256 |
msgid "Single image title"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: ../includes/class-settings.php:186
|
260 |
msgid "Select title for single images."
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: ../includes/class-settings.php:190
|
264 |
msgid "Single images as gallery"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: ../includes/class-settings.php:193
|
268 |
msgid "Display single post images as a gallery."
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: ../includes/class-settings.php:196
|
272 |
msgid "Galleries"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: ../includes/class-settings.php:199
|
276 |
+
msgid "Enable lightbox foor WordPress image galleries."
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: ../includes/class-settings.php:202
|
280 |
msgid "Gallery image size"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: ../includes/class-settings.php:205
|
284 |
msgid "Select image size for gallery image links."
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: ../includes/class-settings.php:209
|
288 |
msgid "Gallery image title"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: ../includes/class-settings.php:212
|
292 |
msgid "Select title for images in native WordPress galleries."
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: ../includes/class-settings.php:216
|
296 |
+
msgid "Videos"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: ../includes/class-settings.php:219
|
300 |
+
msgid "Enable lightbox for YouTube and Vimeo video links."
|
|
|
|
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: ../includes/class-settings.php:222
|
304 |
+
msgid "Widgets"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: ../includes/class-settings.php:225
|
308 |
+
msgid "Enable lightbox for widgets content."
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: ../includes/class-settings.php:228
|
312 |
+
msgid "Comments"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: ../includes/class-settings.php:231
|
316 |
+
msgid "Enable lightbox for comments content."
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: ../includes/class-settings.php:234
|
320 |
+
msgid "Force lightbox"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: ../includes/class-settings.php:237
|
324 |
+
msgid ""
|
325 |
+
"Try to force lightbox for custom WP gallery replacements, like Jetpack or "
|
326 |
+
"Visual Composer galleries."
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: ../includes/class-settings.php:240
|
330 |
+
msgid "WooCommerce lightbox"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: ../includes/class-settings.php:243
|
334 |
+
msgid "Replace WooCommerce product gallery lightbox."
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: ../includes/class-settings.php:247
|
338 |
msgid "Custom events"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: ../includes/class-settings.php:253
|
342 |
msgid "Enable triggering lightbox on custom jQuery events."
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: ../includes/class-settings.php:257
|
346 |
msgid "Enter a space separated list of events."
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: ../includes/class-settings.php:262
|
350 |
msgid "Loading place"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: ../includes/class-settings.php:265
|
354 |
msgid "Select where all the lightbox scripts should be placed."
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: ../includes/class-settings.php:269
|
358 |
msgid "Conditional loading"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: ../includes/class-settings.php:272
|
362 |
msgid ""
|
363 |
"Enable to load scripts and styles only on pages that have images or "
|
364 |
"galleries in post content."
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: ../includes/class-settings.php:275
|
368 |
msgid "Delete data"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: ../includes/class-settings.php:278
|
372 |
msgid "Delete all plugin settings on deactivation."
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: ../includes/class-settings.php:288 ../includes/class-settings.php:388
|
376 |
+
#, php-format
|
377 |
+
msgid "%s settings"
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: ../includes/class-settings.php:301
|
381 |
+
msgid "General"
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: ../includes/class-settings.php:307
|
385 |
+
msgid "Lightbox"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: ../includes/class-settings.php:360 ../includes/class-widgets.php:45
|
389 |
+
#: ../includes/class-widgets.php:53
|
390 |
+
msgid "Gallery"
|
391 |
+
msgstr ""
|
392 |
+
|
393 |
+
#: ../includes/class-settings.php:374 ../includes/class-settings.php:1262
|
394 |
+
msgid "Licenses"
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: ../includes/class-settings.php:382
|
398 |
+
msgid "Add-ons"
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: ../includes/class-settings.php:398
|
402 |
msgid "Animation type"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: ../includes/class-settings.php:402
|
406 |
msgid "Select a method of applying a lightbox effect."
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: ../includes/class-settings.php:407
|
410 |
msgid "Force PNG icons"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: ../includes/class-settings.php:410
|
414 |
msgid ""
|
415 |
"Enable this if you're having problems with navigation icons not visible on "
|
416 |
"some devices."
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: ../includes/class-settings.php:414
|
420 |
msgid "Hide close on mobile"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: ../includes/class-settings.php:417
|
424 |
msgid "Hide the close button on mobile devices."
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: ../includes/class-settings.php:421
|
428 |
msgid "Remove bars on mobile"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: ../includes/class-settings.php:424
|
432 |
msgid "Hide the top and bottom bars on mobile devices."
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: ../includes/class-settings.php:428
|
436 |
msgid "Top and bottom bars"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: ../includes/class-settings.php:434
|
440 |
msgid "Hide top and bottom bars after a period of time."
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: ../includes/class-settings.php:439
|
444 |
msgid ""
|
445 |
"Enter the time after which the top and bottom bars will be hidden (when "
|
446 |
"hiding is enabled)."
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: ../includes/class-settings.php:446
|
450 |
msgid "Video max width"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: ../includes/class-settings.php:449
|
454 |
msgid "Enter the max video width in a lightbox."
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: ../includes/class-settings.php:454
|
458 |
msgid "Loop at end"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: ../includes/class-settings.php:457
|
462 |
msgid "True will return to the first image after the last image is reached."
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: ../includes/class-settings.php:469 ../includes/class-settings.php:861
|
466 |
msgid "Animation speed"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: ../includes/class-settings.php:473
|
470 |
msgid "Select animation speed for lightbox effect."
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: ../includes/class-settings.php:478
|
474 |
msgid "Slideshow"
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: ../includes/class-settings.php:484
|
478 |
msgid "Display images as slideshow"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: ../includes/class-settings.php:489
|
482 |
msgid "Enter time (in miliseconds)."
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: ../includes/class-settings.php:496
|
486 |
msgid "Slideshow autoplay"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: ../includes/class-settings.php:499 ../includes/class-settings.php:943
|
490 |
msgid "Automatically start slideshow."
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: ../includes/class-settings.php:503 ../includes/class-settings.php:705
|
494 |
msgid "Opacity"
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: ../includes/class-settings.php:506
|
498 |
msgid "Value between 0 and 100, 100 for no opacity."
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: ../includes/class-settings.php:512
|
502 |
msgid "Show title"
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: ../includes/class-settings.php:515
|
506 |
msgid "Display image title."
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: ../includes/class-settings.php:519
|
510 |
msgid "Allow resize big images"
|
511 |
msgstr ""
|
512 |
|
513 |
+
#: ../includes/class-settings.php:522
|
514 |
msgid "Resize the photos bigger than viewport."
|
515 |
msgstr ""
|
516 |
|
517 |
+
#: ../includes/class-settings.php:526
|
518 |
msgid "Allow expand"
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: ../includes/class-settings.php:529
|
522 |
msgid "Allow expanding images."
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: ../includes/class-settings.php:533 ../includes/class-settings.php:799
|
526 |
msgid "Video width"
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: ../includes/class-settings.php:540 ../includes/class-settings.php:807
|
530 |
msgid "Video height"
|
531 |
msgstr ""
|
532 |
|
533 |
+
#: ../includes/class-settings.php:547
|
534 |
msgid "Theme"
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: ../includes/class-settings.php:550
|
538 |
msgid "Select the theme for lightbox effect."
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: ../includes/class-settings.php:555
|
542 |
msgid "Horizontal padding"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: ../includes/class-settings.php:562
|
546 |
msgid "Hide Flash"
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: ../includes/class-settings.php:565
|
550 |
msgid ""
|
551 |
"Hide all the flash objects on a page. Enable this if flash appears over "
|
552 |
"prettyPhoto."
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: ../includes/class-settings.php:569
|
556 |
msgid "Flash Window Mode (wmode)"
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: ../includes/class-settings.php:572
|
560 |
msgid "Select flash window mode."
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: ../includes/class-settings.php:577
|
564 |
msgid "Video autoplay"
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: ../includes/class-settings.php:580
|
568 |
msgid "Automatically start videos."
|
569 |
msgstr ""
|
570 |
|
571 |
+
#: ../includes/class-settings.php:584 ../includes/class-settings.php:627
|
572 |
msgid "Modal"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: ../includes/class-settings.php:587
|
576 |
msgid "If set to true, only the close button will close the window."
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: ../includes/class-settings.php:591
|
580 |
msgid "Deeplinking"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: ../includes/class-settings.php:594
|
584 |
msgid "Allow prettyPhoto to update the url to enable deeplinking."
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: ../includes/class-settings.php:598
|
588 |
msgid "Overlay gallery"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: ../includes/class-settings.php:601
|
592 |
msgid "If enabled, a gallery will overlay the fullscreen image on mouse over."
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: ../includes/class-settings.php:605
|
596 |
msgid "Keyboard shortcuts"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: ../includes/class-settings.php:608
|
600 |
msgid "Set to false if you open forms inside prettyPhoto."
|
601 |
msgstr ""
|
602 |
|
603 |
+
#: ../includes/class-settings.php:612
|
604 |
msgid "Social (Twitter, Facebook)"
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: ../includes/class-settings.php:615
|
608 |
msgid "Display links to Facebook and Twitter."
|
609 |
msgstr ""
|
610 |
|
611 |
+
#: ../includes/class-settings.php:630
|
612 |
msgid ""
|
613 |
"When true, \"overlayShow\" is set to true and \"hideOnOverlayClick\", "
|
614 |
"\"hideOnContentClick\", \"enableEscapeButton\", \"showCloseButton\" are set "
|
615 |
"to false."
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: ../includes/class-settings.php:634
|
619 |
msgid "Show overlay"
|
620 |
msgstr ""
|
621 |
|
622 |
+
#: ../includes/class-settings.php:637
|
623 |
msgid "Toggle overlay."
|
624 |
msgstr ""
|
625 |
|
626 |
+
#: ../includes/class-settings.php:641
|
627 |
msgid "Show close button"
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: ../includes/class-settings.php:644
|
631 |
msgid "Toggle close button."
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: ../includes/class-settings.php:648
|
635 |
msgid "Enable escape button"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: ../includes/class-settings.php:651 ../includes/class-settings.php:1022
|
639 |
msgid "Toggle if pressing Esc button closes lightbox."
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: ../includes/class-settings.php:655
|
643 |
msgid "Hide on overlay click"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: ../includes/class-settings.php:658
|
647 |
msgid "Toggle if clicking the overlay should close FancyBox."
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: ../includes/class-settings.php:662
|
651 |
msgid "Hide on content click"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: ../includes/class-settings.php:665
|
655 |
msgid "Toggle if clicking the content should close FancyBox."
|
656 |
msgstr ""
|
657 |
|
658 |
+
#: ../includes/class-settings.php:669
|
659 |
msgid "Cyclic"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: ../includes/class-settings.php:672
|
663 |
msgid ""
|
664 |
"When true, galleries will be cyclic, allowing you to keep pressing next/back."
|
665 |
msgstr ""
|
666 |
|
667 |
+
#: ../includes/class-settings.php:676
|
668 |
msgid "Show nav arrows"
|
669 |
msgstr ""
|
670 |
|
671 |
+
#: ../includes/class-settings.php:679
|
672 |
msgid "Toggle navigation arrows."
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: ../includes/class-settings.php:683
|
676 |
msgid "Auto scale"
|
677 |
msgstr ""
|
678 |
|
679 |
+
#: ../includes/class-settings.php:686
|
680 |
msgid "If true, FancyBox is scaled to fit in viewport."
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: ../includes/class-settings.php:690
|
684 |
msgid "Scrolling (in/out)"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: ../includes/class-settings.php:693
|
688 |
msgid "Set the overflow CSS property to create or hide scrollbars."
|
689 |
msgstr ""
|
690 |
|
691 |
+
#: ../includes/class-settings.php:698
|
692 |
msgid "Center on scroll"
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: ../includes/class-settings.php:701
|
696 |
msgid "When true, FancyBox is centered while scrolling page."
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: ../includes/class-settings.php:708
|
700 |
msgid "When true, transparency of content is changed for elastic transitions."
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: ../includes/class-settings.php:712
|
704 |
msgid "Overlay opacity"
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: ../includes/class-settings.php:715
|
708 |
msgid "Opacity of the overlay."
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: ../includes/class-settings.php:721
|
712 |
msgid "Overlay color"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: ../includes/class-settings.php:724
|
716 |
msgid "Color of the overlay."
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: ../includes/class-settings.php:728
|
720 |
msgid "Title show"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: ../includes/class-settings.php:731
|
724 |
msgid "Toggle title."
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: ../includes/class-settings.php:735
|
728 |
msgid "Title position"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: ../includes/class-settings.php:738
|
732 |
msgid "The position of title."
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: ../includes/class-settings.php:743
|
736 |
msgid "Transition (in/out)"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: ../includes/class-settings.php:746
|
740 |
msgid "The transition type."
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: ../includes/class-settings.php:751
|
744 |
msgid "Easings (in/out)"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: ../includes/class-settings.php:754
|
748 |
msgid "Easing used for elastic animations."
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: ../includes/class-settings.php:759
|
752 |
msgid "Speed (in/out)"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: ../includes/class-settings.php:762
|
756 |
msgid "Speed of the fade and elastic transitions, in milliseconds."
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: ../includes/class-settings.php:767
|
760 |
msgid "Change speed"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: ../includes/class-settings.php:770
|
764 |
msgid "Speed of resizing when changing gallery items, in milliseconds."
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: ../includes/class-settings.php:775
|
768 |
msgid "Change fade"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: ../includes/class-settings.php:778
|
772 |
msgid "Speed of the content fading while changing gallery items."
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: ../includes/class-settings.php:783
|
776 |
msgid "Padding"
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: ../includes/class-settings.php:786
|
780 |
msgid "Space between FancyBox wrapper and content."
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: ../includes/class-settings.php:791
|
784 |
msgid "Margin"
|
785 |
msgstr ""
|
786 |
|
787 |
+
#: ../includes/class-settings.php:794
|
788 |
msgid "Space between viewport and FancyBox wrapper."
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: ../includes/class-settings.php:802
|
792 |
msgid "Width of the video."
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: ../includes/class-settings.php:810
|
796 |
msgid "Height of the video."
|
797 |
msgstr ""
|
798 |
|
799 |
+
#: ../includes/class-settings.php:823
|
800 |
msgid "Effect"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: ../includes/class-settings.php:826
|
804 |
msgid "The effect to use when showing the lightbox."
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: ../includes/class-settings.php:831 ../includes/class-settings.php:930
|
808 |
msgid "Keyboard navigation"
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: ../includes/class-settings.php:834 ../includes/class-settings.php:933
|
812 |
msgid "Enable keyboard navigation (left/right/escape)."
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: ../includes/class-settings.php:838
|
816 |
msgid "Click overlay to close"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: ../includes/class-settings.php:841
|
820 |
msgid "Enable to close lightbox on overlay click."
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: ../includes/class-settings.php:845
|
824 |
msgid "Error message"
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: ../includes/class-settings.php:849
|
828 |
msgid "Error message if the content cannot be loaded."
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: ../includes/class-settings.php:864
|
832 |
msgid "Animation speed."
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: ../includes/class-settings.php:869
|
836 |
msgid "Preload next image"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: ../includes/class-settings.php:872
|
840 |
msgid "Silently preload the next image."
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: ../includes/class-settings.php:876
|
844 |
msgid "Enable keyboard keys"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: ../includes/class-settings.php:879
|
848 |
msgid "Enable keyboard shortcuts (arrows Left/Right and Esc)."
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: ../includes/class-settings.php:883
|
852 |
msgid "Quit after last image"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#: ../includes/class-settings.php:886
|
856 |
msgid "Quit after viewing the last image."
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: ../includes/class-settings.php:890
|
860 |
msgid "Quit on image click"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: ../includes/class-settings.php:893
|
864 |
msgid "Quit when the viewed image is clicked."
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: ../includes/class-settings.php:897
|
868 |
msgid "Quit on anything click"
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: ../includes/class-settings.php:900
|
872 |
msgid "Quit when anything but the viewed image is clicked."
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: ../includes/class-settings.php:912
|
876 |
msgid "Transition effect"
|
877 |
msgstr ""
|
878 |
|
879 |
+
#: ../includes/class-settings.php:915
|
880 |
msgid "What effect to use for the transition."
|
881 |
msgstr ""
|
882 |
|
883 |
+
#: ../includes/class-settings.php:917
|
884 |
msgid "slide"
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: ../includes/class-settings.php:923
|
888 |
msgid "Infinite loop"
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: ../includes/class-settings.php:926
|
892 |
msgid ""
|
893 |
"Whether or not to slide back to the first slide when the last has been "
|
894 |
"reached."
|
895 |
msgstr ""
|
896 |
|
897 |
+
#: ../includes/class-settings.php:937
|
898 |
msgid "Autoplay"
|
899 |
msgstr ""
|
900 |
|
901 |
+
#: ../includes/class-settings.php:948
|
902 |
msgid "The timeout between sliding to the next slide in milliseconds."
|
903 |
msgstr ""
|
904 |
|
905 |
+
#: ../includes/class-settings.php:955
|
906 |
msgid "Pause on hover"
|
907 |
msgstr ""
|
908 |
|
909 |
+
#: ../includes/class-settings.php:958
|
910 |
msgid "Whether or not to pause on hover."
|
911 |
msgstr ""
|
912 |
|
913 |
+
#: ../includes/class-settings.php:962
|
914 |
msgid "Pagination"
|
915 |
msgstr ""
|
916 |
|
917 |
+
#: ../includes/class-settings.php:968
|
918 |
msgid "Whether or not to add a pagination."
|
919 |
msgstr ""
|
920 |
|
921 |
+
#: ../includes/class-settings.php:973
|
922 |
msgid "What type of pagination to use."
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: ../includes/class-settings.php:975
|
926 |
msgid "Bullets"
|
927 |
msgstr ""
|
928 |
|
929 |
+
#: ../includes/class-settings.php:976
|
930 |
msgid "Thumbnails"
|
931 |
msgstr ""
|
932 |
|
933 |
+
#: ../includes/class-settings.php:991
|
934 |
msgid "Opening speed"
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: ../includes/class-settings.php:994
|
938 |
msgid "Duration of opening animation."
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: ../includes/class-settings.php:999
|
942 |
msgid "Closing speed"
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: ../includes/class-settings.php:1002
|
946 |
msgid "Duration of closing animation."
|
947 |
msgstr ""
|
948 |
|
949 |
+
#: ../includes/class-settings.php:1007
|
950 |
msgid "Close on click"
|
951 |
msgstr ""
|
952 |
|
953 |
+
#: ../includes/class-settings.php:1010
|
954 |
msgid "Select how to close lightbox."
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: ../includes/class-settings.php:1012
|
958 |
msgid "background"
|
959 |
msgstr ""
|
960 |
|
961 |
+
#: ../includes/class-settings.php:1013
|
962 |
msgid "anywhere"
|
963 |
msgstr ""
|
964 |
|
965 |
+
#: ../includes/class-settings.php:1014
|
966 |
msgid "false"
|
967 |
msgstr ""
|
968 |
|
969 |
+
#: ../includes/class-settings.php:1019
|
970 |
msgid "Close on Esc"
|
971 |
msgstr ""
|
972 |
|
973 |
+
#: ../includes/class-settings.php:1026
|
974 |
msgid "Gallery fade in"
|
975 |
msgstr ""
|
976 |
|
977 |
+
#: ../includes/class-settings.php:1029
|
978 |
msgid "Animation speed when image is loaded."
|
979 |
msgstr ""
|
980 |
|
981 |
+
#: ../includes/class-settings.php:1034
|
982 |
msgid "Gallery fade out"
|
983 |
msgstr ""
|
984 |
|
985 |
+
#: ../includes/class-settings.php:1037
|
986 |
msgid "Animation speed before image is loaded."
|
987 |
msgstr ""
|
988 |
|
989 |
+
#: ../includes/class-settings.php:1066 ../includes/class-settings.php:1081
|
990 |
+
#: ../includes/class-settings.php:1094
|
|
|
|
|
|
|
|
|
991 |
msgid "Responsive Lightbox"
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: ../includes/class-settings.php:1096
|
995 |
msgid "Need support?"
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: ../includes/class-settings.php:1097
|
999 |
#, php-format
|
1000 |
msgid ""
|
1001 |
"If you are having problems with this plugin, please browse it's <a href=\"%s"
|
1003 |
"\" target=\"_blank\">Support forum</a>"
|
1004 |
msgstr ""
|
1005 |
|
1006 |
+
#: ../includes/class-settings.php:1099
|
1007 |
msgid "Do you like this plugin?"
|
1008 |
msgstr ""
|
1009 |
|
1010 |
+
#: ../includes/class-settings.php:1100
|
1011 |
+
#, php-format
|
1012 |
+
msgid "<a href=\"%s\" target=\"_blank\">Rate it 5</a> on WordPress.org"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1013 |
msgstr ""
|
1014 |
|
1015 |
+
#: ../includes/class-settings.php:1101
|
1016 |
+
#, php-format
|
1017 |
+
msgid ""
|
1018 |
+
"Blog about it & link to the <a href=\"%s\" target=\"_blank\">plugin page</a>."
|
1019 |
msgstr ""
|
1020 |
|
1021 |
+
#: ../includes/class-settings.php:1102
|
1022 |
+
#, php-format
|
1023 |
+
msgid ""
|
1024 |
+
"Check out our other <a href=\"%s\" target=\"_blank\">WordPress plugins</a>."
|
1025 |
msgstr ""
|
1026 |
|
1027 |
+
#: ../includes/class-settings.php:1144
|
1028 |
msgid "Reset to defaults"
|
1029 |
msgstr ""
|
1030 |
|
1031 |
+
#: ../includes/class-settings.php:1532
|
|
|
|
|
|
|
|
|
1032 |
msgid "Settings restored to defaults."
|
1033 |
msgstr ""
|
1034 |
|
1035 |
+
#: ../includes/class-settings.php:1545
|
1036 |
msgid "Add-ons / Extensions"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
+
#: ../includes/class-settings.php:1546
|
1040 |
msgid ""
|
1041 |
"Enhance your website with these beautiful, easy to use extensions, designed "
|
1042 |
"with Responsive Lightbox integration in mind."
|
1043 |
msgstr ""
|
1044 |
|
1045 |
+
#: ../includes/class-settings.php:1560
|
1046 |
msgid ""
|
1047 |
"There was an error retrieving the extensions list from the server. Please "
|
1048 |
"try again later."
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: ../includes/class-settings.php:1573
|
1052 |
msgid "A list of licenses for your Responsive Lightbox extensions."
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: ../includes/class-settings.php:1589
|
1056 |
#, php-format
|
1057 |
msgid ""
|
1058 |
"Enter your license key to activate %s extension and enable automatic upgrade "
|
1059 |
"notices."
|
1060 |
msgstr ""
|
1061 |
|
1062 |
+
#: ../includes/class-settings.php:1645 ../includes/class-settings.php:1658
|
1063 |
+
#: ../includes/class-settings.php:1683 ../includes/class-settings.php:1694
|
1064 |
msgid "License activation failed."
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: ../includes/class-settings.php:1655
|
1068 |
msgid "License successfully activated."
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: ../includes/class-settings.php:1692
|
1072 |
msgid "License successfully deactivated."
|
1073 |
msgstr ""
|
1074 |
|
1075 |
+
#: ../includes/class-widgets.php:47
|
1076 |
+
msgid "Displays an image gallery."
|
1077 |
+
msgstr ""
|
1078 |
+
|
1079 |
+
#: ../includes/class-widgets.php:64
|
1080 |
+
msgid "Menu order"
|
1081 |
+
msgstr ""
|
1082 |
+
|
1083 |
+
#: ../includes/class-widgets.php:65 ../includes/class-widgets.php:121
|
1084 |
+
#: ../includes/class-widgets.php:445
|
1085 |
+
msgid "Title"
|
1086 |
+
msgstr ""
|
1087 |
+
|
1088 |
+
#: ../includes/class-widgets.php:66
|
1089 |
+
msgid "Image date"
|
1090 |
+
msgstr ""
|
1091 |
+
|
1092 |
+
#: ../includes/class-widgets.php:67
|
1093 |
+
msgid "ID"
|
1094 |
+
msgstr ""
|
1095 |
+
|
1096 |
+
#: ../includes/class-widgets.php:68
|
1097 |
+
msgid "Random"
|
1098 |
+
msgstr ""
|
1099 |
+
|
1100 |
+
#: ../includes/class-widgets.php:72
|
1101 |
+
msgid "Ascending"
|
1102 |
+
msgstr ""
|
1103 |
+
|
1104 |
+
#: ../includes/class-widgets.php:73
|
1105 |
+
msgid "Descending"
|
1106 |
+
msgstr ""
|
1107 |
+
|
1108 |
+
#: ../includes/class-widgets.php:81 ../includes/class-widgets.php:328
|
1109 |
+
#: ../includes/class-widgets.php:335
|
1110 |
+
msgid "None"
|
1111 |
+
msgstr ""
|
1112 |
+
|
1113 |
+
#: ../includes/class-widgets.php:82
|
1114 |
+
msgid "Default"
|
1115 |
+
msgstr ""
|
1116 |
+
|
1117 |
+
#: ../includes/class-widgets.php:128 ../responsive-lightbox.php:472
|
1118 |
+
msgid "Select images"
|
1119 |
+
msgstr ""
|
1120 |
+
|
1121 |
+
#: ../includes/class-widgets.php:140
|
1122 |
+
msgid "Delete image"
|
1123 |
+
msgstr ""
|
1124 |
+
|
1125 |
+
#: ../includes/class-widgets.php:153
|
1126 |
+
msgid "Gallery type"
|
1127 |
+
msgstr ""
|
1128 |
+
|
1129 |
+
#: ../includes/class-widgets.php:168
|
1130 |
+
msgid "Order by"
|
1131 |
+
msgstr ""
|
1132 |
+
|
1133 |
+
#: ../includes/class-widgets.php:180
|
1134 |
+
msgid "Order"
|
1135 |
+
msgstr ""
|
1136 |
+
|
1137 |
+
#: ../includes/class-widgets.php:192
|
1138 |
+
msgid "Image size"
|
1139 |
+
msgstr ""
|
1140 |
+
|
1141 |
+
#: ../includes/class-widgets.php:204
|
1142 |
+
msgid "Number of columns"
|
1143 |
+
msgstr ""
|
1144 |
+
|
1145 |
+
#: ../includes/class-widgets.php:208
|
1146 |
+
msgid "Custom attributes"
|
1147 |
+
msgstr ""
|
1148 |
+
|
1149 |
+
#: ../includes/class-widgets.php:210
|
1150 |
+
msgid "Custom gallery shortcode attributes (optional)."
|
1151 |
+
msgstr ""
|
1152 |
+
|
1153 |
+
#: ../includes/class-widgets.php:301 ../includes/class-widgets.php:309
|
1154 |
+
msgid "Image"
|
1155 |
+
msgstr ""
|
1156 |
+
|
1157 |
+
#: ../includes/class-widgets.php:303
|
1158 |
+
msgid "Displays a single image."
|
1159 |
+
msgstr ""
|
1160 |
+
|
1161 |
+
#: ../includes/class-widgets.php:323
|
1162 |
+
msgid "Below the image"
|
1163 |
+
msgstr ""
|
1164 |
+
|
1165 |
+
#: ../includes/class-widgets.php:324
|
1166 |
+
msgid "Above the image"
|
1167 |
+
msgstr ""
|
1168 |
+
|
1169 |
+
#: ../includes/class-widgets.php:329
|
1170 |
+
msgid "Media File"
|
1171 |
+
msgstr ""
|
1172 |
+
|
1173 |
+
#: ../includes/class-widgets.php:330
|
1174 |
+
msgid "Attachment Page"
|
1175 |
+
msgstr ""
|
1176 |
+
|
1177 |
+
#: ../includes/class-widgets.php:331
|
1178 |
+
msgid "Custom URL"
|
1179 |
+
msgstr ""
|
1180 |
+
|
1181 |
+
#: ../includes/class-widgets.php:336
|
1182 |
+
msgid "Left"
|
1183 |
+
msgstr ""
|
1184 |
+
|
1185 |
+
#: ../includes/class-widgets.php:337
|
1186 |
+
msgid "Center"
|
1187 |
+
msgstr ""
|
1188 |
+
|
1189 |
+
#: ../includes/class-widgets.php:338
|
1190 |
+
msgid "Right"
|
1191 |
+
msgstr ""
|
1192 |
+
|
1193 |
+
#: ../includes/class-widgets.php:339
|
1194 |
+
msgid "Justify"
|
1195 |
+
msgstr ""
|
1196 |
+
|
1197 |
+
#: ../includes/class-widgets.php:450 ../responsive-lightbox.php:473
|
1198 |
+
msgid "Select image"
|
1199 |
+
msgstr ""
|
1200 |
+
|
1201 |
+
#: ../includes/class-widgets.php:459
|
1202 |
+
msgid "Force responsive"
|
1203 |
+
msgstr ""
|
1204 |
+
|
1205 |
+
#: ../includes/class-widgets.php:464
|
1206 |
+
msgid "Size"
|
1207 |
+
msgstr ""
|
1208 |
+
|
1209 |
+
#: ../includes/class-widgets.php:478
|
1210 |
+
msgid "Link to"
|
1211 |
+
msgstr ""
|
1212 |
+
|
1213 |
+
#: ../includes/class-widgets.php:492
|
1214 |
+
msgid "URL"
|
1215 |
+
msgstr ""
|
1216 |
+
|
1217 |
+
#: ../includes/class-widgets.php:498
|
1218 |
+
msgid "Image align"
|
1219 |
+
msgstr ""
|
1220 |
+
|
1221 |
+
#: ../includes/class-widgets.php:511
|
1222 |
+
msgid "Text"
|
1223 |
+
msgstr ""
|
1224 |
+
|
1225 |
+
#: ../includes/class-widgets.php:515
|
1226 |
+
msgid "Automatically add paragraphs"
|
1227 |
+
msgstr ""
|
1228 |
+
|
1229 |
+
#: ../includes/class-widgets.php:520
|
1230 |
+
msgid "Text position"
|
1231 |
+
msgstr ""
|
1232 |
+
|
1233 |
+
#: ../includes/class-widgets.php:531
|
1234 |
+
msgid "Text align"
|
1235 |
+
msgstr ""
|
1236 |
+
|
1237 |
+
#: ../responsive-lightbox.php:332
|
1238 |
#, php-format
|
1239 |
msgid ""
|
1240 |
"Thank you for installing Responsive Lightbox version %s. <a href=\"%s"
|
1241 |
"\">Click here</a> to check out our latest extensions!"
|
1242 |
msgstr ""
|
1243 |
|
1244 |
+
#: ../responsive-lightbox.php:404
|
1245 |
msgid "Support"
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: ../responsive-lightbox.php:423
|
1249 |
msgid "Settings"
|
1250 |
msgstr ""
|
1251 |
|
1252 |
+
#: ../responsive-lightbox.php:444
|
1253 |
msgid "Are you sure you want to reset these settings to defaults?"
|
1254 |
msgstr ""
|
1255 |
|
1256 |
+
#: ../responsive-lightbox.php:445
|
1257 |
msgid "Are you sure you want to reset this script settings to defaults?"
|
1258 |
msgstr ""
|
1259 |
+
|
1260 |
+
#: ../responsive-lightbox.php:446
|
1261 |
+
msgid "Are you sure you want to reset this gallery settings to defaults?"
|
1262 |
+
msgstr ""
|
1263 |
+
|
1264 |
+
#: ../responsive-lightbox.php:471
|
1265 |
+
msgid "Remove image"
|
1266 |
+
msgstr ""
|
1267 |
+
|
1268 |
+
#: ../responsive-lightbox.php:474
|
1269 |
+
msgid "Use these images"
|
1270 |
+
msgstr ""
|
1271 |
+
|
1272 |
+
#: ../responsive-lightbox.php:475
|
1273 |
+
msgid "Use this image"
|
1274 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dfactory
|
|
3 |
Donate link: http://www.dfactory.eu/
|
4 |
Tags: gallery, images, lightbox, photos, theme, photo, image, picture, slideshow, modal, overlay, video
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.7.
|
7 |
-
Stable tag: 1.
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
@@ -22,7 +22,12 @@ For more information, check out plugin page at [dFactory](http://www.dfactory.eu
|
|
22 |
* Automatically add lightbox to WordPress image galleries
|
23 |
* Automatically add lightbox to WordPress image links
|
24 |
* Automatically add lightbox to WordPress video links (YouTube, Vimeo)
|
|
|
|
|
25 |
* WooCommerce product gallery support
|
|
|
|
|
|
|
26 |
* Option to display single post images as a gallery
|
27 |
* Option to modify native WP gallery links image size
|
28 |
* Option to set gallery images title from image title, caption, alt or description
|
@@ -38,12 +43,15 @@ For more information, check out plugin page at [dFactory](http://www.dfactory.eu
|
|
38 |
> <strong>Premium Extensions:</strong>
|
39 |
> [Photo & Art bundle](https://www.dfactory.eu/products/photo-art-bundle/)
|
40 |
> [Justified Gallery](https://www.dfactory.eu/products/justified-gallery/)
|
|
|
|
|
41 |
> [Masonry Image Gallery](https://www.dfactory.eu/products/masonry-image-gallery/)
|
42 |
> [Slider Gallery](https://www.dfactory.eu/products/slider-gallery/)
|
43 |
> [Lightcase Lightbox](https://www.dfactory.eu/products/lightcase-lightbox/)
|
44 |
> [PhotoSwipe Lightbox](https://www.dfactory.eu/products/photoswipe-lightbox/)
|
45 |
> [Lightgallery Lightbox](https://www.dfactory.eu/products/lightgallery-lightbox/)
|
46 |
> [Strip Lightbox](https://www.dfactory.eu/products/strip-lightbox/)
|
|
|
47 |
|
48 |
== Installation ==
|
49 |
|
@@ -62,6 +70,20 @@ No questions yet.
|
|
62 |
|
63 |
== Changelog ==
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
= 1.6.12 =
|
66 |
* Fix: WooCommerce single product image lightbox
|
67 |
|
@@ -290,5 +312,10 @@ Initial release
|
|
290 |
|
291 |
== Upgrade Notice ==
|
292 |
|
293 |
-
= 1.
|
294 |
-
*
|
|
|
|
|
|
|
|
|
|
3 |
Donate link: http://www.dfactory.eu/
|
4 |
Tags: gallery, images, lightbox, photos, theme, photo, image, picture, slideshow, modal, overlay, video
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.7.4
|
7 |
+
Stable tag: 1.7.0
|
8 |
License: MIT License
|
9 |
License URI: http://opensource.org/licenses/MIT
|
10 |
|
22 |
* Automatically add lightbox to WordPress image galleries
|
23 |
* Automatically add lightbox to WordPress image links
|
24 |
* Automatically add lightbox to WordPress video links (YouTube, Vimeo)
|
25 |
+
* Automatically add lightbox to widgets content
|
26 |
+
* Automatically add lightbox to WordPress comments content
|
27 |
* WooCommerce product gallery support
|
28 |
+
* Visual Composer compatibility
|
29 |
+
* Gallery widget
|
30 |
+
* Single image widget
|
31 |
* Option to display single post images as a gallery
|
32 |
* Option to modify native WP gallery links image size
|
33 |
* Option to set gallery images title from image title, caption, alt or description
|
43 |
> <strong>Premium Extensions:</strong>
|
44 |
> [Photo & Art bundle](https://www.dfactory.eu/products/photo-art-bundle/)
|
45 |
> [Justified Gallery](https://www.dfactory.eu/products/justified-gallery/)
|
46 |
+
> [Expander Gallery](https://www.dfactory.eu/products/expander-gallery/)
|
47 |
+
> [Hidden Gallery](https://www.dfactory.eu/products/hidden-gallery/)
|
48 |
> [Masonry Image Gallery](https://www.dfactory.eu/products/masonry-image-gallery/)
|
49 |
> [Slider Gallery](https://www.dfactory.eu/products/slider-gallery/)
|
50 |
> [Lightcase Lightbox](https://www.dfactory.eu/products/lightcase-lightbox/)
|
51 |
> [PhotoSwipe Lightbox](https://www.dfactory.eu/products/photoswipe-lightbox/)
|
52 |
> [Lightgallery Lightbox](https://www.dfactory.eu/products/lightgallery-lightbox/)
|
53 |
> [Strip Lightbox](https://www.dfactory.eu/products/strip-lightbox/)
|
54 |
+
> [Fancybox Pro](https://www.dfactory.eu/products/fancybox-pro/)
|
55 |
|
56 |
== Installation ==
|
57 |
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 1.7.0 =
|
74 |
+
* New: Add lightbox to widgets content
|
75 |
+
* New: Add lightbox to WordPress comments
|
76 |
+
* New: Gallery widget
|
77 |
+
* New: Single image widget
|
78 |
+
* New: Visual Composer compatibility
|
79 |
+
* New: WooCommerce 3.0 compatibility
|
80 |
+
* New: [Fancybox Pro](https://www.dfactory.eu/products/fancybox-pro/) premium extension
|
81 |
+
* New: [Expander Gallery](https://www.dfactory.eu/products/expander-gallery/) premium extension
|
82 |
+
* New: [Hidden Gallery](https://www.dfactory.eu/products/hidden-gallery/) premium extension
|
83 |
+
* Tweak: Attachment ID query optimization
|
84 |
+
* Tweak: Revamped lightbox settings screen
|
85 |
+
* Tweak: Improved custom galleries compatibility
|
86 |
+
|
87 |
= 1.6.12 =
|
88 |
* Fix: WooCommerce single product image lightbox
|
89 |
|
312 |
|
313 |
== Upgrade Notice ==
|
314 |
|
315 |
+
= 1.7.0 =
|
316 |
+
* New: Add lightbox to widgets content
|
317 |
+
* New: Add lightbox to WordPress comments
|
318 |
+
* New: Gallery widget
|
319 |
+
* New: Single image widget
|
320 |
+
* New: Visual Composer compatibility
|
321 |
+
* New: WooCommerce 3.0 compatibility
|
responsive-lightbox.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Responsive Lightbox
|
4 |
Description: Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
|
5 |
-
Version: 1.
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
|
@@ -31,12 +31,13 @@ define( 'RESPONSIVE_LIGHTBOX_REL_PATH', dirname( plugin_basename( __FILE__ ) ) .
|
|
31 |
|
32 |
include_once( RESPONSIVE_LIGHTBOX_PATH . 'includes/class-frontend.php' );
|
33 |
include_once( RESPONSIVE_LIGHTBOX_PATH . 'includes/class-settings.php' );
|
|
|
34 |
|
35 |
/**
|
36 |
* Responsive Lightbox class.
|
37 |
*
|
38 |
* @class Responsive_Lightbox
|
39 |
-
* @version 1.
|
40 |
*/
|
41 |
class Responsive_Lightbox {
|
42 |
|
@@ -50,6 +51,8 @@ class Responsive_Lightbox {
|
|
50 |
'force_custom_gallery' => false,
|
51 |
'woocommerce_gallery_lightbox' => false,
|
52 |
'videos' => true,
|
|
|
|
|
53 |
'image_links' => true,
|
54 |
'image_title' => 'default',
|
55 |
'images_as_gallery' => false,
|
@@ -62,6 +65,16 @@ class Responsive_Lightbox {
|
|
62 |
'update_notice' => true
|
63 |
),
|
64 |
'configuration' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
'prettyphoto' => array(
|
66 |
'animation_speed' => 'normal',
|
67 |
'slideshow' => false,
|
@@ -85,16 +98,6 @@ class Responsive_Lightbox {
|
|
85 |
'keyboard_shortcuts' => true,
|
86 |
'social' => false
|
87 |
),
|
88 |
-
'swipebox' => array(
|
89 |
-
'animation' => 'css',
|
90 |
-
'force_png_icons' => false,
|
91 |
-
'hide_close_mobile' => false,
|
92 |
-
'remove_bars_mobile' => false,
|
93 |
-
'hide_bars' => true,
|
94 |
-
'hide_bars_delay' => 5000,
|
95 |
-
'video_max_width' => 1080,
|
96 |
-
'loop_at_end' => false
|
97 |
-
),
|
98 |
'fancybox' => array(
|
99 |
'modal' => false,
|
100 |
'show_overlay' => true,
|
@@ -155,7 +158,7 @@ class Responsive_Lightbox {
|
|
155 |
'gallery_fade_out' => 300
|
156 |
)
|
157 |
),
|
158 |
-
'version' => '1.
|
159 |
);
|
160 |
public $options = array();
|
161 |
private $notices = array();
|
@@ -209,6 +212,7 @@ class Responsive_Lightbox {
|
|
209 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
210 |
add_action( 'wp_enqueue_scripts', array( $this, 'front_scripts_styles' ) );
|
211 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts_styles' ) );
|
|
|
212 |
add_action( 'admin_init', array( $this, 'update_notices' ) );
|
213 |
add_action( 'admin_print_scripts', array( $this, 'admin_inline_js' ), 999 );
|
214 |
|
@@ -296,7 +300,7 @@ class Responsive_Lightbox {
|
|
296 |
* Load textdomain
|
297 |
*/
|
298 |
public function load_textdomain() {
|
299 |
-
load_plugin_textdomain( 'responsive-lightbox', false, dirname( plugin_basename( __FILE__ ) ) . '/languages
|
300 |
}
|
301 |
|
302 |
/**
|
@@ -428,16 +432,18 @@ class Responsive_Lightbox {
|
|
428 |
*/
|
429 |
public function admin_scripts_styles( $page ) {
|
430 |
if ( $page === 'settings_page_responsive-lightbox' ) {
|
431 |
-
|
432 |
wp_register_script(
|
433 |
'responsive-lightbox-admin', plugins_url( 'js/admin.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), $this->defaults['version']
|
434 |
);
|
435 |
wp_enqueue_script( 'responsive-lightbox-admin' );
|
436 |
|
437 |
wp_localize_script(
|
438 |
-
'responsive-lightbox-admin',
|
439 |
-
'
|
440 |
-
|
|
|
|
|
|
|
441 |
)
|
442 |
);
|
443 |
|
@@ -450,6 +456,32 @@ class Responsive_Lightbox {
|
|
450 |
}
|
451 |
}
|
452 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
/**
|
454 |
* Enqueue frontend scripts and styles
|
455 |
*/
|
@@ -735,9 +767,31 @@ class Responsive_Lightbox {
|
|
735 |
if ( ! empty( $args['script'] ) && ! empty( $args['selector'] ) && apply_filters( 'rl_lightbox_conditional_loading', $contitional_scripts ) != false ) {
|
736 |
|
737 |
wp_register_script( 'responsive-lightbox', plugins_url( 'js/front.js', __FILE__ ), array( 'jquery' ), $this->defaults['version'], ( $this->options['settings']['loading_place'] === 'header' ? false : true ) );
|
738 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
739 |
$scripts[] = 'responsive-lightbox';
|
740 |
-
|
741 |
// enqueue scripts
|
742 |
if ( $scripts && is_array( $scripts ) ) {
|
743 |
foreach ( $scripts as $script ) {
|
2 |
/*
|
3 |
Plugin Name: Responsive Lightbox
|
4 |
Description: Responsive Lightbox allows users to view larger versions of images and galleries in a lightbox (overlay) effect optimized for mobile devices.
|
5 |
+
Version: 1.7.0
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/responsive-lightbox/
|
31 |
|
32 |
include_once( RESPONSIVE_LIGHTBOX_PATH . 'includes/class-frontend.php' );
|
33 |
include_once( RESPONSIVE_LIGHTBOX_PATH . 'includes/class-settings.php' );
|
34 |
+
include_once( RESPONSIVE_LIGHTBOX_PATH . 'includes/class-widgets.php' );
|
35 |
|
36 |
/**
|
37 |
* Responsive Lightbox class.
|
38 |
*
|
39 |
* @class Responsive_Lightbox
|
40 |
+
* @version 1.7.0
|
41 |
*/
|
42 |
class Responsive_Lightbox {
|
43 |
|
51 |
'force_custom_gallery' => false,
|
52 |
'woocommerce_gallery_lightbox' => false,
|
53 |
'videos' => true,
|
54 |
+
'widgets' => false,
|
55 |
+
'comments' => false,
|
56 |
'image_links' => true,
|
57 |
'image_title' => 'default',
|
58 |
'images_as_gallery' => false,
|
65 |
'update_notice' => true
|
66 |
),
|
67 |
'configuration' => array(
|
68 |
+
'swipebox' => array(
|
69 |
+
'animation' => 'css',
|
70 |
+
'force_png_icons' => false,
|
71 |
+
'hide_close_mobile' => false,
|
72 |
+
'remove_bars_mobile' => false,
|
73 |
+
'hide_bars' => true,
|
74 |
+
'hide_bars_delay' => 5000,
|
75 |
+
'video_max_width' => 1080,
|
76 |
+
'loop_at_end' => false
|
77 |
+
),
|
78 |
'prettyphoto' => array(
|
79 |
'animation_speed' => 'normal',
|
80 |
'slideshow' => false,
|
98 |
'keyboard_shortcuts' => true,
|
99 |
'social' => false
|
100 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
'fancybox' => array(
|
102 |
'modal' => false,
|
103 |
'show_overlay' => true,
|
158 |
'gallery_fade_out' => 300
|
159 |
)
|
160 |
),
|
161 |
+
'version' => '1.7.0'
|
162 |
);
|
163 |
public $options = array();
|
164 |
private $notices = array();
|
212 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
213 |
add_action( 'wp_enqueue_scripts', array( $this, 'front_scripts_styles' ) );
|
214 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts_styles' ) );
|
215 |
+
add_action( 'sidebar_admin_setup', array( $this, 'sidebar_admin_setup' ) );
|
216 |
add_action( 'admin_init', array( $this, 'update_notices' ) );
|
217 |
add_action( 'admin_print_scripts', array( $this, 'admin_inline_js' ), 999 );
|
218 |
|
300 |
* Load textdomain
|
301 |
*/
|
302 |
public function load_textdomain() {
|
303 |
+
load_plugin_textdomain( 'responsive-lightbox', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
304 |
}
|
305 |
|
306 |
/**
|
432 |
*/
|
433 |
public function admin_scripts_styles( $page ) {
|
434 |
if ( $page === 'settings_page_responsive-lightbox' ) {
|
|
|
435 |
wp_register_script(
|
436 |
'responsive-lightbox-admin', plugins_url( 'js/admin.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), $this->defaults['version']
|
437 |
);
|
438 |
wp_enqueue_script( 'responsive-lightbox-admin' );
|
439 |
|
440 |
wp_localize_script(
|
441 |
+
'responsive-lightbox-admin',
|
442 |
+
'rlArgs',
|
443 |
+
array(
|
444 |
+
'resetSettingsToDefaults' => __( 'Are you sure you want to reset these settings to defaults?', 'responsive-lightbox' ),
|
445 |
+
'resetScriptToDefaults' => __( 'Are you sure you want to reset this script settings to defaults?', 'responsive-lightbox' ),
|
446 |
+
'resetGalleryToDefaults' => __( 'Are you sure you want to reset this gallery settings to defaults?', 'responsive-lightbox' )
|
447 |
)
|
448 |
);
|
449 |
|
456 |
}
|
457 |
}
|
458 |
|
459 |
+
/**
|
460 |
+
* Enqueue admin widget scripts.
|
461 |
+
*/
|
462 |
+
public function sidebar_admin_setup() {
|
463 |
+
wp_enqueue_media();
|
464 |
+
|
465 |
+
wp_enqueue_script( 'responsive-lightbox-admin-widgets', plugins_url( 'js/admin-widgets.js', __FILE__ ), array( 'jquery' ), $this->defaults['version'] );
|
466 |
+
|
467 |
+
wp_localize_script(
|
468 |
+
'responsive-lightbox-admin-widgets',
|
469 |
+
'rlArgs',
|
470 |
+
array(
|
471 |
+
'textRemoveImage' => __( 'Remove image', 'responsive-lightbox' ),
|
472 |
+
'textSelectImages' => __( 'Select images', 'responsive-lightbox' ),
|
473 |
+
'textSelectImage' => __( 'Select image', 'responsive-lightbox' ),
|
474 |
+
'textUseImages' => __( 'Use these images', 'responsive-lightbox' ),
|
475 |
+
'textUseImage' => __( 'Use this image', 'responsive-lightbox' )
|
476 |
+
)
|
477 |
+
);
|
478 |
+
|
479 |
+
wp_register_style(
|
480 |
+
'responsive-lightbox-admin', plugins_url( 'css/admin.css', __FILE__ ), array(), $this->defaults['version']
|
481 |
+
);
|
482 |
+
wp_enqueue_style( 'responsive-lightbox-admin' );
|
483 |
+
}
|
484 |
+
|
485 |
/**
|
486 |
* Enqueue frontend scripts and styles
|
487 |
*/
|
767 |
if ( ! empty( $args['script'] ) && ! empty( $args['selector'] ) && apply_filters( 'rl_lightbox_conditional_loading', $contitional_scripts ) != false ) {
|
768 |
|
769 |
wp_register_script( 'responsive-lightbox', plugins_url( 'js/front.js', __FILE__ ), array( 'jquery' ), $this->defaults['version'], ( $this->options['settings']['loading_place'] === 'header' ? false : true ) );
|
770 |
+
|
771 |
+
$args['woocommerce_gallery'] = 0;
|
772 |
+
|
773 |
+
if ( class_exists( 'WooCommerce' ) ) {
|
774 |
+
global $woocommerce;
|
775 |
+
|
776 |
+
if ( ! empty( Responsive_Lightbox()->options['settings']['default_woocommerce_gallery'] ) && Responsive_Lightbox()->options['settings']['default_woocommerce_gallery'] !== 'default' ) {
|
777 |
+
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
778 |
+
if ( version_compare( $woocommerce->version, '3.0', ">=" ) ) {
|
779 |
+
$args['woocommerce_gallery'] = 1;
|
780 |
+
}
|
781 |
+
}
|
782 |
+
// default gallery?
|
783 |
+
} else {
|
784 |
+
// replace default WooCommerce lightbox?
|
785 |
+
if ( Responsive_Lightbox()->options['settings']['woocommerce_gallery_lightbox'] === true ) {
|
786 |
+
if ( version_compare( $woocommerce->version, '3.0', ">=" ) ) {
|
787 |
+
$args['woocommerce_gallery'] = 1;
|
788 |
+
}
|
789 |
+
}
|
790 |
+
}
|
791 |
+
}
|
792 |
+
|
793 |
$scripts[] = 'responsive-lightbox';
|
794 |
+
|
795 |
// enqueue scripts
|
796 |
if ( $scripts && is_array( $scripts ) ) {
|
797 |
foreach ( $scripts as $script ) {
|