FancyBox for WordPress - Version 3.1.3

Version Description

  • Fixed "Parse error" - https://wordpress.org/support/topic/no-backend-after-fancybox-update/
  • Fixed "Breaks on query strings" - https://wordpress.org/support/topic/url-with-ssl1-fancybox-doesnt-open/
  • Fixed "Caption problems" - https://wordpress.org/support/topic/border-not-fitting-and-strange-white-line/
Download this release

Release Info

Developer colorlibplugins
Plugin Icon wp plugin FancyBox for WordPress
Version 3.1.3
Comparing to
See all releases

Code changes from version 3.1.2 to 3.1.3

fancybox.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: FancyBox for WordPress
5
  Plugin URI: https://wordpress.org/plugins/fancybox-for-wordpress/
6
  Description: Integrates <a href="http://fancyapps.com/fancybox/3/">FancyBox 3</a> into WordPress.
7
- Version: 3.1.2
8
  Author: Colorlib
9
  Author URI: https://colorlib.com/wp/
10
 
@@ -19,7 +19,7 @@ Author URI: https://colorlib.com/wp/
19
  * Plugin Init
20
  */
21
  // Constants
22
- define( 'FBFW_VERSION', '3.1.2' );
23
  define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
24
  define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
25
  define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
@@ -208,12 +208,12 @@ function mfbfw_init() {
208
 
209
  if ( $mfbfw['titlePosition'] == 'inside' ) {
210
  $afterLoad = 'function( instance, current ) {';
211
- $afterLoad .= 'current.$content.append(\'<div class=\"fancybox-custom-caption\" style=\" position: absolute;left:0;right:0;color:#000;padding-top:10px;bottom:-50px;background:#fff;margin:0 auto;text-align:center; \">\' + current.opts.caption + \'</div>\');';
212
  $afterLoad .= '}';
213
  $hideCaption = 'div.fancybox-caption{display:none !important;}';
214
  } else if ( $mfbfw['titlePosition'] == 'over' ) {
215
  $afterLoad = 'function( instance, current ) {';
216
- $afterLoad .= 'current.$content.append(\'<div class=\"fancybox-custom-caption\" style=\" position: absolute;left:0;right:0;color:#000;padding-top:10px;bottom:0;background:#fff;margin:0 auto;text-align:center; \">\' + current.opts.caption + \'</div>\');';
217
  $afterLoad .= '}';
218
  $hideCaption = 'div.fancybox-caption{display:none !important;}';
219
  } else {
@@ -253,7 +253,7 @@ function mfbfw_init() {
253
  <style type="text/css">
254
  '.$hideCaption.'
255
  ' . ( isset( $mfbfw['overlayShow'] ) ? '' : 'div.fancybox-bg{background:transparent !important;}' ) . '
256
- ' . 'img.fancybox-image{border-width:' . $mfbfw['padding'] . 'px;border-color:' . $mfbfw['paddingColor'] . ';border-style:solid;}' . '
257
  ' . ( 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'] . '}' : '' ) . '
258
  ' . ( isset( $mfbfw['paddingColor'] ) && $mfbfw['paddingColor'] && $mfbfw['titlePosition'] == 'inside' ? 'div#fancybox-title{background-color:' . $mfbfw['paddingColor'] . '}' : '' ) . '
259
  div.fancybox-content{background-color:' . $mfbfw['paddingColor'] . ( isset( $mfbfw['border'] ) && $mfbfw['border'] ? ';border:1px solid ' . $mfbfw['borderColor'] : '' ) . '}
@@ -275,7 +275,7 @@ function mfbfw_init() {
275
  }
276
 
277
  // Supported file extensions
278
- var thumbnails = jQuery("a:has(img)").not(".nolightbox").filter( function() { return /\.(jpe?g|png|gif|bmp)$/i.test(jQuery(this).attr('href')) });
279
  <?php if ( $mfbfw['galleryType'] == 'post' ) { ?>
280
 
281
  // Gallery type BY POST and on post or page (so only one post or page is visible)
4
  Plugin Name: FancyBox for WordPress
5
  Plugin URI: https://wordpress.org/plugins/fancybox-for-wordpress/
6
  Description: Integrates <a href="http://fancyapps.com/fancybox/3/">FancyBox 3</a> into WordPress.
7
+ Version: 3.1.3
8
  Author: Colorlib
9
  Author URI: https://colorlib.com/wp/
10
 
19
  * Plugin Init
20
  */
21
  // Constants
22
+ define( 'FBFW_VERSION', '3.1.3' );
23
  define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
24
  define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
25
  define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
208
 
209
  if ( $mfbfw['titlePosition'] == 'inside' ) {
210
  $afterLoad = 'function( instance, current ) {';
211
+ $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>\');';
212
  $afterLoad .= '}';
213
  $hideCaption = 'div.fancybox-caption{display:none !important;}';
214
  } else if ( $mfbfw['titlePosition'] == 'over' ) {
215
  $afterLoad = 'function( instance, current ) {';
216
+ $afterLoad .= 'current.$content.append(\'<div class=\"fancybox-custom-caption\" style=\" position: absolute;left:0;right:0;color:#000;padding-top:10px;bottom:0;margin:0 auto;text-align:center; \">\' + current.opts.caption + \'</div>\');';
217
  $afterLoad .= '}';
218
  $hideCaption = 'div.fancybox-caption{display:none !important;}';
219
  } else {
253
  <style type="text/css">
254
  '.$hideCaption.'
255
  ' . ( isset( $mfbfw['overlayShow'] ) ? '' : 'div.fancybox-bg{background:transparent !important;}' ) . '
256
+ ' . 'img.fancybox-image{border-width:' . $mfbfw['padding'] . 'px;border-color:' . $mfbfw['paddingColor'] . ';border-style:solid;height:auto;}' . '
257
  ' . ( 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'] . '}' : '' ) . '
258
  ' . ( isset( $mfbfw['paddingColor'] ) && $mfbfw['paddingColor'] && $mfbfw['titlePosition'] == 'inside' ? 'div#fancybox-title{background-color:' . $mfbfw['paddingColor'] . '}' : '' ) . '
259
  div.fancybox-content{background-color:' . $mfbfw['paddingColor'] . ( isset( $mfbfw['border'] ) && $mfbfw['border'] ? ';border:1px solid ' . $mfbfw['borderColor'] : '' ) . '}
275
  }
