Featured Image From URL - Version 3.1.3

Version Description

  • Improvement (Premium): Same Height (each selector can have a different size ratio); Improvement: Image Metadata (query optimization); Deprecated: Maximum Sizes; Bug fix: conflict between Lazy Load and Storefront; Bug fix: conflict between Lazy Load and background-images.
Download this release

Release Info

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

Code changes from version 3.1.2 to 3.1.3

admin/db.php CHANGED
@@ -53,9 +53,8 @@ class FifuDb {
53
  AND p.post_author = " . $this->author . "
54
  AND NOT EXISTS (
55
  SELECT 1
56
- FROM " . $this->postmeta . "
57
- WHERE post_id = id
58
- AND meta_key = '_wp_attached_file'
59
  )
60
  )"
61
  );
@@ -88,9 +87,8 @@ class FifuDb {
88
  AND p.post_author = " . $this->author . "
89
  AND NOT EXISTS (
90
  SELECT 1
91
- FROM " . $this->postmeta . "
92
- WHERE post_id = id
93
- AND meta_key = '_wp_attachment_image_alt'
94
  )
95
  )"
96
  );
@@ -107,9 +105,8 @@ class FifuDb {
107
  AND p.post_author = " . $this->author . "
108
  AND NOT EXISTS (
109
  SELECT 1
110
- FROM " . $this->postmeta . "
111
- WHERE post_id = p.post_parent
112
- AND meta_key = '_thumbnail_id'
113
  )
114
  )"
115
  );
@@ -153,9 +150,8 @@ class FifuDb {
153
  AND a.meta_value <> ''
154
  AND NOT EXISTS (
155
  SELECT 1
156
- FROM " . $this->postmeta . " b
157
  WHERE a.post_id = b.post_id
158
- AND b.meta_key = '_thumbnail_id'
159
  )"
160
  );
161
  }
53
  AND p.post_author = " . $this->author . "
54
  AND NOT EXISTS (
55
  SELECT 1
56
+ FROM (SELECT post_id FROM " . $this->postmeta . " WHERE meta_key = '_wp_attached_file') AS b
57
+ WHERE p.id = b.post_id
 
58
  )
59
  )"
60
  );
87
  AND p.post_author = " . $this->author . "
88
  AND NOT EXISTS (
89
  SELECT 1
90
+ FROM (SELECT post_id FROM " . $this->postmeta . " WHERE meta_key = '_wp_attachment_image_alt') AS b
91
+ WHERE p.id = b.post_id
 
92
  )
93
  )"
94
  );
105
  AND p.post_author = " . $this->author . "
106
  AND NOT EXISTS (
107
  SELECT 1
108
+ FROM (SELECT post_id FROM " . $this->postmeta . " WHERE meta_key = '_thumbnail_id') AS b
109
+ WHERE p.post_parent = b.post_id
 
110
  )
111
  )"
112
  );
150
  AND a.meta_value <> ''
151
  AND NOT EXISTS (
152
  SELECT 1
153
+ FROM (SELECT post_id FROM " . $this->postmeta . " WHERE meta_key = '_thumbnail_id') AS b
154
  WHERE a.post_id = b.post_id
 
155
  )"
156
  );
157
  }
admin/html/menu.html CHANGED
@@ -489,9 +489,23 @@
489
 
490
  <div id="tabsCrop-b">
491
  <div>
492
- Examples of valid selectors: <b>#</b><i>products</i> (if the element <b>id</b>="<i>products</i>"), <b>.</b><i>my-post-area</i> (if the element <b>class</b>="<i>my-post-area</i>")
493
- <br>
 
 
 
 
 
 
 
 
 
 
 
 
 
494
  <br>
 
495
  <input id="fifu_input_crop0"
496
  type="text"
497
  placeholder="selector 1"
@@ -950,200 +964,6 @@
950
  </form>
951
  </div>
952
 
