FancyBox for WordPress - Version 3.3.1

Version Description

= 3.0.5 = Fixes the Revert options button and wrong version number on settings page. Also updates links in settings page and readme file.

Download this release

Release Info

Developer giucu91
Plugin Icon wp plugin FancyBox for WordPress
Version 3.3.1
Comparing to
See all releases

Code changes from version 3.3.0 to 3.3.1

Files changed (4) hide show
  1. assets/js/admin.js +35 -43
  2. assets/js/jquery.fancybox.js +4 -4
  3. fancybox.php +3 -3
  4. readme.txt +4 -1
assets/js/admin.js CHANGED
@@ -12,7 +12,7 @@ jQuery(function () {
12
  jQuery(block).css("display", "none");
13
  }
14
 
15
- jQuery(button).click(function () {
16
  jQuery(block).animate({
17
  opacity: "toggle",
18
  height: "toggle"
@@ -30,47 +30,39 @@ jQuery(function () {
30
  switchBlock("#extraCallsBlock", "#extraCallsEnable");
31
  switchBlock("#easingBlock", "#easing");
32
 
33
- jQuery(document).ready(function () {
34
- jQuery(".slider-horizontal").each(function () {
35
- var mySl = jQuery(this);
36
- var defaultState = mySl.prev('input').val();
37
- mySl.attr('defSl', defaultState);
38
- });
39
-
40
-
41
-
42
-
43
- //Function enable codemirror on FancyBox Extra Calls
44
-
45
- jQuery('.start-editing').click(function () {
46
- wp.codeEditor.initialize(jQuery(this).next("textarea"));
47
- jQuery(this).hide();
48
- });
49
-
50
 
51
- //add color picker to buttons
52
- jQuery('.color-btn').wpColorPicker();
 
 
53
  });
54
 
55
- jQuery(window).load(function () {
56
- //function to initiate horizontal slider from jQuery UI
57
- jQuery(".slider-horizontal").each(function () {
58
- var mySl = jQuery(this);
59
- var minSl = parseFloat(mySl.attr("minSl"));
60
- var maxSl = parseFloat(mySl.attr("maxSl"));
61
- var defSl = parseFloat(mySl.attr("defSl"));
62
- var stepSl = parseFloat(mySl.attr("stepSl"));
63
- jQuery(this).slider({
64
- orientation: "horizontal",
65
- range: "min",
66
- min: minSl,
67
- max: maxSl,
68
- value: defSl,
69
- step: stepSl,
70
- slide: function (event, ui) {
71
- mySl.prev("input").val(ui.value);
72
- }
73
- });
 
 
74
  });
75
  });
76
 
@@ -84,11 +76,11 @@ jQuery(function () {
84
  jQuery("#titleColorBlock").css("display", "none");
85
  }
86
 
87
- jQuery("#titlePositionFloat, #titlePositionOutside, #titlePositionOver").click(function () {
88
  jQuery("#titleColorBlock").hide("slow");
89
  });
90
 
91
- jQuery("#titlePositionInside").click(function () {
92
  jQuery("#titleColorBlock").show("slow");
93
  });
94
 
@@ -104,11 +96,11 @@ jQuery(function () {
104
  jQuery("#customExpressionBlock").css("display", "none");
105
  }
106
 
107
- jQuery("#galleryTypeAll, #galleryTypeNone, #galleryTypePost, #galleryTypeGutenbergBlock").click(function () {
108
  jQuery("#customExpressionBlock").hide("slow");
109
  });
110
 
111
- jQuery("#galleryTypeCustom").click(function () {
112
  jQuery("#customExpressionBlock").show("slow");
113
  });
114
 
12
  jQuery(block).css("display", "none");
13
  }
14
 
15
+ jQuery(button).on('click', function () {
16
  jQuery(block).animate({
17
  opacity: "toggle",
18
  height: "toggle"
30
  switchBlock("#extraCallsBlock", "#extraCallsEnable");
31
  switchBlock("#easingBlock", "#easing");
32
 
33
+ jQuery(".slider-horizontal").each(function () {
34
+ var mySl = jQuery(this);
35
+ var defaultState = mySl.prev('input').val();
36
+ mySl.attr('defSl', defaultState);
37
+ });
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
+ //Function enable codemirror on FancyBox Extra Calls
40
+ jQuery('.start-editing').on('click', function () {
41
+ wp.codeEditor.initialize(jQuery(this).next("textarea"));
42
+ jQuery(this).hide();
43
  });
44
 
45
+
46
+ //add color picker to buttons
47
+ jQuery('.color-btn').wpColorPicker();
48
+
49
+ //function to initiate horizontal slider from jQuery UI
50
+ jQuery(".slider-horizontal").each(function () {
51
+ var mySl = jQuery(this);
52
+ var minSl = parseFloat(mySl.attr("minSl"));
53
+ var maxSl = parseFloat(mySl.attr("maxSl"));
54
+ var defSl = parseFloat(mySl.attr("defSl"));
55
+ var stepSl = parseFloat(mySl.attr("stepSl"));
56
+ jQuery(this).slider({
57
+ orientation: "horizontal",
58
+ range: "min",
59
+ min: minSl,
60
+ max: maxSl,
61
+ value: defSl,
62
+ step: stepSl,
63
+ slide: function (event, ui) {
64
+ mySl.prev("input").val(ui.value);
65
+ }
66
  });
67
  });
68
 
76
  jQuery("#titleColorBlock").css("display", "none");
77
  }
78
 
79
+ jQuery("#titlePositionFloat, #titlePositionOutside, #titlePositionOver").on('click', function () {
80
  jQuery("#titleColorBlock").hide("slow");
81
  });
82
 
83
+ jQuery("#titlePositionInside").on('click', function () {
84
  jQuery("#titleColorBlock").show("slow");
85
  });
86
 
96
  jQuery("#customExpressionBlock").css("display", "none");
97
  }
98
 
99
+ jQuery("#galleryTypeAll, #galleryTypeNone, #galleryTypePost, #galleryTypeGutenbergBlock").on('click', function () {
100
  jQuery("#customExpressionBlock").hide("slow");
101
  });
102
 
103
+ jQuery("#galleryTypeCustom").on('click', function () {
104
  jQuery("#customExpressionBlock").show("slow");
105
  });
106
 
assets/js/jquery.fancybox.js CHANGED
@@ -485,7 +485,7 @@
485
  var rez = $.extend(true, {}, opts1, opts2);
486
 
487
  $.each(opts2, function(key, value) {
488
- if ($.isArray(value)) {
489
  rez[key] = value;
490
  }
491
  });
@@ -714,7 +714,7 @@
714
  obj.opts = $.extend(true, {}, self.opts, opts);
715
 
716
  // Do not merge buttons array
717
- if ($.isArray(opts.buttons)) {
718
  obj.opts.buttons = opts.buttons;
719
  }
720
 
@@ -859,7 +859,7 @@
859
  if (thumbs && thumbs.isActive) {
860
  thumbs.create();
861
 
862
- thumbs.focus();
863
  }
864
  }
865
  },
@@ -5369,7 +5369,7 @@
5369
  });
5370
 
5371
  // Opening links in a popup window
5372
- shareCurrent.$content.find(".fancybox-share__button").click(function() {
5373
  window.open(this.href, "Share", "width=550, height=450");
5374
  return false;
5375
  });
485
  var rez = $.extend(true, {}, opts1, opts2);
486
 
487
  $.each(opts2, function(key, value) {
488
+ if (Array.isArray(value)) {
489
  rez[key] = value;
490
  }
491
  });
714
  obj.opts = $.extend(true, {}, self.opts, opts);
715
 
716
  // Do not merge buttons array
717
+ if (Array.isArray(opts.buttons)) {
718
  obj.opts.buttons = opts.buttons;
719
  }
720
 
859
  if (thumbs && thumbs.isActive) {
860
  thumbs.create();
861
 
862
+ thumbs.trigger('focus');
863
  }
864
  }
865
  },
5369
  });
5370
 
5371
  // Opening links in a popup window
5372
+ shareCurrent.$content.find(".fancybox-share__button").on('click', function() {
5373
  window.open(this.href, "Share", "width=550, height=450");
5374
  return false;
5375
  });
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.3.0
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/wp/
9
- * Tested up to: 5.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.3.0' );
40
  define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
41
  define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
42
  define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
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.3.1
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/wp/
9
+ * Tested up to: 5.6
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.3.1' );
40
  define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
41
  define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
42
  define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
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.6
6
- Stable tag: 3.3.0
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -30,6 +30,9 @@ If you are new to WordPress and want to lear more we have got you covered. Color
30
  If you enjoy using FancyBox lightbox for WordPress please leave a [positive feedback](https://wordpress.org/support/plugin/fancybox-for-wordpress/reviews/?filter=5). We are committed to make it the best lightbox plugin for WordPress.
31
 
32
  == Changelog ==
 
 
 
33
  = 3.3.0 =
34
  Fixed compatibility issue with WordPress 5.6
35
 
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
6
+ Stable tag: 3.3.1
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
30
  If you enjoy using FancyBox lightbox for WordPress please leave a [positive feedback](https://wordpress.org/support/plugin/fancybox-for-wordpress/reviews/?filter=5). We are committed to make it the best lightbox plugin for WordPress.
31
 
32
  == Changelog ==
33
+ = 3.3.0 =
34
+ Compatibility with jQuery 3.0
35
+
36
  = 3.3.0 =
37
  Fixed compatibility issue with WordPress 5.6
38