Version Description
- Admin bar overfloat fix
- Tooltip description bug fix
- Add option for caption hide/show
Download this release
Release Info
Developer | giucu91 |
Plugin | FancyBox for WordPress |
Version | 3.2.6 |
Comparing to | |
See all releases |
Code changes from version 3.2.5 to 3.2.6
- assets/css/fancybox.css +5 -0
- fancybox.php +62 -51
- lib/admin-tab-appearance.php +26 -0
- lib/admin-tab-other.php +1 -1
- readme.txt +7 -2
assets/css/fancybox.css
CHANGED
@@ -882,6 +882,11 @@ body.compensate-for-scrollbar {
|
|
882 |
opacity: 1;
|
883 |
}
|
884 |
|
|
|
|
|
|
|
|
|
|
|
885 |
/* Styling for Small-Screen Devices */
|
886 |
@media all and (max-width: 576px) {
|
887 |
.fancybox-thumbs {
|
882 |
opacity: 1;
|
883 |
}
|
884 |
|
885 |
+
/* Admin bar overfloat fix */
|
886 |
+
.fancybox-container.fancybox-is-open {
|
887 |
+
z-index:99999;
|
888 |
+
}
|
889 |
+
|
890 |
/* Styling for Small-Screen Devices */
|
891 |
@media all and (max-width: 576px) {
|
892 |
.fancybox-thumbs {
|
fancybox.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
* Plugin Name: FancyBox for WordPress
|
4 |
* Plugin URI: https://wordpress.org/plugins/fancybox-for-wordpress/
|
5 |
* Description: Integrates <a href="http://fancyapps.com/fancybox/3/">FancyBox 3</a> into WordPress.
|
6 |
-
* Version: 3.2.
|
7 |
* Author: Colorlib
|
8 |
* Author URI: https://colorlib.com/wp/
|
9 |
-
* Tested up to: 5.
|
10 |
* Requires: 4.6 or higher
|
11 |
* License: GPLv3 or later
|
12 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -36,7 +36,7 @@
|
|
36 |
* Plugin Init
|
37 |
*/
|
38 |
// Constants
|
39 |
-
define( 'FBFW_VERSION', '3.2.
|
40 |
define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
|
41 |
define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
|
42 |
define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
|
@@ -75,60 +75,61 @@ function mfbfw_defaults() {
|
|
75 |
|
76 |
$default_settings = array(
|
77 |
// Appearance
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
100 |
return current.type === "image" ? "close" : false;
|
101 |
},',
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
jQuery.each(arr, function() {
|
124 |
var title = jQuery(this).children("img").attr("title");
|
125 |
var caption = jQuery(this).next("figcaption").html();
|
126 |
if(caption.length){jQuery(this).attr("title",title+" " + caption)}else{ jQuery(this).attr("title",title);};
|
127 |
}); ',
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
);
|
133 |
|
134 |
return $default_settings;
|
@@ -214,12 +215,22 @@ function mfbfw_init() {
|
|
214 |
|
215 |
// fix undefined index copyTitleFunction. $mfbfw array misses this index.
|
216 |
|
217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
jQuery.each(arr, function() {
|
219 |
var title = jQuery(this).children("img").attr("title");
|
220 |
var caption = jQuery(this).next("figcaption").html();
|
221 |
if(caption && title){jQuery(this).attr("title",title+" " + caption)}else if(title){ jQuery(this).attr("title",title);}else if(caption){jQuery(this).attr("title",caption);}
|
222 |
}); ';
|
|
|
|
|
|
|
223 |
|
224 |
$afterLoad = '';
|
225 |
if ( $mfbfw['titlePosition'] == 'inside' ) {
|
3 |
* Plugin Name: FancyBox for WordPress
|
4 |
* Plugin URI: https://wordpress.org/plugins/fancybox-for-wordpress/
|
5 |
* Description: Integrates <a href="http://fancyapps.com/fancybox/3/">FancyBox 3</a> into WordPress.
|
6 |
+
* Version: 3.2.6
|
7 |
* Author: Colorlib
|
8 |
* Author URI: https://colorlib.com/wp/
|
9 |
+
* Tested up to: 5.3
|
10 |
* Requires: 4.6 or higher
|
11 |
* License: GPLv3 or later
|
12 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
36 |
* Plugin Init
|
37 |
*/
|
38 |
// Constants
|
39 |
+
define( 'FBFW_VERSION', '3.2.6' );
|
40 |
define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
|
41 |
define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
|
42 |
define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
|
75 |
|
76 |
$default_settings = array(
|
77 |
// Appearance
|
78 |
+
'border' => '',
|
79 |
+
'borderColor' => '#BBBBBB',
|
80 |
+
'paddingColor' => '#FFFFFF',
|
81 |
+
'padding' => '10',
|
82 |
+
'overlayShow' => 'on',
|
83 |
+
'overlayColor' => '#666666',
|
84 |
+
'overlayOpacity' => '0.3',
|
85 |
+
'titleShow' => 'on',
|
86 |
+
'captionShow' => '',
|
87 |
+
'titlePosition' => 'inside',
|
88 |
+
'titleColor' => '#333333',
|
89 |
+
'showNavArrows' => 'on',
|
90 |
+
'titleSize' => '14',
|
91 |
+
'showCloseButton' => '',
|
92 |
+
'showToolbar' => 'on',
|
93 |
+
// Animations
|
94 |
+
'zoomOpacity' => 'on',
|
95 |
+
'zoomSpeedIn' => '500',
|
96 |
+
'zoomSpeedChange' => '300',
|
97 |
+
'transitionIn' => 'fade',
|
98 |
+
'transitionEffect' => 'fade',
|
99 |
+
// Behaviour
|
100 |
+
'hideOnOverlayClick' => 'function(current, event) {
|
101 |
return current.type === "image" ? "close" : false;
|
102 |
},',
|
103 |
+
'hideOnContentClick' => '',
|
104 |
+
'enableEscapeButton' => 'on',
|
105 |
+
'cyclic' => '',
|
106 |
+
'mouseWheel' => '',
|
107 |
+
'disableWoocommercePages' => '',
|
108 |
+
'disableWoocommerceProducts' => '',
|
109 |
+
// Gallery Type
|
110 |
+
'galleryType' => 'all',
|
111 |
+
'customExpression' => 'jQuery(thumbnails).attr("data-fancybox","gallery").getTitle();',
|
112 |
+
// Misc
|
113 |
+
'autoDimensions' => 'on',
|
114 |
+
'frameWidth' => '560',
|
115 |
+
'frameHeight' => '340',
|
116 |
+
'loadAtFooter' => '',
|
117 |
+
'callbackEnable' => '',
|
118 |
+
'callbackOnStart' => 'function() { alert("Start!"); }',
|
119 |
+
'callbackOnCancel' => 'function() { alert("Cancel!"); }',
|
120 |
+
'callbackOnComplete' => 'function() { alert("Complete!"); }',
|
121 |
+
'callbackOnCleanup' => 'function() { alert("CleanUp!"); }',
|
122 |
+
'callbackOnClose' => 'function() { alert("Close!"); }',
|
123 |
+
'copyTitleFunction' => 'var arr = jQuery("a[data-fancybox]");
|
124 |
jQuery.each(arr, function() {
|
125 |
var title = jQuery(this).children("img").attr("title");
|
126 |
var caption = jQuery(this).next("figcaption").html();
|
127 |
if(caption.length){jQuery(this).attr("title",title+" " + caption)}else{ jQuery(this).attr("title",title);};
|
128 |
}); ',
|
129 |
+
'nojQuery' => '',
|
130 |
+
'extraCallsEnable' => '',
|
131 |
+
'extraCallsData' => '',
|
132 |
+
'uninstall' => '',
|
133 |
);
|
134 |
|
135 |
return $default_settings;
|
215 |
|
216 |
// fix undefined index copyTitleFunction. $mfbfw array misses this index.
|
217 |
|
218 |
+
if (isset($mfbfw['captionShow']) && 'on' == $mfbfw['captionShow']) {
|
219 |
+
$mfbfw['copyTitleFunction'] = 'var arr = jQuery("a[data-fancybox]");
|
220 |
+
jQuery.each(arr, function() {
|
221 |
+
var title = jQuery(this).children("img").attr("title");
|
222 |
+
if(title){jQuery(this).attr("title",title)}
|
223 |
+
}); ';
|
224 |
+
} else {
|
225 |
+
$mfbfw['copyTitleFunction'] = 'var arr = jQuery("a[data-fancybox]");
|
226 |
jQuery.each(arr, function() {
|
227 |
var title = jQuery(this).children("img").attr("title");
|
228 |
var caption = jQuery(this).next("figcaption").html();
|
229 |
if(caption && title){jQuery(this).attr("title",title+" " + caption)}else if(title){ jQuery(this).attr("title",title);}else if(caption){jQuery(this).attr("title",caption);}
|
230 |
}); ';
|
231 |
+
}
|
232 |
+
|
233 |
+
|
234 |
|
235 |
$afterLoad = '';
|
236 |
if ( $mfbfw['titlePosition'] == 'inside' ) {
|
lib/admin-tab-appearance.php
CHANGED
@@ -226,6 +226,32 @@
|
|
226 |
</fieldset>
|
227 |
</td>
|
228 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
<tr valign="top">
|
230 |
<th scope="row"><?php _e( 'Navigation Arrows', 'mfbfw' ); ?>
|
231 |
<span class="tooltip-right"
|
226 |
</fieldset>
|
227 |
</td>
|
228 |
</tr>
|
229 |
+
<tr valign="top">
|
230 |
+
<th scope="row"><?php _e( 'Hide caption*', 'mfbfw' ); ?>
|
231 |
+
<span class="tooltip-right"
|
232 |
+
data-tooltip="<?php _e( 'Hide the caption in lightbox. In some cases both figure caption and image title are displayed in the lightbox (default: off)', 'mfbfw' ); ?>">
|
233 |
+
<i class="dashicons dashicons-editor-help"></i>
|
234 |
+
</span>
|
235 |
+
</th>
|
236 |
+
<td>
|
237 |
+
<fieldset>
|
238 |
+
<div class="epsilon-toggle">
|
239 |
+
<input class="epsilon-toggle__input" type="checkbox" id="captionShow" name="mfbfw[captionShow]" <?php checked( 1, isset( $settings['captionShow'] ) && $settings['captionShow'] );?> >
|
240 |
+
<div class="epsilon-toggle__items">
|
241 |
+
<span class="epsilon-toggle__track"></span>
|
242 |
+
<span class="epsilon-toggle__thumb"></span>
|
243 |
+
<svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6">
|
244 |
+
<path d="M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"></path>
|
245 |
+
</svg>
|
246 |
+
<svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6">
|
247 |
+
<path d="M0 0h2v6H0z"></path>
|
248 |
+
</svg>
|
249 |
+
</div>
|
250 |
+
</div>
|
251 |
+
<div class="cf"></div>
|
252 |
+
</fieldset>
|
253 |
+
</td>
|
254 |
+
</tr>
|
255 |
<tr valign="top">
|
256 |
<th scope="row"><?php _e( 'Navigation Arrows', 'mfbfw' ); ?>
|
257 |
<span class="tooltip-right"
|
lib/admin-tab-other.php
CHANGED
@@ -245,7 +245,7 @@
|
|
245 |
<tr valign="top">
|
246 |
<th scope="row"><?php _e( 'Remove settings', 'mfbfw' ); ?>
|
247 |
<span class="tooltip-right"
|
248 |
-
data-tooltip="<?php
|
249 |
<i class="dashicons dashicons-editor-help"></i>
|
250 |
</span>
|
251 |
</th>
|
245 |
<tr valign="top">
|
246 |
<th scope="row"><?php _e( 'Remove settings', 'mfbfw' ); ?>
|
247 |
<span class="tooltip-right"
|
248 |
+
data-tooltip="<?php echo esc_attr__( 'Remove Settings when plugin is deactivated from the "Manage Plugins" page. (default: off)', 'mfbfw' ); ?>">
|
249 |
<i class="dashicons dashicons-editor-help"></i>
|
250 |
</span>
|
251 |
</th>
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: silkalns
|
3 |
Tags: fancybox, lightbox, jquery, gallery, image, images, photo, photos, picture, pictures, zoom
|
4 |
Requires at least: 4.6
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 3.2.
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -31,6 +31,11 @@ If you enjoy using FancyBox lightbox for WordPress please leave a [positive feed
|
|
31 |
|
32 |
== Changelog ==
|
33 |
|
|
|
|
|
|
|
|
|
|
|
34 |
= 3.2.5 =
|
35 |
* Fix title hide/show option
|
36 |
* Fix extra height on lightbox image wrapper
|
2 |
Contributors: silkalns
|
3 |
Tags: fancybox, lightbox, jquery, gallery, image, images, photo, photos, picture, pictures, zoom
|
4 |
Requires at least: 4.6
|
5 |
+
Tested up to: 5.3
|
6 |
+
Stable tag: 3.2.6
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
= 3.2.6 =
|
35 |
+
* Admin bar overfloat fix
|
36 |
+
* Tooltip description bug fix
|
37 |
+
* Add option for caption hide/show
|
38 |
+
|
39 |
= 3.2.5 =
|
40 |
* Fix title hide/show option
|
41 |
* Fix extra height on lightbox image wrapper
|