33* Plugin Name: FancyBox for WordPress
44* Plugin URI: https://wordpress.org/plugins/fancybox-for-wordpress/
55* Description: Integrates <a href="http://fancyapps.com/fancybox/3/">FancyBox 3</a> into WordPress.
6- * Version: 3.2.0
6+ * Version: 3.2.2
77* Author: Colorlib
88* Author URI: https://colorlib.com/wp/
99* Tested up to: 5.1
3636 * Plugin Init
3737 */
3838// Constants
39- define ( 'FBFW_VERSION ' , '3.2.0 ' );
39+ define ( 'FBFW_VERSION ' , '3.2.2 ' );
4040define ( 'FBFW_PATH ' , plugin_dir_path ( __FILE__ ) );
4141define ( 'FBFW_URL ' , plugin_dir_url ( __FILE__ ) );
4242define ( 'FBFW_PLUGIN_BASE ' , plugin_basename ( __FILE__ ) );
@@ -221,10 +221,10 @@ function mfbfw_init() {
221221 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);}
222222 }); ' ;
223223
224-
224+ $ afterLoad = '' ;
225225 if ( $ mfbfw ['titlePosition ' ] == 'inside ' ) {
226226 $ afterLoad = 'function( instance, current ) { ' ;
227- $ afterLoad .= 'current.$content.append( \'<div class=\"fancybox-custom-caption\" style=\" position: absolute;left:0;right:0;color:#000;padding-top:10px;bottom:-50px; margin:0 auto;text-align:center; \"> \' + current.opts.caption + \'</div> \'); ' ;
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> \'); ' ;
228228 $ afterLoad .= '} ' ;
229229 $ hideCaption = 'div.fancybox-caption{display:none !important;} ' ;
230230 } else if ( $ mfbfw ['titlePosition ' ] == 'over ' ) {
@@ -251,7 +251,7 @@ function mfbfw_init() {
251251 //title position settings
252252 if ( isset ( $ mfbfw ['titlePosition ' ] ) ) {
253253 if ( $ mfbfw ['titlePosition ' ] == 'inside ' ) {
254- $ captionPosition = 'div.fancybox-caption p.caption-title {background:#fff; width:auto;padding:10px 30px;} ' ;
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;} ' ;
255255 } elseif ( $ mfbfw ['titlePosition ' ] == 'float ' ) {
256256 $ captionPosition = 'div.fancybox-caption p.caption-title {background:#fff;color:#000;padding:10px 30px;width:auto;} ' ;
257257 } else {
@@ -267,7 +267,7 @@ function mfbfw_init() {
267267 echo '
268268<!-- Fancybox for WordPress v ' . $ mfbfw_version . ' -->
269269<style type="text/css">
270- ' .$ hideCaption .'
270+ .fancybox-slide--image .fancybox-content{background-color: ' . $ mfbfw [ ' paddingColor ' ] . ' } ' .$ hideCaption .'
271271 ' . ( isset ( $ mfbfw ['overlayShow ' ] ) ? '' : 'div.fancybox-bg{background:transparent !important;} ' ) . '
272272 ' . 'img.fancybox-image{border-width: ' . $ mfbfw ['padding ' ] . 'px;border-color: ' . $ mfbfw ['paddingColor ' ] . ';border-style:solid;height:auto;} ' . '
273273 ' . ( 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 ' ] . '} ' : '' ) . '
@@ -357,7 +357,18 @@ function mfbfw_init() {
357357 });
358358
359359 // Else, gallery type is custom, so just print the custom expression
360- <?php } else { ?>
360+ <?php } else if ( $ mfbfw ['galleryType ' ] == 'single_gutenberg_block ' ){
361+ ?>
362+
363+ var gallery_block = jQuery('ul.wp-block-gallery');
364+ gallery_block.each(function() {
365+ jQuery(this).find(thumbnails).addClass("fancyboxforwp").attr("data-fancybox","gallery"+gallery_block.index(this)).attr("rel","fancybox"+gallery_block.index(this)).getTitle();
366+
367+ jQuery(this).find(iframeLinks).attr({ "data-fancybox":"gallery"+gallery_block.index(this) }).attr("rel","fancybox"+gallery_block.index(this)).getTitle();
368+
369+ });
370+ <?php
371+ } else { ?>
361372 /* Custom Expression */
362373 <?php echo $ mfbfw ['customExpression ' ]; ?>
363374 <?php } ?>
@@ -563,3 +574,5 @@ function mfbfw_get_activate_link() {
563574 );
564575
565576}
577+
578+ require_once 'lib/class-colorlib-dashboard-widget-extend-feed.php ' ;
0 commit comments