Skip to content

Commit cac97e3

Browse files
authored
Merge pull request #60 from MachoThemes/master
Update to 3.2.0
2 parents cb6ec58 + b3b14c2 commit cac97e3

File tree

8 files changed

+1419
-226
lines changed

8 files changed

+1419
-226
lines changed

assets/css/fancybox-admin.css

Lines changed: 313 additions & 79 deletions
Large diffs are not rendered by default.

fancybox.php

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
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.1.9
6+
* Version: 3.2.0
77
* Author: Colorlib
88
* Author URI: https://colorlib.com/wp/
9-
* Tested up to: 5.0.3
9+
* Tested up to: 5.1
1010
* Requires: 4.6 or higher
1111
* License: GPLv3 or later
1212
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -36,7 +36,7 @@
3636
* Plugin Init
3737
*/
3838
// Constants
39-
define( 'FBFW_VERSION', '3.1.9' );
39+
define( 'FBFW_VERSION', '3.2.0' );
4040
define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
4141
define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
4242
define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
@@ -172,6 +172,7 @@ function mfbfw_enqueue_scripts() {
172172

173173
// Register Scripts
174174
wp_register_script( 'fancybox', FBFW_URL . 'assets/js/jquery.fancybox.js', $jquery, '1.3.4', $footer ); // Main Fancybox script
175+
175176
// Enqueue Scripts
176177
wp_enqueue_script( 'fancybox' ); // Load fancybox
177178

@@ -185,10 +186,8 @@ function mfbfw_enqueue_scripts() {
185186

186187
// Register Styles
187188
wp_register_style( 'fancybox', FBFW_URL . 'assets/css/fancybox.css', false, '1.3.4' ); // Main Fancybox style
188-
wp_register_style( 'fancybox-ie', FBFW_URL . 'assets/css/fancybox.ie.css', array( 'fancybox' ), '1.3.4' ); // Main Fancybox style fixes for IE6-8
189189
// Enqueue Styles
190190
wp_enqueue_style( 'fancybox' );
191-
wp_enqueue_style( 'fancybox-ie' );
192191

193192
// Make IE specific styles load only on IE6-8
194193
$wp_styles->add_data( 'fancybox-ie', 'conditional', 'lt IE 9' );
@@ -292,7 +291,23 @@ function mfbfw_init() {
292291
}
293292

294293
// Supported file extensions
295-
var thumbnails = jQuery("a:has(img)").not(".nolightbox").not('.envira-gallery-link').not('.ngg-simplelightbox').filter( function() { return /\.(jpe?g|png|gif|mp4|webp|bmp|pdf)(\?[^/]*)*$/i.test(jQuery(this).attr('href')) });
294+
295+
<?php
296+
if(isset($mfbfw['exclude_pdf']) && 'on' == $mfbfw['exclude_pdf']){
297+
?>
298+
var thumbnails = jQuery("a:has(img)").not(".nolightbox").not('.envira-gallery-link').not('.ngg-simplelightbox').filter(function () {
299+
return /\.(jpe?g|png|gif|mp4|webp|bmp)(\?[^/]*)*$/i.test(jQuery(this).attr('href'))
300+
});
301+
<?php
302+
} else {
303+
?>
304+
var thumbnails = jQuery("a:has(img)").not(".nolightbox").not('.envira-gallery-link').not('.ngg-simplelightbox').filter(function () {
305+
return /\.(jpe?g|png|gif|mp4|webp|bmp|pdf)(\?[^/]*)*$/i.test(jQuery(this).attr('href'))
306+
});
307+
<?php
308+
}
309+
?>
310+
296311

297312
// Add data-type iframe for links that are not images or videos.
298313
var iframeLinks = jQuery('.fancyboxforwp').filter( function() { return ! /\.(jpe?g|png|gif|mp4|webp|bmp|pdf)(\?[^/]*)*$/i.test(jQuery(this).attr('href')) }).filter( function() { return ! /vimeo|youtube/i.test(jQuery(this).attr('href')) });

lib/admin-tab-animations.php

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,27 @@
55
<table class="form-table fancy-table" style="clear:none;">
66
<tbody>
77
<tr valign="top">
8-
<th scope="row"><?php _e( 'Zoom Options', 'mfbfw' ); ?></th>
8+
<th scope="row"><?php _e( 'Zoom Options', 'mfbfw' ); ?>
9+
<span class="tooltip-right"
10+
data-tooltip="<?php _e( 'Change content transparency during zoom animations (default: on)', 'mfbfw' ); ?>">
11+
<i class="dashicons dashicons-editor-help"></i>
12+
</span>
13+
</th>
914
<td>
1015
<fieldset>
11-
<input type="checkbox" class="onoffswitch-checkbox" name="mfbfw[zoomOpacity]"
12-
id="zoomOpacity"<?php if ( isset( $settings['zoomOpacity'] ) && $settings['zoomOpacity'] ) {
13-
echo ' checked="yes"';
14-
} ?> />
15-
<label for="zoomOpacity" class="onoffswitch-label"></label>
16-
<span class="switch-text"><?php _e( 'Change content transparency during zoom animations (default: on)', 'mfbfw' ); ?></span>
16+
<div class="epsilon-toggle">
17+
<input class="epsilon-toggle__input" type="checkbox" id="zoomOpacity" name="mfbfw[zoomOpacity]" <?php checked( 1, isset( $settings['zoomOpacity'] ) && $settings['zoomOpacity'] ); ?> >
18+
<div class="epsilon-toggle__items">
19+
<span class="epsilon-toggle__track"></span>
20+
<span class="epsilon-toggle__thumb"></span>
21+
<svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6">
22+
<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>
23+
</svg>
24+
<svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6">
25+
<path d="M0 0h2v6H0z"></path>
26+
</svg>
27+
</div>
28+
</div>
1729
</fieldset>
1830
</td>
1931
</tr>

lib/admin-tab-appearance.php

Lines changed: 124 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,80 @@
55
<table class="form-table fancy-table" style="clear:none;">
66
<tbody>
77
<tr valign="top">
8-
<th scope="row"><?php _e( 'Close Button', 'mfbfw' ); ?></th>
8+
<th scope="row"><?php _e( 'Close Button', 'mfbfw' ); ?>
9+
<span class="tooltip-right"
10+
data-tooltip="<?php _e( 'Show Close button (default: off)', 'mfbfw' ); ?>">
11+
<i class="dashicons dashicons-editor-help"></i>
12+
</span>
13+
</th>
914
<td>
1015
<fieldset>
11-
<input type="checkbox" class="onoffswitch-checkbox" name="mfbfw[showCloseButton]"
12-
id="showCloseButton"<?php if ( isset( $settings['showCloseButton'] ) && $settings['showCloseButton'] ) {
13-
echo ' checked="yes"';
14-
} ?> />
15-
<label for="showCloseButton" class="onoffswitch-label">
16-
</label>
17-
<span class="switch-text"><?php _e( 'Show Close button (default: off)', 'mfbfw' ); ?></span>
16+
<div class="epsilon-toggle">
17+
<input class="epsilon-toggle__input" type="checkbox" id="showCloseButton" name="mfbfw[showCloseButton]" <?php checked( 1, isset( $settings['showCloseButton'] ) && $settings['showCloseButton'] ); ?> >
18+
<div class="epsilon-toggle__items">
19+
<span class="epsilon-toggle__track"></span>
20+
<span class="epsilon-toggle__thumb"></span>
21+
<svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6">
22+
<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>
23+
</svg>
24+
<svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6">
25+
<path d="M0 0h2v6H0z"></path>
26+
</svg>
27+
</div>
28+
</div>
29+
1830
<div class="cf"></div>
1931
</fieldset>
2032
</td>
2133
</tr>
2234
<tr valign="top">
23-
<th scope="row"><?php _e( 'Toolbar', 'mfbfw' ); ?></th>
35+
<th scope="row"><?php _e( 'Toolbar', 'mfbfw' ); ?>
36+
<span class="tooltip-right"
37+
data-tooltip="<?php _e( 'Show Toolbar (default: on)', 'mfbfw' ); ?>">
38+
<i class="dashicons dashicons-editor-help"></i>
39+
</span>
40+
</th>
2441
<td>
2542
<fieldset>
26-
<input type="checkbox" class="onoffswitch-checkbox" name="mfbfw[showToolbar]"
27-
id="showToolbar"<?php if ( isset( $settings['showToolbar'] ) && $settings['showToolbar'] ) {
28-
echo ' checked="yes"';
29-
} ?> />
30-
<label for="showToolbar" class="onoffswitch-label">
31-
</label>
32-
<span class="switch-text"><?php _e( 'Show Toolbar (default: on)', 'mfbfw' ); ?></span>
43+
<div class="epsilon-toggle">
44+
<input class="epsilon-toggle__input" type="checkbox" id="showToolbar" name="mfbfw[showToolbar]" <?php checked( 1, isset( $settings['showToolbar'] ) && $settings['showToolbar'] ); ?> >
45+
<div class="epsilon-toggle__items">
46+
<span class="epsilon-toggle__track"></span>
47+
<span class="epsilon-toggle__thumb"></span>
48+
<svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6">
49+
<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>
50+
</svg>
51+
<svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6">
52+
<path d="M0 0h2v6H0z"></path>
53+
</svg>
54+
</div>
55+
</div>
3356
<div class="cf"></div>
3457
</fieldset>
3558
</td>
3659
</tr>
3760
<tr valign="top">
38-
<th scope="row"><?php _e( 'Border', 'mfbfw' ); ?></th>
61+
<th scope="row"><?php _e( 'Border', 'mfbfw' ); ?>
62+
<span class="tooltip-right"
63+
data-tooltip="<?php _e( 'Show Border (default: off)', 'mfbfw' ); ?>">
64+
<i class="dashicons dashicons-editor-help"></i>
65+
</span>
66+
</th>
3967
<td>
4068
<fieldset>
41-
<input class="onoffswitch-checkbox" type="checkbox" name="mfbfw[border]"
42-
id="border"<?php if ( isset( $settings['border'] ) && $settings['border'] ) {
43-
echo ' checked="yes"';
44-
} ?> />
45-
<label for="border" class="onoffswitch-label"></label>
46-
<span class="switch-text"><?php _e( 'Show Border (default: off)', 'mfbfw' ); ?></span>
69+
<div class="epsilon-toggle">
70+
<input class="epsilon-toggle__input" type="checkbox" id="border" name="mfbfw[border]" <?php checked( 1, isset( $settings['border'] ) && $settings['border'] ); ?> >
71+
<div class="epsilon-toggle__items">
72+
<span class="epsilon-toggle__track"></span>
73+
<span class="epsilon-toggle__thumb"></span>
74+
<svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6">
75+
<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>
76+
</svg>
77+
<svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6">
78+
<path d="M0 0h2v6H0z"></path>
79+
</svg>
80+
</div>
81+
</div>
4782
<div class="cf"></div>
4883
<div id="borderColorBlock" class="hidden-block">
4984
<label for="borderColor">
@@ -56,14 +91,18 @@
5691
</td>
5792
</tr>
5893
<tr valign="top">
59-
<th scope="row"><?php _e( 'Padding', 'mfbfw' ); ?></th>
94+
<th scope="row"><?php _e( 'Padding', 'mfbfw' ); ?>
95+
<span class="tooltip-right"
96+
data-tooltip="<?php _e( 'HTML color of the padding (default: #FFFFFF)', 'mfbfw' ); ?>">
97+
<i class="dashicons dashicons-editor-help"></i>
98+
</span>
99+
</th>
60100
<td>
61101
<fieldset>
62102
<label for="paddingColor">
63103
<input type="text" class="color-btn" name="mfbfw[paddingColor]" id="paddingColor"
64104
value="<?php echo $settings['paddingColor'] ?>" size="7" maxlength="7"/>
65105
</label>
66-
<p class="description"><?php _e( 'HTML color of the padding (default: #FFFFFF)', 'mfbfw' ); ?></p>
67106
<p class="description"><?php _e( '(This should be left on #FFFFFF (white) if you want to display anything other than images, like inline or framed content)', 'mfbfw' ); ?></p>
68107
<div class="line-spacer"></div>
69108
<label for="padding" class="inlined">
@@ -78,15 +117,28 @@
78117
</td>
79118
</tr>
80119
<tr valign="top">
81-
<th scope="row"><?php _e( 'Overlay Options', 'mfbfw' ); ?></th>
120+
<th scope="row"><?php _e( 'Overlay Options', 'mfbfw' ); ?>
121+
<span class="tooltip-right"
122+
data-tooltip="<?php _e( 'Add overlay (default: on)', 'mfbfw' ); ?>">
123+
<i class="dashicons dashicons-editor-help"></i>
124+
</span>
125+
</th>
82126
<td>
83127
<fieldset>
84-
<input type="checkbox" class="onoffswitch-checkbox" name="mfbfw[overlayShow]"
85-
id="overlayShow"<?php if ( isset( $settings['overlayShow'] ) && $settings['overlayShow'] ) {
86-
echo ' checked="yes"';
87-
} ?> />
88-
<label for="overlayShow" class="onoffswitch-label"></label>
89-
<span class="switch-text"><?php _e( 'Add overlay (default: on)', 'mfbfw' ); ?></span>
128+
<div class="epsilon-toggle">
129+
<input class="epsilon-toggle__input" type="checkbox" id="overlayShow" name="mfbfw[overlayShow]" <?php checked( 1, isset( $settings['overlayShow'] ) && $settings['overlayShow'] ); ?> >
130+
<div class="epsilon-toggle__items">
131+
<span class="epsilon-toggle__track"></span>
132+
<span class="epsilon-toggle__thumb"></span>
133+
<svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6">
134+
<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>
135+
</svg>
136+
<svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6">
137+
<path d="M0 0h2v6H0z"></path>
138+
</svg>
139+
</div>
140+
</div>
141+
90142
<div class="cf"></div>
91143
<div id="overlayBlock" class="hidden-block">
92144
<label for="overlayColor">
@@ -108,15 +160,28 @@
108160
</td>
109161
</tr>
110162
<tr valign="top">
111-
<th scope="row"><?php _e( 'Title', 'mfbfw' ); ?></th>
163+
<th scope="row"><?php _e( 'Title', 'mfbfw' ); ?>
164+
<span class="tooltip-right"
165+
data-tooltip="<?php _e( 'Show the title (default: on)', 'mfbfw' ); ?>">
166+
<i class="dashicons dashicons-editor-help"></i>
167+
</span>
168+
</th>
112169
<td>
113170
<fieldset>
114-
<input type="checkbox" class="onoffswitch-checkbox" name="mfbfw[titleShow]"
115-
id="titleShow"<?php if ( isset( $settings['titleShow'] ) && $settings['titleShow'] ) {
116-
echo ' checked="yes"';
117-
} ?> />
118-
<label for="titleShow" class="onoffswitch-label"></label>
119-
<span class="switch-text"><?php _e( 'Show the title (default: on)', 'mfbfw' ); ?></span>
171+
<div class="epsilon-toggle">
172+
<input class="epsilon-toggle__input" type="checkbox" id="titleShow" name="mfbfw[titleShow]" <?php checked( 1, isset( $settings['titleShow'] ) && $settings['titleShow'] );?> >
173+
<div class="epsilon-toggle__items">
174+
<span class="epsilon-toggle__track"></span>
175+
<span class="epsilon-toggle__thumb"></span>
176+
<svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6">
177+
<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>
178+
</svg>
179+
<svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6">
180+
<path d="M0 0h2v6H0z"></path>
181+
</svg>
182+
</div>
183+
</div>
184+
120185
<div class="cf"></div>
121186
<div id="titleBlock" class="hidden-block">
122187
<label for="titleSize">
@@ -162,15 +227,28 @@ class="colorpick" value="<?php echo $settings['titleColor']; ?>" size="7"
162227
</td>
163228
</tr>
164229
<tr valign="top">
165-
<th scope="row"><?php _e( 'Navigation Arrows', 'mfbfw' ); ?></th>
230+
<th scope="row"><?php _e( 'Navigation Arrows', 'mfbfw' ); ?>
231+
<span class="tooltip-right"
232+
data-tooltip="<?php _e( 'Show the navigation arrows (default: on)', 'mfbfw' ); ?>">
233+
<i class="dashicons dashicons-editor-help"></i>
234+
</span>
235+
</th>
166236
<td>
167237
<fieldset>
168-
<input type="checkbox" class="onoffswitch-checkbox" name="mfbfw[showNavArrows]"
169-
id="showNavArrows"<?php if ( isset( $settings['showNavArrows'] ) && $settings['showNavArrows'] ) {
170-
echo ' checked="yes"';
171-
} ?> />
172-
<label for="showNavArrows" class="onoffswitch-label"></label>
173-
<span class="switch-text"><?php _e( 'Show the navigation arrows (default: on)', 'mfbfw' ); ?></span>
238+
<div class="epsilon-toggle">
239+
<input class="epsilon-toggle__input" type="checkbox" id="showNavArrows" name="mfbfw[showNavArrows]" <?php checked( 1, isset( $settings['showNavArrows'] ) && $settings['showNavArrows'] ); ?> >
240+
<div class="epsilon-toggle__items">
241+
<span class="epsilon-toggle__track"></span>
242+
<span class="epsilon-toggle__thumb"></span>
243+
<svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6">
244+
<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>
245+
</svg>
246+
<svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6">
247+
<path d="M0 0h2v6H0z"></path>
248+
</svg>
249+
</div>
250+
</div>
251+
174252
<div class="cf"></div>
175253
</fieldset>
176254
</td>

0 commit comments

Comments
 (0)