Easy FancyBox - Version 1.6.2

Version Description

  • FIX: line breaks hidden on options media admin page since WP4.9, thanks @garrett-eclipse
Download this release

Release Info

Developer deployer
Plugin Icon 128x128 Easy FancyBox
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

easy-fancybox.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://status301.net/wordpress-plugins/easy-fancybox/
5
  Description: Easily enable the <a href="http://fancybox.net/">FancyBox jQuery extension</a> on all image, SWF, PDF, YouTube, Dailymotion and Vimeo links. Also supports iFrame and inline content.
6
  Text Domain: easy-fancybox
7
  Domain Path: languages
8
- Version: 1.6.1
9
  Author: RavanH
10
  Author URI: http://status301.net/
11
  */
@@ -37,7 +37,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
37
  * CONSTANTS
38
  **************/
39
 
40
- define( 'EASY_FANCYBOX_VERSION', '1.6.1' );
41
  define( 'FANCYBOX_VERSION', '1.3.8' );
42
  define( 'MOUSEWHEEL_VERSION', '3.1.13' );
43
  define( 'EASING_VERSION', '1.4.0' );
5
  Description: Easily enable the <a href="http://fancybox.net/">FancyBox jQuery extension</a> on all image, SWF, PDF, YouTube, Dailymotion and Vimeo links. Also supports iFrame and inline content.
6
  Text Domain: easy-fancybox
7
  Domain Path: languages
8
+ Version: 1.6.2
9
  Author: RavanH
10
  Author URI: http://status301.net/
11
  */
37
  * CONSTANTS
38
  **************/
39
 
40
+ define( 'EASY_FANCYBOX_VERSION', '1.6.2' );
41
  define( 'FANCYBOX_VERSION', '1.3.8' );
42
  define( 'MOUSEWHEEL_VERSION', '3.1.13' );
43
  define( 'EASING_VERSION', '1.4.0' );