953
- <div class="box">
954
- <h2>Maximum Sizes</h2>
955
- <div class="greybox">
956
- When you are working with external images, there is no way to know the image dimensions before loading the page.
957
- 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>
958
- <form
959
- id="fifu_form_image_size"
960
- action="javascript:void(0)"
961
- method="post">
962
-
963
- <table style="text-align:left">
964
- <tr>
965
- <th>
966
- Archive:
967
- </th>
968
- <th>
969
- <input id="fifu_input_image_width_arch"
970
- name="fifu_input_image_width_arch"
971
- placeholder="max-width"
972
- value="<?php echo $max_image_width_arch; ?>"
973
- size="7">
974
- </th>
975
- <th>
976
- <input id="fifu_input_image_height_arch"
977
- name="fifu_input_image_height_arch"
978
- placeholder="max-height"
979
- value="<?php echo $max_image_height_arch; ?>"
980
- size="7">
981
- </th>
982
- <th>
983
- <div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
984
- </th>
985
- </tr>
986
- <tr>
987
- <th>
988
- Cart:
989
- </th>
990
- <th>
991
- <input id="fifu_input_image_width_cart"
992
- name="fifu_input_image_width_cart"
993
- placeholder="max-width"
994
- size="7">
995
- </th>
996
- <th>
997
- <input id="fifu_input_image_height_cart"
998
- name="fifu_input_image_height_arch"
999
- placeholder="max-height"
1000
- size="7">
1001
- </th>
1002
- <th>
1003
- <div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
1004
- </th>
1005
- </tr>
1006
- <tr>
1007
- <th>
1008
- Category:
1009
- </th>
1010
- <th>
1011
- <input id="fifu_input_image_width_ctgr"
1012
- name="fifu_input_image_width_ctgr"
1013
- placeholder="max-width"
1014
- value="<?php echo $max_image_width_ctgr; ?>"
1015
- size="7">
1016
- </th>
1017
- <th>
1018
- <input id="fifu_input_image_height_ctgr"
1019
- name="fifu_input_image_height_ctgr"
1020
- placeholder="max-height"
1021
- value="<?php echo $max_image_height_ctgr; ?>"
1022
- size="7">
1023
- </th>
1024
- <th>
1025
- <div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
1026
- </th>
1027
- </tr>
1028
- <tr>
1029
- <th>
1030
- Home:
1031
- </th>
1032
- <th>
1033
- <input id="fifu_input_image_width_home"
1034
- name="fifu_input_image_width_home"
1035
- placeholder="max-width"
1036
- value="<?php echo $max_image_width_home; ?>"
1037
- size="7">
1038
- </th>
1039
- <th>
1040
- <input id="fifu_input_image_height_home"
1041
- name="fifu_input_image_height_home"
1042
- placeholder="max-height"
1043
- value="<?php echo $max_image_height_home; ?>"
1044
- size="7">
1045
- </th>
1046
- <th>
1047
- <div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
1048
- </th>
1049
- </tr>
1050
- <tr>
1051
- <th>
1052
- Page:
1053
- </th>
1054
- <th>
1055
- <input id="fifu_input_image_width_page"
1056
- name="fifu_input_image_width_page"
1057
- placeholder="max-width"
1058
- value="<?php echo $max_image_width_page; ?>"
1059
- size="7">
1060
- </th>
1061
- <th>
1062
- <input id="fifu_input_image_height_page"
1063
- name="fifu_input_image_height_page"
1064
- placeholder="max-height"
1065
- value="<?php echo $max_image_height_page; ?>"
1066
- size="7">
1067
- </th>
1068
- <th>
1069
- <div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
1070
- </th>
1071
- </tr>
1072
- <tr>
1073
- <th>
1074
- Post:
1075
- </th>
1076
- <th>
1077
- <input id="fifu_input_image_width_post"
1078
- name="fifu_input_image_width_post"
1079
- placeholder="max-width"
1080
- value="<?php echo $max_image_width_post; ?>"
1081
- size="7">
1082
- </th>
1083
- <th>
1084
- <input id="fifu_input_image_height_post"
1085
- name="fifu_input_image_height_post"
1086
- placeholder="max-height"
1087
- value="<?php echo $max_image_height_post; ?>"
1088
- size="7">
1089
- </th>
1090
- <th>
1091
- <div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
1092
- </th>
1093
- </tr>
1094
- <tr>
1095
- <th>
1096
- Product:
1097
- </th>
1098
- <th>
1099
- <input id="fifu_input_image_width_prod"
1100
- name="fifu_input_image_width_prod"
1101
- placeholder="max-width"
1102
- value="<?php echo $max_image_width_prod; ?>"
1103
- size="7">
1104
- </th>
1105
- <th>
1106
- <input id="fifu_input_image_height_prod"
1107
- name="fifu_input_image_height_prod"
1108
- placeholder="max-height"
1109
- value="<?php echo $max_image_height_prod; ?>"
1110
- size="7">
1111
- </th>
1112
- <th>
1113
- <div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
1114
- </th>
1115
- </tr>
1116
- <tr>
1117
- <th>
1118
- Shop:
1119
- </th>
1120
- <th>
1121
- <input id="fifu_input_image_width_shop"
1122
- name="fifu_input_image_width_shop"
1123
- placeholder="max-width"
1124
- value="<?php echo $max_image_width_shop; ?>"
1125
- size="7">
1126
- </th>
1127
- <th>
1128
- <input id="fifu_input_image_height_shop"
1129
- name="fifu_input_image_height_shop"
1130
- placeholder="max-height"
1131
- value="<?php echo $max_image_height_shop; ?>"
1132
- size="7">
1133
- </th>
1134
- <th>
1135
- <div style="font-style: italic;font-weight:normal;">e.g.: 128, 256, 1024...</div>
1136
- </th>
1137
- </tr>
1138
- </table>
1139
-
1140
- <br>
1141
-
1142
- <input type="submit" value="Submit" >
1143
- </form>
1144
- </div>
1145
- </div>
1146
-
1147
  <div class="box">
