Version Description
- Bug fix: background images might not being shown after the last update.
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 3.0.9 |
Comparing to | |
See all releases |
Code changes from version 3.0.8 to 3.0.9
- featured-image-from-url.php +1 -1
- includes/attachment.php +11 -9
- readme.txt +7 -1
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: 3.0.
|
8 |
* Author: Marcel Jacques Machado
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 3.0
|
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: 3.0.9
|
8 |
* Author: Marcel Jacques Machado
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 3.0
|
includes/attachment.php
CHANGED
@@ -162,15 +162,17 @@ function fifu_callback($buffer) {
|
|
162 |
}
|
163 |
}
|
164 |
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
|
|
|
|
174 |
}
|
175 |
|
176 |
return $buffer;
|
162 |
}
|
163 |
}
|
164 |
|
165 |
+
if (fifu_is_on('fifu_lazy')) {
|
166 |
+
// lazy load for background-image
|
167 |
+
$imgList = array();
|
168 |
+
preg_match_all('/<[^>]*background-image[^>]*>/', $buffer, $imgList);
|
169 |
+
foreach ($imgList[0] as $imgItem) {
|
170 |
+
$url = explode(')', explode('url(', $imgItem)[1])[0];
|
171 |
+
$newImgItem = preg_replace("/background-image[^:]*:[^\)]*url[^\)]*[\)]/", "", $imgItem);
|
172 |
+
$attr = 'data-bg=' . $url;
|
173 |
+
$newImgItem = str_replace('>', ' ' . $attr . '>', $newImgItem);
|
174 |
+
$buffer = str_replace($imgItem, $newImgItem, $buffer);
|
175 |
+
}
|
176 |
}
|
177 |
|
178 |
return $buffer;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
|
|
4 |
Tags: featured image, image, featured, url, external, external featured image, featured image from url, url featured image, 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, 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, publitio, 9gag, wcfm, add-on, scraper, 特色圖片, 图片, 网址, 外部, unsplash, keyword, random, acf, rss, media, tag
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.4.1
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -166,6 +166,9 @@ Features:
|
|
166 |
|
167 |
== Changelog ==
|
168 |
|
|
|
|
|
|
|
169 |
= 3.0.8 =
|
170 |
* New Feature (Premium): Video > Product Gallery Icon; Improvement (Premium): FIFU gets YouTube video image thumbnails without top and bottom black stripes now; Improvement: Lazy Load can work with background images now; Notice: Internal URL Parameters is a FREE feature now.
|
171 |
|
@@ -760,6 +763,9 @@ was removed. To finish, a Premium version is now been presented.
|
|
760 |
|
761 |
== Upgrade Notice ==
|
762 |
|
|
|
|
|
|
|
763 |
= 3.0.8 =
|
764 |
* New Feature (Premium): Video > Product Gallery Icon; Improvement (Premium): FIFU gets YouTube video image thumbnails without top and bottom black stripes now; Improvement: Lazy Load can work with background images now; Notice: Internal URL Parameters is a FREE feature now.
|
765 |
|
4 |
Tags: featured image, image, featured, url, external, external featured image, featured image from url, url featured image, 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, 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, publitio, 9gag, wcfm, add-on, scraper, 特色圖片, 图片, 网址, 外部, unsplash, keyword, random, acf, rss, media, tag
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.4.1
|
7 |
+
Stable tag: 3.0.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
166 |
|
167 |
== Changelog ==
|
168 |
|
169 |
+
= 3.0.9 =
|
170 |
+
* Bug fix: background images might not being shown after the last update.
|
171 |
+
|
172 |
= 3.0.8 =
|
173 |
* New Feature (Premium): Video > Product Gallery Icon; Improvement (Premium): FIFU gets YouTube video image thumbnails without top and bottom black stripes now; Improvement: Lazy Load can work with background images now; Notice: Internal URL Parameters is a FREE feature now.
|
174 |
|
763 |
|
764 |
== Upgrade Notice ==
|
765 |
|
766 |
+
= 3.0.9 =
|
767 |
+
* Bug fix: background images might not being shown after the last update.
|
768 |
+
|
769 |
= 3.0.8 =
|
770 |
* New Feature (Premium): Video > Product Gallery Icon; Improvement (Premium): FIFU gets YouTube video image thumbnails without top and bottom black stripes now; Improvement: Lazy Load can work with background images now; Notice: Internal URL Parameters is a FREE feature now.
|
771 |
|