Featured Image From URL - Version 3.8.2

Version Description

  • Fix: conflict with WP Super Cache plugin (cache not working); fix: Lazy Load (conflict with themes that use LazySizes library).
Download this release

Release Info

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

Code changes from version 3.8.1 to 3.8.2

admin/api.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  define('FIFU_SU_ADDRESS', /* fifu_is_local() ? 'http://0.0.0.0:8080' : */ 'https://cloud.featuredimagefromurl.com');
4
  define('FIFU_QUERY_ADDRESS', 'https://query.featuredimagefromurl.com');
5
- define('FIFU_SURVEY_ADDRESS', /* fifu_is_local() ? 'http://0.0.0.0:8080' : */ 'https://survey.featuredimagefromurl.com');
6
 
7
  function fifu_get_ip() {
8
  foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) {
2
 
3
  define('FIFU_SU_ADDRESS', /* fifu_is_local() ? 'http://0.0.0.0:8080' : */ 'https://cloud.featuredimagefromurl.com');
4
  define('FIFU_QUERY_ADDRESS', 'https://query.featuredimagefromurl.com');
5
+ define('FIFU_SURVEY_ADDRESS', 'https://survey.featuredimagefromurl.com');
6
 
7
  function fifu_get_ip() {
8
  foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) {
admin/html/cloud.html CHANGED
@@ -116,3 +116,19 @@
116
  </div>
117
 
118
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  </div>
117
 
118
  </div>
119
+
120
+ <script>
121
+ jQuery(document).ready(function () {
122
+ removeNotices();
123
+ });
124
+
125
+ // remove notices from other plugins
126
+ setTimeout(function () {
127
+ removeNotices();
128
+ }, 250);
129
+
130
+ function removeNotices() {
131
+ jQuery('div.header-box > div').remove();
132
+ jQuery('.notice').remove();
133
+ }
134
+ </script>
admin/html/js/cloud.js CHANGED
@@ -6,6 +6,8 @@
6
  // 1. lazy load enabled
7
  // 2. new incognito tab
8
  // 3. DevTools > Undock into a separate window
 
 
9
 
10
  jQuery(document).ready(function () {
11
  jQuery('link[href*="jquery-ui.css"]').attr("disabled", "true");
6
  // 1. lazy load enabled
7
  // 2. new incognito tab
8
  // 3. DevTools > Undock into a separate window
9
+ // 4. deactivate plugins
10
+ // 5. activate Astra
11
 
12
  jQuery(document).ready(function () {
13
  jQuery('link[href*="jquery-ui.css"]').attr("disabled", "true");
admin/html/js/menu-su.js CHANGED
@@ -12,9 +12,11 @@ function message(data, box) {
12
  }
13
 
14
  function fifu_block() {
15
- jQuery('#tabs-top').block({message: 'Please wait a few seconds...', css: {backgroundColor: 'none', border: 'none', color: 'white'}});
 
16
  }
17
 
18
  function fifu_unblock() {
19
  jQuery('#tabs-top').unblock();
 
20
  }
12
  }
13
 
14
  function fifu_block() {
15
+ jQuery('#tabs-top').block({message: '', css: {backgroundColor: 'none', border: 'none', color: 'white'}});
16
+ jQuery('button').attr('disabled', 'true');
17
  }
18
 
19
  function fifu_unblock() {
20
  jQuery('#tabs-top').unblock();
21
+ jQuery('button').removeAttr('disabled');
22
  }
admin/html/js/meta-box.js CHANGED
@@ -169,7 +169,10 @@ function fifu_register_help() {
169
  }
170
 
171
  function fifu_hide_regular_featured_image_field() {
172
- if (wp.data.dispatch('core/edit-post') && wp.data.select('core/edit-post').isEditorPanelOpened('featured-image')) {
 
 
 
173
  wp.data.dispatch('core/edit-post').toggleEditorPanelOpened('featured-image');
174
  }
175
  }
169
  }
170
 
171
  function fifu_hide_regular_featured_image_field() {
172
+ if (fifuMetaBoxVars.is_product)
173
+ return;
174
+
175
+ if (wp.data && wp.data.dispatch('core/edit-post') && wp.data.select('core/edit-post').isEditorPanelOpened('featured-image')) {
176
  wp.data.dispatch('core/edit-post').toggleEditorPanelOpened('featured-image');
177
  }
178
  }
admin/html/menu.html CHANGED
@@ -5739,3 +5739,19 @@
5739
  </ul>
5740
  </div>
5741
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5739
  </ul>
5740
  </div>
5741
  </div>
5742
+
5743
+ <script>
5744
+ jQuery(document).ready(function () {
5745
+ removeNotices();
5746
+ });
5747
+
5748
+ // remove notices from other plugins
5749
+ setTimeout(function () {
5750
+ removeNotices();
5751
+ }, 250);
5752
+
5753
+ function removeNotices() {
5754
+ jQuery('div.header-box > div').remove();
5755
+ jQuery('.notice').remove();
5756
+ }
5757
+ </script>
admin/html/support-data.html CHANGED
@@ -72,10 +72,16 @@ REST routes:
72
  jQuery(document).ready(function () {
73
  var box = jQuery("#bar");
74
  box.val(box.val() + '- ' + fifu_get_rest_url().substring(0, 100) + ':JS');
 
75
  });
76
 
77
  // remove notices from other plugins
78
  setTimeout(function () {
79
- jQuery('div.header-box > div').remove();
80
  }, 250);
 
 
 
 
 
81
  </script>
72
  jQuery(document).ready(function () {
73
  var box = jQuery("#bar");
74
  box.val(box.val() + '- ' + fifu_get_rest_url().substring(0, 100) + ':JS');
75
+ removeNotices();
76
  });
77
 
78
  // remove notices from other plugins
79
  setTimeout(function () {
80
+ removeNotices();
81
  }, 250);
82
+
83
+ function removeNotices() {
84
+ jQuery('div.header-box > div').remove();
85
+ jQuery('.notice').remove();
86
+ }
87
  </script>
admin/html/troubleshooting.html CHANGED
@@ -776,4 +776,20 @@
776
  </div>
777
  </ul>
778
  </div>
779
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
776
  </div>
777
  </ul>
778
  </div>
779
+ </div>
780
+
781
+ <script>
782
+ jQuery(document).ready(function () {
783
+ removeNotices();
784
+ });
785
+
786
+ // remove notices from other plugins
787
+ setTimeout(function () {
788
+ removeNotices();
789
+ }, 250);
790
+
791
+ function removeNotices() {
792
+ jQuery('div.header-box > div').remove();
793
+ jQuery('.notice').remove();
794
+ }
795
+ </script>
admin/meta-box.php CHANGED
@@ -23,7 +23,6 @@ function remove_metaboxes() {
23
  $url = get_post_meta($post->ID, 'fifu_image_url', true);
24
  if ($url) {
25
  remove_meta_box('postimagediv', 'product', 'side');
26
- // remove_meta_box('woocommerce-product-images', 'product', 'side');
27
  }
28
  }
29
 
@@ -268,7 +267,7 @@ function fifu_is_sirv_active() {
268
 
269
  /* woocommerce variation elements */
270
 
271
- add_action('woocommerce_product_after_variable_attributes', 'fifu_variation_settings_fields', 10, 3);
272
 
273
  function fifu_variation_settings_fields($loop, $variation_data, $variation) {
274
  $fifu = fifu_get_strings_meta_box_php();
23
  $url = get_post_meta($post->ID, 'fifu_image_url', true);
24
  if ($url) {
25
  remove_meta_box('postimagediv', 'product', 'side');
 
26
  }
27
  }
28
 
267
 
268
  /* woocommerce variation elements */
269
 
270
+ // add_action('woocommerce_product_after_variable_attributes', 'fifu_variation_settings_fields', 10, 3);
271
 
272
  function fifu_variation_settings_fields($loop, $variation_data, $variation) {
273
  $fifu = fifu_get_strings_meta_box_php();
admin/strings.php CHANGED
@@ -563,7 +563,7 @@ function fifu_get_strings_settings() {
563
 
564
  // media library
565
  $fifu['media']['desc'] = function() {
566
- _e("It's possible to save the external images in the media library. Make a backup before running the cron job, because you can't revert this action later.", FIFU_SLUG);
567
  };
568
  $fifu['media']['upload'] = function() {
569
  _e("show upload button on post editor", FIFU_SLUG);
@@ -950,7 +950,7 @@ function fifu_get_strings_settings() {
950
 
951
  // clean
952
  $fifu['clean']['desc'] = function() {
953
- _e("Clean the Image Metadata generated by FIFU, but not the URLs. This option might be necessary if you intend to deactivate the plugin and use only internal featured images again.", FIFU_SLUG);
954
  };
955
  $fifu['clean']['disabled'] = function() {
956
  _e("it will be automatically disabled when finished", FIFU_SLUG);
@@ -1843,13 +1843,16 @@ function fifu_get_strings_cloud() {
1843
  return _e("Log out", FIFU_SLUG);
1844
  };
1845
  $fifu['title']['add'] = function() {
1846
- return _e("Send to Cloud", FIFU_SLUG);
1847
  };
1848
  $fifu['title']['delete'] = function() {
1849
  return _e("Delete from Cloud", FIFU_SLUG);
1850
  };
1851
  $fifu['title']['media'] = function() {
1852
- return _e("Convert to FIFU", FIFU_SLUG);
 
 
 
1853
  };
1854
  $fifu['title']['waiting'] = function() {
1855
  return _e("Waiting list", FIFU_SLUG);
@@ -1866,13 +1869,19 @@ function fifu_get_strings_cloud() {
1866
  return _e("Log in", FIFU_SLUG);
1867
  };
1868
  $fifu['tabs']['send'] = function() {
1869
- return _e("Send", FIFU_SLUG);
1870
  };
1871
  $fifu['tabs']['delete'] = function() {
1872
  return _e("Delete", FIFU_SLUG);
1873
  };
1874
  $fifu['tabs']['media'] = function() {
1875
- return _e("Media library", FIFU_SLUG);
 
 
 
 
 
 
1876
  };
1877
 
1878
  // support
@@ -1901,10 +1910,10 @@ function fifu_get_strings_cloud() {
1901
  _e("Websites were not made to process images. But when you save an image in the media library, the WordPress core and even your theme and plugins start threads to process the image locally, converting, duplicating, rotating, resizing, cropping, compressing, etc. Depending on the number of images, it can take days and eventually the website needs to repeat the whole process again. It consumes a lot of storage, memory and processing, which can make the website slow for the users. But FIFU Cloud doesn't use your computing resources. We process your images 100% in Google Cloud servers. The power of the cloud allows us to process and store thousands of images simultaneously in seconds.");
1902
  };
1903
  $fifu['support']['price-desc'] = function() {
1904
- _e("Similar cloud services often charge for the amount of hits to the images. Or they sell static plans where you pay for the amount of storage available, even if unused. But FIFU Cloud charges only for the average amount of images stored, every 30-day period. You don't pay for thumbnails. Example: on the first day, you stored 1000 images; ten days later, you deleted them all; ten days later, you added 1100, which were stored for ten days. So, on average, you used 700 images per day in a 30-day period and you will pay $3.50. If there are no changes in the next period, the average will be 1100 and the paid value will be $4.95. And if in the following period you remove all the images, there will be no cost.");
1905
  };
1906
  $fifu['support']['price-desc2'] = function() {
1907
- _e("Similar cloud services often charge for the amount of hits to the images. Or they sell static plans where you pay for the amount of storage available, even if unused. But FIFU Cloud will charge only for the average amount of images stored, every 30-day period. You don't pay for thumbnails. Example: on the first day, you stored 1000 images; ten days later, you deleted them all; ten days later, you added 1100, which were stored for ten days. So, on average, you used 700 images per day in a 30-day period and you only pay for that. If there are no changes in the next period, the average will be 1100 and the paid value increases. And if in the following period you remove all the images, there will be no cost.");
1908
  };
1909
 
1910
  // pricing
@@ -1912,10 +1921,10 @@ function fifu_get_strings_cloud() {
1912
  _e("Quantity of images");
1913
  };
1914
  $fifu['pricing']['desc'] = function() {
1915
- _e("You pay for the average amount of images stored in FIFU Cloud, every 30-day period.");
1916
  };
1917
  $fifu['pricing']['thumbnails'] = function() {
1918
- _e("You don't pay for the multiple image thumbnails created automatically by the service. Consider only the amount of images you sent to FIFU Cloud.");
1919
  };
1920
  $fifu['pricing']['example'] = function() {
1921
  _e("Price calculation example");
@@ -1948,9 +1957,19 @@ function fifu_get_strings_cloud() {
1948
  _e("suggest");
1949
  };
1950
 
 
 
 
 
 
 
 
 
 
 
1951
  // media
1952
  $fifu['media']['desc'] = function() {
1953
- _e("Before sending internal images to FIFU Cloud, the URLs need to be copied to FIFU custom fields, clicking on \"convert\" button. It is highly recommended to have a backup of the database, because some post metadata will be replaced, making FIFU responsible for displaying the images. Also, you shouldn't delete images from the media library before making sure they're saved in the cloud, otherwise you will lose the images.");
1954
  };
1955
 
1956
  // waiting list
@@ -1969,5 +1988,25 @@ function fifu_get_strings_cloud() {
1969
  _e("let's go");
1970
  };
1971
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1972
  return $fifu;
1973
  }
563
 
564
  // media library
565
  $fifu['media']['desc'] = function() {
566
+ _e("It's possible to save the external images in the media library. Make a backup before running the cron job, because after making an image local it can't be external again.", FIFU_SLUG);
567
  };
568
  $fifu['media']['upload'] = function() {
569
  _e("show upload button on post editor", FIFU_SLUG);
950
 
951
  // clean
952
  $fifu['clean']['desc'] = function() {
953
+ _e("Clean the Image Metadata generated by FIFU, but not the URLs. This option might be necessary if you intend to deactivate the plugin and use only local featured images again.", FIFU_SLUG);
954
  };
955
  $fifu['clean']['disabled'] = function() {
956
  _e("it will be automatically disabled when finished", FIFU_SLUG);
1843
  return _e("Log out", FIFU_SLUG);
1844
  };
1845
  $fifu['title']['add'] = function() {
1846
+ return _e("Upload to Cloud", FIFU_SLUG);
1847
  };
1848
  $fifu['title']['delete'] = function() {
1849
  return _e("Delete from Cloud", FIFU_SLUG);
1850
  };
1851
  $fifu['title']['media'] = function() {
1852
+ return _e("Link local image URLs to FIFU plugin", FIFU_SLUG);
1853
+ };
1854
+ $fifu['title']['billing'] = function() {
1855
+ return _e("Billing", FIFU_SLUG);
1856
  };
1857
  $fifu['title']['waiting'] = function() {
1858
  return _e("Waiting list", FIFU_SLUG);
1869
  return _e("Log in", FIFU_SLUG);
1870
  };
1871
  $fifu['tabs']['send'] = function() {
1872
+ return _e("Upload", FIFU_SLUG);
1873
  };
1874
  $fifu['tabs']['delete'] = function() {
1875
  return _e("Delete", FIFU_SLUG);
1876
  };
1877
  $fifu['tabs']['media'] = function() {
1878
+ return _e("Local images", FIFU_SLUG);
1879
+ };
1880
+ $fifu['tabs']['trash'] = function() {
1881
+ return _e("Trash", FIFU_SLUG);
1882
+ };
1883
+ $fifu['tabs']['bill'] = function() {
1884
+ return _e("Billing", FIFU_SLUG);
1885
  };
1886
 
1887
  // support
1910
  _e("Websites were not made to process images. But when you save an image in the media library, the WordPress core and even your theme and plugins start threads to process the image locally, converting, duplicating, rotating, resizing, cropping, compressing, etc. Depending on the number of images, it can take days and eventually the website needs to repeat the whole process again. It consumes a lot of storage, memory and processing, which can make the website slow for the users. But FIFU Cloud doesn't use your computing resources. We process your images 100% in Google Cloud servers. The power of the cloud allows us to process and store thousands of images simultaneously in seconds.");
1911
  };
1912
  $fifu['support']['price-desc'] = function() {
1913
+ _e("Similar cloud services often charge for the amount of hits to the images. Or they sell static plans where you pay for the amount of storage available, even if unused. But FIFU Cloud charges only for the daily average of stored images, every 30-day period. You don't pay for thumbnails. Example: on the first day, you stored 1000 images; ten days later, you deleted them all; ten days later, you added 1100, which were stored for ten days. So, on average, you used 700 images per day in a 30-day period and you will pay $3.50. If there are no changes in the next period, the average will be 1100 and the paid value will be $4.95. And if in the following period you remove all the images, there will be no cost.");
1914
  };
1915
  $fifu['support']['price-desc2'] = function() {
1916
+ _e("Similar cloud services often charge for the amount of hits to the images. Or they sell static plans where you pay for the amount of storage available, even if unused. But FIFU Cloud will charge only for the daily average of stored images, every 30-day period. You don't pay for thumbnails. Example: on the first day, you stored 1000 images; ten days later, you deleted them all; ten days later, you added 1100, which were stored for ten days. So, on average, you used 700 images per day in a 30-day period and you only pay for that. If there are no changes in the next period, the average will be 1100 and the paid value increases. And if in the following period you remove all the images, there will be no cost.");
1917
  };
1918
 
1919
  // pricing
1921
  _e("Quantity of images");
1922
  };
1923
  $fifu['pricing']['desc'] = function() {
1924
+ _e("You pay for the daily average of stored images in FIFU Cloud, every 30-day period.");
1925
  };
1926
  $fifu['pricing']['thumbnails'] = function() {
1927
+ _e("You don't pay for the multiple image thumbnails created automatically by the service. Consider only the amount of images you uploaded to FIFU Cloud.");
1928
  };
1929
  $fifu['pricing']['example'] = function() {
1930
  _e("Price calculation example");
1957
  _e("suggest");
1958
  };
1959
 
1960
+ // upload
1961
+ $fifu['upload']['desc'] = function() {
1962
+ _e("When an image is uploaded to the cloud, it starts to generate costs from the uploaded date.");
1963
+ };
1964
+
1965
+ // delete
1966
+ $fifu['delete']['desc'] = function() {
1967
+ _e("When an image is deleted from the cloud, you stop being charged for it from the next day.");
1968
+ };
1969
+
1970
  // media
1971
  $fifu['media']['desc'] = function() {
1972
+ _e("Before uploading local images to the cloud, the URLs need to be copied to FIFU custom fields, clicking on \"link\" button. It is highly recommended to have a backup of the database, because some post metadata will be replaced, making FIFU responsible for displaying the images. Also, you shouldn't delete images from the media library before making sure they're saved in the cloud, otherwise you will lose the images.");
1973
  };
1974
 
1975
  // waiting list
1988
  _e("let's go");
1989
  };
1990
 
1991
+ // billing
1992
+ $fifu['billing']['desc'] = function() {
1993
+ _e("FIFU Cloud will charge you for the daily average of stored images, every 30-day period. The following data is updated hourly.");
1994
+ };
1995
+ $fifu['billing']['current'] = function() {
1996
+ _e("Current 30-day period");
1997
+ };
1998
+ $fifu['billing']['column']['start'] = function() {
1999
+ _e("start date");
2000
+ };
2001
+ $fifu['billing']['column']['end'] = function() {
2002
+ _e("end date");
2003
+ };
2004
+ $fifu['billing']['column']['average'] = function() {
2005
+ _e("daily average of stored images");
2006
+ };
2007
+ $fifu['billing']['column']['cost'] = function() {
2008
+ _e("current cost");
2009
+ };
2010
+
2011
  return $fifu;
2012
  }
featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image/video as featured image/video of a post or WooCommerce product.
7
- * Version: 3.8.1
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image/video as featured image/video of a post or WooCommerce product.
7
+ * Version: 3.8.2
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
includes/attachment.php CHANGED
@@ -237,8 +237,8 @@ function fifu_callback($buffer) {
237
  $post_id = null;
238
 
239
  // get parameters
240
- if (isset($_POST[$url]))
241
- $data = $_POST[$url];
242
  else
243
  continue;
244
 
@@ -275,8 +275,8 @@ function fifu_callback($buffer) {
275
  $newImgItem = $imgItem;
276
 
277
  $url = fifu_normalize($url);
278
- if (isset($_POST[$url])) {
279
- $data = $_POST[$url];
280
 
281
  if (strpos($imgItem, 'fifu-replaced') !== false)
282
  continue;
@@ -329,7 +329,7 @@ function fifu_add_url_parameters($url, $att_id, $size) {
329
  return $url;
330
 
331
  // avoid duplicated call
332
- if (isset($_POST[$url]))
333
  return $url;
334
 
335
  $parameters = array();
@@ -337,7 +337,7 @@ function fifu_add_url_parameters($url, $att_id, $size) {
337
  $parameters['post_id'] = $post_id;
338
  $parameters['featured'] = $featured;
339
 
340
- $_POST[$url] = $parameters;
341
  return $url;
342
  }
343
 
237
  $post_id = null;
238
 
239
  // get parameters
240
+ if (isset($_SESSION[$url]))
241
+ $data = $_SESSION[$url];
242
  else
243
  continue;
244
 
275
  $newImgItem = $imgItem;
276
 
277
  $url = fifu_normalize($url);
278
+ if (isset($_SESSION[$url])) {
279
+ $data = $_SESSION[$url];
280
 
281
  if (strpos($imgItem, 'fifu-replaced') !== false)
282
  continue;
329
  return $url;
330
 
331
  // avoid duplicated call
332
+ if (isset($_SESSION[$url]))
333
  return $url;
334
 
335
  $parameters = array();
337
  $parameters['post_id'] = $post_id;
338
  $parameters['featured'] = $featured;
339
 
340
+ $_SESSION[$url] = $parameters;
341
  return $url;
342
  }
343
 
includes/html/js/lazySizesConfig.js CHANGED
@@ -5,10 +5,13 @@
5
  window.lazySizesConfig.expFactor = 0.1;
6
  window.lazySizesConfig.hFac = 0.1;
7
  window.lazySizesConfig.throttleDelay = 0;
 
 
 
8
  })();
9
 
10
  // 1920x1: https://png-pixel.com/
11
- const FIFU_PLACEHOLDER = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAABCAQAAACV4Hu+AAAAGklEQVR42u3BAQEAAAABIP6fNkTVAAAAwIEBHgIAAi1TyoIAAAAASUVORK5CYII=';
12
 
13
  function fifu_lazy() {
14
  jQuery('img').each(function (index) {
@@ -31,7 +34,6 @@ function fifu_add_lazyload($) {
31
  }
32
 
33
  function fifu_add_placeholder($) {
34
- clazz = jQuery($).attr('class');
35
  src = jQuery($).attr('src');
36
  datasrc = jQuery($).attr('data-src');
37
  if (!src && datasrc)
5
  window.lazySizesConfig.expFactor = 0.1;
6
  window.lazySizesConfig.hFac = 0.1;
7
  window.lazySizesConfig.throttleDelay = 0;
8
+ window.lazySizesConfig.lazyClass = 'lazyload';
9
+ window.lazySizesConfig.loadingClass = 'lazyloading';
10
+ window.lazySizesConfig.loadedClass = 'lazyloaded';
11
  })();
12
 
13
  // 1920x1: https://png-pixel.com/
14
+ const FIFU_PLACEHOLDER = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAJxAAAAABCAQAAADS13yAAAAAK0lEQVR42u3BIQEAAAACIP1/2hsGoAEAAAAAAAAAAAAAAAAAAAAAAADgwgCcQgACWbaCCgAAAABJRU5ErkJggg==';
15
 
16
  function fifu_lazy() {
17
  jQuery('img').each(function (index) {
34
  }
35
 
36
  function fifu_add_placeholder($) {
 
37
  src = jQuery($).attr('src');
38
  datasrc = jQuery($).attr('data-src');
39
  if (!src && datasrc)
includes/thumbnail.php CHANGED
@@ -110,8 +110,8 @@ function fifu_replace($html, $post_id, $post_thumbnail_id, $size, $attr) {
110
 
111
  $datasrc = fifu_get_attribute('data-src', $html);
112
  $src = $datasrc ? $datasrc : fifu_get_attribute('src', $html);
113
- if (isset($_POST[$src])) {
114
- $data = $_POST[$src];
115
  if (strpos($html, 'fifu-replaced') !== false)
116
  return $html;
117
  }
@@ -248,3 +248,4 @@ function fifu_get_default_url() {
248
  return wp_get_attachment_url(get_option('fifu_default_attach_id'));
249
  }
250
 
 
110
 
111
  $datasrc = fifu_get_attribute('data-src', $html);
112
  $src = $datasrc ? $datasrc : fifu_get_attribute('src', $html);
113
+ if (isset($_SESSION[$src])) {
114
+ $data = $_SESSION[$src];
115
  if (strpos($html, 'fifu-replaced') !== false)
116
  return $html;
117
  }
248
  return wp_get_attachment_url(get_option('fifu_default_attach_id'));
249
  }
250
 
251
+
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: marceljm
3
  Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
- Tested up to: 5.8.2
7
- Stable tag: 3.8.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -124,6 +124,7 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio,
124
  #### LINKS
125
 
126
  * **<a href="https://fifu.app/">FIFU PRO</a>**
 
127
  * **<a href="https://referral.fifu.app/">Affiliate Program</a>**
128
  * **<a href="https://chrome.google.com/webstore/detail/fifu-scraper/pccimcccbkdeeadhejdmnffmllpicola">Google Chrome extension</a>**
129
 
@@ -225,20 +226,20 @@ Featured Image, Figurë e Zgjedhur, Image mise en avant, Uitgelichte afbeelding,
225
 
226
  == Changelog ==
227
 
 
 
 
228
  = 3.8.1 =
229
  * New: FIFU Cloud; enhancement: Lazy Load (ignores top images for a better performance); enhancement: better integration with Octolook Scrapes plugin (Schedule Metadata Generation is not necessary anymore); fix: CDN + Optimized Thumbnails (conflict with SVG images); fix: WooCommerce (Product Gallery metabox not displayed when there was an external Product Image).
230
 
231
  = 3.8.0 =
232
  * Fix: the regular featured image metabox will be closed and not longer removed when the post has an external featured image.
233
 
234
- = 3.7.9 =
235
- * Enhancement: hide internal image metaboxes when the post has an external featured image.
236
-
237
  = others =
238
  * [more](https://fifu.app/changelog)
239
 
240
 
241
  == Upgrade Notice ==
242
 
243
- = 3.8.1 =
244
- * New: FIFU Cloud; enhancement: Lazy Load (ignores top images for a better performance); enhancement: better integration with Octolook Scrapes plugin (Schedule Metadata Generation is not necessary anymore); fix: CDN + Optimized Thumbnails (conflict with SVG images); fix: WooCommerce (Product Gallery metabox not displayed when there was an external Product Image).
3
  Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
+ Tested up to: 5.8.3
7
+ Stable tag: 3.8.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
124
  #### LINKS
125
 
126
  * **<a href="https://fifu.app/">FIFU PRO</a>**
127
+ * **<a href="https://tastewp.com/new?pre-installed-plugin-slug=featured-image-from-url&redirect=admin.php%3Fpage%3Dfeatured-image-from-url&ni=true">Dummy site for testing</a>**
128
  * **<a href="https://referral.fifu.app/">Affiliate Program</a>**
129
  * **<a href="https://chrome.google.com/webstore/detail/fifu-scraper/pccimcccbkdeeadhejdmnffmllpicola">Google Chrome extension</a>**
130
 
226
 
227
  == Changelog ==
228
 
229
+ = 3.8.2 =
230
+ * Fix: conflict with WP Super Cache plugin (cache not working); fix: Lazy Load (conflict with themes that use LazySizes library).
231
+
232
  = 3.8.1 =
233
  * New: FIFU Cloud; enhancement: Lazy Load (ignores top images for a better performance); enhancement: better integration with Octolook Scrapes plugin (Schedule Metadata Generation is not necessary anymore); fix: CDN + Optimized Thumbnails (conflict with SVG images); fix: WooCommerce (Product Gallery metabox not displayed when there was an external Product Image).
234
 
235
  = 3.8.0 =
236
  * Fix: the regular featured image metabox will be closed and not longer removed when the post has an external featured image.
237
 
 
 
 
238
  = others =
239
  * [more](https://fifu.app/changelog)
240
 
241
 
242
  == Upgrade Notice ==
243
 
244
+ = 3.8.2 =
245
+ * Fix: conflict with WP Super Cache plugin (cache not working); fix: Lazy Load (conflict with themes that use LazySizes library).