Version Description
- New option: Fast Buy > custom field; enhancement: WP All Import add-on (documentation added); fix: Lazy Load (conflict with Slider Revolution plugin); fix: conflict with Web Stories plugin; deprecated: Featured Slider > number of fields; deprecated: Unsplash Image Sizes.
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 4.1.3 |
Comparing to | |
See all releases |
Code changes from version 4.1.2 to 4.1.3
- admin/html/js/convert-url.js +3 -0
- admin/html/js/menu.js +0 -1
- admin/html/js/meta-box.js +1 -1
- admin/html/js/unsplash.js +3 -1
- admin/html/menu.html +110 -68
- admin/html/troubleshooting.html +27 -13
- admin/meta-box.php +6 -0
- admin/strings.php +7 -12
- featured-image-from-url.php +2 -2
- includes/attachment.php +14 -2
- includes/html/js/lazySizesConfig.js +4 -0
- readme.txt +6 -7
admin/html/js/convert-url.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
function fifu_convert($url) {
|
|
|
|
|
|
|
2 |
if (fifu_from_google_drive($url))
|
3 |
return fifu_google_drive_url($url);
|
4 |
|
1 |
function fifu_convert($url) {
|
2 |
+
if (!$url)
|
3 |
+
return $url;
|
4 |
+
|
5 |
if (fifu_from_google_drive($url))
|
6 |
return fifu_google_drive_url($url);
|
7 |
|
admin/html/js/menu.js
CHANGED
@@ -34,7 +34,6 @@ jQuery(function () {
|
|
34 |
jQuery("#fifu_input_spinner_nth").spinner({min: 1});
|
35 |
jQuery("#fifu_input_spinner_image").spinner({min: 0});
|
36 |
jQuery("#fifu_input_spinner_video").spinner({min: 0});
|
37 |
-
jQuery("#fifu_input_spinner_slider").spinner({min: 0});
|
38 |
jQuery("#fifu_input_slider_speed").spinner({min: 0});
|
39 |
jQuery("#fifu_input_slider_pause").spinner({min: 0});
|
40 |
jQuery("#fifu_input_auto_set_width").spinner({min: 0});
|
34 |
jQuery("#fifu_input_spinner_nth").spinner({min: 1});
|
35 |
jQuery("#fifu_input_spinner_image").spinner({min: 0});
|
36 |
jQuery("#fifu_input_spinner_video").spinner({min: 0});
|
|
|
37 |
jQuery("#fifu_input_slider_speed").spinner({min: 0});
|
38 |
jQuery("#fifu_input_slider_pause").spinner({min: 0});
|
39 |
jQuery("#fifu_input_auto_set_width").spinner({min: 0});
|
admin/html/js/meta-box.js
CHANGED
@@ -49,7 +49,7 @@ function previewImage() {
|
|
49 |
xhr.open("GET", 'https://source.unsplash.com/random', true);
|
50 |
else {
|
51 |
xhr.open("GET", 'https://source.unsplash.com/featured/?' + $url, true);
|
52 |
-
fifu_start_unsplash_lightbox($url
|
53 |
}
|
54 |
xhr.send();
|
55 |
if (!$url)
|
49 |
xhr.open("GET", 'https://source.unsplash.com/random', true);
|
50 |
else {
|
51 |
xhr.open("GET", 'https://source.unsplash.com/featured/?' + $url, true);
|
52 |
+
fifu_start_unsplash_lightbox($url);
|
53 |
}
|
54 |
xhr.send();
|
55 |
if (!$url)
|
admin/html/js/unsplash.js
CHANGED
@@ -38,10 +38,12 @@ function fifu_get_unsplash_urls(keywords, limit, size) {
|
|
38 |
var fifu_scrolling = false;
|
39 |
var idSet = new Set();
|
40 |
|
41 |
-
function fifu_start_unsplash_lightbox(keywords
|
42 |
idSet = new Set();
|
43 |
fifu_register_unsplash_click_event();
|
44 |
|
|
|
|
|
45 |
jQuery.fancybox.open('<div><div class="masonry"></div></div>');
|
46 |
jQuery('div.masonry').after('<center><div id="fifu-loading"><img src="https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyloadxt/1.1.0/loading.gif"><div>Loading...</div><div></center>');
|
47 |
fifu_get_unsplash_urls(keywords, 10, size);
|
38 |
var fifu_scrolling = false;
|
39 |
var idSet = new Set();
|
40 |
|
41 |
+
function fifu_start_unsplash_lightbox(keywords) {
|
42 |
idSet = new Set();
|
43 |
fifu_register_unsplash_click_event();
|
44 |
|
45 |
+
size = 'featured';
|
46 |
+
|
47 |
jQuery.fancybox.open('<div><div class="masonry"></div></div>');
|
48 |
jQuery('div.masonry').after('<center><div id="fifu-loading"><img src="https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyloadxt/1.1.0/loading.gif"><div>Loading...</div><div></center>');
|
49 |
fifu_get_unsplash_urls(keywords, 10, size);
|
admin/html/menu.html
CHANGED
@@ -1061,21 +1061,6 @@
|
|
1061 |
on, off
|
1062 |
</th>
|
1063 |
</tr>
|
1064 |
-
<tr class="color">
|
1065 |
-
<th>
|
1066 |
-
<?php $fifu['tab']['image']() ?>
|
1067 |
-
</th>
|
1068 |
-
<th>
|
1069 |
-
<?php $fifu['title']['unsplash']() ?>
|
1070 |
-
</th>
|
1071 |
-
<th></th>
|
1072 |
-
<th>
|
1073 |
-
wp fifu image --unsplash-size <integer>
|
1074 |
-
</th>
|
1075 |
-
<th>
|
1076 |
-
300x400, 1920x1080...
|
1077 |
-
</th>
|
1078 |
-
</tr>
|
1079 |
<tr class="color">
|
1080 |
<th>
|
1081 |
<?php $fifu['tab']['slider']() ?>
|
@@ -1246,23 +1231,6 @@
|
|
1246 |
on, off
|
1247 |
</th>
|
1248 |
</tr>
|
1249 |
-
<tr class="color">
|
1250 |
-
<th>
|
1251 |
-
<?php $fifu['tab']['slider']() ?>
|
1252 |
-
</th>
|
1253 |
-
<th>
|
1254 |
-
<?php $fifu['title']['slider']() ?>
|
1255 |
-
</th>
|
1256 |
-
<th>
|
1257 |
-
<?php $fifu['fields']['slider']() ?>
|
1258 |
-
</th>
|
1259 |
-
<th>
|
1260 |
-
wp fifu slider --fields <integer>
|
1261 |
-
</th>
|
1262 |
-
<th>
|
1263 |
-
3, 4, 5...
|
1264 |
-
</th>
|
1265 |
-
</tr>
|
1266 |
<tr class="color">
|
1267 |
<th>
|
1268 |
<?php $fifu['tab']['slider']() ?>
|
@@ -2294,6 +2262,23 @@
|
|
2294 |
This site...
|
2295 |
</th>
|
2296 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2297 |
</table>
|
2298 |
</div>
|
2299 |
<div id="tabs-2">
|
@@ -3712,23 +3697,6 @@
|
|
3712 |
class="toggleoff"
|
3713 |
value="" style="display:block;border:none">
|
3714 |
</div>
|
3715 |
-
|
3716 |
-
<div class="box">
|
3717 |
-
<div class="fifu-pro"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all PRO features"><span class="dashicons dashicons-lock fifu-pro-icon"></span></a></div>
|
3718 |
-
<h2><?php $fifu['title']['unsplash']() ?></h2>
|
3719 |
-
<div class="greybox" id="grad2">
|
3720 |
-
<?php $fifu['unsplash']['desc']() ?>
|
3721 |
-
</div>
|
3722 |
-
<br>
|
3723 |
-
<input id="fifu_input_unsplash_size"
|
3724 |
-
type="text"
|
3725 |
-
name="fifu_input_unsplash_size"
|
3726 |
-
value=""
|
3727 |
-
size="8">
|
3728 |
-
<input type="submit"
|
3729 |
-
value="<?php $fifu['button']['submit']() ?>" disabled>
|
3730 |
-
</div>
|
3731 |
-
|
3732 |
</div>
|
3733 |
<div id="tabs-j">
|
3734 |
<div class="box">
|
@@ -4721,20 +4689,7 @@
|
|
4721 |
</tr>
|
4722 |
</table>
|
4723 |
|
4724 |
-
<br>
|
4725 |
-
|
4726 |
<table style="text-align:left">
|
4727 |
-
<tr>
|
4728 |
-
<th>
|
4729 |
-
<input id="fifu_input_spinner_slider"
|
4730 |
-
name="fifu_input_spinner_slider"
|
4731 |
-
step="1"
|
4732 |
-
size="4">
|
4733 |
-
</th>
|
4734 |
-
<th>
|
4735 |
-
<?php $fifu['fields']['slider']() ?>
|
4736 |
-
</th>
|
4737 |
-
</tr>
|
4738 |
<tr>
|
4739 |
<th>
|
4740 |
<input id="fifu_input_slider_pause"
|
@@ -5862,6 +5817,19 @@
|
|
5862 |
value="">
|
5863 |
</th>
|
5864 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5865 |
<tr>
|
5866 |
<th>
|
5867 |
<input type="submit" value="<?php $fifu['button']['ok']() ?>" style="width:72px" disabled>
|
@@ -5887,19 +5855,19 @@
|
|
5887 |
</ul>
|
5888 |
|
5889 |
<div id="tabs-4">
|
5890 |
-
|
5891 |
-
<table style="text-align:left">
|
5892 |
-
<tr>
|
5893 |
<th>
|
5894 |
-
1
|
5895 |
</th>
|
5896 |
<th>
|
5897 |
<a href="http://www.wpallimport.com/documentation/woocommerce/variable-products/"><?php $fifu['addon']['faq']['woocommerce']() ?></a>
|
5898 |
</th>
|
5899 |
</tr>
|
5900 |
-
<tr>
|
5901 |
<th>
|
5902 |
-
2
|
5903 |
</th>
|
5904 |
<th>
|
5905 |
<?php $fifu['addon']['faq']['variation-child-xml']() ?>:
|
@@ -5907,6 +5875,80 @@
|
|
5907 |
</th>
|
5908 |
</tr>
|
5909 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5910 |
</div>
|
5911 |
|
5912 |
<div id="tabs-2">
|
1061 |
on, off
|
1062 |
</th>
|
1063 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1064 |
<tr class="color">
|
1065 |
<th>
|
1066 |
<?php $fifu['tab']['slider']() ?>
|
1231 |
on, off
|
1232 |
</th>
|
1233 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1234 |
<tr class="color">
|
1235 |
<th>
|
1236 |
<?php $fifu['tab']['slider']() ?>
|
2262 |
This site...
|
2263 |
</th>
|
2264 |
</tr>
|
2265 |
+
<tr class="color">
|
2266 |
+
<th>
|
2267 |
+
<?php $fifu['tab']['woo']() ?>
|
2268 |
+
</th>
|
2269 |
+
<th>
|
2270 |
+
<?php $fifu['title']['buy']() ?>
|
2271 |
+
</th>
|
2272 |
+
<th>
|
2273 |
+
<?php $fifu['buy']['cf']['text']() ?>
|
2274 |
+
</th>
|
2275 |
+
<th>
|
2276 |
+
wp fifu woo --buy-cf <string>
|
2277 |
+
</th>
|
2278 |
+
<th>
|
2279 |
+
my_custom_field
|
2280 |
+
</th>
|
2281 |
+
</tr>
|
2282 |
</table>
|
2283 |
</div>
|
2284 |
<div id="tabs-2">
|
3697 |
class="toggleoff"
|
3698 |
value="" style="display:block;border:none">
|
3699 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3700 |
</div>
|
3701 |
<div id="tabs-j">
|
3702 |
<div class="box">
|
4689 |
</tr>
|
4690 |
</table>
|
4691 |
|
|
|
|
|
4692 |
<table style="text-align:left">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4693 |
<tr>
|
4694 |
<th>
|
4695 |
<input id="fifu_input_slider_pause"
|
5817 |
value="">
|
5818 |
</th>
|
5819 |
</tr>
|
5820 |
+
<tr>
|
5821 |
+
<th>
|
5822 |
+
<?php $fifu['buy']['cf']['text']() ?>
|
5823 |
+
</th>
|
5824 |
+
<th>
|
5825 |
+
<input id="fifu_input_buy_cf"
|
5826 |
+
type="text"
|
5827 |
+
name="fifu_input_buy_cf"
|
5828 |
+
style="width:250px"
|
5829 |
+
placeholder="<?php $fifu['buy']['cf']['placeholder']() ?>"
|
5830 |
+
value="">
|
5831 |
+
</th>
|
5832 |
+
</tr>
|
5833 |
<tr>
|
5834 |
<th>
|
5835 |
<input type="submit" value="<?php $fifu['button']['ok']() ?>" style="width:72px" disabled>
|
5855 |
</ul>
|
5856 |
|
5857 |
<div id="tabs-4">
|
5858 |
+
<h3>Examples</h3>
|
5859 |
+
<table style="width:100%;text-align:left">
|
5860 |
+
<tr class="color">
|
5861 |
<th>
|
5862 |
+
1
|
5863 |
</th>
|
5864 |
<th>
|
5865 |
<a href="http://www.wpallimport.com/documentation/woocommerce/variable-products/"><?php $fifu['addon']['faq']['woocommerce']() ?></a>
|
5866 |
</th>
|
5867 |
</tr>
|
5868 |
+
<tr class="color">
|
5869 |
<th>
|
5870 |
+
2
|
5871 |
</th>
|
5872 |
<th>
|
5873 |
<?php $fifu['addon']['faq']['variation-child-xml']() ?>:
|
5875 |
</th>
|
5876 |
</tr>
|
5877 |
</table>
|
5878 |
+
<br>
|
5879 |
+
<hr>
|
5880 |
+
<h3>How NOT to configure WP All Import</h3>
|
5881 |
+
<table style="width:100%;text-align:left">
|
5882 |
+
<tr class="color">
|
5883 |
+
<th>
|
5884 |
+
<b>Section</b>
|
5885 |
+
</th>
|
5886 |
+
<th>
|
5887 |
+
<b>Description</b>
|
5888 |
+
</th>
|
5889 |
+
</tr>
|
5890 |
+
<tr class="color">
|
5891 |
+
<th>
|
5892 |
+
Images
|
5893 |
+
</th>
|
5894 |
+
<th>
|
5895 |
+
DON'T add filenames or URLs. Keep the text fields EMPTY
|
5896 |
+
</th>
|
5897 |
+
</tr>
|
5898 |
+
<tr class="color">
|
5899 |
+
<th>
|
5900 |
+
FIFU Add-On
|
5901 |
+
</th>
|
5902 |
+
<th>
|
5903 |
+
For WooCommerce, DON'T use "Featured image (URL)" field
|
5904 |
+
</th>
|
5905 |
+
</tr>
|
5906 |
+
<tr class="color">
|
5907 |
+
<th>
|
5908 |
+
Custom Fields
|
5909 |
+
</th>
|
5910 |
+
<th>
|
5911 |
+
DON'T add FIFU custom fields
|
5912 |
+
</th>
|
5913 |
+
</tr>
|
5914 |
+
</table>
|
5915 |
+
<br>
|
5916 |
+
<hr>
|
5917 |
+
<h3>How to configure FIFU Add-On</h3>
|
5918 |
+
<table style="width:100%;text-align:left">
|
5919 |
+
<tr class="color">
|
5920 |
+
<th>
|
5921 |
+
<b>For</b>
|
5922 |
+
</th>
|
5923 |
+
<th>
|
5924 |
+
<b>Description</b>
|
5925 |
+
</th>
|
5926 |
+
</tr>
|
5927 |
+
<tr class="color">
|
5928 |
+
<th>
|
5929 |
+
WooCommerce
|
5930 |
+
</th>
|
5931 |
+
<th>
|
5932 |
+
Use "Product image URL + gallery URLs", even if you have 1 URL only
|
5933 |
+
</th>
|
5934 |
+
</tr>
|
5935 |
+
<tr class="color">
|
5936 |
+
<th>
|
5937 |
+
List of URLs delimited by comma
|
5938 |
+
</th>
|
5939 |
+
<th>
|
5940 |
+
Enter a comma in the "List delimiter" field
|
5941 |
+
</th>
|
5942 |
+
</tr>
|
5943 |
+
<tr class="color">
|
5944 |
+
<th>
|
5945 |
+
URLs in different columns
|
5946 |
+
</th>
|
5947 |
+
<th>
|
5948 |
+
{columnA[1]}|{columnB[1]}|{columnC[1]}|{columnD[1]}|...
|
5949 |
+
</th>
|
5950 |
+
</tr>
|
5951 |
+
</table>
|
5952 |
</div>
|
5953 |
|
5954 |
<div id="tabs-2">
|
admin/html/troubleshooting.html
CHANGED
@@ -9,6 +9,33 @@
|
|
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>
|
@@ -317,19 +344,6 @@
|
|
317 |
2) restart Apache.<br>
|
318 |
</div>
|
319 |
</div>
|
320 |
-
<div class="box">
|
321 |
-
<table>
|
322 |
-
<tr>
|
323 |
-
<td style="border-bottom:none">2021-07-29</td>
|
324 |
-
<td style="border-bottom:none"><h3> Wordpress Automatic Plugin</h3></td>
|
325 |
-
<td style="border-bottom:none">plugin</td>
|
326 |
-
</tr>
|
327 |
-
</table>
|
328 |
-
<div class="greybox" style="position: relative; top: -10px">
|
329 |
-
Posts created by WP Automatic have no featured image. <br>
|
330 |
-
x) please contact its support, because WP Automatic is responsible for saving image URLs in FIFU custom fields.<br>
|
331 |
-
</div>
|
332 |
-
</div>
|
333 |
<div class="box">
|
334 |
<table>
|
335 |
<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-09-22</td>
|
16 |
+
<td style="border-bottom:none"><h3> Woodmart</h3></td>
|
17 |
+
<td style="border-bottom:none">theme</td>
|
18 |
+
</tr>
|
19 |
+
</table>
|
20 |
+
<div class="greybox" style="position: relative; top: -10px">
|
21 |
+
"Replace Not Found Image" nor working:<br>
|
22 |
+
1) disable "Theme Settings > Performance > Lazy loading > Lazy loading for images"<br>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
<div class="box">
|
26 |
+
<table>
|
27 |
+
<tr>
|
28 |
+
<td style="border-bottom:none">2022-09-21</td>
|
29 |
+
<td style="border-bottom:none"><h3> Wordpress Automatic Plugin</h3></td>
|
30 |
+
<td style="border-bottom:none">plugin</td>
|
31 |
+
</tr>
|
32 |
+
</table>
|
33 |
+
<div class="greybox" style="position: relative; top: -10px">
|
34 |
+
Posts created by WP Automatic have no featured image. Two possible solutions:<br>
|
35 |
+
a) contact its support, because WP Automatic is responsible for saving image URLs in FIFU custom fields<br>
|
36 |
+
b) use "FIFU > Settings > Automatic > Auto set featured media using web page address" with the custom field "original_link"<br>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
<div class="box">
|
40 |
<table>
|
41 |
<tr>
|
344 |
2) restart Apache.<br>
|
345 |
</div>
|
346 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
<div class="box">
|
348 |
<table>
|
349 |
<tr>
|
admin/meta-box.php
CHANGED
@@ -3,6 +3,12 @@
|
|
3 |
add_action('add_meta_boxes', 'fifu_insert_meta_box');
|
4 |
|
5 |
function fifu_insert_meta_box() {
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
$fifu = fifu_get_strings_meta_box_php();
|
7 |
$post_types = fifu_get_post_types();
|
8 |
|
3 |
add_action('add_meta_boxes', 'fifu_insert_meta_box');
|
4 |
|
5 |
function fifu_insert_meta_box() {
|
6 |
+
if (function_exists('get_current_screen')) {
|
7 |
+
$screen = get_current_screen();
|
8 |
+
if (isset($screen->post_type) && strpos($screen->post_type, 'web-story') !== false)
|
9 |
+
return;
|
10 |
+
}
|
11 |
+
|
12 |
$fifu = fifu_get_strings_meta_box_php();
|
13 |
$post_types = fifu_get_post_types();
|
14 |
|
admin/strings.php
CHANGED
@@ -246,9 +246,6 @@ function fifu_get_strings_settings() {
|
|
246 |
$fifu['title']['block'] = function () {
|
247 |
_e("Disable right-click", FIFU_SLUG);
|
248 |
};
|
249 |
-
$fifu['title']['unsplash'] = function () {
|
250 |
-
_e("Unsplash Image Size", FIFU_SLUG);
|
251 |
-
};
|
252 |
$fifu['title']['replace'] = function () {
|
253 |
_e("Replace Not Found Image", FIFU_SLUG);
|
254 |
};
|
@@ -564,9 +561,6 @@ function fifu_get_strings_settings() {
|
|
564 |
$fifu['fields']['video'] = function () {
|
565 |
_e("Video gallery", FIFU_SLUG);
|
566 |
};
|
567 |
-
$fifu['fields']['slider'] = function () {
|
568 |
-
_e("number of fields in the post editor", FIFU_SLUG);
|
569 |
-
};
|
570 |
|
571 |
// reset
|
572 |
$fifu['reset']['desc'] = function () {
|
@@ -771,7 +765,7 @@ function fifu_get_strings_settings() {
|
|
771 |
_e("Amazon", FIFU_SLUG);
|
772 |
};
|
773 |
$fifu['finder']['custom']['desc'] = function () {
|
774 |
-
_e("If you already have the web page address saved in your database, you could inform its custom field name here. FIFU would access that and import the value. For example, if the web page URL is saved in the Product URL field, you could add \"_product_url\", which is the field where the external URL to the product is stored.", FIFU_SLUG);
|
775 |
};
|
776 |
|
777 |
// tags
|
@@ -789,11 +783,6 @@ function fifu_get_strings_settings() {
|
|
789 |
_e("Adds a new meta box in the post editor where you can specify a forwarding URL. Then, when accessing a post and clicking on the featured image, the user will be redirected to the specified address.", FIFU_SLUG);
|
790 |
};
|
791 |
|
792 |
-
// unsplash
|
793 |
-
$fifu['unsplash']['desc'] = function () {
|
794 |
-
_e("Choose the size of the Unsplash images (loaded randomly or via keywords/tags search). Examples of valid sizes: 500x500, 300x400, 1920x1080... Or leave this field empty to get the original size.", FIFU_SLUG);
|
795 |
-
};
|
796 |
-
|
797 |
// replace
|
798 |
$fifu['replace']['desc'] = function () {
|
799 |
_e("Define the URL of an image to be shown in case of image not found error.", FIFU_SLUG);
|
@@ -1278,12 +1267,18 @@ function fifu_get_strings_settings() {
|
|
1278 |
$fifu['buy']['disclaimer']['text'] = function () {
|
1279 |
_e("Disclaimer", FIFU_SLUG);
|
1280 |
};
|
|
|
|
|
|
|
1281 |
$fifu['buy']['text']['placeholder'] = function () {
|
1282 |
_e("buy now (optional)", FIFU_SLUG);
|
1283 |
};
|
1284 |
$fifu['buy']['disclaimer']['placeholder'] = function () {
|
1285 |
_e("disclaimer (optional)", FIFU_SLUG);
|
1286 |
};
|
|
|
|
|
|
|
1287 |
|
1288 |
// social
|
1289 |
$fifu['social']['desc'] = function () {
|
246 |
$fifu['title']['block'] = function () {
|
247 |
_e("Disable right-click", FIFU_SLUG);
|
248 |
};
|
|
|
|
|
|
|
249 |
$fifu['title']['replace'] = function () {
|
250 |
_e("Replace Not Found Image", FIFU_SLUG);
|
251 |
};
|
561 |
$fifu['fields']['video'] = function () {
|
562 |
_e("Video gallery", FIFU_SLUG);
|
563 |
};
|
|
|
|
|
|
|
564 |
|
565 |
// reset
|
566 |
$fifu['reset']['desc'] = function () {
|
765 |
_e("Amazon", FIFU_SLUG);
|
766 |
};
|
767 |
$fifu['finder']['custom']['desc'] = function () {
|
768 |
+
_e("If you already have the web page address saved in your database, you could inform its custom field name here. FIFU would access that and import the value. For example, if the web page URL is saved in the Product URL field, you could add \"_product_url\", which is the field where the external URL to the product is stored. For posts created by WordPress Automatic Plugin, add \"original_link\".", FIFU_SLUG);
|
769 |
};
|
770 |
|
771 |
// tags
|
783 |
_e("Adds a new meta box in the post editor where you can specify a forwarding URL. Then, when accessing a post and clicking on the featured image, the user will be redirected to the specified address.", FIFU_SLUG);
|
784 |
};
|
785 |
|
|
|
|
|
|
|
|
|
|
|
786 |
// replace
|
787 |
$fifu['replace']['desc'] = function () {
|
788 |
_e("Define the URL of an image to be shown in case of image not found error.", FIFU_SLUG);
|
1267 |
$fifu['buy']['disclaimer']['text'] = function () {
|
1268 |
_e("Disclaimer", FIFU_SLUG);
|
1269 |
};
|
1270 |
+
$fifu['buy']['cf']['text'] = function () {
|
1271 |
+
_e("Custom field", FIFU_SLUG);
|
1272 |
+
};
|
1273 |
$fifu['buy']['text']['placeholder'] = function () {
|
1274 |
_e("buy now (optional)", FIFU_SLUG);
|
1275 |
};
|
1276 |
$fifu['buy']['disclaimer']['placeholder'] = function () {
|
1277 |
_e("disclaimer (optional)", FIFU_SLUG);
|
1278 |
};
|
1279 |
+
$fifu['buy']['cf']['placeholder'] = function () {
|
1280 |
+
_e("custom field name (optional)", FIFU_SLUG);
|
1281 |
+
};
|
1282 |
|
1283 |
// social
|
1284 |
$fifu['social']['desc'] = function () {
|
featured-image-from-url.php
CHANGED
@@ -4,11 +4,11 @@
|
|
4 |
* Plugin Name: Featured Image from URL (FIFU)
|
5 |
* Plugin URI: https://fifu.app/
|
6 |
* Description: Use an external image/video/audio as featured image/video/audio of a post or WooCommerce product.
|
7 |
-
* Version: 4.1.
|
8 |
* Author: fifu.app
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 4.0
|
11 |
-
* WC tested up to: 6.9.
|
12 |
* Text Domain: featured-image-from-url
|
13 |
* License: GPLv3
|
14 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
4 |
* Plugin Name: Featured Image from URL (FIFU)
|
5 |
* Plugin URI: https://fifu.app/
|
6 |
* Description: Use an external image/video/audio as featured image/video/audio of a post or WooCommerce product.
|
7 |
+
* Version: 4.1.3
|
8 |
* Author: fifu.app
|
9 |
* Author URI: https://fifu.app/
|
10 |
* WC requires at least: 4.0
|
11 |
+
* WC tested up to: 6.9.3
|
12 |
* Text Domain: featured-image-from-url
|
13 |
* License: GPLv3
|
14 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
includes/attachment.php
CHANGED
@@ -52,15 +52,27 @@ function fifu_replace_attachment_url($att_url, $att_id) {
|
|
52 |
add_filter('posts_where', 'fifu_query_attachments');
|
53 |
|
54 |
function fifu_query_attachments($where) {
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
global $wpdb;
|
56 |
-
if (isset($_POST['action']) && ($_POST['action'] == 'query-attachments'))
|
57 |
$where .= ' AND ' . $wpdb->prefix . 'posts.post_author <> ' . FIFU_AUTHOR . ' ';
|
58 |
return $where;
|
59 |
}
|
60 |
|
61 |
add_filter('posts_where', function ($where, \WP_Query $q) {
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
global $wpdb;
|
63 |
-
if (is_admin() && $q->is_main_query() && true)
|
64 |
$where .= ' AND ' . $wpdb->prefix . 'posts.post_author <> ' . FIFU_AUTHOR . ' ';
|
65 |
return $where;
|
66 |
}, 10, 2);
|
52 |
add_filter('posts_where', 'fifu_query_attachments');
|
53 |
|
54 |
function fifu_query_attachments($where) {
|
55 |
+
$is_web_story = false;
|
56 |
+
if (function_exists('get_current_screen')) {
|
57 |
+
$screen = get_current_screen();
|
58 |
+
$is_web_story = isset($screen->post_type) && strpos($screen->post_type, 'web-story') !== false;
|
59 |
+
}
|
60 |
+
|
61 |
global $wpdb;
|
62 |
+
if ($is_web_story || (isset($_POST['action']) && ($_POST['action'] == 'query-attachments')))
|
63 |
$where .= ' AND ' . $wpdb->prefix . 'posts.post_author <> ' . FIFU_AUTHOR . ' ';
|
64 |
return $where;
|
65 |
}
|
66 |
|
67 |
add_filter('posts_where', function ($where, \WP_Query $q) {
|
68 |
+
$is_web_story = false;
|
69 |
+
if (function_exists('get_current_screen')) {
|
70 |
+
$screen = get_current_screen();
|
71 |
+
$is_web_story = isset($screen->post_type) && strpos($screen->post_type, 'web-story') !== false;
|
72 |
+
}
|
73 |
+
|
74 |
global $wpdb;
|
75 |
+
if ($is_web_story || (is_admin() && $q->is_main_query() && true))
|
76 |
$where .= ' AND ' . $wpdb->prefix . 'posts.post_author <> ' . FIFU_AUTHOR . ' ';
|
77 |
return $where;
|
78 |
}, 10, 2);
|
includes/html/js/lazySizesConfig.js
CHANGED
@@ -196,6 +196,10 @@ function fifu_lazy_ajax(selector = 'img') {
|
|
196 |
if (jQuery(this).hasClass('sgdg-grid-img'))
|
197 |
return;
|
198 |
|
|
|
|
|
|
|
|
|
199 |
src = jQuery(this).attr('src');
|
200 |
if (src && src.includes('cloud.fifu.app'))
|
201 |
return;
|
196 |
if (jQuery(this).hasClass('sgdg-grid-img'))
|
197 |
return;
|
198 |
|
199 |
+
// "Slider Revolution" plugin
|
200 |
+
if (jQuery(this).hasClass('tp-rs-img'))
|
201 |
+
return;
|
202 |
+
|
203 |
src = jQuery(this).attr('src');
|
204 |
if (src && src.includes('cloud.fifu.app'))
|
205 |
return;
|
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: 6.0.2
|
7 |
-
Stable tag: 4.1.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -31,7 +31,6 @@ Use an external image as featured image of your post, page or custom post type.
|
|
31 |
* Featured image column
|
32 |
* **[PRO]** Disable right-click
|
33 |
* **[PRO]** Save in the media library
|
34 |
-
* **[PRO]** Unsplash image size
|
35 |
* **[PRO]** Same height
|
36 |
* **[PRO]** Hover effects
|
37 |
* **[PRO]** Replace not found image
|
@@ -262,20 +261,20 @@ Featured Image, Figurë e Zgjedhur, Image mise en avant, Uitgelichte afbeelding,
|
|
262 |
|
263 |
== Changelog ==
|
264 |
|
|
|
|
|
|
|
265 |
= 4.1.2 =
|
266 |
* Fix: CDN + Optimized Thumbnails (conflict with Facebook images); fix: Lazy Load (conflict with Image and Video Gallery from Google Drive plugin).
|
267 |
|
268 |
= 4.1.1 =
|
269 |
* Enhancement: FIFU Cloud (performance optimization for mobile); fix: CDN + Optimized Thumbnails > crop featured images; fix: CDN + Optimized Thumbnails > apply to content images; fix: incompatibility with AMP plugin.
|
270 |
|
271 |
-
= 4.1.0 =
|
272 |
-
* Enhancement: Featured Video (supports external video files now as mp4, ogg and webm); enhancement: Fast Buy (new settings and improvements); enhancement: CDN + Optimized Thumbnails (serves Unsplash images now).
|
273 |
-
|
274 |
= others =
|
275 |
* [more](https://fifu.app/changelog)
|
276 |
|
277 |
|
278 |
== Upgrade Notice ==
|
279 |
|
280 |
-
= 4.1.
|
281 |
-
*
|
4 |
Tags: featured, image, url, video, woocommerce
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 6.0.2
|
7 |
+
Stable tag: 4.1.3
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
31 |
* Featured image column
|
32 |
* **[PRO]** Disable right-click
|
33 |
* **[PRO]** Save in the media library
|
|
|
34 |
* **[PRO]** Same height
|
35 |
* **[PRO]** Hover effects
|
36 |
* **[PRO]** Replace not found image
|
261 |
|
262 |
== Changelog ==
|
263 |
|
264 |
+
= 4.1.3 =
|
265 |
+
* New option: Fast Buy > custom field; enhancement: WP All Import add-on (documentation added); fix: Lazy Load (conflict with Slider Revolution plugin); fix: conflict with Web Stories plugin; deprecated: Featured Slider > number of fields; deprecated: Unsplash Image Sizes.
|
266 |
+
|
267 |
= 4.1.2 =
|
268 |
* Fix: CDN + Optimized Thumbnails (conflict with Facebook images); fix: Lazy Load (conflict with Image and Video Gallery from Google Drive plugin).
|
269 |
|
270 |
= 4.1.1 =
|
271 |
* Enhancement: FIFU Cloud (performance optimization for mobile); fix: CDN + Optimized Thumbnails > crop featured images; fix: CDN + Optimized Thumbnails > apply to content images; fix: incompatibility with AMP plugin.
|
272 |
|
|
|
|
|
|
|
273 |
= others =
|
274 |
* [more](https://fifu.app/changelog)
|
275 |
|
276 |
|
277 |
== Upgrade Notice ==
|
278 |
|
279 |
+
= 4.1.3 =
|
280 |
+
* New option: Fast Buy > custom field; enhancement: WP All Import add-on (documentation added); fix: Lazy Load (conflict with Slider Revolution plugin); fix: conflict with Web Stories plugin; deprecated: Featured Slider > number of fields; deprecated: Unsplash Image Sizes.
|