276
 
277
  // Supported file extensions
278
+ var thumbnails = jQuery("a:has(img)").not(".nolightbox").filter( function() { return /\.(jpe?g|png|gif|bmp|pdf)\?.+$/i.test(jQuery(this).attr('href')) });
279
  <?php if ( $mfbfw['galleryType'] == 'post' ) { ?>
280
 
281
  // Gallery type BY POST and on post or page (so only one post or page is visible)
lib/class-fbfw-plugin-rollback.php CHANGED
@@ -44,27 +44,26 @@ class FBFW_Plugin_RollBack {
44
 
45
  if ( class_exists( 'FBFW_Rollback' ) ) {
46
  $rollback = new FBFW_Rollback(
47
- [
48
  'version' => FBFW_PREVIOUS_PLUGIN_VERSION,
49
  'plugin_name' => FBFW_PLUGIN_BASE,
50
  'plugin_slug' => $plugin_slug,
51
  'package_url' => sprintf( 'https://downloads.wordpress.org/plugin/%s.%s.zip', PLUGIN_NAME, FBFW_PREVIOUS_PLUGIN_VERSION ),
52
- ]
53
  );
54
  $rollback->run();
55
  }
56
 
57
  wp_die(
58
- '', __( 'Rollback to Previous Version', 'mfbfw' ), [
59
  'response' => 200,
60
- ]
61
  );
62
  }
63
 
64
  public function rollback_scripts() {
65
  wp_enqueue_script('rollback-script', FBFW_URL . 'assets/js/rollback.js', FBFW_VERSION); // Load Rollback script
66
  wp_enqueue_script( 'rollback-script' );
67
-
68
  }
69
 
70
  }
44
 
