Easy FancyBox - Version 1.6.1

Version Description

  • Nolightbox class in menu also for other media types than images
  • FIX: CSS color code
  • Spelling fixes, thanks @garrett-eclipse
  • FIX: Pinterest button compatibility
  • FIX: Double load plugin text domain
Download this release

Release Info

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

Code changes from version 1.6 to 1.6.1

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
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' );
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.1
9
  Author: RavanH
10
  Author URI: http://status301.net/
11
  */
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' );
fancybox/jquery.fancybox-1.3.8.css CHANGED
@@ -85,7 +85,7 @@
85
  height: 100%;
86
  background: #fff;
87
  box-shadow:0 0 20px #111;
88
- -moz-box-shadow:0 0 20px #1111;
89
  -webkit-box-shadow:0 0 20px #111;
90
  }
91
 
@@ -138,12 +138,15 @@
138
  margin: 0;
139
  }
140
 
141
- #fancybox-img {
142
  width: 100%;
143
  height: 100%;
 
 
 
 
144
  padding: 0;
145
  margin: 0;
146
- border: none;
147
  outline: none;
148
  line-height: 0;
149
  vertical-align: top;
@@ -152,12 +155,12 @@
152
  }
153
 
154
  #fancybox-frame {
155
- width: 100%;
156
- height: 100%;
157
- border: none;
158
  display: block;
159
  -webkit-overflow-scrolling: touch;
160
  z-index: 0; /* z-index bug with -webkit-overflow-scrolling */
 
 
 
161
  }
162
 
163
  #fancybox-left, #fancybox-right {
85
  height: 100%;
86
  background: #fff;
87
  box-shadow:0 0 20px #111;
88
+ -moz-box-shadow:0 0 20px #111;
89
  -webkit-box-shadow:0 0 20px #111;
90
  }
91
 
138
  margin: 0;
139
  }
140
 
141
+ #fancybox-frame, #fancybox-img {
142
  width: 100%;
143
  height: 100%;
144
+ border: none;
145
+ }
146
+
147
+ #fancybox-img {
148
  padding: 0;
149
  margin: 0;
 
150
  outline: none;
151
  line-height: 0;
152
  vertical-align: top;
155
  }
156
 
157
  #fancybox-frame {
 
 
 
158
  display: block;
159
  -webkit-overflow-scrolling: touch;
160
  z-index: 0; /* z-index bug with -webkit-overflow-scrolling */
161
+ -webkit-transform: translateZ(0px);
162
+ -webkit-transform: translate3d(0,0,0);
163
+ -webkit-perspective: 1000;
164
  }
165
 
166
  #fancybox-left, #fancybox-right {
