FancyBox for WordPress - Version 3.2.9

Version Description

  • Added Zoom on Click functionality
Download this release

Release Info

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

Code changes from version 3.2.8 to 3.2.9

Files changed (3) hide show
  1. fancybox.php +5 -4
  2. lib/admin-tab-behaviour.php +26 -0
  3. readme.txt +3 -1
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.8
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/wp/
9
  * Tested up to: 5.5
@@ -36,7 +36,7 @@
36
  * Plugin Init
37
  */
38
  // Constants
39
- define( 'FBFW_VERSION', '3.2.8' );
40
  define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
41
  define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
42
  define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
@@ -103,7 +103,8 @@ function mfbfw_defaults() {
103
  'hideOnOverlayClick' => 'function(current, event) {
104
  return current.type === "image" ? "close" : false;
105
  },',
106
- 'hideOnContentClick' => '',
 
107
  'enableEscapeButton' => 'on',
108
  'cyclic' => '',
109
  'mouseWheel' => '',
@@ -444,7 +445,7 @@ function mfbfw_init() {
444
  onDeactivate
445
  : <?php echo(isset( $mfbfw['callbackEnable'], $mfbfw['callbackOnCancel'] ) && $mfbfw['callbackEnable'] && $mfbfw['callbackOnCancel'] ? $mfbfw['callbackOnCancel'] . ',' : 'function() { },') ?>
446
  beforeClose: <?php echo(isset( $mfbfw['callbackEnable'], $mfbfw['callbackOnCleanup'] ) && $mfbfw['callbackEnable'] && $mfbfw['callbackOnCleanup'] ? $mfbfw['callbackOnCleanup'] . ',' : 'function() { },') ?>
447
- afterShow: <?php echo(isset( $mfbfw['callbackEnable'], $mfbfw['callbackOnComplete'] ) && $mfbfw['callbackEnable'] && $mfbfw['callbackOnComplete'] ? $mfbfw['callbackOnComplete'] . ',' : 'function() { },') ?>
448
  afterClose: <?php echo(isset( $mfbfw['callbackEnable'], $mfbfw['callbackOnClose'] ) && $mfbfw['callbackEnable'] && $mfbfw['callbackOnClose'] ? $mfbfw['callbackOnClose'] . ',' : 'function() { },') ?>
449
  caption : <?php echo $caption ?>,
450
  afterLoad : <?php echo $afterLoad ?>,
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.9
7
  * Author: Colorlib
8
  * Author URI: https://colorlib.com/wp/
9
  * Tested up to: 5.5
36
  * Plugin Init
37
  */
38
  // Constants
39
+ define( 'FBFW_VERSION', '3.2.9' );
40
  define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
41
  define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
42
  define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
103
  'hideOnOverlayClick' => 'function(current, event) {
104
  return current.type === "image" ? "close" : false;
105
  },',
106
+ 'hideOnContentClick' => '',
107
+ 'zoomOnClick' => '',
108
  'enableEscapeButton' => 'on',
109
  'cyclic' => '',
110
  'mouseWheel' => '',
445
  onDeactivate
446
  : <?php echo(isset( $mfbfw['callbackEnable'], $mfbfw['callbackOnCancel'] ) && $mfbfw['callbackEnable'] && $mfbfw['callbackOnCancel'] ? $mfbfw['callbackOnCancel'] . ',' : 'function() { },') ?>
447
  beforeClose: <?php echo(isset( $mfbfw['callbackEnable'], $mfbfw['callbackOnCleanup'] ) && $mfbfw['callbackEnable'] && $mfbfw['callbackOnCleanup'] ? $mfbfw['callbackOnCleanup'] . ',' : 'function() { },') ?>
448
+ afterShow: <?php echo(isset( $mfbfw['callbackEnable'], $mfbfw['callbackOnComplete'] ) && $mfbfw['callbackEnable'] && $mfbfw['callbackOnComplete'] ? $mfbfw['callbackOnComplete'] . ',' : ( isset( $mfbfw['zoomOnClick'] ) ? 'function(instance) { jQuery( ".fancybox-image" ).on("click", function( ){ ( instance.isScaledDown() ) ? instance.scaleToActual() : instance.scaleToFit() }) },' : 'function() {},' ) )?>
449
  afterClose: <?php echo(isset( $mfbfw['callbackEnable'], $mfbfw['callbackOnClose'] ) && $mfbfw['callbackEnable'] && $mfbfw['callbackOnClose'] ? $mfbfw['callbackOnClose'] . ',' : 'function() { },') ?>
450
  caption : <?php echo $caption ?>,
451
  afterLoad : <?php echo $afterLoad ?>,
lib/admin-tab-behaviour.php CHANGED
@@ -135,6 +135,32 @@
135
  </fieldset>
136
  </td>
137
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  <tr valign="top">
139
  <th scope="row"><?php _e( 'Woocommerce:', 'mfbfw' ); ?></th>
140
  <td>
135
  </fieldset>
136
  </td>
137
  </tr>
138
+ <tr valign="top">
139
+ <th scope="row"><?php _e( 'Zoom On Click', 'mfbfw' ); ?>
140
+ <span class="tooltip-right"
141
+ data-tooltip="<?php _e( 'Lets visitors zoom in on the image when clicking it. It will have no effect if Close on Content Click is toggled. (default: off)', 'mfbfw' ); ?>">
142
+ <i class="dashicons dashicons-editor-help"></i>
143
+ </span>
144
+ </th>
145
+ <td>
146
+ <fieldset>
147
+ <div class="epsilon-toggle">
148
+ <input class="epsilon-toggle__input" type="checkbox" id="zoomOnClick" name="mfbfw[zoomOnClick]" <?php checked( 1, isset( $settings['zoomOnClick'] ) && $settings['zoomOnClick'] ); ?> >
149
+ <div class="epsilon-toggle__items">
150
+ <span class="epsilon-toggle__track"></span>
151
+ <span class="epsilon-toggle__thumb"></span>
152
+ <svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6">
153
+ <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>
154
+ </svg>
155
+ <svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6">
156
+ <path d="M0 0h2v6H0z"></path>
157
+ </svg>
158
+ </div>
159
+ </div>
160
+ <div class="cf"></div>
161
+ </fieldset>
162
+ </td>
163
+ </tr>
164
  <tr valign="top">
165
  <th scope="row"><?php _e( 'Woocommerce:', 'mfbfw' ); ?></th>
166
  <td>
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.5
6
- Stable tag: 3.2.8
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -30,6 +30,8 @@ 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
 
34
  = 3.2.8 =
35
  * Fix property ‘title’ of undefined when using newer versions of jQuery
3
  Tags: fancybox, lightbox, jquery, gallery, image, images, photo, photos, picture, pictures, zoom
4
  Requires at least: 4.6
5
  Tested up to: 5.5
6
+ Stable tag: 3.2.9
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.2.9 =
34
+ * Added Zoom on Click functionality
35
 
36
  = 3.2.8 =
37
  * Fix property ‘title’ of undefined when using newer versions of jQuery