Featured Image From URL - Version 2.9.9

Version Description

  • Improvement (Premium): play button on video image thumbnail can be disabled/enabled now; Bug fix: conflict between WooCommerce lightbox toggle and some themes.
Download this release

Release Info

Developer marceljm
Plugin Icon 128x128 Featured Image From URL
Version 2.9.9
Comparing to
See all releases

Code changes from version 2.9.8 to 2.9.9

admin/html/menu.html CHANGED
@@ -1523,6 +1523,19 @@
1523
  <th>
1524
  on page
1525
  </th>
 
 
 
 
 
 
 
 
 
 
 
 
 
1526
  </tr>
1527
  </table>
1528
  </div>
1523
  <th>
1524
  on page
1525
  </th>
1526
+ </tr>
1527
+ <tr>
1528
+ <th>
1529
+ <input
1530
+ type="submit"
1531
+ href="javascript:void(0)"
1532
+ class="toggleoff"
1533
+ value=""
1534
+ style="display:block;border:none">
1535
+ </th>
1536
+ <th>
1537
+ play button (starts the video in a lightbox)
1538
+ </th>
1539
  </tr>
1540
  </table>
1541
  </div>
admin/html/support-data.html CHANGED
@@ -87,6 +87,6 @@ REST Routes:
87
 
88
  // remove notices from other plugins
89
  setTimeout(function () {
90
- jQuery('div.header-box > div')[0].remove();
91
- }, 50);
92
  </script>
87
 
88
  // remove notices from other plugins
89
  setTimeout(function () {
90
+ jQuery('div.header-box > div').remove();
91
+ }, 250);
92
  </script>
featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image from URL
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image as Featured Image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
- * Version: 2.9.8
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
4
  * Plugin Name: Featured Image from URL
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image as Featured Image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
+ * Version: 2.9.9
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/html/js/image.js CHANGED
@@ -10,12 +10,18 @@ jQuery(document).ready(function ($) {
10
 
11
  // woocommerce lightbox/zoom
12
  disableClick($);
 
13
 
14
  // for all images at single product page
15
  setTimeout(function () {
16
  resizeImg($);
17
  jQuery('a.woocommerce-product-gallery__trigger').css('visibility', 'visible');
18
  }, 2500);
 
 
 
 
 
19
  });
20
 
21
  jQuery(window).on('ajaxComplete', function () {
@@ -37,21 +43,28 @@ function resizeImg($) {
37
  //original size
38
  var width = $(this)['0'].naturalWidth;
39
  var height = $(this)['0'].naturalHeight;
40
- jQuery(this).attr('data-large_image_width', width);
41
- jQuery(this).attr('data-large_image_height', height);
42
 
43
  //100%
44
- //var ratio = width / height;
45
- //jQuery(this).attr('data-large_image_width', jQuery(window).width() * ratio);
46
- //jQuery(this).attr('data-large_image_height', jQuery(window).width());
47
  });
48
  };
49
  resizeImage(imgSelector);
50
  }
51
 
52
  function disableClick($) {
53
- if (fifuImageVars.fifu_woo_lbox == 'off') {
54
- jQuery('.woocommerce-product-gallery__image').each(function (index) {
 
 
 
 
 
 
 
 
 
55
  jQuery(this).children().click(function () {
56
  return false;
57
  });
@@ -59,3 +72,20 @@ function disableClick($) {
59
  });
60
  }
61
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  // woocommerce lightbox/zoom
12
  disableClick($);
13
+ disableLink($);
14
 
15
  // for all images at single product page
16
  setTimeout(function () {
17
  resizeImg($);
18
  jQuery('a.woocommerce-product-gallery__trigger').css('visibility', 'visible');
19
  }, 2500);
20
+
21
+ // zoomImg
22
+ setTimeout(function () {
23
+ jQuery('img.zoomImg').css('z-index', '');
24
+ }, 1000);
25
  });
26
 
27
  jQuery(window).on('ajaxComplete', function () {
43
  //original size
44
  var width = $(this)['0'].naturalWidth;
45
  var height = $(this)['0'].naturalHeight;
 
 
46
 
47
  //100%
48
+ var ratio = width / height;
49
+ jQuery(this).attr('data-large_image_width', jQuery(window).width() * ratio);
50
+ jQuery(this).attr('data-large_image_height', jQuery(window).width());
51
  });
52
  };
53
  resizeImage(imgSelector);
54
  }
55
 