fancybox/jquery.fancybox-1.3.8.min.css CHANGED
@@ -1 +1 @@
1
- #fancybox-close,#fancybox-content,#fancybox-content>div,#fancybox-content>div>div,#fancybox-frame,#fancybox-left,#fancybox-loading,#fancybox-loading div,#fancybox-outer,#fancybox-overlay,#fancybox-right,#fancybox-title,#fancybox-title div,#fancybox-wrap,.fancy-ico,.fancybox-bg{box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:111104;display:none}#fancybox-loading div,#fancybox-overlay,#fancybox-wrap{left:0;top:0;position:absolute}#fancybox-loading div{width:40px;height:480px;background-image:url(fancybox.png)}#fancybox-overlay{width:100%;z-index:111100;display:none}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{padding:20px;z-index:111101;outline:0;display:none}#fancybox-content,#fancybox-outer{position:relative;background:#fff}#fancybox-outer{width:100%;height:100%;box-shadow:0 0 20px #111;-moz-box-shadow:0 0 20px #1111;-webkit-box-shadow:0 0 20px #111}#fancybox-content{width:0;height:0;padding:0;outline:0;overflow:hidden;z-index:111102;border:0 solid #fff;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}#fancybox-content>div{max-width:100%;max-height:100%}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:0 0;z-index:111101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:url(fancybox.png) -40px 0;cursor:pointer;z-index:111103;display:none}#fancybox-left-ico,#fancybox-right-ico{background-image:url(fancybox.png)}#fancybox-frame,#fancybox-img{border:none;height:100%;width:100%}#fancybox-error{color:#444;font:400 12px/20px Arial;padding:14px;margin:0}#fancybox-img{padding:0;margin:0;outline:0;line-height:0;vertical-align:top;max-width:none!important;max-height:none!important}#fancybox-frame{display:block;-webkit-overflow-scrolling:touch;z-index:0}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;background:initial;outline:0;z-index:111102;display:none}#fancybox-left{left:0}.rtl #fancybox-left{left:auto;right:0}#fancybox-right{right:0}.rtl #fancybox-right{left:0;right:auto}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:111102;display:block}#fancybox-left-ico{background-position:-40px -30px}.rtl #fancybox-left-ico{background-position:-40px -60px;right:-9999px}#fancybox-right-ico{background-position:-40px -60px}.rtl #fancybox-right-ico{background-position:-40px -30px;right:-9999px}#fancybox-left:hover,#fancybox-right:hover{visibility:visible}#fancybox-left:hover span{left:20px}.rtl #fancybox-left:hover span{right:20px}#fancybox-right:hover span{left:auto;right:20px}.rtl #fancybox-right:hover span{right:auto;left:20px}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:111102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}.rtl .fancybox-title-over{text-align:right}#fancybox-title-over{padding:10px;background:rgba(0,0,0,.64);display:block}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto}#fancybox-title-float-wrap td{border:none;white-space:nowrap}#fancybox-title-float-left{padding:0 0 0 15px;background:url(fancybox.png) -40px -90px no-repeat}#fancybox-title-float-main{color:#fff;line-height:29px;font-weight:700;padding:0 0 3px;background:url(fancybox-x.png) 0 -40px}#fancybox-title-float-right{padding:0 0 0 15px;background:url(fancybox.png) -55px -90px no-repeat}.fancybox-hidden{display:none}
1
+ #fancybox-close,#fancybox-content,#fancybox-content>div,#fancybox-content>div>div,#fancybox-frame,#fancybox-left,#fancybox-loading,#fancybox-loading div,#fancybox-outer,#fancybox-overlay,#fancybox-right,#fancybox-title,#fancybox-title div,#fancybox-wrap,.fancy-ico,.fancybox-bg{box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:111104;display:none}#fancybox-loading div,#fancybox-overlay,#fancybox-wrap{left:0;top:0;position:absolute}#fancybox-loading div{width:40px;height:480px;background-image:url(fancybox.png)}#fancybox-overlay{width:100%;z-index:111100;display:none}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{padding:20px;z-index:111101;outline:0;display:none}#fancybox-content,#fancybox-outer{position:relative;background:#fff}#fancybox-outer{width:100%;height:100%;box-shadow:0 0 20px #111;-moz-box-shadow:0 0 20px #111;-webkit-box-shadow:0 0 20px #111}#fancybox-content{width:0;height:0;padding:0;outline:0;overflow:hidden;z-index:111102;border:0 solid #fff;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}#fancybox-content>div{max-width:100%;max-height:100%}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:0 0;z-index:111101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:url(fancybox.png) -40px 0;cursor:pointer;z-index:111103;display:none}#fancybox-left-ico,#fancybox-right-ico{background-image:url(fancybox.png)}#fancybox-frame,#fancybox-img{border:none;height:100%;width:100%}#fancybox-error{color:#444;font:400 12px/20px Arial;padding:14px;margin:0}#fancybox-img{padding:0;margin:0;outline:0;line-height:0;vertical-align:top;max-width:none!important;max-height:none!important}#fancybox-frame{display:block;-webkit-overflow-scrolling:touch;z-index:0;-webkit-transform: translateZ(0px);-webkit-transform: translate3d(0,0,0);-webkit-perspective:1000}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;background:initial;outline:0;z-index:111102;display:none}#fancybox-left{left:0}.rtl #fancybox-left{left:auto;right:0}#fancybox-right{right:0}.rtl #fancybox-right{left:0;right:auto}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:111102;display:block}#fancybox-left-ico{background-position:-40px -30px}.rtl #fancybox-left-ico{background-position:-40px -60px;right:-9999px}#fancybox-right-ico{background-position:-40px -60px}.rtl #fancybox-right-ico{background-position:-40px -30px;right:-9999px}#fancybox-left:hover,#fancybox-right:hover{visibility:visible}#fancybox-left:hover span{left:20px}.rtl #fancybox-left:hover span{right:20px}#fancybox-right:hover span{left:auto;right:20px}.rtl #fancybox-right:hover span{right:auto;left:20px}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:111102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}.rtl .fancybox-title-over{text-align:right}#fancybox-title-over{padding:10px;background:rgba(0,0,0,.64);display:block}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto}#fancybox-title-float-wrap td{border:none;white-space:nowrap}#fancybox-title-float-left{padding:0 0 0 15px;background:url(fancybox.png) -40px -90px no-repeat}#fancybox-title-float-main{color:#fff;line-height:29px;font-weight:700;padding:0 0 3px;background:url(fancybox-x.png) 0 -40px}#fancybox-title-float-right{padding:0 0 0 15px;background:url(fancybox.png) -55px -90px no-repeat}.fancybox-hidden{display:none}
inc/class-easyfancybox-admin.php CHANGED
@@ -49,7 +49,17 @@ 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 behaviour 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
  // Pro extension version compatibility message
