Version Description
- Enhancement: integration with WP Automatic (supports external images in the WooCommerce gallery now); enhancement: Auto set featured media from post content > hide the image/video from content (the hidden media is also removed on page load now).
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 3.8.4 |
Comparing to | |
See all releases |
Code changes from version 3.8.3 to 3.8.4
- admin/html/troubleshooting.html +24 -0
- featured-image-from-url.php +1 -1
- includes/thumbnail.php +19 -2
- readme.txt +6 -6
admin/html/troubleshooting.html
CHANGED
@@ -9,6 +9,30 @@
|
|
9 |
<div id="tabs-top" style="float:left">
|
10 |
<ul>
|
11 |
<div id="tabs-t" style="padding:1em 1.4em; position: relative; top: -25px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
<div class="box">
|
13 |
<table>
|
14 |
<tr>
|
9 |
<div id="tabs-top" style="float:left">
|
10 |
<ul>
|
11 |
<div id="tabs-t" style="padding:1em 1.4em; position: relative; top: -25px;">
|
12 |
+
<div class="box">
|
13 |
+
<table>
|
14 |
+
<tr>
|
15 |
+
<td style="border-bottom:none">2022-01-31</td>
|
16 |
+
<td style="border-bottom:none"><h3>Wordpress Automatic Plugin</h3></td>
|
17 |
+
<td style="border-bottom:none">plugin</td>
|
18 |
+
</tr>
|
19 |
+
</table>
|
20 |
+
<div class="greybox" style="position: relative; top: -10px">
|
21 |
+
Using external images in the product gallery:<br>
|
22 |
+
1) access the campaign and uncheck all options in "Images" box<br>
|
23 |
+
2) go to "Post Type, format & status" box and check "Add custom fields/Taxonomies to the posts"<br>
|
24 |
+
3) use "fifu_list_url" as "Field Name" and "[product_imgs]" as "value"<br>
|
25 |
+
4) click on "Run campaign" button<br>
|
26 |
+
</div>
|
27 |
+
<div class="greybox" style="position: relative; top: -10px">
|
28 |
+
Using a video from post content as featured video:<br>
|
29 |
+
1) enable "FIFU Settings > Video > Featured Video"<br>
|
30 |
+
2) enable "FIFU Settings > Automatic > Auto set featured media from post content > use the found image/video as featured image/video"<br>
|
31 |
+
3) enable "FIFU Settings > Automatic > Auto set featured media from post content > hide the image/video from content"<br>
|
32 |
+
4) access the campaign and uncheck all options in "Images" box<br>
|
33 |
+
5) click on "Run campaign" button<br>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
<div class="box">
|
37 |
<table>
|
38 |
<tr>
|
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.
|
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.4
|
8 |
* Author: fifu.app
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 4.0
|
includes/thumbnail.php
CHANGED
@@ -104,7 +104,7 @@ function fifu_woo_replace($html, $product, $woosize) {
|
|
104 |
|
105 |
add_filter('post_thumbnail_html', 'fifu_replace', 10, 5);
|
106 |
|
107 |
-
function fifu_replace($html, $post_id, $post_thumbnail_id, $size, $attr=null) {
|
108 |
if (!$html)
|
109 |
return $html;
|
110 |
|
@@ -172,6 +172,24 @@ function fifu_add_to_content($content) {
|
|
172 |
return is_singular() && has_post_thumbnail() && ((is_singular('post') && fifu_is_on('fifu_content')) || (is_singular('page') && fifu_is_on('fifu_content_page')) || (fifu_is_cpt() && fifu_is_on('fifu_content_cpt'))) ? get_the_post_thumbnail() . $content : $content;
|
173 |
}
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
add_filter('the_content', 'fifu_optimize_content');
|
176 |
|
177 |
function fifu_optimize_content($content) {
|
@@ -248,4 +266,3 @@ function fifu_get_default_url() {
|
|
248 |
return wp_get_attachment_url(get_option('fifu_default_attach_id'));
|
249 |
}
|
250 |
|
251 |
-
|
104 |
|
105 |
add_filter('post_thumbnail_html', 'fifu_replace', 10, 5);
|
106 |
|
107 |
+
function fifu_replace($html, $post_id, $post_thumbnail_id, $size, $attr = null) {
|
108 |
if (!$html)
|
109 |
return $html;
|
110 |
|
172 |
return is_singular() && has_post_thumbnail() && ((is_singular('post') && fifu_is_on('fifu_content')) || (is_singular('page') && fifu_is_on('fifu_content_page')) || (fifu_is_cpt() && fifu_is_on('fifu_content_cpt'))) ? get_the_post_thumbnail() . $content : $content;
|
173 |
}
|
174 |
|
175 |
+
add_filter('the_content', 'fifu_remove_content_image');
|
176 |
+
|
177 |
+
function fifu_remove_content_image($content) {
|
178 |
+
if (fifu_is_on('fifu_pop_first')) {
|
179 |
+
preg_match_all('/<img[^>]*display:none[^>]*>/', $content, $matches);
|
180 |
+
if ($matches && $matches[0]) {
|
181 |
+
$image_url = get_post_meta(get_the_ID(), 'fifu_image_url', true);
|
182 |
+
if ($image_url) {
|
183 |
+
$tag = $matches[0][0];
|
184 |
+
if (strpos($tag, $image_url) !== false) {
|
185 |
+
$content = str_replace($tag, "", $content);
|
186 |
+
}
|
187 |
+
}
|
188 |
+
}
|
189 |
+
}
|
190 |
+
return $content;
|
191 |
+
}
|
192 |
+
|
193 |
add_filter('the_content', 'fifu_optimize_content');
|
194 |
|
195 |
function fifu_optimize_content($content) {
|
266 |
return wp_get_attachment_url(get_option('fifu_default_attach_id'));
|
267 |
}
|
268 |
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
|
|
4 |
Tags: featured, image, url, video, woocommerce
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 5.9
|
7 |
-
Stable tag: 3.8.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -226,20 +226,20 @@ Featured Image, Figurë e Zgjedhur, Image mise en avant, Uitgelichte afbeelding,
|
|
226 |
|
227 |
== Changelog ==
|
228 |
|
|
|
|
|
|
|
229 |
= 3.8.3 =
|
230 |
* Fix: CDN + Optimized thumbnails (not working for images loaded via ajax); fix: Hide Featured Media (no images in related posts); fix: conflict with BuddyBoss App (lightbox not opening); fix: conflict with Wolmart theme (fatal error).
|
231 |
|
232 |
= 3.8.2 =
|
233 |
* Fix: conflict with WP Super Cache plugin (cache not working); fix: Lazy Load (conflict with themes that use LazySizes library).
|
234 |
|
235 |
-
= 3.8.1 =
|
236 |
-
* 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).
|
237 |
-
|
238 |
= others =
|
239 |
* [more](https://fifu.app/changelog)
|
240 |
|
241 |
|
242 |
== Upgrade Notice ==
|
243 |
|
244 |
-
= 3.8.
|
245 |
-
*
|
4 |
Tags: featured, image, url, video, woocommerce
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 5.9
|
7 |
+
Stable tag: 3.8.4
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
226 |
|
227 |
== Changelog ==
|
228 |
|
229 |
+
= 3.8.4 =
|
230 |
+
* Enhancement: integration with WP Automatic (supports external images in the WooCommerce gallery now); enhancement: Auto set featured media from post content > hide the image/video from content (the hidden media is also removed on page load now).
|
231 |
+
|
232 |
= 3.8.3 =
|
233 |
* Fix: CDN + Optimized thumbnails (not working for images loaded via ajax); fix: Hide Featured Media (no images in related posts); fix: conflict with BuddyBoss App (lightbox not opening); fix: conflict with Wolmart theme (fatal error).
|
234 |
|
235 |
= 3.8.2 =
|
236 |
* Fix: conflict with WP Super Cache plugin (cache not working); fix: Lazy Load (conflict with themes that use LazySizes library).
|
237 |
|
|
|
|
|
|
|
238 |
= others =
|
239 |
* [more](https://fifu.app/changelog)
|
240 |
|
241 |
|
242 |
== Upgrade Notice ==
|
243 |
|
244 |
+
= 3.8.4 =
|
245 |
+
* Enhancement: integration with WP Automatic (supports external images in the WooCommerce gallery now); enhancement: Auto set featured media from post content > hide the image/video from content (the hidden media is also removed on page load now).
|