Featured Image From URL - Version 2.0.1

Version Description

  • Bug fix: lazy load.
Download this release

Release Info

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

Code changes from version 2.0.0 to 2.0.1

featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image From URL
5
  * Plugin URI: https://featuredimagefromurl.com/
6
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
7
- * Version: 2.0.0
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://featuredimagefromurl.com/
6
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
7
+ * Version: 2.0.1
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/thumbnail.php CHANGED
@@ -6,8 +6,10 @@ add_filter('wp_head', 'fifu_add_sirv_js');
6
  add_filter('wp_head', 'fifu_apply_css');
7
 
8
  function fifu_add_js() {
9
- wp_register_script('lazyload', plugins_url('/html/js/jquery.lazyloadxt.extra.js', __FILE__), array('jquery'));
10
- wp_enqueue_script('lazyload');
 
 
11
  include 'html/script.html';
12
  }
13
 
@@ -70,6 +72,9 @@ function fifu_replace($html, $post_id, $post_thumbnail_id, $size) {
70
  $width = fifu_get_attribute('width', $html);
71
  $height = fifu_get_attribute('height', $html);
72
 
 
 
 
73
  if (get_post_meta($post_id, 'fifu_image_url', true))
74
  return $html;
75
 
6
  add_filter('wp_head', 'fifu_apply_css');
7
 
8
  function fifu_add_js() {
9
+ if (fifu_is_on('fifu_lazy')) {
10
+ wp_register_script('lazyload', plugins_url('/html/js/jquery.lazyloadxt.extra.js', __FILE__), array('jquery'));
11
+ wp_enqueue_script('lazyload');
12
+ }
13
  include 'html/script.html';
14
  }
15
 
72
  $width = fifu_get_attribute('width', $html);
73
  $height = fifu_get_attribute('height', $html);
74
 
75
+ if (fifu_is_on('fifu_lazy'))
76
+ $html = str_replace("src", "data-src", $html);
77
+
78
  if (get_post_meta($post_id, 'fifu_image_url', true))
79
  return $html;
80
 
readme.txt CHANGED
@@ -161,6 +161,9 @@ Features:
161
 
162
  == Changelog ==
163
 
 
 
 
164
  = 2.0.0 =
165
  * Beta Version (NOT STABLE): a lot of changes were done to overcome some old known issues in FIFU 1, such as problems in image sizes or images that were not shown in some areas, including WooCommerce lightbox and categories. Fake Internal Featured Image and Default External Featured Image features have changed. And Default Width was created.
166
 
@@ -431,6 +434,9 @@ was removed. To finish, a Premium version is now been presented.
431
 
432
  == Upgrade Notice ==
433
 
 
 
 
434
  = 2.0.0 =
435
  * Beta Version (NOT STABLE): a lot of changes were done to overcome some old known issues in FIFU 1, such as problems in image sizes or images that were not shown in some areas, including WooCommerce lightbox and categories. Fake Internal Featured Image and Default External Featured Image features have changed. And Default Width was created.
436
 
161
 
162
  == Changelog ==
163
 
164
+ = 2.0.1 =
165
+ * Bug fix: lazy load.
166
+
167
  = 2.0.0 =
168
  * Beta Version (NOT STABLE): a lot of changes were done to overcome some old known issues in FIFU 1, such as problems in image sizes or images that were not shown in some areas, including WooCommerce lightbox and categories. Fake Internal Featured Image and Default External Featured Image features have changed. And Default Width was created.
169
 
434
 
435
  == Upgrade Notice ==
436
 
437
+ = 2.0.1 =
438
+ * Bug fix: lazy load.
439
+
440
  = 2.0.0 =
441
  * Beta Version (NOT STABLE): a lot of changes were done to overcome some old known issues in FIFU 1, such as problems in image sizes or images that were not shown in some areas, including WooCommerce lightbox and categories. Fake Internal Featured Image and Default External Featured Image features have changed. And Default Width was created.
442