55
  if ( self::$do_compat_warning ) {
@@ -193,61 +203,6 @@ class easyFancyBox_Admin extends easyFancyBox {
193
  return $setting;
194
  }
195
 
196
- /*
197
- public static function add_menu() {
198
- // Register our plugin page
199
- self::$pagehook = add_submenu_page( 'themes.php', __('Easy FancyBox Settings', 'easy-fancybox'), __('FancyBox', 'easy-fancybox'), 'manage_options', 'easy-fancybox', array(__CLASS__, 'admin') );
200
- // Using registered $page handle to hook script load
201
- add_action('load-' . self::$pagehook, array(__CLASS__, 'admin_scripts'));
202
- }
203
-
204
- public static function admin() {
205
-
206
- add_filter( 'get_user_option_closedpostboxes_'.self::$pagehook, array(__CLASS__, 'closed_meta_boxes') );
207
-
208
- add_meta_box('submitdiv', __('Sections','easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_submit'), self::$pagehook, 'side', 'high');
209
- add_meta_box('globaldiv', __('Global settings', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_global'), self::$pagehook, 'normal', 'high');
210
- add_meta_box('imgdiv', __('Images', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_img'), self::$pagehook, 'normal', 'normal');
211
- add_meta_box('inlinediv', __('Inline content', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_inline'), self::$pagehook, 'normal', 'normal');
212
- add_meta_box('pdfdiv', __('PDF', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_pdf'), self::$pagehook, 'normal', 'normal');
213
- add_meta_box('swfdiv', __('SWF', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_swf'), self::$pagehook, 'normal', 'normal');
214
- add_meta_box('youtubediv', __('YouTube', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_youtube'), self::$pagehook, 'normal', 'normal');
215
- add_meta_box('vimeodiv', __('Vimeo', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_vimeo'), self::$pagehook, 'normal', 'normal');
216
- add_meta_box('dailymotiondiv', __('Dailymotion', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_dailymotion'), self::$pagehook, 'normal', 'normal');
217
- add_meta_box('iframediv', __('iFrames', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_iframe'), self::$pagehook, 'normal', 'normal');
218
-
219
- //load admin page
220
- //include(EASY_FANCYBOX_PLUGINDIR . '/easy-fancybox-admin.php');
221
- }
222
-
223
- public function closed_meta_boxes( $closed ) {
224
-
225
- if ( false === $closed )
226
- // set default closed metaboxes
227
- $closed = array( 'advanceddiv', 'supportdiv', 'creditsdiv', 'resourcesdiv' );
228
- else
229
- // remove closed setting of some metaboxes
230
- $closed = array_diff ( $closed , array ( 'submitdiv' ) );
231
-
232
- return $closed;
233
- }
234
-
235
- public static function admin_scripts($hook) {
236
-
237
- // needed javascripts to allow drag/drop, expand/collapse and hide/show of boxes
238
- wp_enqueue_script('common');
239
- wp_enqueue_script('wp-list');
240
- wp_enqueue_script('postbox');
241
-
242
- //add several metaboxes now, all metaboxes registered during load page can be switched off/on at "Screen Options" automatically, nothing special to do therefore
243
- add_meta_box('advanceddiv', __('Advanced Options', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_advanced'), self::$pagehook, 'normal', 'core');
244
-
245
- add_meta_box('supportdiv', __('Support','easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_support'), self::$pagehook, 'side', 'core');
246
- add_meta_box('discussiondiv', translate('Discussion'), array(__CLASS__.'_Admin', 'meta_box_discussion'), self::$pagehook, 'normal', 'low');
247
-
248
- }
249
- */
250
-
251
 
252
  /***********************
253
  ACTIONS & FILTERS
@@ -267,30 +222,22 @@ class easyFancyBox_Admin extends easyFancyBox {
267
  printf(__('Or you can ignore and <a href="%1$s">hide this message</a>.','easy-fancybox'), '?easy_fancybox_ignore_notice=1');
268
  echo '</p></div>';
269
  }
270
-
271
- /* Black Friday deal notice */
272
- //if ( !class_exists('easyFancyBox_Advanced') && current_user_can( 'install_plugins' ) && !get_user_meta($current_user->ID, 'easy_fancybox_ignore_deal_2017') && strtotime('now') => strtotime('24-11-2017') && strtotime('now') <= strtotime('27-11-2017') ) {
273
- // echo '<div class="update-nag updating-message success"><h3>Easy FancyBox advanced options at 30% OFF!</h3><p><strong>Black Friday to Cyber Monday: THE BIG 30 SALE at Status301.</strong> <em>A whopping 30% discount but only for the first 30 customers so <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>... ';
274
- // printf(__('Or you can ignore and <a href="%1$s">hide this message</a>.','easy-fancybox'), '?easy_fancybox_ignore_deal_2017=1');
275
- // echo '</p></div>';
276
- //}
277
  }