56
  function disableClick($) {
57
+ if (!fifuImageVars.fifu_woo_lbox_enabled) {
58
+ firstParentClass = '';
59
+ parentClass = '';
60
+ jQuery('figure.woocommerce-product-gallery__wrapper').find('div.woocommerce-product-gallery__image').each(function (index) {
61
+ parentClass = jQuery(this).parent().attr('class').split(' ')[0];
62
+ if (!firstParentClass)
63
+ firstParentClass = parentClass;
64
+
65
+ if (parentClass != firstParentClass)
66
+ return false;
67
+
68
  jQuery(this).children().click(function () {
69
  return false;
70
  });
72
  });
73
  }
74
  }
75
+
76
+ function disableLink($) {
77
+ if (!fifuImageVars.fifu_woo_lbox_enabled) {
78
+ firstParentClass = '';
79
+ parentClass = '';
80
+ jQuery('figure.woocommerce-product-gallery__wrapper').find('div.woocommerce-product-gallery__image').each(function (index) {
81
+ parentClass = jQuery(this).parent().attr('class').split(' ')[0];
82
+ if (!firstParentClass)
83
+ firstParentClass = parentClass;
84
+
85
+ if (parentClass != firstParentClass)
86
+ return false;
87
+
88
+ jQuery(this).children().attr("href", "");
89
+ });
90
+ }
91
+ }
includes/thumbnail.php CHANGED
@@ -29,7 +29,7 @@ function fifu_add_js() {
29
  wp_enqueue_script('fifu-image-js', plugins_url('/html/js/image.js?' . fifu_version(), __FILE__));
30
  wp_localize_script('fifu-image-js', 'fifuImageVars', [
31
  'fifu_lazy' => fifu_is_on("fifu_lazy") ? 'on' : 'off',
32
- 'fifu_woo_lbox' => fifu_woo_lbox() ? 'on' : 'off',
33
  'fifu_woo_zoom' => fifu_woo_zoom(),
34
  ]);
35
  }
29
  wp_enqueue_script('fifu-image-js', plugins_url('/html/js/image.js?' . fifu_version(), __FILE__));
30
  wp_localize_script('fifu-image-js', 'fifuImageVars', [
31
  'fifu_lazy' => fifu_is_on("fifu_lazy") ? 'on' : 'off',
32
+ 'fifu_woo_lbox_enabled' => fifu_woo_lbox(),
33
  'fifu_woo_zoom' => fifu_woo_zoom(),
34
  ]);
35
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
4
  Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, flickr, s3, picasa, woocommerce, product image, product gallery, product, gallery, column, list, page, post, all, content, custom, type, custom post type, category, video, external video, youtube, vimeo, featured video, hover, effects, hover effects, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, instagram, validation, jetpack, visual composer, play, pause, crop, resize, zoom, enable, disable, default, automatic, auto set, cloudinary, schedule, event, cron, seo, variable, tumblr, variation, product variation, shortcode, facebook, instagram, imgur, 9gag, wcfm, add-on, scraper, 特色圖片, 图片, 网址, 外部, unsplash, keyword, random, acf
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
- Stable tag: 2.9.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -162,6 +162,9 @@ Features:
162
 
163
  == Changelog ==
164
 
 
 
 
165
  = 2.9.8 =
166
  * Improvement (Premium): Featured Video and Featured Slider should work with ANY theme now.
167
 
@@ -726,6 +729,9 @@ was removed. To finish, a Premium version is now been presented.
726
 
727
  == Upgrade Notice ==
728
 
 
 
 
729
  = 2.9.8 =
730
  * Improvement (Premium): Featured Video and Featured Slider should work with ANY theme now.
731
 
4
  Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, flickr, s3, picasa, woocommerce, product image, product gallery, product, gallery, column, list, page, post, all, content, custom, type, custom post type, category, video, external video, youtube, vimeo, featured video, hover, effects, hover effects, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, instagram, validation, jetpack, visual composer, play, pause, crop, resize, zoom, enable, disable, default, automatic, auto set, cloudinary, schedule, event, cron, seo, variable, tumblr, variation, product variation, shortcode, facebook, instagram, imgur, 9gag, wcfm, add-on, scraper, 特色圖片, 图片, 网址, 外部, unsplash, keyword, random, acf
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
+ Stable tag: 2.9.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
162
 
163
  == Changelog ==
164
 
165
+ = 2.9.9 =
166
+ * Improvement (Premium): play button on video image thumbnail can be disabled/enabled now; Bug fix: conflict between WooCommerce lightbox toggle and some themes.
167
+
168
  = 2.9.8 =
169
  * Improvement (Premium): Featured Video and Featured Slider should work with ANY theme now.
170
 
729
 
730
  == Upgrade Notice ==
731
 
732
+ = 2.9.9 =
733
+ * Improvement (Premium): play button on video image thumbnail can be disabled/enabled now; Bug fix: conflict between WooCommerce lightbox toggle and some themes.
734
+
735
  = 2.9.8 =
736
  * Improvement (Premium): Featured Video and Featured Slider should work with ANY theme now.
737