1148
 
1149
  <h2>Save Image Dimensions</h2>
@@ -3027,6 +2847,21 @@
3027
  From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
3028
  </div>
3029
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3030
  <div class="box">
3031
  <table>
3032
  <tr>
489
 
490
  <div id="tabsCrop-b">
491
  <div>
492
+ Examples of selectors...<br><br>
493
+ <table style="text-align: left;">
494
+ <tr>
495
+ <th><b>#</b><i>products</i></th>
496
+ <th>(if the element <b>id</b>="<i>products</i>")</th>
497
+ </tr>
498
+ <tr>
499
+ <th><b>.</b><i>my-post-area</i></th>
500
+ <th>(if the element <b>class</b>="<i>my-post-area</i>")</th>
501
+ </tr>
502
+ <tr>
503
+ <th><b>#</b><i>products|4:3</i></th>
504
+ <th>(if the element <b>id</b>="<i>products</i>" and you want a 4:3 size ratio)</th>
505
+ </tr>
506
+ </table>
507
  <br>
508
+
509
  <input id="fifu_input_crop0"
510
  type="text"
511
  placeholder="selector 1"
964
  </form>
965
  </div>
966
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
967
  <div class="box">
968
 
969
  <h2>Save Image Dimensions</h2>
2847
  From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
2848
  </div>
2849
  </div>
2850
+ <div class="box">
2851
+ <table>
2852
+ <tr>
2853
+ <td style="border-bottom:none">2020-06-18</td>
2854
+ <td style="border-bottom:none"><h3> Unyson</h3></td>
2855
+ <td style="border-bottom:none">plugin</td>
2856
+ </tr>
2857
+ </table>
2858
+ <div class="greybox" style="position: relative; top: -10px">
2859
+ "There has been a critical error on your website" message:<br>
2860
+ 1) open "unyson/framework/helpers/class-fw-resize.php";<br>
2861
+ 2) search for the line that contains "$saved['file']";<br>
2862
+ 3) add "if(!is_array($saved))return;" immediately above that.<br>
2863
+ </div>
2864
+ </div>
2865
  <div class="box">
2866
  <table>
2867
  <tr>
admin/html/support-data.html CHANGED
@@ -40,22 +40,6 @@ fifu_grid_category:<?php echo $enable_grid_category ?>;
40
  fifu_hide_cpt:<?php echo $enable_hide_cpt ?>;
41
  fifu_hide_page:<?php echo $enable_hide_page ?>;
42
  fifu_hide_post:<?php echo $enable_hide_post ?>;