inc/class-easyfancybox-admin.php CHANGED
@@ -49,16 +49,21 @@ class easyFancyBox_Admin extends easyFancyBox {
49
 
50
  // add our FancyBox Media Settings Section on Settings > Media admin page
51
  public static function settings_section() {
52
- echo '<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number='.EASY_FANCYBOX_VERSION.'&no_shipping=0&tax=0&charset=UTF%2d8&currency_code=EUR" title="'.__('Donate to keep the Easy FancyBox plugin development going!','easy-fancybox').'"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:right;margin:5px 0 0 10px" alt="'.__('Donate to keep the Easy FancyBox plugin development going!','easy-fancybox').'" width="92" height="26" /></a>'.sprintf(__('The options in this section are provided by the plugin %s and determine the <strong>Media Lightbox</strong> overlay appearance and behavior controlled by %s.','easy-fancybox'),'<strong><a href="http://status301.net/wordpress-plugins/easy-fancybox/">'.__('Easy FancyBox','easy-fancybox').'</a></strong>','<strong><a href="http://fancybox.net/">'.__('FancyBox','easy-fancybox').'</a></strong>').'</p><p>'.__('First enable each sub-section that you need. Then save and come back to adjust its specific settings.','easy-fancybox').' '.__('Note: Each additional sub-section and features like <em>Auto-detection</em>, <em>Elastic transitions</em> and all <em>Easing effects</em> (except Swing) will have some extra impact on client-side page speed. Enable only those sub-sections and options that you actually need on your site.','easy-fancybox').' '.__('Some setting like Transition options are unavailable for SWF video, PDF and iFrame content to ensure browser compatibility and readability.','easy-fancybox').'</p>';
 
53
 
54
  /* Black Friday offer */
55
  if ( !class_exists('easyFancyBox_Advanced')
56
  && current_user_can( 'install_plugins' )
57
  && strtotime('now') > strtotime('23-11-2017')
58
  && strtotime('now') < strtotime('28-11-2017') ) {
59
- echo '<p style="background-color:#F9D400;padding:5px 10px;border-radius:15px;box-shadow:#333 0 1px 1px;color:#000;"><strong>Easy FancyBox advanced options at 30% OFF!</strong> Black Friday to Cyber Monday: THE BIG 30 SALE at Status301. <em>A whopping 30% discount but only for the first 30 customers.
 
 
 
60
  After that, there will still be a discount of 15% for everybody until tuesday 0:00 GMT so
61
- <strong><a href="https://premium.status301.net/black-friday-til-cyber-monday-big-30-sale/?discount=BFCM30" target="_blank">to take advantage of this opportunity</a></strong> before it\'s too late</em>...</p>';
 
62
  }
63
 
64
  // Pro extension version compatibility message
@@ -216,7 +221,7 @@ class easyFancyBox_Admin extends easyFancyBox {
216
  echo '<div class="update-nag"><p>';
217
  //echo '<a href="?easy_fancybox_ignore_notice=1" title="' . __('Hide message','easy-fancybox') . '" style="display:block;float:right">X</a>';
218
  _e('Notice: The current Easy FancyBox plugin version is not fully compatible with your version of the Pro extension. Some advanced options may not be functional.','easy-fancybox');
219
- echo '<br/>';
220
  printf(__('Please <a href="%1$s" target="_blank">download and install the latest Pro version</a>.','easy-fancybox'), 'https://premium.status301.net/account/');
221
  echo ' ';
222
  printf(__('Or you can ignore and <a href="%1$s">hide this message</a>.','easy-fancybox'), '?easy_fancybox_ignore_notice=1');
@@ -253,12 +258,12 @@ class easyFancyBox_Admin extends easyFancyBox {
253
  /* If user clicks to ignore the notice, add that to their user meta */
254
  global $current_user;
255
 
256
- if ( isset($_GET['easy_fancybox_ignore_notice']) && '1' == $_GET['easy_fancybox_ignore_notice'] ) {
257
  add_user_meta($current_user->ID, 'easy_fancybox_ignore_notice', 'true', true);
258
- }
259
 
260
  if ( class_exists('easyFancyBox_Advanced')
261
- && ( !defined('easyFancyBox_Advanced::VERSION') || version_compare(easyFancyBox_Advanced::VERSION, self::$compat_pro_min, '<') ) )
 
262
  self::$do_compat_warning = true;
263
  }
264
 
49
 
50
  // add our FancyBox Media Settings Section on Settings > Media admin page
51
  public static function settings_section() {
52
+ echo '<style type="text/css">.options-media-php br { display: initial; }</style><!-- undo WP style rule introduced in 4.9 on settings-media -->
53
+ <p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number='.EASY_FANCYBOX_VERSION.'&no_shipping=0&tax=0&charset=UTF%2d8&currency_code=EUR" title="'.__('Donate to keep the Easy FancyBox plugin development going!','easy-fancybox').'"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:right;margin:5px 0 0 10px" alt="'.__('Donate to keep the Easy FancyBox plugin development going!','easy-fancybox').'" width="92" height="26" /></a>'.sprintf(__('The options in this section are provided by the plugin %s and determine the <strong>Media Lightbox</strong> overlay appearance and behavior controlled by %s.','easy-fancybox'),'<strong><a href="http://status301.net/wordpress-plugins/easy-fancybox/">'.__('Easy FancyBox','easy-fancybox').'</a></strong>','<strong><a href="http://fancybox.net/">'.__('FancyBox','easy-fancybox').'</a></strong>').'</p><p>'.__('First enable each sub-section that you need. Then save and come back to adjust its specific settings.','easy-fancybox').' '.__('Note: Each additional sub-section and features like <em>Auto-detection</em>, <em>Elastic transitions</em> and all <em>Easing effects</em> (except Swing) will have some extra impact on client-side page speed. Enable only those sub-sections and options that you actually need on your site.','easy-fancybox').' '.__('Some setting like Transition options are unavailable for SWF video, PDF and iFrame content to ensure browser compatibility and readability.','easy-fancybox').'</p>';
54
 
55
  /* Black Friday offer */
56
  if ( !class_exists('easyFancyBox_Advanced')
57
  && current_user_can( 'install_plugins' )
58
  && strtotime('now') > strtotime('23-11-2017')
59
  && strtotime('now') < strtotime('28-11-2017') ) {
60
+ echo '<p style="background-color:#F9D400;padding:5px 10px;border-radius:15px;box-shadow:#333 0 1px 1px;color:#000;">
61
+ <strong>Easy FancyBox advanced options at 30% OFF!</strong>
62
+ Black Friday to Cyber Monday: THE BIG 30 SALE at Status301.
63
+ <em>A whopping 30% discount but only for the first 30 customers.
64
  After that, there will still be a discount of 15% for everybody until tuesday 0:00 GMT so
65
+ <strong><a href="https://premium.status301.net/black-friday-til-cyber-monday-big-30-sale/?discount=BFCM30" target="_blank">to take advantage of this opportunity</a></strong>
66
+ before it\'s too late</em>...</p>';
67
  }
68
 
69
  // Pro extension version compatibility message
221
  echo '<div class="update-nag"><p>';
222
  //echo '<a href="?easy_fancybox_ignore_notice=1" title="' . __('Hide message','easy-fancybox') . '" style="display:block;float:right">X</a>';
223
  _e('Notice: The current Easy FancyBox plugin version is not fully compatible with your version of the Pro extension. Some advanced options may not be functional.','easy-fancybox');
224
+ echo '<br />';
225
  printf(__('Please <a href="%1$s" target="_blank">download and install the latest Pro version</a>.','easy-fancybox'), 'https://premium.status301.net/account/');
226
  echo ' ';
227
  printf(__('Or you can ignore and <a href="%1$s">hide this message</a>.','easy-fancybox'), '?easy_fancybox_ignore_notice=1');
258
  /* If user clicks to ignore the notice, add that to their user meta */
259
  global $current_user;
260
 
261
+ if ( isset($_GET['easy_fancybox_ignore_notice']) && '1' == $_GET['easy_fancybox_ignore_notice'] )
262
  add_user_meta($current_user->ID, 'easy_fancybox_ignore_notice', 'true', true);
 
263
 
264
  if ( class_exists('easyFancyBox_Advanced')
265
+ && ( !defined('easyFancyBox_Advanced::VERSION')
266
+ || version_compare(easyFancyBox_Advanced::VERSION, self::$compat_pro_min, '<') ) )
267
  self::$do_compat_warning = true;
268
  }
269
 
inc/class-easyfancybox-options.php CHANGED
@@ -363,9 +363,12 @@ class easyFancyBox_Options extends easyFancyBox {
363
  'default' => '0',
364
  'sanitize_callback' => 'intval',
365
  'options' => array(
366
- '0' => translate('No')
367
- ),
368
- 'translations' => __('1 Day','easy-fancybox') . __('1 Week','easy-fancybox') . __('1 Month','easy-fancybox') . __('1 Year','easy-fancybox'),
 
 
 
369
  'description' => ' <em><a href="'.$url.'">' . __('Make available &raquo;','easy-fancybox') . '</a></em>'
370
  ),
371
  'p1' => array (
@@ -686,8 +689,7 @@ class easyFancyBox_Options extends easyFancyBox {
686
  'id' => 'fancybox_autoSelector',
687
  'hide' => true,
688
  'input' => 'hidden',
689
- 'default' => 'div.gallery ', // add div.tiled-gallery for Tiled Galleries support
690
- 'translations' => __('Galleries per Section (below)','easy-fancybox') . __('This applies when <em>Apply to</em> is set to <em>Limited to Sections</em> and/or <em>Autogallery</em> is set to <em>Galleries per Section</em>. Adapt it to conform with your theme.','easy-fancybox') . __('Examples: If your theme wraps post content in a div with class post, change this value to "div.post". If you only want to group images in a WordPress gallery together, use "div.gallery". If you want to include images in a sidebar with ID primary, add ", #primary".','easy-fancybox') . __('Hide/show title on mouse hover action works best with Overlay title position.','easy-fancybox') . __('Auto-rotation uses a fixed 3, 6, 9 or 12 second pause per image.','easy-fancybox') . __('(3 seconds)','easy-fancybox') . __('(6 seconds)','easy-fancybox') . __('(9 seconds)','easy-fancybox') . __('(12 seconds)','easy-fancybox')
691
  ),
692
  'onComplete' => array (
693
  'id' => '',
363
  'default' => '0',
364
  'sanitize_callback' => 'intval',
365
  'options' => array(
366
+ '0' => translate('No'),
367
+ '1' => __('1 Day','easy-fancybox'),
368
+ '7' => __('1 Week','easy-fancybox'),
369
+ '30' => __('1 Month','easy-fancybox'),
370
+ '365' => __('1 Year','easy-fancybox')
371
+ ),
372
  'description' => ' <em><a href="'.$url.'">' . __('Make available &raquo;','easy-fancybox') . '</a></em>'
373
  ),
374
  'p1' => array (
689
  'id' => 'fancybox_autoSelector',
690
  'hide' => true,
691
  'input' => 'hidden',
692
+ 'default' => 'div.gallery ' // add div.tiled-gallery for Tiled Galleries support
 
693
  ),
694
  'onComplete' => array (
695
  'id' => '',
inc/translation-strings.php CHANGED
@@ -1,9 +1,71 @@
1
  <?php return;
2
  /**
3
- * This file exists soley to store the plugin
4
  * translation strings.
5
  *
6
- * It is never included anywhere, and is used for parsing.
7
  */
8
-
9
  //
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php return;
2
  /**
3
+ * This file exists solely to store the plugin
4
  * translation strings.
5
  *
6
+ * It is never included anywhere, used only for parsing.
7
  */
8
+
9
  //
10
+ __('Thank you for purchasing the Easy FancyBox - Pro extension. New options are available.','easy-fancybox');
11
+ __('Get support here.','easy-fancybox');
12
+
13
+ // appearance
14
+ __('Set a border radius to create rounded corners. Higher is rounder.','easy-fancybox');
15
+
16
+ // autopopup
17
+ __('First Image link','easy-fancybox');
18
+ __('First PDF link','easy-fancybox');
19
+ __('First SWF link','easy-fancybox');
20
+ __('First SVG link','easy-fancybox');
21
+ __('First YouTube link ','easy-fancybox');
22
+ __('First Vimeo link ','easy-fancybox');
23
+ __('First Dailymotion link ','easy-fancybox');
24
+ __('First iFrame link','easy-fancybox');
25
+ __('First of any link','easy-fancybox');
26
+
27
+ __('Treat popups on different URLs separately','easy-fancybox');
28
+
29
+ // gallery section
30
+ __('Links inside Section(s) only (below)','easy-fancybox');
31
+
32
+ // more easing effect names
33
+ __('easeInQuad','easy-fancybox');
34
+ __('easeOutQuad','easy-fancybox');
35
+ __('easeInOutQuad','easy-fancybox');
36
+ __('easeInCubic','easy-fancybox');
37
+ __('easeOutCubic','easy-fancybox');
38
+ __('easeInOutCubic','easy-fancybox');
39
+ __('easeInQuart','easy-fancybox');
40
+ __('easeOutQuart','easy-fancybox');
41
+ __('easeInOutQuart','easy-fancybox');
42
+ __('easeInQuint','easy-fancybox');
43
+ __('easeOutQuint','easy-fancybox');
44
+ __('easeInOutQuint','easy-fancybox');
45
+ __('easeInSine','easy-fancybox');
46
+ __('easeOutSine','easy-fancybox');
47
+ __('easeInOutSine','easy-fancybox');
48
+ __('easeInExpo','easy-fancybox');
49
+ __('easeOutExpo','easy-fancybox');
50
+ __('easeInOutExpo','easy-fancybox');
51
+ __('easeInCirc','easy-fancybox');
52
+ __('easeOutCirc','easy-fancybox');
53
+ __('easeInOutCirc','easy-fancybox');
54
+ __('easeInElastic','easy-fancybox');
55
+ __('easeOutElastic','easy-fancybox');
56
+ __('easeInOutElastic','easy-fancybox');
57
+ __('easeInOutBack','easy-fancybox');
58
+ __('easeInBounce','easy-fancybox');
59
+ __('easeOutBounce','easy-fancybox');
60
+ __('easeInOutBounce','easy-fancybox');
61
+
62
+ // advanced
63
+ __('Galleries per Section (below)','easy-fancybox');
64
+ __('This applies when <em>Apply to</em> is set to <em>Limited to Sections</em> and/or <em>Autogallery</em> is set to <em>Galleries per Section</em>. Adapt it to conform with your theme.','easy-fancybox');
65
+ __('Examples: If your theme wraps post content in a div with class post, change this value to "div.post". If you only want to group images in a WordPress gallery together, use "div.gallery". If you want to include images in a sidebar with ID primary, add ", #primary".','easy-fancybox');
66
+ __('Hide/show title on mouse hover action works best with Overlay title position.','easy-fancybox');
67
+ __('Auto-rotation uses a fixed 3, 6, 9 or 12 second pause per image.','easy-fancybox');
68
+ __('(3 seconds)','easy-fancybox');
69
+ __('(6 seconds)','easy-fancybox');
70
+ __('(9 seconds)','easy-fancybox');
71
+ __('(12 seconds)','easy-fancybox');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravan
4
  Tags: fancybox, lightbox, gallery, image, photo, video, flash, overlay, youtube, vimeo, dailymotion, pdf, svg, iframe, swf, jquery, webp
5
  Requires at least: 3.3
6
  Tested up to: 4.9
7
- Stable tag: 1.6.2
8
 
9
  Easily enable the FancyBox jQuery extension on just about all media links. Multi-Site compatible. Supports iFrame and Flash movies.
10
 
@@ -458,11 +458,15 @@ If you still do not get to see your images in FancyBox, ask on the [Easy FancyBo
458
 
459
  == Upgrade Notice ==
460
 
461
- = 1.6.2 =
462
- Fix: admin page line breaks hidden in WP 4.9
463
 
464
  == Changelog ==
465
 
 
 
 
 
466
  = 1.6.2 =
467
  * FIX: line breaks hidden on options media admin page since WP 4.9, thanks @garrett-eclipse
468
 
4
  Tags: fancybox, lightbox, gallery, image, photo, video, flash, overlay, youtube, vimeo, dailymotion, pdf, svg, iframe, swf, jquery, webp
5
  Requires at least: 3.3
6
  Tested up to: 4.9
7
+ Stable tag: 1.6.3
8
 
9
  Easily enable the FancyBox jQuery extension on just about all media links. Multi-Site compatible. Supports iFrame and Flash movies.
10
 
458
 
459
  == Upgrade Notice ==
460
 
461
+ = 1.6.3 =
462
+ Switch to wp_add_inline_script() and fix inline js minification incompatibility
463
 
464
  == Changelog ==
465
 
466
+ = 1.6.3 =
467
+ * Switch to wp_add_inline_script() script printing, thanks @szepeviktor
468
+ * FIX: inline js minification incompatibility, thanks @alexiswilke
469
+
470
  = 1.6.2 =
471
  * FIX: line breaks hidden on options media admin page since WP 4.9, thanks @garrett-eclipse
472