45
  if ( class_exists( 'FBFW_Rollback' ) ) {
46
  $rollback = new FBFW_Rollback(
47
+ array(
48
  'version' => FBFW_PREVIOUS_PLUGIN_VERSION,
49
  'plugin_name' => FBFW_PLUGIN_BASE,
50
  'plugin_slug' => $plugin_slug,
51
  'package_url' => sprintf( 'https://downloads.wordpress.org/plugin/%s.%s.zip', PLUGIN_NAME, FBFW_PREVIOUS_PLUGIN_VERSION ),
52
+ )
53
  );
54
  $rollback->run();
55
  }
56
 
57
  wp_die(
58
+ '', __( 'Rollback to Previous Version', 'mfbfw' ), array(
59
  'response' => 200,
60
+ )
61
  );
62
  }
63
 
64
  public function rollback_scripts() {
65
  wp_enqueue_script('rollback-script', FBFW_URL . 'assets/js/rollback.js', FBFW_VERSION); // Load Rollback script
66
  wp_enqueue_script( 'rollback-script' );
 
67
  }
68
 
69
  }
lib/class-fbfw-rollback.php CHANGED
@@ -72,7 +72,7 @@ class FBFW_Rollback {
72
  *
73
  * @param array $args Optional. Rollback arguments. Default is an empty array.
74
  */
75
- public function __construct( $args = [] ) {
76
  foreach ( $args as $key => $value ) {
77
  $this->{$key} = $value;
78
  }
@@ -150,12 +150,12 @@ class FBFW_Rollback {
150
 
151
  $logo_url = FBFW_URL . 'assets/images/icon.jpg';
152
 
153
- $upgrader_args = [
154
  'url' => 'update.php?action=upgrade-plugin&plugin=' . rawurlencode( $this->plugin_name ),
155
  'plugin' => $this->plugin_name,
156
  'nonce' => 'upgrade-plugin_' . $this->plugin_name,
157
  'title' => '<img src="' . $logo_url . '" alt="FBFW logo">' . __( 'Rollback to Previous Version', 'epfw' ),
158
- ];
159
 
160
  $this->print_inline_style();
161
 
72
  *
73
  * @param array $args Optional. Rollback arguments. Default is an empty array.
74
  */
75
+ public function __construct( $args = array() ) {
76
  foreach ( $args as $key => $value ) {
77
  $this->{$key} = $value;
78
  }
150
 
151
  $logo_url = FBFW_URL . 'assets/images/icon.jpg';
152
 
153
+ $upgrader_args = array(
154
  'url' => 'update.php?action=upgrade-plugin&plugin=' . rawurlencode( $this->plugin_name ),
155
  'plugin' => $this->plugin_name,
156
  'nonce' => 'upgrade-plugin_' . $this->plugin_name,
157
  'title' => '<img src="' . $logo_url . '" alt="FBFW logo">' . __( 'Rollback to Previous Version', 'epfw' ),
158
+ );
159
 
160
  $this->print_inline_style();
161
 
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: 3.4
5
  Tested up to: 4.9
6
- Stable tag: 3.1.2
7
  License: GPL/MIT
8
 
9
  Seamlessly integrates FancyBox lightbox into your WordPress blog: Upload, activate, and you're done. Additional configuration optional.
@@ -31,6 +31,11 @@ If you enjoy using FancyBox lightbox for WordPress please leave a [positive feed
31
 
32
  == Changelog ==
33
 
 
 
 
 
 
34
  = 3.1.2 =
35
  * Fixed "All links get the fancybox class"
36
 
3
  Tags: fancybox, lightbox, jquery, gallery, image, images, photo, photos, picture, pictures, zoom
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
+ Stable tag: 3.1.3
7
  License: GPL/MIT
8
 
9
  Seamlessly integrates FancyBox lightbox into your WordPress blog: Upload, activate, and you're done. Additional configuration optional.
31
 
32
  == Changelog ==
33
 
34
+ = 3.1.3 =
35
+ * Fixed "Parse error" - https://wordpress.org/support/topic/no-backend-after-fancybox-update/
36
+ * Fixed "Breaks on query strings" - https://wordpress.org/support/topic/url-with-ssl1-fancybox-doesnt-open/
37
+ * Fixed "Caption problems" - https://wordpress.org/support/topic/border-not-fitting-and-strange-white-line/
38
+
39
  = 3.1.2 =
40
  * Fixed "All links get the fancybox class"
41