43
- fifu_image_height_arch:<?php echo $max_image_height_arch ?>;
44
- fifu_image_height_cart:<?php echo $max_image_height_cart ?>;
45
- fifu_image_height_ctgr:<?php echo $max_image_height_ctgr ?>;
46
- fifu_image_height_home:<?php echo $max_image_height_home ?>;
47
- fifu_image_height_page:<?php echo $max_image_height_page ?>;
48
- fifu_image_height_post:<?php echo $max_image_height_post ?>;
49
- fifu_image_height_prod:<?php echo $max_image_height_prod ?>;
50
- fifu_image_height_shop:<?php echo $max_image_height_shop ?>;
51
- fifu_image_width_arch:<?php echo $max_image_width_arch ?>;
52
- fifu_image_width_cart:<?php echo $max_image_width_cart ?>;
53
- fifu_image_width_ctgr:<?php echo $max_image_width_ctgr ?>;
54
- fifu_image_width_home:<?php echo $max_image_width_home ?>;
55
- fifu_image_width_page:<?php echo $max_image_width_page ?>;
56
- fifu_image_width_post:<?php echo $max_image_width_post ?>;
57
- fifu_image_width_prod:<?php echo $max_image_width_prod ?>;
58
- fifu_image_width_shop:<?php echo $max_image_width_shop ?>;
59
  fifu_jquery:<?php echo $enable_jquery ?>;
60
  fifu_lazy:<?php echo $enable_lazy ?>;
61
  fifu_media_library:<?php echo $enable_media_library ?>;
40
  fifu_hide_cpt:<?php echo $enable_hide_cpt ?>;
41
  fifu_hide_page:<?php echo $enable_hide_page ?>;
42
  fifu_hide_post:<?php echo $enable_hide_post ?>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  fifu_jquery:<?php echo $enable_jquery ?>;
44
  fifu_lazy:<?php echo $enable_lazy ?>;
45
  fifu_media_library:<?php echo $enable_media_library ?>;
admin/menu.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_social_image_only', 'fifu_original', 'fifu_lazy', 'fifu_jquery', 'fifu_media_library', 'fifu_parameters', 'fifu_content', 'fifu_content_page', 'fifu_enable_default_url', 'fifu_spinner_db', 'fifu_spinner_nth', 'fifu_fake', 'fifu_css', 'fifu_default_url', 'fifu_wc_lbox', 'fifu_wc_zoom', 'fifu_hide_page', 'fifu_hide_post', 'fifu_hide_cpt', 'fifu_class', 'fifu_get_first', 'fifu_pop_first', 'fifu_ovw_first', 'fifu_query_strings', 'fifu_confirm_delete_all', 'fifu_run_delete_all', 'fifu_column_height', 'fifu_grid_category', 'fifu_auto_alt', 'fifu_dynamic_alt', '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', 'fifu_save_dimensions', 'fifu_save_dimensions_redirect', 'fifu_save_dimensions_all', 'fifu_clean_dimensions_all')));
4
 
5
  add_action('admin_menu', 'fifu_insert_menu');
6
 