278
 
279
  /**********************
280
  RUN
281
  **********************/
282
 
283
- public static function run(){
284
-
285
- load_plugin_textdomain('easy-fancybox', false, dirname( parent::$plugin_basename ) . '/languages' );
286
-
287
  add_action('admin_init', array(__CLASS__, 'admin_init'));
288
  }
289
 
290
- public static function admin_init(){
291
-
292
  load_plugin_textdomain('easy-fancybox', false, dirname( parent::$plugin_basename ) . '/languages' );
 
293
 
 
294
  add_action('admin_notices', array(__CLASS__, 'admin_notice'));
295
 
296
  add_filter('plugin_action_links_'.parent::$plugin_basename, array(__CLASS__, 'add_action_link') );
@@ -310,10 +257,6 @@ class easyFancyBox_Admin extends easyFancyBox {
310
  add_user_meta($current_user->ID, 'easy_fancybox_ignore_notice', 'true', true);
311
  }
312
 
313
- if ( isset($_GET['easy_fancybox_ignore_deal']) && '1' == $_GET['easy_fancybox_ignore_deal'] ) {
314
- add_user_meta($current_user->ID, 'easy_fancybox_ignore_deal', 'true', true);
315
- }
316
-
317
  if ( class_exists('easyFancyBox_Advanced')
318
  && ( !defined('easyFancyBox_Advanced::VERSION') || version_compare(easyFancyBox_Advanced::VERSION, self::$compat_pro_min, '<') ) )
319
  self::$do_compat_warning = true;
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
65
  if ( self::$do_compat_warning ) {
203
  return $setting;
204
  }
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
 
207
  /***********************
208
  ACTIONS & FILTERS
222
  printf(__('Or you can ignore and <a href="%1$s">hide this message</a>.','easy-fancybox'), '?easy_fancybox_ignore_notice=1');
223
  echo '</p></div>';
224
  }
 
 
 
 
 
 
 
225
  }
226
 
227
  /**********************
228
  RUN
229
  **********************/
230
 
231
+ public static function run() {
232
+ add_action('plugins_loaded', array(__CLASS__, 'load_textdomain'));
 
 
233
  add_action('admin_init', array(__CLASS__, 'admin_init'));
234
  }
235
 
236
+ public static function load_textdomain(){
 
237
  load_plugin_textdomain('easy-fancybox', false, dirname( parent::$plugin_basename ) . '/languages' );
238
+ }
239
 
240
+ public static function admin_init() {
241
  add_action('admin_notices', array(__CLASS__, 'admin_notice'));
242
 
243
  add_filter('plugin_action_links_'.parent::$plugin_basename, array(__CLASS__, 'add_action_link') );
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;
inc/class-easyfancybox.php CHANGED
@@ -98,7 +98,7 @@ var easy_fancybox_handler = function(){';
98
  if(!empty($autoAttribute)) {
99
  if(is_numeric($autoAttribute)) {
100
  echo '
101
- jQuery(\''.$value['options']['autoAttribute']['selector'].'\').not(\'.nolightbox\').addClass(\''.$value['options']['class']['default'].'\');';
102
  } else {
103
  // set selectors
104
  $file_types = array_filter( explode( ' ', str_replace( ',', ' ', $autoAttribute ) ) );
@@ -244,10 +244,10 @@ var easy_fancybox_auto = function(){';
244
  #fancybox-outer,#fancybox-content{border-radius:'.$borderRadius.'px}.fancybox-title-inside{padding-top:'.$borderRadius.'px;margin-top:-'.$borderRadius.'px !important;border-radius: 0 0 '.$borderRadius.'px '.$borderRadius.'px}';
245
  if (!empty($backgroundColor))
246
  $styles .= '
247
- #fancybox-content{background-color:'.$backgroundColor.'}';
248
  if (!empty($paddingColor))
249
  $styles .= '
250
- #fancybox-content{border-color:'.$paddingColor.'}#fancybox-outer{background-color:'.$paddingColor.'}'; //.fancybox-title-inside{background-color:'.$paddingColor.';margin-left:0 !important;margin-right:0 !important;width:100% !important;}
251
  if (!empty($textColor))
252
  $styles .= '
253
  #fancybox-content{color:'.$textColor.'}';
@@ -372,7 +372,7 @@ var easy_fancybox_auto = function(){';
372
  // first exclude some links by adding nolightbox class:
373
  // (1) nofancybox backwards compatibility and (2) tries to detect social sharing buttons with known issues
374
  echo '<script type="text/javascript">
375
- jQuery(document).on(\'ready post-load\', function(){ jQuery(\'.nofancybox,a.pin-it-button,a[href*="pinterest.com/pin/create/button"]\').addClass(\'nolightbox\'); });';
376
 
377
  echo apply_filters( 'easy_fancybox_onready_handler', '
378
  jQuery(document).on(\'ready post-load\',easy_fancybox_handler);' );
98
  if(!empty($autoAttribute)) {
99
  if(is_numeric($autoAttribute)) {
100
  echo '
101
+ jQuery(\''.$value['options']['autoAttribute']['selector'].'\').not(\'.nolightbox,li.nolightbox>a\').addClass(\''.$value['options']['class']['default'].'\');';
102
  } else {
103
  // set selectors
104
  $file_types = array_filter( explode( ' ', str_replace( ',', ' ', $autoAttribute ) ) );
244
  #fancybox-outer,#fancybox-content{border-radius:'.$borderRadius.'px}.fancybox-title-inside{padding-top:'.$borderRadius.'px;margin-top:-'.$borderRadius.'px !important;border-radius: 0 0 '.$borderRadius.'px '.$borderRadius.'px}';
245
  if (!empty($backgroundColor))
246
  $styles .= '
247
+ #fancybox-content{background:'.$backgroundColor.'}';
248
  if (!empty($paddingColor))
249
  $styles .= '
250
+ #fancybox-content{border-color:'.$paddingColor.'}#fancybox-outer{background:'.$paddingColor.'}'; //.fancybox-title-inside{background-color:'.$paddingColor.';margin-left:0 !important;margin-right:0 !important;width:100% !important;}
251
  if (!empty($textColor))
252
  $styles .= '
253
  #fancybox-content{color:'.$textColor.'}';
372
  // first exclude some links by adding nolightbox class:
373
  // (1) nofancybox backwards compatibility and (2) tries to detect social sharing buttons with known issues
374
  echo '<script type="text/javascript">
375
+ jQuery(document).on(\'ready post-load\', function(){ jQuery(\'.nofancybox,a.pin-it-button,a[href*="pinterest.com/pin/create"]\').addClass(\'nolightbox\'); });';
376
 
377
  echo apply_filters( 'easy_fancybox_onready_handler', '
378
  jQuery(document).on(\'ready post-load\',easy_fancybox_handler);' );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: RavanH
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox
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.7
7
- Stable tag: 1.6.1
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,14 @@ 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.1 =
462
- Bugfix release: color code, translation strings, pinterest button compat...
463
 
464
  == Changelog ==
465
 
 
 
 
466
  = 1.6.1 =
467
  * Nolightbox class in menu also for other media types than images
468
  * FIX: CSS color code
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox
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
 
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
+
469
  = 1.6.1 =
470
  * Nolightbox class in menu also for other media types than images
471
  * FIX: CSS color code