Version Description
- Fix for padding issue when title inside position
- Fix for title color when title is set to inside position
Download this release
Release Info
| Developer | machothemes |
| Plugin | |
| Version | 3.2.2 |
| Comparing to | |
| See all releases | |
Code changes from version 3.2.1 to 3.2.2
- assets/css/fancybox.css +3 -3
- assets/js/jquery.fancybox.js +24 -1
- fancybox.php +6 -6
- readme.txt +5 -1
assets/css/fancybox.css
CHANGED
|
@@ -239,15 +239,15 @@ body.compensate-for-scrollbar {
|
|
| 239 |
background: transparent;
|
| 240 |
border: 0;
|
| 241 |
height: 100%;
|
| 242 |
-
left: 0
|
| 243 |
/* Fix images beeing distorted */
|
| 244 |
object-fit: contain;
|
| 245 |
margin: 0;
|
| 246 |
max-height: none;
|
| 247 |
max-width: none;
|
| 248 |
padding: 0;
|
| 249 |
-
position: absolute;
|
| 250 |
-
top: 0
|
| 251 |
-webkit-user-select: none;
|
| 252 |
-moz-user-select: none;
|
| 253 |
-ms-user-select: none;
|
| 239 |
background: transparent;
|
| 240 |
border: 0;
|
| 241 |
height: 100%;
|
| 242 |
+
/*left: 0;*/
|
| 243 |
/* Fix images beeing distorted */
|
| 244 |
object-fit: contain;
|
| 245 |
margin: 0;
|
| 246 |
max-height: none;
|
| 247 |
max-width: none;
|
| 248 |
padding: 0;
|
| 249 |
+
/*position: absolute;
|
| 250 |
+
top: 0;*/
|
| 251 |
-webkit-user-select: none;
|
| 252 |
-moz-user-select: none;
|
| 253 |
-ms-user-select: none;
|
assets/js/jquery.fancybox.js
CHANGED
|
@@ -3178,8 +3178,31 @@
|
|
| 3178 |
css.width = props.width;
|
| 3179 |
}
|
| 3180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3181 |
if (props.height !== undefined) {
|
| 3182 |
-
css.height = props.height;
|
| 3183 |
}
|
| 3184 |
|
| 3185 |
return $el.css(css);
|
| 3178 |
css.width = props.width;
|
| 3179 |
}
|
| 3180 |
|
| 3181 |
+
var custom_caption_outerHeight = 0;
|
| 3182 |
+
|
| 3183 |
+
if($('.fancybox-custom-caption.inside-caption').length ){
|
| 3184 |
+
custom_caption_outerHeight = $el.find('.fancybox-custom-caption').outerHeight();
|
| 3185 |
+
if(custom_caption_outerHeight == 0){
|
| 3186 |
+
custom_caption_outerHeight = 10;
|
| 3187 |
+
}
|
| 3188 |
+
} else {
|
| 3189 |
+
custom_caption_outerHeight = ($el.find('.fancybox-image').outerHeight() - $el.find('.fancybox-image').height())/2;
|
| 3190 |
+
// Seems like different border width for image requires a little trimming
|
| 3191 |
+
if(custom_caption_outerHeight > 20 && custom_caption_outerHeight < 25 ){
|
| 3192 |
+
custom_caption_outerHeight -= 2;
|
| 3193 |
+
}
|
| 3194 |
+
|
| 3195 |
+
if(custom_caption_outerHeight >= 25 && custom_caption_outerHeight <= 30){
|
| 3196 |
+
custom_caption_outerHeight -= 4;
|
| 3197 |
+
}
|
| 3198 |
+
|
| 3199 |
+
if(custom_caption_outerHeight > 30){
|
| 3200 |
+
custom_caption_outerHeight -= 6;
|
| 3201 |
+
}
|
| 3202 |
+
}
|
| 3203 |
+
|
| 3204 |
if (props.height !== undefined) {
|
| 3205 |
+
css.height = props.height + custom_caption_outerHeight;
|
| 3206 |
}
|
| 3207 |
|
| 3208 |
return $el.css(css);
|
fancybox.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 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.1
|
|
@@ -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__ ) );
|
|
@@ -221,10 +221,10 @@ function mfbfw_init() {
|
|
| 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 |
-
|
| 225 |
if ( $mfbfw['titlePosition'] == 'inside' ) {
|
| 226 |
$afterLoad = 'function( instance, current ) {';
|
| 227 |
-
$afterLoad .= 'current.$content.append(\'<div class=\"fancybox-custom-caption\" style=\" position: absolute;left:0;right:0;color:#000;
|
| 228 |
$afterLoad .= '}';
|
| 229 |
$hideCaption = 'div.fancybox-caption{display:none !important;}';
|
| 230 |
} else if ( $mfbfw['titlePosition'] == 'over' ) {
|
|
@@ -251,7 +251,7 @@ function mfbfw_init() {
|
|
| 251 |
//title position settings
|
| 252 |
if ( isset( $mfbfw['titlePosition'] ) ) {
|
| 253 |
if ( $mfbfw['titlePosition'] == 'inside' ) {
|
| 254 |
-
$captionPosition = 'div.fancybox-caption p.caption-title {background:#fff; width:auto;padding:10px 30px;}';
|
| 255 |
} elseif ( $mfbfw['titlePosition'] == 'float' ) {
|
| 256 |
$captionPosition = 'div.fancybox-caption p.caption-title {background:#fff;color:#000;padding:10px 30px;width:auto;}';
|
| 257 |
} else {
|
|
@@ -267,7 +267,7 @@ function mfbfw_init() {
|
|
| 267 |
echo '
|
| 268 |
<!-- Fancybox for WordPress v' . $mfbfw_version . ' -->
|
| 269 |
<style type="text/css">
|
| 270 |
-
'.$hideCaption.'
|
| 271 |
' . ( isset( $mfbfw['overlayShow'] ) ? '' : 'div.fancybox-bg{background:transparent !important;}' ) . '
|
| 272 |
' . 'img.fancybox-image{border-width:' . $mfbfw['padding'] . 'px;border-color:' . $mfbfw['paddingColor'] . ';border-style:solid;height:auto;}' . '
|
| 273 |
' . ( isset( $mfbfw['overlayColor'] ) && $mfbfw['overlayColor'] ? 'div.fancybox-bg{background-color:' . hexTorgba( $mfbfw['overlayColor'], $mfbfw['overlayOpacity'] ) . ';opacity:1 !important;}' : '' ) . ( isset( $mfbfw['paddingColor'] ) && $mfbfw['paddingColor'] ? 'div.fancybox-content{border-color:' . $mfbfw['paddingColor'] . '}' : '' ) . '
|
| 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.2
|
| 7 |
* Author: Colorlib
|
| 8 |
* Author URI: https://colorlib.com/wp/
|
| 9 |
* Tested up to: 5.1
|
| 36 |
* Plugin Init
|
| 37 |
*/
|
| 38 |
// Constants
|
| 39 |
+
define( 'FBFW_VERSION', '3.2.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__ ) );
|
| 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' ) {
|
| 226 |
$afterLoad = 'function( instance, current ) {';
|
| 227 |
+
$afterLoad .= 'current.$content.append(\'<div class=\"fancybox-custom-caption inside-caption\" style=\" position: absolute;left:0;right:0;color:#000;margin:0 auto;bottom:0;text-align:center;background-color:'.$mfbfw['paddingColor'].' \">\' + current.opts.caption + \'</div>\');';
|
| 228 |
$afterLoad .= '}';
|
| 229 |
$hideCaption = 'div.fancybox-caption{display:none !important;}';
|
| 230 |
} else if ( $mfbfw['titlePosition'] == 'over' ) {
|
| 251 |
//title position settings
|
| 252 |
if ( isset( $mfbfw['titlePosition'] ) ) {
|
| 253 |
if ( $mfbfw['titlePosition'] == 'inside' ) {
|
| 254 |
+
$captionPosition = 'div.fancybox-caption p.caption-title {background:#fff; width:auto;padding:10px 30px;}div.fancybox-content p.caption-title{color:'.$mfbfw['titleColor'].';margin: 0;padding: 5px 0;}';
|
| 255 |
} elseif ( $mfbfw['titlePosition'] == 'float' ) {
|
| 256 |
$captionPosition = 'div.fancybox-caption p.caption-title {background:#fff;color:#000;padding:10px 30px;width:auto;}';
|
| 257 |
} else {
|
| 267 |
echo '
|
| 268 |
<!-- Fancybox for WordPress v' . $mfbfw_version . ' -->
|
| 269 |
<style type="text/css">
|
| 270 |
+
.fancybox-slide--image .fancybox-content{background-color: ' . $mfbfw['paddingColor'] . '}'.$hideCaption.'
|
| 271 |
' . ( isset( $mfbfw['overlayShow'] ) ? '' : 'div.fancybox-bg{background:transparent !important;}' ) . '
|
| 272 |
' . 'img.fancybox-image{border-width:' . $mfbfw['padding'] . 'px;border-color:' . $mfbfw['paddingColor'] . ';border-style:solid;height:auto;}' . '
|
| 273 |
' . ( isset( $mfbfw['overlayColor'] ) && $mfbfw['overlayColor'] ? 'div.fancybox-bg{background-color:' . hexTorgba( $mfbfw['overlayColor'], $mfbfw['overlayOpacity'] ) . ';opacity:1 !important;}' : '' ) . ( isset( $mfbfw['paddingColor'] ) && $mfbfw['paddingColor'] ? 'div.fancybox-content{border-color:' . $mfbfw['paddingColor'] . '}' : '' ) . '
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ 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.1
|
| 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,10 @@ If you enjoy using FancyBox lightbox for WordPress please leave a [positive feed
|
|
| 31 |
|
| 32 |
== Changelog ==
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
= 3.2.1 =
|
| 35 |
* Update toggles
|
| 36 |
* Added new option to make a gallery for each gutenberg gallery block
|
| 3 |
Tags: fancybox, lightbox, jquery, gallery, image, images, photo, photos, picture, pictures, zoom
|
| 4 |
Requires at least: 4.6
|
| 5 |
Tested up to: 5.1
|
| 6 |
+
Stable tag: 3.2.2
|
| 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.2 =
|
| 35 |
+
* Fix for padding issue when title inside position
|
| 36 |
+
* Fix for title color when title is set to inside position
|
| 37 |
+
|
| 38 |
= 3.2.1 =
|
| 39 |
* Update toggles
|
| 40 |
* Added new option to make a gallery for each gutenberg gallery block
|
