Version Description
- New feature: Maximum Sizes; Deprecated: Default Width.
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 2.4.7 |
Comparing to | |
See all releases |
Code changes from version 2.4.6 to 2.4.7
- admin/html/menu.html +225 -44
- admin/html/meta-box.html +2 -2
- admin/menu.php +37 -4
- featured-image-from-url.php +1 -1
- includes/attachment.php +4 -2
- includes/util.php +22 -0
- readme.txt +6 -0
admin/html/menu.html
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
<li><a href="#tabs-c">Video</a></li>
|
21 |
<li><a href="#tabs-o">WooCommerce</a></li>
|
22 |
<li><a href="#tabs-p">WP All Import</a></li>
|
23 |
-
<li><a href="#tabs-a">Premium version <b style="border-radius:2px;padding:3px;background-color:#32373c;color:white">
|
24 |
<br>
|
25 |
<br>
|
26 |
<div id="tabs-a">
|
@@ -38,7 +38,7 @@
|
|
38 |
<tr>
|
39 |
<td style="width:60%"
|
40 |
<div>
|
41 |
-
Donate <b>US$
|
42 |
Moreover, <b>you will have lifetime automatic updates</b>.<br><br>
|
43 |
<i>* price valid for May 2019</i>
|
44 |
</div>
|
@@ -730,34 +730,200 @@
|
|
730 |
<input type="submit"
|
731 |
value="Submit" >
|
732 |
</form>
|
733 |
-
</div>
|
734 |
|
735 |
<div class="box">
|
736 |
-
|
737 |
-
<h2>Default Width</h2>
|
738 |
-
|
739 |
<div class="greybox">
|
|
|
|
|
|
|
|
|
|
|
|
|
740 |
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
757 |
|
758 |
-
|
759 |
-
</form>
|
760 |
|
|
|
|
|
|
|
761 |
</div>
|
762 |
|
763 |
<a name="priority"></a>
|
@@ -1137,7 +1303,7 @@
|
|
1137 |
<h2>Video Sizes</h2>
|
1138 |
<div class="greybox" id="grad2">
|
1139 |
<b>Premium feature</b><br><br>
|
1140 |
-
The default value applied to the videos is "100%" and it usually works fine. However, here you can define the max size
|
1141 |
<table style="text-align:left">
|
1142 |
<tr>
|
1143 |
<th>
|
@@ -1146,12 +1312,12 @@
|
|
1146 |
<th>
|
1147 |
<input id="fifu_input_video_width_rtio"
|
1148 |
name="fifu_input_video_width_rtio"
|
1149 |
-
size="
|
1150 |
</th>
|
1151 |
<th>
|
1152 |
<input id="fifu_input_video_height_rtio"
|
1153 |
name="fifu_input_video_height_rtio"
|
1154 |
-
size="
|
1155 |
</th>
|
1156 |
<th>
|
1157 |
<div style="font-style: italic;font-weight:normal;">e.g.: 1, 2, 3...</div>
|
@@ -1164,7 +1330,7 @@
|
|
1164 |
<th>
|
1165 |
<input id="fifu_input_video_margin_bottom"
|
1166 |
name="fifu_input_video_margin_bottom"
|
1167 |
-
size="
|
1168 |
</th>
|
1169 |
<th>
|
1170 |
<div style="font-style: italic;font-weight:normal;">e.g.: 10px, 1cm...</div>
|
@@ -1177,7 +1343,7 @@
|
|
1177 |
<th>
|
1178 |
<input id="fifu_input_video_vertical_margin"
|
1179 |
name="fifu_input_video_vertical_margin"
|
1180 |
-
size="
|
1181 |
</th>
|
1182 |
<th>
|
1183 |
<div style="font-style: italic;font-weight:normal;">e.g.: 10px, 1cm...</div>
|
@@ -1191,13 +1357,13 @@
|
|
1191 |
<input id="fifu_input_video_width_arch"
|
1192 |
name="fifu_input_video_width_arch"
|
1193 |
placeholder="max-width"
|
1194 |
-
size="
|
1195 |
</th>
|
1196 |
<th>
|
1197 |
<input id="fifu_input_video_height_arch"
|
1198 |
name="fifu_input_video_height_arch"
|
1199 |
placeholder="max-height"
|
1200 |
-
size="
|
1201 |
</th>
|
1202 |
<th>
|
1203 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
@@ -1211,13 +1377,13 @@
|
|
1211 |
<input id="fifu_input_video_width_ctgr"
|
1212 |
name="fifu_input_video_width_ctgr"
|
1213 |
placeholder="max-width"
|
1214 |
-
size="
|
1215 |
</th>
|
1216 |
<th>
|
1217 |
<input id="fifu_input_video_height_ctgr"
|
1218 |
name="fifu_input_video_height_ctgr"
|
1219 |
placeholder="max-height"
|
1220 |
-
size="
|
1221 |
</th>
|
1222 |
<th>
|
1223 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
@@ -1231,13 +1397,13 @@
|
|
1231 |
<input id="fifu_input_video_width_home"
|
1232 |
name="fifu_input_video_width_home"
|
1233 |
placeholder="max-width"
|
1234 |
-
size="
|
1235 |
</th>
|
1236 |
<th>
|
1237 |
<input id="fifu_input_video_height_home"
|
1238 |
name="fifu_input_video_height_home"
|
1239 |
placeholder="max-height"
|
1240 |
-
size="
|
1241 |
</th>
|
1242 |
<th>
|
1243 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
@@ -1251,13 +1417,13 @@
|
|
1251 |
<input id="fifu_input_video_width_page"
|
1252 |
name="fifu_input_video_width_page"
|
1253 |
placeholder="max-width"
|
1254 |
-
size="
|
1255 |
</th>
|
1256 |
<th>
|
1257 |
<input id="fifu_input_video_height_page"
|
1258 |
name="fifu_input_video_height_page"
|
1259 |
placeholder="max-height"
|
1260 |
-
size="
|
1261 |
</th>
|
1262 |
<th>
|
1263 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
@@ -1271,13 +1437,13 @@
|
|
1271 |
<input id="fifu_input_video_width_post"
|
1272 |
name="fifu_input_video_width_post"
|
1273 |
placeholder="max-width"
|
1274 |
-
size="
|
1275 |
</th>
|
1276 |
<th>
|
1277 |
<input id="fifu_input_video_height_post"
|
1278 |
name="fifu_input_video_height_post"
|
1279 |
placeholder="max-height"
|
1280 |
-
size="
|
1281 |
</th>
|
1282 |
<th>
|
1283 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
@@ -1291,13 +1457,13 @@
|
|
1291 |
<input id="fifu_input_video_width_prod"
|
1292 |
name="fifu_input_video_width_prod"
|
1293 |
placeholder="max-width"
|
1294 |
-
size="
|
1295 |
</th>
|
1296 |
<th>
|
1297 |
<input id="fifu_input_video_height_prod"
|
1298 |
name="fifu_input_video_height_prod"
|
1299 |
placeholder="max-height"
|
1300 |
-
size="
|
1301 |
</th>
|
1302 |
<th>
|
1303 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
@@ -1311,13 +1477,13 @@
|
|
1311 |
<input id="fifu_input_video_width_shop"
|
1312 |
name="fifu_input_video_width_shop"
|
1313 |
placeholder="max-width"
|
1314 |
-
size="
|
1315 |
</th>
|
1316 |
<th>
|
1317 |
<input id="fifu_input_video_height_shop"
|
1318 |
name="fifu_input_video_height_shop"
|
1319 |
placeholder="max-height"
|
1320 |
-
size="
|
1321 |
</th>
|
1322 |
<th>
|
1323 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
@@ -2342,7 +2508,6 @@ fifu_css:<?php echo $css_style ?>;
|
|
2342 |
fifu_data_clean:<?php echo $enable_data_clean ?>;
|
2343 |
fifu_data_generation:<?php echo $enable_data_generation ?>;
|
2344 |
fifu_default_url:<?php echo $default_url ?>;
|
2345 |
-
fifu_default_width:<?php echo $default_width ?>;
|
2346 |
fifu_enable_default_url:<?php echo $enable_default_url ?>;
|
2347 |
fifu_fake:<?php echo $enable_fake ?>;
|
2348 |
fifu_fake2:<?php echo $enable_fake2 ?>;
|
@@ -2350,6 +2515,22 @@ fifu_get_first:<?php echo $enable_get_first ?>;
|
|
2350 |
fifu_grid_category:<?php echo $enable_grid_category ?>;
|
2351 |
fifu_hide_page:<?php echo $enable_hide_page ?>;
|
2352 |
fifu_hide_post:<?php echo $enable_hide_post ?>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2353 |
fifu_lazy:<?php echo $enable_lazy ?>;
|
2354 |
fifu_original:<?php echo $enable_original ?>;
|
2355 |
fifu_ovw_first:<?php echo $enable_ovw_first ?>;
|
20 |
<li><a href="#tabs-c">Video</a></li>
|
21 |
<li><a href="#tabs-o">WooCommerce</a></li>
|
22 |
<li><a href="#tabs-p">WP All Import</a></li>
|
23 |
+
<li><a href="#tabs-a">Premium version <b style="border-radius:2px;padding:3px;background-color:#32373c;color:white">20%OFF</b></a></li>
|
24 |
<br>
|
25 |
<br>
|
26 |
<div id="tabs-a">
|
38 |
<tr>
|
39 |
<td style="width:60%"
|
40 |
<div>
|
41 |
+
Donate <b>US$ 39,90</b> and receive the download link by email within 12 hours.<br>
|
42 |
Moreover, <b>you will have lifetime automatic updates</b>.<br><br>
|
43 |
<i>* price valid for May 2019</i>
|
44 |
</div>
|
730 |
<input type="submit"
|
731 |
value="Submit" >
|
732 |
</form>
|
733 |
+
</div>
|
734 |
|
735 |
<div class="box">
|
736 |
+
<h2>Maximum Sizes</h2>
|
|
|
|
|
737 |
<div class="greybox">
|
738 |
+
When you are working with external images, there is no way to know the image dimensions before loading the page.
|
739 |
+
As consequence, some themes may show the images in their real (sometimes huge) sizes. Here you can define the max size (px) of the featured images at different layouts.<br><br>
|
740 |
+
<form
|
741 |
+
id="fifu_form_image_size"
|
742 |
+
action="javascript:void(0)"
|
743 |
+
method="post">
|
744 |
|
745 |
+
<table style="text-align:left">
|
746 |
+
<tr>
|
747 |
+
<th>
|
748 |
+
Archive:
|
749 |
+
</th>
|
750 |
+
<th>
|
751 |
+
<input id="fifu_input_image_width_arch"
|
752 |
+
name="fifu_input_image_width_arch"
|
753 |
+
placeholder="max-width"
|
754 |
+
value="<?php echo $max_image_width_arch; ?>"
|
755 |
+
size="7">
|
756 |
+
</th>
|
757 |
+
<th>
|
758 |
+
<input id="fifu_input_image_height_arch"
|
759 |
+
name="fifu_input_image_height_arch"
|
760 |
+
placeholder="max-height"
|
761 |
+
value="<?php echo $max_image_height_arch; ?>"
|
762 |
+
size="7">
|
763 |
+
</th>
|
764 |
+
<th>
|
765 |
+
<div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
|
766 |
+
</th>
|
767 |
+
</tr>
|
768 |
+
<tr>
|
769 |
+
<th>
|
770 |
+
Cart:
|
771 |
+
</th>
|
772 |
+
<th>
|
773 |
+
<input id="fifu_input_image_width_cart"
|
774 |
+
name="fifu_input_image_width_cart"
|
775 |
+
placeholder="max-width"
|
776 |
+
size="7">
|
777 |
+
</th>
|
778 |
+
<th>
|
779 |
+
<input id="fifu_input_image_height_cart"
|
780 |
+
name="fifu_input_image_height_arch"
|
781 |
+
placeholder="max-height"
|
782 |
+
size="7">
|
783 |
+
</th>
|
784 |
+
<th>
|
785 |
+
<div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
|
786 |
+
</th>
|
787 |
+
</tr>
|
788 |
+
<tr>
|
789 |
+
<th>
|
790 |
+
Category:
|
791 |
+
</th>
|
792 |
+
<th>
|
793 |
+
<input id="fifu_input_image_width_ctgr"
|
794 |
+
name="fifu_input_image_width_ctgr"
|
795 |
+
placeholder="max-width"
|
796 |
+
value="<?php echo $max_image_width_ctgr; ?>"
|
797 |
+
size="7">
|
798 |
+
</th>
|
799 |
+
<th>
|
800 |
+
<input id="fifu_input_image_height_ctgr"
|
801 |
+
name="fifu_input_image_height_ctgr"
|
802 |
+
placeholder="max-height"
|
803 |
+
value="<?php echo $max_image_height_ctgr; ?>"
|
804 |
+
size="7">
|
805 |
+
</th>
|
806 |
+
<th>
|
807 |
+
<div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
|
808 |
+
</th>
|
809 |
+
</tr>
|
810 |
+
<tr>
|
811 |
+
<th>
|
812 |
+
Home:
|
813 |
+
</th>
|
814 |
+
<th>
|
815 |
+
<input id="fifu_input_image_width_home"
|
816 |
+
name="fifu_input_image_width_home"
|
817 |
+
placeholder="max-width"
|
818 |
+
value="<?php echo $max_image_width_home; ?>"
|
819 |
+
size="7">
|
820 |
+
</th>
|
821 |
+
<th>
|
822 |
+
<input id="fifu_input_image_height_home"
|
823 |
+
name="fifu_input_image_height_home"
|
824 |
+
placeholder="max-height"
|
825 |
+
value="<?php echo $max_image_height_home; ?>"
|
826 |
+
size="7">
|
827 |
+
</th>
|
828 |
+
<th>
|
829 |
+
<div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
|
830 |
+
</th>
|
831 |
+
</tr>
|
832 |
+
<tr>
|
833 |
+
<th>
|
834 |
+
Page:
|
835 |
+
</th>
|
836 |
+
<th>
|
837 |
+
<input id="fifu_input_image_width_page"
|
838 |
+
name="fifu_input_image_width_page"
|
839 |
+
placeholder="max-width"
|
840 |
+
value="<?php echo $max_image_width_page; ?>"
|
841 |
+
size="7">
|
842 |
+
</th>
|
843 |
+
<th>
|
844 |
+
<input id="fifu_input_image_height_page"
|
845 |
+
name="fifu_input_image_height_page"
|
846 |
+
placeholder="max-height"
|
847 |
+
value="<?php echo $max_image_height_page; ?>"
|
848 |
+
size="7">
|
849 |
+
</th>
|
850 |
+
<th>
|
851 |
+
<div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
|
852 |
+
</th>
|
853 |
+
</tr>
|
854 |
+
<tr>
|
855 |
+
<th>
|
856 |
+
Post:
|
857 |
+
</th>
|
858 |
+
<th>
|
859 |
+
<input id="fifu_input_image_width_post"
|
860 |
+
name="fifu_input_image_width_post"
|
861 |
+
placeholder="max-width"
|
862 |
+
value="<?php echo $max_image_width_post; ?>"
|
863 |
+
size="7">
|
864 |
+
</th>
|
865 |
+
<th>
|
866 |
+
<input id="fifu_input_image_height_post"
|
867 |
+
name="fifu_input_image_height_post"
|
868 |
+
placeholder="max-height"
|
869 |
+
value="<?php echo $max_image_height_post; ?>"
|
870 |
+
size="7">
|
871 |
+
</th>
|
872 |
+
<th>
|
873 |
+
<div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
|
874 |
+
</th>
|
875 |
+
</tr>
|
876 |
+
<tr>
|
877 |
+
<th>
|
878 |
+
Product:
|
879 |
+
</th>
|
880 |
+
<th>
|
881 |
+
<input id="fifu_input_image_width_prod"
|
882 |
+
name="fifu_input_image_width_prod"
|
883 |
+
placeholder="max-width"
|
884 |
+
value="<?php echo $max_image_width_prod; ?>"
|
885 |
+
size="7">
|
886 |
+
</th>
|
887 |
+
<th>
|
888 |
+
<input id="fifu_input_image_height_prod"
|
889 |
+
name="fifu_input_image_height_prod"
|
890 |
+
placeholder="max-height"
|
891 |
+
value="<?php echo $max_image_height_prod; ?>"
|
892 |
+
size="7">
|
893 |
+
</th>
|
894 |
+
<th>
|
895 |
+
<div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
|
896 |
+
</th>
|
897 |
+
</tr>
|
898 |
+
<tr>
|
899 |
+
<th>
|
900 |
+
Shop:
|
901 |
+
</th>
|
902 |
+
<th>
|
903 |
+
<input id="fifu_input_image_width_shop"
|
904 |
+
name="fifu_input_image_width_shop"
|
905 |
+
placeholder="max-width"
|
906 |
+
value="<?php echo $max_image_width_shop; ?>"
|
907 |
+
size="7">
|
908 |
+
</th>
|
909 |
+
<th>
|
910 |
+
<input id="fifu_input_image_height_shop"
|
911 |
+
name="fifu_input_image_height_shop"
|
912 |
+
placeholder="max-height"
|
913 |
+
value="<?php echo $max_image_height_shop; ?>"
|
914 |
+
size="7">
|
915 |
+
</th>
|
916 |
+
<th>
|
917 |
+
<div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
|
918 |
+
</th>
|
919 |
+
</tr>
|
920 |
+
</table>
|
921 |
|
922 |
+
<br>
|
|
|
923 |
|
924 |
+
<input type="submit" value="Submit" >
|
925 |
+
</form>
|
926 |
+
</div>
|
927 |
</div>
|
928 |
|
929 |
<a name="priority"></a>
|
1303 |
<h2>Video Sizes</h2>
|
1304 |
<div class="greybox" id="grad2">
|
1305 |
<b>Premium feature</b><br><br>
|
1306 |
+
The default value applied to the videos is "100%" and it usually works fine. However, here you can define the max size of the featured videos at different layouts and the ratio for those videos as well.<br><br>
|
1307 |
<table style="text-align:left">
|
1308 |
<tr>
|
1309 |
<th>
|
1312 |
<th>
|
1313 |
<input id="fifu_input_video_width_rtio"
|
1314 |
name="fifu_input_video_width_rtio"
|
1315 |
+
size="7">
|
1316 |
</th>
|
1317 |
<th>
|
1318 |
<input id="fifu_input_video_height_rtio"
|
1319 |
name="fifu_input_video_height_rtio"
|
1320 |
+
size="7">
|
1321 |
</th>
|
1322 |
<th>
|
1323 |
<div style="font-style: italic;font-weight:normal;">e.g.: 1, 2, 3...</div>
|
1330 |
<th>
|
1331 |
<input id="fifu_input_video_margin_bottom"
|
1332 |
name="fifu_input_video_margin_bottom"
|
1333 |
+
size="7">
|
1334 |
</th>
|
1335 |
<th>
|
1336 |
<div style="font-style: italic;font-weight:normal;">e.g.: 10px, 1cm...</div>
|
1343 |
<th>
|
1344 |
<input id="fifu_input_video_vertical_margin"
|
1345 |
name="fifu_input_video_vertical_margin"
|
1346 |
+
size="7">
|
1347 |
</th>
|
1348 |
<th>
|
1349 |
<div style="font-style: italic;font-weight:normal;">e.g.: 10px, 1cm...</div>
|
1357 |
<input id="fifu_input_video_width_arch"
|
1358 |
name="fifu_input_video_width_arch"
|
1359 |
placeholder="max-width"
|
1360 |
+
size="7">
|
1361 |
</th>
|
1362 |
<th>
|
1363 |
<input id="fifu_input_video_height_arch"
|
1364 |
name="fifu_input_video_height_arch"
|
1365 |
placeholder="max-height"
|
1366 |
+
size="7">
|
1367 |
</th>
|
1368 |
<th>
|
1369 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
1377 |
<input id="fifu_input_video_width_ctgr"
|
1378 |
name="fifu_input_video_width_ctgr"
|
1379 |
placeholder="max-width"
|
1380 |
+
size="7">
|
1381 |
</th>
|
1382 |
<th>
|
1383 |
<input id="fifu_input_video_height_ctgr"
|
1384 |
name="fifu_input_video_height_ctgr"
|
1385 |
placeholder="max-height"
|
1386 |
+
size="7">
|
1387 |
</th>
|
1388 |
<th>
|
1389 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
1397 |
<input id="fifu_input_video_width_home"
|
1398 |
name="fifu_input_video_width_home"
|
1399 |
placeholder="max-width"
|
1400 |
+
size="7">
|
1401 |
</th>
|
1402 |
<th>
|
1403 |
<input id="fifu_input_video_height_home"
|
1404 |
name="fifu_input_video_height_home"
|
1405 |
placeholder="max-height"
|
1406 |
+
size="7">
|
1407 |
</th>
|
1408 |
<th>
|
1409 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
1417 |
<input id="fifu_input_video_width_page"
|
1418 |
name="fifu_input_video_width_page"
|
1419 |
placeholder="max-width"
|
1420 |
+
size="7">
|
1421 |
</th>
|
1422 |
<th>
|
1423 |
<input id="fifu_input_video_height_page"
|
1424 |
name="fifu_input_video_height_page"
|
1425 |
placeholder="max-height"
|
1426 |
+
size="7">
|
1427 |
</th>
|
1428 |
<th>
|
1429 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
1437 |
<input id="fifu_input_video_width_post"
|
1438 |
name="fifu_input_video_width_post"
|
1439 |
placeholder="max-width"
|
1440 |
+
size="7">
|
1441 |
</th>
|
1442 |
<th>
|
1443 |
<input id="fifu_input_video_height_post"
|
1444 |
name="fifu_input_video_height_post"
|
1445 |
placeholder="max-height"
|
1446 |
+
size="7">
|
1447 |
</th>
|
1448 |
<th>
|
1449 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
1457 |
<input id="fifu_input_video_width_prod"
|
1458 |
name="fifu_input_video_width_prod"
|
1459 |
placeholder="max-width"
|
1460 |
+
size="7">
|
1461 |
</th>
|
1462 |
<th>
|
1463 |
<input id="fifu_input_video_height_prod"
|
1464 |
name="fifu_input_video_height_prod"
|
1465 |
placeholder="max-height"
|
1466 |
+
size="7">
|
1467 |
</th>
|
1468 |
<th>
|
1469 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
1477 |
<input id="fifu_input_video_width_shop"
|
1478 |
name="fifu_input_video_width_shop"
|
1479 |
placeholder="max-width"
|
1480 |
+
size="7">
|
1481 |
</th>
|
1482 |
<th>
|
1483 |
<input id="fifu_input_video_height_shop"
|
1484 |
name="fifu_input_video_height_shop"
|
1485 |
placeholder="max-height"
|
1486 |
+
size="7">
|
1487 |
</th>
|
1488 |
<th>
|
1489 |
<div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
|
2508 |
fifu_data_clean:<?php echo $enable_data_clean ?>;
|
2509 |
fifu_data_generation:<?php echo $enable_data_generation ?>;
|
2510 |
fifu_default_url:<?php echo $default_url ?>;
|
|
|
2511 |
fifu_enable_default_url:<?php echo $enable_default_url ?>;
|
2512 |
fifu_fake:<?php echo $enable_fake ?>;
|
2513 |
fifu_fake2:<?php echo $enable_fake2 ?>;
|
2515 |
fifu_grid_category:<?php echo $enable_grid_category ?>;
|
2516 |
fifu_hide_page:<?php echo $enable_hide_page ?>;
|
2517 |
fifu_hide_post:<?php echo $enable_hide_post ?>;
|
2518 |
+
fifu_image_height_arch:<?php echo $max_image_height_arch ?>;
|
2519 |
+
fifu_image_height_cart:<?php echo $max_image_height_cart ?>;
|
2520 |
+
fifu_image_height_ctgr:<?php echo $max_image_height_ctgr ?>;
|
2521 |
+
fifu_image_height_home:<?php echo $max_image_height_home ?>;
|
2522 |
+
fifu_image_height_page:<?php echo $max_image_height_page ?>;
|
2523 |
+
fifu_image_height_post:<?php echo $max_image_height_post ?>;
|
2524 |
+
fifu_image_height_prod:<?php echo $max_image_height_prod ?>;
|
2525 |
+
fifu_image_height_shop:<?php echo $max_image_height_shop ?>;
|
2526 |
+
fifu_image_width_arch:<?php echo $max_image_width_arch ?>;
|
2527 |
+
fifu_image_width_cart:<?php echo $max_image_width_cart ?>;
|
2528 |
+
fifu_image_width_ctgr:<?php echo $max_image_width_ctgr ?>;
|
2529 |
+
fifu_image_width_home:<?php echo $max_image_width_home ?>;
|
2530 |
+
fifu_image_width_page:<?php echo $max_image_width_page ?>;
|
2531 |
+
fifu_image_width_post:<?php echo $max_image_width_post ?>;
|
2532 |
+
fifu_image_width_prod:<?php echo $max_image_width_prod ?>;
|
2533 |
+
fifu_image_width_shop:<?php echo $max_image_width_shop ?>;
|
2534 |
fifu_lazy:<?php echo $enable_lazy ?>;
|
2535 |
fifu_original:<?php echo $enable_original ?>;
|
2536 |
fifu_ovw_first:<?php echo $enable_ovw_first ?>;
|
admin/html/meta-box.html
CHANGED
@@ -40,6 +40,6 @@
|
|
40 |
<div id="fifu_news" style="top:10px; <?php echo $show_news ?>">
|
41 |
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid red; border-top: 2px solid red; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
|
42 |
background-color: whitesmoke; border-radius: 15px 15px 15px 15px; position: relative; top: 10px; box-shadow: 2px 2px 2px #aaaaaa;">Please report any problem to <b>marcel@featuredimagefromurl.com</b><br>It should be fixed in 24 hours.</p>
|
43 |
-
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid
|
44 |
-
background-color: whitesmoke; border-radius: 15px 15px 15px 15px; position: relative; top: 10px; box-shadow: 2px 2px 2px #aaaaaa;">Product Gallery, Video and Slider fields are only available in the <a href="wp-admin/admin.php?page=featured-image-from-url#tabs-a"><b>premium</b></a> version (<b>
|
45 |
</div>
|
40 |
<div id="fifu_news" style="top:10px; <?php echo $show_news ?>">
|
41 |
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid red; border-top: 2px solid red; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
|
42 |
background-color: whitesmoke; border-radius: 15px 15px 15px 15px; position: relative; top: 10px; box-shadow: 2px 2px 2px #aaaaaa;">Please report any problem to <b>marcel@featuredimagefromurl.com</b><br>It should be fixed in 24 hours.</p>
|
43 |
+
<p style="font-size: 12px; padding: 10px; border-bottom: 2px solid purple; border-top: 2px solid purple; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
|
44 |
+
background-color: whitesmoke; border-radius: 15px 15px 15px 15px; position: relative; top: 10px; box-shadow: 2px 2px 2px #aaaaaa;">Product Gallery, Video and Slider fields are only available in the <a href="wp-admin/admin.php?page=featured-image-from-url#tabs-a"><b>premium</b></a> version (<b>20%OFF</b> in May 2019).</p>
|
45 |
</div>
|
admin/menu.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_original', 'fifu_lazy', 'fifu_content', 'fifu_content_page', 'fifu_enable_default_url', 'fifu_fake', 'fifu_fake2', 'fifu_css', 'fifu_default_url', '
|
4 |
|
5 |
add_action('admin_menu', 'fifu_insert_menu');
|
6 |
|
@@ -34,7 +34,6 @@ function fifu_get_menu_html() {
|
|
34 |
$enable_fake2 = get_option('fifu_fake2');
|
35 |
$css_style = get_option('fifu_css');
|
36 |
$default_url = get_option('fifu_default_url');
|
37 |
-
$default_width = get_option('fifu_default_width');
|
38 |
$enable_default_url = get_option('fifu_enable_default_url');
|
39 |
$enable_wc_lbox = get_option('fifu_wc_lbox');
|
40 |
$enable_wc_zoom = get_option('fifu_wc_zoom');
|
@@ -49,6 +48,22 @@ function fifu_get_menu_html() {
|
|
49 |
$enable_auto_alt = get_option('fifu_auto_alt');
|
50 |
$enable_data_generation = get_option('fifu_data_generation');
|
51 |
$enable_data_clean = get_option('fifu_data_clean');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
include 'html/menu.html';
|
54 |
|
@@ -81,7 +96,8 @@ function fifu_get_menu_settings() {
|
|
81 |
function fifu_get_setting($type) {
|
82 |
register_setting('settings-group', $type);
|
83 |
|
84 |
-
$arrEmpty = array('fifu_default_url', '
|
|
|
85 |
$arr64 = array('fifu_column_height');
|
86 |
$arrOn = array('fifu_fake2', 'fifu_auto_alt', 'fifu_wc_zoom', 'fifu_wc_lbox');
|
87 |
$arrOffNo = array('fifu_data_clean');
|
@@ -89,6 +105,8 @@ function fifu_get_setting($type) {
|
|
89 |
if (!get_option($type)) {
|
90 |
if (in_array($type, $arrEmpty))
|
91 |
update_option($type, '');
|
|
|
|
|
92 |
else if (in_array($type, $arr64))
|
93 |
update_option($type, "64", 'no');
|
94 |
else if (in_array($type, $arrOn))
|
@@ -110,7 +128,6 @@ function fifu_update_menu_options() {
|
|
110 |
fifu_update_option('fifu_input_fake2', 'fifu_fake2');
|
111 |
fifu_update_option('fifu_input_css', 'fifu_css');
|
112 |
fifu_update_option('fifu_input_default_url', 'fifu_default_url');
|
113 |
-
fifu_update_option('fifu_input_default_width', 'fifu_default_width');
|
114 |
fifu_update_option('fifu_input_enable_default_url', 'fifu_enable_default_url');
|
115 |
fifu_update_option('fifu_input_wc_lbox', 'fifu_wc_lbox');
|
116 |
fifu_update_option('fifu_input_wc_zoom', 'fifu_wc_zoom');
|
@@ -125,6 +142,22 @@ function fifu_update_menu_options() {
|
|
125 |
fifu_update_option('fifu_input_auto_alt', 'fifu_auto_alt');
|
126 |
fifu_update_option('fifu_input_data_generation', 'fifu_data_generation');
|
127 |
fifu_update_option('fifu_input_data_clean', 'fifu_data_clean');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
|
130 |
function fifu_update_option($input, $type) {
|
1 |
<?php
|
2 |
|
3 |
+
define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_original', 'fifu_lazy', 'fifu_content', 'fifu_content_page', 'fifu_enable_default_url', 'fifu_fake', 'fifu_fake2', 'fifu_css', 'fifu_default_url', 'fifu_wc_lbox', 'fifu_wc_zoom', 'fifu_hide_page', 'fifu_hide_post', 'fifu_get_first', 'fifu_pop_first', 'fifu_ovw_first', 'fifu_column_height', 'fifu_priority', 'fifu_grid_category', 'fifu_auto_alt', 'fifu_data_generation', 'fifu_data_clean', 'fifu_image_height_shop', 'fifu_image_width_shop', 'fifu_image_height_prod', 'fifu_image_width_prod', 'fifu_image_height_cart', 'fifu_image_width_cart', 'fifu_image_height_ctgr', 'fifu_image_width_ctgr', 'fifu_image_height_arch', 'fifu_image_width_arch', 'fifu_image_height_home', 'fifu_image_width_home', 'fifu_image_height_page', 'fifu_image_width_page', 'fifu_image_height_post', 'fifu_image_width_post')));
|
4 |
|
5 |
add_action('admin_menu', 'fifu_insert_menu');
|
6 |
|
34 |
$enable_fake2 = get_option('fifu_fake2');
|
35 |
$css_style = get_option('fifu_css');
|
36 |
$default_url = get_option('fifu_default_url');
|
|
|
37 |
$enable_default_url = get_option('fifu_enable_default_url');
|
38 |
$enable_wc_lbox = get_option('fifu_wc_lbox');
|
39 |
$enable_wc_zoom = get_option('fifu_wc_zoom');
|
48 |
$enable_auto_alt = get_option('fifu_auto_alt');
|
49 |
$enable_data_generation = get_option('fifu_data_generation');
|
50 |
$enable_data_clean = get_option('fifu_data_clean');
|
51 |
+
$max_image_height_shop = get_option('fifu_image_height_shop');
|
52 |
+
$max_image_width_shop = get_option('fifu_image_width_shop');
|
53 |
+
$max_image_height_prod = get_option('fifu_image_height_prod');
|
54 |
+
$max_image_width_prod = get_option('fifu_image_width_prod');
|
55 |
+
$max_image_height_cart = get_option('fifu_image_height_cart');
|
56 |
+
$max_image_width_cart = get_option('fifu_image_width_cart');
|
57 |
+
$max_image_height_ctgr = get_option('fifu_image_height_ctgr');
|
58 |
+
$max_image_width_ctgr = get_option('fifu_image_width_ctgr');
|
59 |
+
$max_image_height_arch = get_option('fifu_image_height_arch');
|
60 |
+
$max_image_width_arch = get_option('fifu_image_width_arch');
|
61 |
+
$max_image_height_home = get_option('fifu_image_height_home');
|
62 |
+
$max_image_width_home = get_option('fifu_image_width_home');
|
63 |
+
$max_image_height_page = get_option('fifu_image_height_page');
|
64 |
+
$max_image_width_page = get_option('fifu_image_width_page');
|
65 |
+
$max_image_height_post = get_option('fifu_image_height_post');
|
66 |
+
$max_image_width_post = get_option('fifu_image_width_post');
|
67 |
|
68 |
include 'html/menu.html';
|
69 |
|
96 |
function fifu_get_setting($type) {
|
97 |
register_setting('settings-group', $type);
|
98 |
|
99 |
+
$arrEmpty = array('fifu_default_url', 'fifu_css');
|
100 |
+
$arrEmptyNo = array('fifu_image_height_shop', 'fifu_image_width_shop', 'fifu_image_height_prod', 'fifu_image_width_prod', 'fifu_image_height_cart', 'fifu_image_width_cart', 'fifu_image_height_ctgr', 'fifu_image_width_ctgr', 'fifu_image_height_arch', 'fifu_image_width_arch', 'fifu_image_height_home', 'fifu_image_width_home', 'fifu_image_height_page', 'fifu_image_width_page', 'fifu_image_height_post', 'fifu_image_width_post');
|
101 |
$arr64 = array('fifu_column_height');
|
102 |
$arrOn = array('fifu_fake2', 'fifu_auto_alt', 'fifu_wc_zoom', 'fifu_wc_lbox');
|
103 |
$arrOffNo = array('fifu_data_clean');
|
105 |
if (!get_option($type)) {
|
106 |
if (in_array($type, $arrEmpty))
|
107 |
update_option($type, '');
|
108 |
+
else if (in_array($type, $arrEmptyNo))
|
109 |
+
update_option($type, '', 'no');
|
110 |
else if (in_array($type, $arr64))
|
111 |
update_option($type, "64", 'no');
|
112 |
else if (in_array($type, $arrOn))
|
128 |
fifu_update_option('fifu_input_fake2', 'fifu_fake2');
|
129 |
fifu_update_option('fifu_input_css', 'fifu_css');
|
130 |
fifu_update_option('fifu_input_default_url', 'fifu_default_url');
|
|
|
131 |
fifu_update_option('fifu_input_enable_default_url', 'fifu_enable_default_url');
|
132 |
fifu_update_option('fifu_input_wc_lbox', 'fifu_wc_lbox');
|
133 |
fifu_update_option('fifu_input_wc_zoom', 'fifu_wc_zoom');
|
142 |
fifu_update_option('fifu_input_auto_alt', 'fifu_auto_alt');
|
143 |
fifu_update_option('fifu_input_data_generation', 'fifu_data_generation');
|
144 |
fifu_update_option('fifu_input_data_clean', 'fifu_data_clean');
|
145 |
+
fifu_update_option('fifu_input_image_height_shop', 'fifu_image_height_shop');
|
146 |
+
fifu_update_option('fifu_input_image_width_shop', 'fifu_image_width_shop');
|
147 |
+
fifu_update_option('fifu_input_image_height_prod', 'fifu_image_height_prod');
|
148 |
+
fifu_update_option('fifu_input_image_width_prod', 'fifu_image_width_prod');
|
149 |
+
fifu_update_option('fifu_input_image_height_cart', 'fifu_image_height_cart');
|
150 |
+
fifu_update_option('fifu_input_image_width_cart', 'fifu_image_width_cart');
|
151 |
+
fifu_update_option('fifu_input_image_height_ctgr', 'fifu_image_height_ctgr');
|
152 |
+
fifu_update_option('fifu_input_image_width_ctgr', 'fifu_image_width_ctgr');
|
153 |
+
fifu_update_option('fifu_input_image_height_arch', 'fifu_image_height_arch');
|
154 |
+
fifu_update_option('fifu_input_image_width_arch', 'fifu_image_width_arch');
|
155 |
+
fifu_update_option('fifu_input_image_height_home', 'fifu_image_height_home');
|
156 |
+
fifu_update_option('fifu_input_image_width_home', 'fifu_image_width_home');
|
157 |
+
fifu_update_option('fifu_input_image_height_page', 'fifu_image_height_page');
|
158 |
+
fifu_update_option('fifu_input_image_width_page', 'fifu_image_width_page');
|
159 |
+
fifu_update_option('fifu_input_image_height_post', 'fifu_image_height_post');
|
160 |
+
fifu_update_option('fifu_input_image_width_post', 'fifu_image_width_post');
|
161 |
}
|
162 |
|
163 |
function fifu_update_option($input, $type) {
|
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.4.
|
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.4.7
|
8 |
* Author: Marcel Jacques Machado
|
9 |
* Author URI: https://www.linkedin.com/in/marceljm/
|
10 |
*/
|
includes/attachment.php
CHANGED
@@ -75,10 +75,12 @@ function fifu_replace_attachment_image_src($image, $att_id, $size) {
|
|
75 |
null,
|
76 |
);
|
77 |
}
|
|
|
|
|
78 |
return array(
|
79 |
strpos($image[0], fifu_get_internal_image_path()) !== false ? get_post($att_id)->guid : $image[0],
|
80 |
-
isset($image_size['width'])
|
81 |
-
isset($image_size['height']) ? $image_size['height'] :
|
82 |
isset($image_size['crop']) ? $image_size['crop'] : '',
|
83 |
);
|
84 |
}
|
75 |
null,
|
76 |
);
|
77 |
}
|
78 |
+
$width = fifu_maximum('width');
|
79 |
+
$height = fifu_maximum('height');
|
80 |
return array(
|
81 |
strpos($image[0], fifu_get_internal_image_path()) !== false ? get_post($att_id)->guid : $image[0],
|
82 |
+
isset($image_size['width']) && $image_size['width'] < $width ? $image_size['width'] : $width,
|
83 |
+
isset($image_size['height']) && $image_size['height'] < $height ? $image_size['height'] : $height,
|
84 |
isset($image_size['crop']) ? $image_size['crop'] : '',
|
85 |
);
|
86 |
}
|
includes/util.php
CHANGED
@@ -33,3 +33,25 @@ function fifu_get_post_types() {
|
|
33 |
return $arr;
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
return $arr;
|
34 |
}
|
35 |
|
36 |
+
function fifu_maximum($dimension) {
|
37 |
+
$dimension = 'fifu_image_' . $dimension . '_';
|
38 |
+
|
39 |
+
if (is_home()) {
|
40 |
+
$size = get_option($dimension . 'home');
|
41 |
+
} else if (class_exists('WooCommerce') && is_shop()) {
|
42 |
+
$size = get_option($dimension . 'shop');
|
43 |
+
} else if (class_exists('WooCommerce') && is_product_category()) {
|
44 |
+
$size = get_option($dimension . 'ctgr');
|
45 |
+
} else if (is_singular('post') || is_author() || is_search()) {
|
46 |
+
$size = get_option($dimension . 'post');
|
47 |
+
} else if (is_singular('page')) {
|
48 |
+
$size = class_exists('WooCommerce') && is_cart() ? get_option($dimension . 'cart') : get_option($dimension . 'page');
|
49 |
+
} else if (is_singular('product')) {
|
50 |
+
$size = get_option($dimension . 'prod');
|
51 |
+
} else if (is_archive()) {
|
52 |
+
$size = get_option($dimension . 'arch');
|
53 |
+
}
|
54 |
+
|
55 |
+
return $size ? $size : '1024';
|
56 |
+
}
|
57 |
+
|
readme.txt
CHANGED
@@ -157,6 +157,9 @@ Features:
|
|
157 |
|
158 |
== Changelog ==
|
159 |
|
|
|
|
|
|
|
160 |
= 2.4.6 =
|
161 |
* Bug fix: lazy load.
|
162 |
|
@@ -565,6 +568,9 @@ was removed. To finish, a Premium version is now been presented.
|
|
565 |
|
566 |
== Upgrade Notice ==
|
567 |
|
|
|
|
|
|
|
568 |
= 2.4.6 =
|
569 |
* Bug fix: lazy load.
|
570 |
|
157 |
|
158 |
== Changelog ==
|
159 |
|
160 |
+
= 2.4.7 =
|
161 |
+
* New feature: Maximum Sizes; Deprecated: Default Width.
|
162 |
+
|
163 |
= 2.4.6 =
|
164 |
* Bug fix: lazy load.
|
165 |
|
568 |
|
569 |
== Upgrade Notice ==
|
570 |
|
571 |
+
= 2.4.7 =
|
572 |
+
* New feature: Maximum Sizes; Deprecated: Default Width.
|
573 |
+
|
574 |
= 2.4.6 =
|
575 |
* Bug fix: lazy load.
|
576 |
|