@@ -68,22 +68,6 @@ function fifu_support_data() {
68
  $enable_auto_alt = get_option('fifu_auto_alt');
69
  $enable_dynamic_alt = get_option('fifu_dynamic_alt');
70
  $enable_data_clean = 'toggleoff';
71
- $max_image_height_shop = get_option('fifu_image_height_shop');
72
- $max_image_width_shop = get_option('fifu_image_width_shop');
73
- $max_image_height_prod = get_option('fifu_image_height_prod');
74
- $max_image_width_prod = get_option('fifu_image_width_prod');
75
- $max_image_height_cart = get_option('fifu_image_height_cart');
76
- $max_image_width_cart = get_option('fifu_image_width_cart');
77
- $max_image_height_ctgr = get_option('fifu_image_height_ctgr');
78
- $max_image_width_ctgr = get_option('fifu_image_width_ctgr');
79
- $max_image_height_arch = get_option('fifu_image_height_arch');
80
- $max_image_width_arch = get_option('fifu_image_width_arch');
81
- $max_image_height_home = get_option('fifu_image_height_home');
82
- $max_image_width_home = get_option('fifu_image_width_home');
83
- $max_image_height_page = get_option('fifu_image_height_page');
84
- $max_image_width_page = get_option('fifu_image_width_page');
85
- $max_image_height_post = get_option('fifu_image_height_post');
86
- $max_image_width_post = get_option('fifu_image_width_post');
87
  $enable_save_dimensions = get_option('fifu_save_dimensions');
88
  $enable_save_dimensions_redirect = get_option('fifu_save_dimensions_redirect ');
89
  $enable_save_dimensions_all = 'toggleoff';
@@ -140,22 +124,6 @@ function fifu_get_menu_html() {
140
  $enable_auto_alt = get_option('fifu_auto_alt');
141
  $enable_dynamic_alt = get_option('fifu_dynamic_alt');
142
  $enable_data_clean = 'toggleoff';
143
- $max_image_height_shop = get_option('fifu_image_height_shop');
144
- $max_image_width_shop = get_option('fifu_image_width_shop');
145
- $max_image_height_prod = get_option('fifu_image_height_prod');
146
- $max_image_width_prod = get_option('fifu_image_width_prod');
147
- $max_image_height_cart = get_option('fifu_image_height_cart');
148
- $max_image_width_cart = get_option('fifu_image_width_cart');
149
- $max_image_height_ctgr = get_option('fifu_image_height_ctgr');
150
- $max_image_width_ctgr = get_option('fifu_image_width_ctgr');
151
- $max_image_height_arch = get_option('fifu_image_height_arch');
152
- $max_image_width_arch = get_option('fifu_image_width_arch');
153
- $max_image_height_home = get_option('fifu_image_height_home');
154
- $max_image_width_home = get_option('fifu_image_width_home');
155
- $max_image_height_page = get_option('fifu_image_height_page');
156
- $max_image_width_page = get_option('fifu_image_width_page');
157
- $max_image_height_post = get_option('fifu_image_height_post');
158
- $max_image_width_post = get_option('fifu_image_width_post');
159
  $enable_save_dimensions = get_option('fifu_save_dimensions');
160
  $enable_save_dimensions_redirect = get_option('fifu_save_dimensions_redirect ');
161
  $enable_save_dimensions_all = 'toggleoff';
@@ -186,7 +154,6 @@ function fifu_get_setting($type) {
186
 
187
  $arr1 = array('fifu_spinner_nth');
188
  $arrEmpty = array('fifu_default_url', 'fifu_css');
189
- $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');
190
  $arr64 = array('fifu_column_height');
191
  $arr100 = array('fifu_spinner_db');
192
  $arrOn = array('fifu_auto_alt', 'fifu_wc_zoom', 'fifu_wc_lbox');
@@ -196,8 +163,6 @@ function fifu_get_setting($type) {
196
  if (!get_option($type)) {
197
  if (in_array($type, $arrEmpty))
198
  update_option($type, '');
199
- else if (in_array($type, $arrEmptyNo))
200
- update_option($type, '', 'no');
201
  else if (in_array($type, $arr1))
202
  update_option($type, 1);
203
  else if (in_array($type, $arr64))
@@ -248,22 +213,6 @@ function fifu_update_menu_options() {
248
  fifu_update_option('fifu_input_auto_alt', 'fifu_auto_alt');
249
  fifu_update_option('fifu_input_dynamic_alt', 'fifu_dynamic_alt');
250
  fifu_update_option('fifu_input_data_clean', 'fifu_data_clean');
251
- fifu_update_option('fifu_input_image_height_shop', 'fifu_image_height_shop');
252
- fifu_update_option('fifu_input_image_width_shop', 'fifu_image_width_shop');
253
- fifu_update_option('fifu_input_image_height_prod', 'fifu_image_height_prod');
254
- fifu_update_option('fifu_input_image_width_prod', 'fifu_image_width_prod');
255
- fifu_update_option('fifu_input_image_height_cart', 'fifu_image_height_cart');
256
- fifu_update_option('fifu_input_image_width_cart', 'fifu_image_width_cart');
257
- fifu_update_option('fifu_input_image_height_ctgr', 'fifu_image_height_ctgr');
258
- fifu_update_option('fifu_input_image_width_ctgr', 'fifu_image_width_ctgr');
259
- fifu_update_option('fifu_input_image_height_arch', 'fifu_image_height_arch');
260
- fifu_update_option('fifu_input_image_width_arch', 'fifu_image_width_arch');
261
- fifu_update_option('fifu_input_image_height_home', 'fifu_image_height_home');
262
- fifu_update_option('fifu_input_image_width_home', 'fifu_image_width_home');
263
- fifu_update_option('fifu_input_image_height_page', 'fifu_image_height_page');
264
- fifu_update_option('fifu_input_image_width_page', 'fifu_image_width_page');
265
- fifu_update_option('fifu_input_image_height_post', 'fifu_image_height_post');
266
- fifu_update_option('fifu_input_image_width_post', 'fifu_image_width_post');
267
  fifu_update_option('fifu_input_save_dimensions', 'fifu_save_dimensions');
268
  fifu_update_option('fifu_input_save_dimensions_redirect', 'fifu_save_dimensions_redirect');
269
  fifu_update_option('fifu_input_save_dimensions_all', 'fifu_save_dimensions_all');
1
  <?php
2
 
3
+ define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_social_image_only', 'fifu_original', 'fifu_lazy', 'fifu_jquery', 'fifu_media_library', 'fifu_parameters', 'fifu_content', 'fifu_content_page', 'fifu_enable_default_url', 'fifu_spinner_db', 'fifu_spinner_nth', 'fifu_fake', 'fifu_css', 'fifu_default_url', 'fifu_wc_lbox', 'fifu_wc_zoom', 'fifu_hide_page', 'fifu_hide_post', 'fifu_hide_cpt', 'fifu_class', 'fifu_get_first', 'fifu_pop_first', 'fifu_ovw_first', 'fifu_query_strings', 'fifu_confirm_delete_all', 'fifu_run_delete_all', 'fifu_column_height', 'fifu_grid_category', 'fifu_auto_alt', 'fifu_dynamic_alt', 'fifu_data_clean', 'fifu_save_dimensions', 'fifu_save_dimensions_redirect', 'fifu_save_dimensions_all', 'fifu_clean_dimensions_all')));
4
 
5
  add_action('admin_menu', 'fifu_insert_menu');
6
 
68
  $enable_auto_alt = get_option('fifu_auto_alt');
69
  $enable_dynamic_alt = get_option('fifu_dynamic_alt');
70
  $enable_data_clean = 'toggleoff';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  $enable_save_dimensions = get_option('fifu_save_dimensions');
72
  $enable_save_dimensions_redirect = get_option('fifu_save_dimensions_redirect ');
73
  $enable_save_dimensions_all = 'toggleoff';
124
  $enable_auto_alt = get_option('fifu_auto_alt');
125
  $enable_dynamic_alt = get_option('fifu_dynamic_alt');
126
  $enable_data_clean = 'toggleoff';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  $enable_save_dimensions = get_option('fifu_save_dimensions');
128
  $enable_save_dimensions_redirect = get_option('fifu_save_dimensions_redirect ');
129
  $enable_save_dimensions_all = 'toggleoff';
154
 
155
  $arr1 = array('fifu_spinner_nth');
156
  $arrEmpty = array('fifu_default_url', 'fifu_css');
 
157
  $arr64 = array('fifu_column_height');
158
  $arr100 = array('fifu_spinner_db');
159
  $arrOn = array('fifu_auto_alt', 'fifu_wc_zoom', 'fifu_wc_lbox');
163
  if (!get_option($type)) {
164
  if (in_array($type, $arrEmpty))
165
  update_option($type, '');
 
 
166
  else if (in_array($type, $arr1))
167
  update_option($type, 1);
168
  else if (in_array($type, $arr64))
213
  fifu_update_option('fifu_input_auto_alt', 'fifu_auto_alt');
214
  fifu_update_option('fifu_input_dynamic_alt', 'fifu_dynamic_alt');
215
  fifu_update_option('fifu_input_data_clean', 'fifu_data_clean');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  fifu_update_option('fifu_input_save_dimensions', 'fifu_save_dimensions');
217
  fifu_update_option('fifu_input_save_dimensions_redirect', 'fifu_save_dimensions_redirect');
218
  fifu_update_option('fifu_input_save_dimensions_all', 'fifu_save_dimensions_all');
admin/meta-box.php CHANGED
@@ -184,10 +184,10 @@ function fifu_save_properties($post_id) {
184
  fifu_update_or_delete_value($post_id, 'fifu_image_alt', $alt);
185
  }
186
 
187
- fifu_save($post_id);
188
  }
189
 
190
- function fifu_save($post_id) {
191
  fifu_update_fake_attach_id($post_id);
192
  }
193
 
184
  fifu_update_or_delete_value($post_id, 'fifu_image_alt', $alt);
185
  }
186
 
187
+ fifu_save($post_id, $ignore);
188
  }
189
 
190
+ function fifu_save($post_id, $ignore) {
191
  fifu_update_fake_attach_id($post_id);
192
  }
193
 
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.1.2
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.1.3
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 3.0
includes/attachment.php CHANGED
@@ -168,7 +168,10 @@ function fifu_callback($buffer) {
168
  preg_match_all('/<[^>]*background-image[^>]*>/', $buffer, $imgList);
169
  foreach ($imgList[0] as $imgItem) {
170
  $mainDelimiter = substr(explode('style=', $imgItem)[1], 0, 1);
171
- $url = preg_split('/[\'\" ]{0,1}\)/', preg_split('/url\([\'\" ]{0,1}/', $imgItem, -1)[1], -1)[0];
 
 
 
172
  $newImgItem = preg_replace("/background-image[^:]*:[^\)]*url[^\)]*[\)]/", "", $imgItem);
173
  $attr = 'data-bg=' . $mainDelimiter . $url . $mainDelimiter;
174
  $newImgItem = str_replace('>', ' ' . $attr . '>', $newImgItem);
168
  preg_match_all('/<[^>]*background-image[^>]*>/', $buffer, $imgList);
169
  foreach ($imgList[0] as $imgItem) {
170
  $mainDelimiter = substr(explode('style=', $imgItem)[1], 0, 1);
171
+ if ($mainDelimiter)
172
+ $url = preg_split('/[\'\"]/', preg_split('/url\([\'\"]/', $imgItem, -1)[1], -1)[0];
173
+ else
174
+ $url = preg_split('/[ ]{0,1}\)\;/', preg_split('/url\([ ]{0,1}/', $imgItem, -1)[1], -1)[0];
175
  $newImgItem = preg_replace("/background-image[^:]*:[^\)]*url[^\)]*[\)]/", "", $imgItem);
176
  $attr = 'data-bg=' . $mainDelimiter . $url . $mainDelimiter;
177
  $newImgItem = str_replace('>', ' ' . $attr . '>', $newImgItem);
includes/html/js/image.js CHANGED
@@ -6,6 +6,11 @@ jQuery(document).ready(function ($) {
6
  visibleOnly: false,
7
  updateEvent: 'load orientationchange resize scroll touchmove focus hover'
8
  });
 
 
 
 
 
9
  }
10
 
11
  // woocommerce lightbox/zoom
6
  visibleOnly: false,
7
  updateEvent: 'load orientationchange resize scroll touchmove focus hover'
8
  });
9
+
10
+ // storefront theme
11
+ jQuery("ul#site-header-cart").on('hover', function (evt) {
12
+ jQuery(window).lazyLoadXT();
13
+ });
14
  }
15
 
16
  // woocommerce lightbox/zoom
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, giphy, 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, gif
5
  Requires at least: 4.0
6
  Tested up to: 5.4.2
7
- Stable tag: 3.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -168,6 +168,9 @@ Features:
168
 
169
  == Changelog ==
170
 
 
 
 
171
  = 3.1.2 =
172
  * Deprecated (Premium): Maximum Height option for Featured Shortcode; Bug fix: conflict between Lazy Load and background-images.
173
 
@@ -774,6 +777,9 @@ was removed. To finish, a Premium version is now been presented.
774
 
775
  == Upgrade Notice ==
776
 
 
 
 
777
  = 3.1.2 =
778
  * Deprecated (Premium): Maximum Height option for Featured Shortcode; Bug fix: conflict between Lazy Load and background-images.
779
 
4
  Tags: featured image, image, featured, url, external, external featured image, featured image from url, url featured image, giphy, 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, gif
5
  Requires at least: 4.0
6
  Tested up to: 5.4.2
7
+ Stable tag: 3.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
168
 
169
  == Changelog ==
170
 
171
+ = 3.1.3 =
172
+ * Improvement (Premium): Same Height (each selector can have a different size ratio); Improvement: Image Metadata (query optimization); Deprecated: Maximum Sizes; Bug fix: conflict between Lazy Load and Storefront; Bug fix: conflict between Lazy Load and background-images.
173
+
174
  = 3.1.2 =
175
  * Deprecated (Premium): Maximum Height option for Featured Shortcode; Bug fix: conflict between Lazy Load and background-images.
176
 
777
 
778
  == Upgrade Notice ==
779
 
780
+ = 3.1.3 =
781
+ * Improvement (Premium): Same Height (each selector can have a different size ratio); Improvement: Image Metadata (query optimization); Deprecated: Maximum Sizes; Bug fix: conflict between Lazy Load and Storefront; Bug fix: conflict between Lazy Load and background-images.
782
+
783
  = 3.1.2 =
784
  * Deprecated (Premium): Maximum Height option for Featured Shortcode; Bug fix: conflict between Lazy Load and background-images.
785