Featured Image From URL - Version 3.4.6

Version Description

  • Improvement: 35 new WP-CLI commands added; new integration function: fifu_dev_set_image_list(); fix: conflict with AMP + Jetpack; fix: expired Instagram URLs.
Download this release

Release Info

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

Code changes from version 3.4.5 to 3.4.6

admin/cli-commands.php CHANGED
@@ -13,6 +13,67 @@ class fifu_cli extends WP_CLI_Command {
13
  fifu_reset_settings();
14
  }
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  // metadata
17
 
18
  function metadata($args) {
13
  fifu_reset_settings();
14
  }
15
 
16
+ // automatic
17
+
18
+ function content($args, $assoc_args) {
19
+ if (!empty($assoc_args['position'])) {
20
+ update_option('fifu_spinner_nth', $args[0], 'no');
21
+ return;
22
+ }
23
+ if (!empty($assoc_args['hide'])) {
24
+ switch ($args[0]) {
25
+ case 'on':
26
+ update_option('fifu_pop_first', 'toggleon', 'no'); // toggle
27
+ break;
28
+ case 'off':
29
+ update_option('fifu_pop_first', 'toggleoff', 'no'); // toggle
30
+ break;
31
+ }
32
+ return;
33
+ }
34
+ if (!empty($assoc_args['remove-query'])) {
35
+ switch ($args[0]) {
36
+ case 'on':
37
+ update_option('fifu_query_strings', 'toggleon', 'no'); // toggle
38
+ break;
39
+ case 'off':
40
+ update_option('fifu_query_strings', 'toggleoff', 'no'); // toggle
41
+ break;
42
+ }
43
+ return;
44
+ }
45
+ if (!empty($assoc_args['overwrite'])) {
46
+ switch ($args[0]) {
47
+ case 'on':
48
+ update_option('fifu_ovw_first', 'toggleon', 'no'); // toggle
49
+ break;
50
+ case 'off':
51
+ update_option('fifu_ovw_first', 'toggleoff', 'no'); // toggle
52
+ break;
53
+ }
54
+ return;
55
+ }
56
+ if (!empty($assoc_args['decode'])) {
57
+ switch ($args[0]) {
58
+ case 'on':
59
+ update_option('fifu_decode', 'toggleon', 'no'); // toggle
60
+ break;
61
+ case 'off':
62
+ update_option('fifu_decode', 'toggleoff', 'no'); // toggle
63
+ break;
64
+ }
65
+ return;
66
+ }
67
+ switch ($args[0]) {
68
+ case 'on':
69
+ update_option('fifu_get_first', 'toggleon', 'no'); // toggle
70
+ break;
71
+ case 'off':
72
+ update_option('fifu_get_first', 'toggleoff', 'no'); // toggle
73
+ break;
74
+ }
75
+ }
76
+
77
  // metadata
78
 
79
  function metadata($args) {
admin/html/css/menu.css CHANGED
@@ -151,6 +151,28 @@ tr.color:nth-child(even) {
151
  margin-top: -12px;
152
  }
153
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
155
  color: white;
156
  }
151
  margin-top: -12px;
152
  }
153
 
154
+ .speech-bubble3 {
155
+ position: relative;
156
+ background: #000;
157
+ border-radius: 1em;
158
+ width: 100%;
159
+ line-height: 13px;
160
+ }
161
+
162
+ .speech-bubble3:after {
163
+ content: '';
164
+ position: absolute;
165
+ left: 0;
166
+ top: 50%;
167
+ width: 0;
168
+ height: 0;
169
+ border: 12px solid transparent;
170
+ border-right-color: #000;
171
+ border-left: 0;
172
+ margin-top: -12px;
173
+ margin-left: -12px;
174
+ }
175
+
176
  .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
177
  color: white;
178
  }
admin/html/menu.html CHANGED
@@ -94,10 +94,10 @@
94
  <li><a href="#tabs-2"><?php $fifu['cli']['tab']['documentation']() ?></a></li>
95
  </ul>
96
  <div id="tabs-1">
97
- <table style="text-align:left">
98
  <tr class="color">
99
  <th>
100
- <b><?php $fifu['cli']['column']['section']() ?></b>
101
  </th>
102
  <th>
103
  <b><?php $fifu['cli']['column']['feature']() ?></b>
@@ -105,15 +105,12 @@
105
  <th>
106
  <b><?php $fifu['cli']['column']['option']() ?></b>
107
  </th>
108
- <th>
109
  <b><?php $fifu['cli']['column']['command']() ?></b>
110
  </th>
111
- <th>
112
  <b><?php $fifu['cli']['column']['eg']() ?></b>
113
  </th>
114
- <th>
115
- <b>Version</b>
116
- </th>
117
  </tr>
118
  <tr class="color">
119
  <th>
@@ -129,7 +126,6 @@
129
  <th>
130
  32, 64, 128...
131
  </th>
132
- <th></th>
133
  </tr>
134
  <tr class="color">
135
  <th>
@@ -142,9 +138,586 @@
142
  <th>
143
  wp fifu reset
144
  </th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  <th></th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  <th></th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  <tr class="color">
149
  <th>
150
  <?php $fifu['tab']['metadata']() ?>
@@ -159,7 +732,6 @@
159
  <th>
160
  on, off
161
  </th>
162
- <th></th>
163
  </tr>
164
  <tr class="color">
165
  <th>
@@ -172,8 +744,8 @@
172
  <th>
173
  wp fifu clean
174
  </th>
175
- <th></th>
176
- <th></th>
177
  </tr>
178
  <tr class="color">
179
  <th>
@@ -189,7 +761,6 @@
189
  <th>
190
  on, off
191
  </th>
192
- <th><a href="https://fifu.app" target="_blank">premium</a></th>
193
  </tr>
194
  <tr class="color">
195
  <th>
@@ -207,7 +778,6 @@
207
  <th>
208
  1, 30, 60...
209
  </th>
210
- <th><a href="https://fifu.app" target="_blank">premium</a></th>
211
  </tr>
212
  <tr class="color">
213
  <th>
@@ -223,7 +793,6 @@
223
  <th>
224
  100, 1000, 5000...
225
  </th>
226
- <th></th>
227
  </tr>
228
  <tr class="color">
229
  <th>
@@ -239,7 +808,6 @@
239
  <th>
240
  on, off
241
  </th>
242
- <th></th>
243
  </tr>
244
  <tr class="color">
245
  <th>
@@ -255,7 +823,6 @@
255
  <th>
256
  on, off
257
  </th>
258
- <th><a href="https://fifu.app" target="_blank">premium</a></th>
259
  </tr>
260
  <tr class="color">
261
  <th>
@@ -273,7 +840,6 @@
273
  <th>
274
  on, off
275
  </th>
276
- <th></th>
277
  </tr>
278
  <tr class="color">
279
  <th>
@@ -291,7 +857,6 @@
291
  <th>
292
  on, off
293
  </th>
294
- <th></th>
295
  </tr>
296
  <tr class="color">
297
  <th>
@@ -307,7 +872,6 @@
307
  <th>
308
  on, off
309
  </th>
310
- <th><a href="https://fifu.app" target="_blank">premium</a></th>
311
  </tr>
312
  <tr class="color">
313
  <th>
@@ -325,7 +889,6 @@
325
  <th>
326
  300, 600, 900...
327
  </th>
328
- <th><a href="https://fifu.app" target="_blank">premium</a></th>
329
  </tr>
330
  <tr class="color">
331
  <th>
@@ -343,7 +906,6 @@
343
  <th>
344
  on, off
345
  </th>
346
- <th></th>
347
  </tr>
348
  <tr class="color">
349
  <th>
@@ -361,7 +923,6 @@
361
  <th>
362
  on, off
363
  </th>
364
- <th></th>
365
  </tr>
366
  <tr class="color">
367
  <th>
@@ -377,7 +938,6 @@
377
  <th>
378
  on, off
379
  </th>
380
- <th></th>
381
  </tr>
382
  <tr class="color">
383
  <th>
@@ -395,7 +955,6 @@
395
  <th>
396
  3, 4, 5...
397
  </th>
398
- <th><a href="https://fifu.app" target="_blank">premium</a></th>
399
  </tr>
400
  <tr class="color">
401
  <th>
@@ -413,7 +972,6 @@
413
  <th>
414
  3, 4, 5...
415
  </th>
416
- <th><a href="https://fifu.app" target="_blank">premium</a></th>
417
  </tr>
418
  <tr class="color">
419
  <th>
@@ -429,7 +987,6 @@
429
  <th>
430
  on, off
431
  </th>
432
- <th><a href="https://fifu.app" target="_blank">premium</a></th>
433
  </tr>
434
  <tr class="color">
435
  <th>
@@ -445,7 +1002,6 @@
445
  <th>
446
  on, off
447
  </th>
448
- <th><a href="https://fifu.app" target="_blank">premium</a></th>
449
  </tr>
450
  </table>
451
  </div>
@@ -3127,15 +3683,60 @@
3127
  <div class="box">
3128
  <h2><?php $fifu['title']['dev']() ?></h2>
3129
  <div class="greybox">
 
 
3130
  <table style="width:100%">
3131
  <tr>
3132
  <td style="width:14%;vertical-align:unset;">
3133
- <i class="fab fa-dev" style="font-size:110px"></i>
3134
  </td>
3135
  <td style="width:85%">
3136
- <?php $fifu['dev']['function']() ?><br>
3137
- <?php $fifu['dev']['args']() ?><br><br>
3138
- <div style="background-color:#966385;color:white;padding:15px;border-radius:5px;font-weight:bold;">fifu_dev_set_image($post_id, $image_url)</div><br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3139
  </td>
3140
  </tr>
3141
  </table>
94
  <li><a href="#tabs-2"><?php $fifu['cli']['tab']['documentation']() ?></a></li>
95
  </ul>
96
  <div id="tabs-1">
97
+ <table style="text-align:left; font-size: 11px">
98
  <tr class="color">
99
  <th>
100
+ <b><?php $fifu['cli']['column']['tab']() ?></b>
101
  </th>
102
  <th>
103
  <b><?php $fifu['cli']['column']['feature']() ?></b>
105
  <th>
106
  <b><?php $fifu['cli']['column']['option']() ?></b>
107
  </th>
108
+ <th style="width:200px">
109
  <b><?php $fifu['cli']['column']['command']() ?></b>
110
  </th>
111
+ <th style="width:100px">
112
  <b><?php $fifu['cli']['column']['eg']() ?></b>
113
  </th>
 
 
 
114
  </tr>
115
  <tr class="color">
116
  <th>
126
  <th>
127
  32, 64, 128...
128
  </th>
 
129
  </tr>
130
  <tr class="color">
131
  <th>
138
  <th>
139
  wp fifu reset
140
  </th>
141
+ <th>
142
+ </th>
143
+ </tr>
144
+ <tr class="color">
145
+ <th>
146
+ <?php $fifu['tab']['auto']() ?>
147
+ </th>
148
+ <th>
149
+ <?php $fifu['title']['html']() ?>
150
+ </th>
151
+ <th>
152
+ <?php $fifu['html']['position']() ?>
153
+ </th>
154
+ <th>
155
+ wp fifu content --position &lt;integer&gt;
156
+ </th>
157
+ <th>
158
+ 1, 2, 3...
159
+ </th>
160
+ </tr>
161
+ <tr class="color">
162
+ <th>
163
+ <?php $fifu['tab']['auto']() ?>
164
+ </th>
165
+ <th>
166
+ <?php $fifu['title']['html']() ?>
167
+ </th>
168
+ <th>
169
+ <?php $fifu['html']['first']() ?>
170
+ </th>
171
+ <th>
172
+ wp fifu content &lt;toggle&gt;
173
+ </th>
174
+ <th>
175
+ on, off
176
+ </th>
177
+ </tr>
178
+ <tr class="color">
179
+ <th>
180
+ <?php $fifu['tab']['auto']() ?>
181
+ </th>
182
+ <th>
183
+ <?php $fifu['title']['html']() ?>
184
+ </th>
185
+ <th>
186
+ <?php $fifu['html']['hide']() ?>
187
+ </th>
188
+ <th>
189
+ wp fifu content --hide &lt;toggle&gt;
190
+ </th>
191
+ <th>
192
+ on, off
193
+ </th>
194
+ </tr>
195
+ <tr class="color">
196
+ <th>
197
+ <?php $fifu['tab']['auto']() ?>
198
+ </th>
199
+ <th>
200
+ <?php $fifu['title']['html']() ?>
201
+ </th>
202
+ <th>
203
+ <?php $fifu['html']['query']() ?>
204
+ </th>
205
+ <th>
206
+ wp fifu content --remove-query &lt;toggle&gt;
207
+ </th>
208
+ <th>
209
+ on, off
210
+ </th>
211
+ </tr>
212
+ <tr class="color">
213
+ <th>
214
+ <?php $fifu['tab']['auto']() ?>
215
+ </th>
216
+ <th>
217
+ <?php $fifu['title']['html']() ?>
218
+ </th>
219
+ <th>
220
+ <?php $fifu['html']['overwrite']() ?>
221
+ </th>
222
+ <th>
223
+ wp fifu content --overwrite &lt;toggle&gt;
224
+ </th>
225
+ <th>
226
+ on, off
227
+ </th>
228
+ </tr>
229
+ <tr class="color">
230
+ <th>
231
+ <?php $fifu['tab']['auto']() ?>
232
+ </th>
233
+ <th>
234
+ <?php $fifu['title']['html']() ?>
235
+ </th>
236
+ <th>
237
+ <?php $fifu['html']['prioritize']() ?>
238
+ </th>
239
+ <th>
240
+ wp fifu content --prioritize-video &lt;toggle&gt;
241
+ </th>
242
+ <th>
243
+ on, off
244
+ </th>
245
+ </tr>
246
+ <tr class="color">
247
+ <th>
248
+ <?php $fifu['tab']['auto']() ?>
249
+ </th>
250
+ <th>
251
+ <?php $fifu['title']['html']() ?>
252
+ </th>
253
+ <th>
254
+ <?php $fifu['html']['decode']() ?>
255
+ </th>
256
+ <th>
257
+ wp fifu content --decode &lt;toggle&gt;
258
+ </th>
259
+ <th>
260
+ on, off
261
+ </th>
262
+ </tr>
263
+ <tr class="color">
264
+ <th>
265
+ <?php $fifu['tab']['auto']() ?>
266
+ </th>
267
+ <th>
268
+ <?php $fifu['title']['html']() ?>
269
+ </th>
270
+ <th>
271
+ <?php $fifu['all']['ignore']() ?>
272
+ </th>
273
+ <th>
274
+ wp fifu content --all-ignore &lt;toggle&gt;
275
+ </th>
276
+ <th>
277
+ on, off
278
+ </th>
279
+ </tr>
280
+ <tr class="color">
281
+ <th>
282
+ <?php $fifu['tab']['auto']() ?>
283
+ </th>
284
+ <th>
285
+ <?php $fifu['title']['html']() ?>
286
+ </th>
287
+ <th>
288
+ <?php $fifu['all']['update']() ?>
289
+ </th>
290
+ <th>
291
+ wp fifu content --all-run
292
+ </th>
293
+ <th></th>
294
+ </tr>
295
+ <tr class="color">
296
+ <th>
297
+ <?php $fifu['tab']['auto']() ?>
298
+ </th>
299
+ <th>
300
+ <?php $fifu['title']['auto']() ?>
301
+ </th>
302
+ <th></th>
303
+ <th>
304
+ wp fifu search &lt;toggle&gt;
305
+ </th>
306
+ <th>
307
+ on, off
308
+ </th>
309
+ </tr>
310
+ <tr class="color">
311
+ <th>
312
+ <?php $fifu['tab']['auto']() ?>
313
+ </th>
314
+ <th>
315
+ <?php $fifu['title']['auto']() ?>
316
+ </th>
317
+ <th>
318
+ <?php $fifu['auto']['filter']['width']() ?>
319
+ </th>
320
+ <th>
321
+ wp fifu search --min-width &lt;integer&gt;
322
+ </th>
323
+ <th>600, 800, 1200...</th>
324
+ </tr>
325
+ <tr class="color">
326
+ <th>
327
+ <?php $fifu['tab']['auto']() ?>
328
+ </th>
329
+ <th>
330
+ <?php $fifu['title']['auto']() ?>
331
+ </th>
332
+ <th>
333
+ <?php $fifu['auto']['filter']['height']() ?>
334
+ </th>
335
+ <th>
336
+ wp fifu search --min-height &lt;integer&gt;
337
+ </th>
338
+ <th>400, 600, 800...</th>
339
+ </tr>
340
+ <tr class="color">
341
+ <th>
342
+ <?php $fifu['tab']['auto']() ?>
343
+ </th>
344
+ <th>
345
+ <?php $fifu['title']['auto']() ?>
346
+ </th>
347
+ <th>
348
+ <?php $fifu['auto']['tab']['blocklist']() ?>
349
+ </th>
350
+ <th>
351
+ wp fifu search --blocklist &lt;string&gt;
352
+ </th>
353
+ <th>fb.com|yt.com|...</th>
354
+ </tr>
355
+ <tr class="color">
356
+ <th>
357
+ <?php $fifu['tab']['auto']() ?>
358
+ </th>
359
+ <th>
360
+ <?php $fifu['title']['isbn']() ?>
361
+ </th>
362
+ <th></th>
363
+ <th>
364
+ wp fifu isbn &lt;toggle&gt;
365
+ </th>
366
+ <th>
367
+ on, off
368
+ </th>
369
+ </tr>
370
+ <tr class="color">
371
+ <th>
372
+ <?php $fifu['tab']['shortcode']() ?>
373
+ </th>
374
+ <th>
375
+ <?php $fifu['title']['shortcode']() ?>
376
+ </th>
377
+ <th></th>
378
+ <th>
379
+ wp fifu shortcode &lt;toggle&gt;
380
+ </th>
381
+ <th>
382
+ on, off
383
+ </th>
384
+ </tr>
385
+ <tr class="color">
386
+ <th>
387
+ <?php $fifu['tab']['slider']() ?>
388
+ </th>
389
+ <th>
390
+ <?php $fifu['title']['slider']() ?>
391
+ </th>
392
+ <th>
393
+ <?php $fifu['slider']['featured']() ?>
394
+ </th>
395
+ <th>
396
+ wp fifu slider &lt;toggle&gt;
397
+ </th>
398
+ <th>
399
+ on, off
400
+ </th>
401
+ </tr>
402
+ <tr class="color">
403
+ <th>
404
+ <?php $fifu['tab']['slider']() ?>
405
+ </th>
406
+ <th>
407
+ <?php $fifu['title']['slider']() ?>
408
+ </th>
409
+ <th>
410
+ <?php $fifu['slider']['pause']() ?>
411
+ </th>
412
+ <th>
413
+ wp fifu slider --pause &lt;toggle&gt;
414
+ </th>
415
+ <th>
416
+ on, off
417
+ </th>
418
+ </tr>
419
+ <tr class="color">
420
+ <th>
421
+ <?php $fifu['tab']['slider']() ?>
422
+ </th>
423
+ <th>
424
+ <?php $fifu['title']['slider']() ?>
425
+ </th>
426
+ <th>
427
+ <?php $fifu['slider']['buttons']() ?>
428
+ </th>
429
+ <th>
430
+ wp fifu slider --buttons &lt;toggle&gt;
431
+ </th>
432
+ <th>
433
+ on, off
434
+ </th>
435
+ </tr>
436
+ <tr class="color">
437
+ <th>
438
+ <?php $fifu['tab']['slider']() ?>
439
+ </th>
440
+ <th>
441
+ <?php $fifu['title']['slider']() ?>
442
+ </th>
443
+ <th>
444
+ <?php $fifu['slider']['start']() ?>
445
+ </th>
446
+ <th>
447
+ wp fifu slider --auto &lt;toggle&gt;
448
+ </th>
449
+ <th>
450
+ on, off
451
+ </th>
452
+ </tr>
453
+ <tr class="color">
454
+ <th>
455
+ <?php $fifu['tab']['slider']() ?>
456
+ </th>
457
+ <th>
458
+ <?php $fifu['title']['slider']() ?>
459
+ </th>
460
+ <th>
461
+ <?php $fifu['slider']['click']() ?>
462
+ </th>
463
+ <th>
464
+ wp fifu slider --gallery &lt;toggle&gt;
465
+ </th>
466
+ <th>
467
+ on, off
468
+ </th>
469
+ </tr>
470
+ <tr class="color">
471
+ <th>
472
+ <?php $fifu['tab']['slider']() ?>
473
+ </th>
474
+ <th>
475
+ <?php $fifu['title']['slider']() ?>
476
+ </th>
477
+ <th>
478
+ <?php $fifu['slider']['thumb']() ?>
479
+ </th>
480
+ <th>
481
+ wp fifu slider --thumb-gallery &lt;toggle&gt;
482
+ </th>
483
+ <th>
484
+ on, off
485
+ </th>
486
+ </tr>
487
+ <tr class="color">
488
+ <th>
489
+ <?php $fifu['tab']['slider']() ?>
490
+ </th>
491
+ <th>
492
+ <?php $fifu['title']['slider']() ?>
493
+ </th>
494
+ <th>
495
+ <?php $fifu['slider']['counter']() ?>
496
+ </th>
497
+ <th>
498
+ wp fifu slider --counter &lt;toggle&gt;
499
+ </th>
500
+ <th>
501
+ on, off
502
+ </th>
503
+ </tr>
504
+ <tr class="color">
505
+ <th>
506
+ <?php $fifu['tab']['slider']() ?>
507
+ </th>
508
+ <th>
509
+ <?php $fifu['title']['slider']() ?>
510
+ </th>
511
+ <th>
512
+ <?php $fifu['fields']['slider']() ?>
513
+ </th>
514
+ <th>
515
+ wp fifu slider --fields &lt;integer&gt;
516
+ </th>
517
+ <th>
518
+ 3, 4, 5...
519
+ </th>
520
+ </tr>
521
+ <tr class="color">
522
+ <th>
523
+ <?php $fifu['tab']['slider']() ?>
524
+ </th>
525
+ <th>
526
+ <?php $fifu['title']['slider']() ?>
527
+ </th>
528
+ <th>
529
+ <?php $fifu['slider']['time']() ?>
530
+ </th>
531
+ <th>
532
+ wp fifu slider --time-image &lt;integer&gt;
533
+ </th>
534
+ <th>
535
+ 1000, 2000, 3000...
536
+ </th>
537
+ </tr>
538
+ <tr class="color">
539
+ <th>
540
+ <?php $fifu['tab']['slider']() ?>
541
+ </th>
542
+ <th>
543
+ <?php $fifu['title']['slider']() ?>
544
+ </th>
545
+ <th>
546
+ <?php $fifu['slider']['duration']() ?>
547
+ </th>
548
+ <th>
549
+ wp fifu slider --time-transition &lt;integer&gt;
550
+ </th>
551
+ <th>
552
+ 500, 1000, 1500...
553
+ </th>
554
+ </tr>
555
+ <tr class="color">
556
+ <th>
557
+ <?php $fifu['tab']['video']() ?>
558
+ </th>
559
+ <th>
560
+ <?php $fifu['title']['video']() ?>
561
+ </th>
562
  <th></th>
563
+ <th>
564
+ wp fifu video &lt;toggle&gt;
565
+ </th>
566
+ <th>
567
+ on, off
568
+ </th>
569
+ </tr>
570
+ <tr class="color">
571
+ <th>
572
+ <?php $fifu['tab']['video']() ?>
573
+ </th>
574
+ <th>
575
+ <?php $fifu['title']['thumbnail']() ?>
576
+ </th>
577
+ <th>
578
+ <?php $fifu['where']['home']() ?>
579
+ </th>
580
+ <th>
581
+ wp fifu video --thumb-home &lt;toggle&gt;
582
+ </th>
583
+ <th>
584
+ on, off
585
+ </th>
586
+ </tr>
587
+ <tr class="color">
588
+ <th>
589
+ <?php $fifu['tab']['video']() ?>
590
+ </th>
591
+ <th>
592
+ <?php $fifu['title']['thumbnail']() ?>
593
+ </th>
594
+ <th>
595
+ <?php $fifu['where']['page']() ?>
596
+ </th>
597
+ <th>
598
+ wp fifu video --thumb-page &lt;toggle&gt;
599
+ </th>
600
+ <th>
601
+ on, off
602
+ </th>
603
+ </tr>
604
+ <tr class="color">
605
+ <th>
606
+ <?php $fifu['tab']['video']() ?>
607
+ </th>
608
+ <th>
609
+ <?php $fifu['title']['thumbnail']() ?>
610
+ </th>
611
+ <th>
612
+ <?php $fifu['where']['post']() ?>
613
+ </th>
614
+ <th>
615
+ wp fifu video --thumb-post &lt;toggle&gt;
616
+ </th>
617
+ <th>
618
+ on, off
619
+ </th>
620
+ </tr>
621
+ <tr class="color">
622
+ <th>
623
+ <?php $fifu['tab']['video']() ?>
624
+ </th>
625
+ <th>
626
+ <?php $fifu['title']['thumbnail']() ?>
627
+ </th>
628
+ <th>
629
+ <?php $fifu['where']['cpt']() ?>
630
+ </th>
631
+ <th>
632
+ wp fifu video --thumb-cpt &lt;toggle&gt;
633
+ </th>
634
+ <th>
635
+ on, off
636
+ </th>
637
+ </tr>
638
+ <tr class="color">
639
+ <th>
640
+ <?php $fifu['tab']['video']() ?>
641
+ </th>
642
+ <th>
643
+ <?php $fifu['title']['play']() ?>
644
+ </th>
645
  <th></th>
646
+ <th>
647
+ wp fifu video --play &lt;toggle&gt;
648
+ </th>
649
+ <th>
650
+ on, off
651
+ </th>
652
+ </tr>
653
+ <tr class="color">
654
+ <th>
655
+ <?php $fifu['tab']['video']() ?>
656
+ </th>
657
+ <th>
658
+ <?php $fifu['title']['play']() ?>
659
+ </th>
660
+ <th>
661
+ <?php $fifu['word']['color']() ?>
662
+ </th>
663
+ <th>
664
+ wp fifu video --play-color &lt;string&gt;
665
+ </th>
666
+ <th>
667
+ red, blue, black...
668
+ </th>
669
  </tr>
670
+ <tr class="color">
671
+ <th>
672
+ <?php $fifu['tab']['video']() ?>
673
+ </th>
674
+ <th>
675
+ <?php $fifu['title']['play']() ?>
676
+ </th>
677
+ <th>
678
+ <?php $fifu['word']['mode']() ?>
679
+ </th>
680
+ <th>
681
+ wp fifu video --play-mode &lt;string&gt;
682
+ </th>
683
+ <th>
684
+ inline, lightbox
685
+ </th>
686
+ </tr>
687
+ <tr class="color">
688
+ <th>
689
+ <?php $fifu['tab']['video']() ?>
690
+ </th>
691
+ <th>
692
+ <?php $fifu['title']['play']() ?>
693
+ </th>
694
+ <th>
695
+ <?php $fifu['word']['zindex']() ?>
696
+ </th>
697
+ <th>
698
+ wp fifu video --play-zindex &lt;integer&gt;
699
+ </th>
700
+ <th>
701
+ 500, 1000, 1500...
702
+ </th>
703
+ </tr>
704
+ <tr class="color">
705
+ <th>
706
+ <?php $fifu['tab']['video']() ?>
707
+ </th>
708
+ <th>
709
+ <?php $fifu['title']['play']() ?>
710
+ </th>
711
+ <th>
712
+ <?php $fifu['play']['hide']() ?>
713
+ </th>
714
+ <th>
715
+ wp fifu video --play-hide &lt;toggle&gt;
716
+ </th>
717
+ <th>
718
+ on, off
719
+ </th>
720
+ </tr>
721
  <tr class="color">
722
  <th>
723
  <?php $fifu['tab']['metadata']() ?>
732
  <th>
733
  on, off
734
  </th>
 
735
  </tr>
736
  <tr class="color">
737
  <th>
744
  <th>
745
  wp fifu clean
746
  </th>
747
+ <th>
748
+ </th>
749
  </tr>
750
  <tr class="color">
751
  <th>
761
  <th>
762
  on, off
763
  </th>
 
764
  </tr>
765
  <tr class="color">
766
  <th>
778
  <th>
779
  1, 30, 60...
780
  </th>
 
781
  </tr>
782
  <tr class="color">
783
  <th>
793
  <th>
794
  100, 1000, 5000...
795
  </th>
 
796
  </tr>
797
  <tr class="color">
798
  <th>
808
  <th>
809
  on, off
810
  </th>
 
811
  </tr>
812
  <tr class="color">
813
  <th>
823
  <th>
824
  on, off
825
  </th>
 
826
  </tr>
827
  <tr class="color">
828
  <th>
840
  <th>
841
  on, off
842
  </th>
 
843
  </tr>
844
  <tr class="color">
845
  <th>
857
  <th>
858
  on, off
859
  </th>
 
860
  </tr>
861
  <tr class="color">
862
  <th>
872
  <th>
873
  on, off
874
  </th>
 
875
  </tr>
876
  <tr class="color">
877
  <th>
889
  <th>
890
  300, 600, 900...
891
  </th>
 
892
  </tr>
893
  <tr class="color">
894
  <th>
906
  <th>
907
  on, off
908
  </th>
 
909
  </tr>
910
  <tr class="color">
911
  <th>
923
  <th>
924
  on, off
925
  </th>
 
926
  </tr>
927
  <tr class="color">
928
  <th>
938
  <th>
939
  on, off
940
  </th>
 
941
  </tr>
942
  <tr class="color">
943
  <th>
955
  <th>
956
  3, 4, 5...
957
  </th>
 
958
  </tr>
959
  <tr class="color">
960
  <th>
972
  <th>
973
  3, 4, 5...
974
  </th>
 
975
  </tr>
976
  <tr class="color">
977
  <th>
987
  <th>
988
  on, off
989
  </th>
 
990
  </tr>
991
  <tr class="color">
992
  <th>
1002
  <th>
1003
  on, off
1004
  </th>
 
1005
  </tr>
1006
  </table>
1007
  </div>
3683
  <div class="box">
3684
  <h2><?php $fifu['title']['dev']() ?></h2>
3685
  <div class="greybox">
3686
+ <?php $fifu['dev']['function']() ?><br>
3687
+ <?php $fifu['dev']['args']() ?><br><br>
3688
  <table style="width:100%">
3689
  <tr>
3690
  <td style="width:14%;vertical-align:unset;">
3691
+ <i class="fab fa-dev" style="font-size:110px; color: #76496d"></i>
3692
  </td>
3693
  <td style="width:85%">
3694
+ <hgroup style="float:right;opacity:0.85" class="speech-bubble3">
3695
+ <table style="text-align:left; width:100%; background-color: #000; color: white; padding:15px; border-radius:13px; font-weight:bold;">
3696
+ <tr>
3697
+ <th>
3698
+ <b><?php $fifu['word']['field']() ?></b>
3699
+ </th>
3700
+ <th>
3701
+ <b><?php $fifu['word']['function']() ?></b>
3702
+ </th>
3703
+ <th>
3704
+ <b><?php $fifu['word']['delimiter']() ?></b>
3705
+ </th>
3706
+ <th>
3707
+ <b>Premium</b>
3708
+ </th>
3709
+ </tr>
3710
+ <tr>
3711
+ <th>
3712
+ Featured image
3713
+ </th>
3714
+ <th>
3715
+ fifu_dev_set_image($post_id, $image_url)
3716
+ </th>
3717
+ <th>
3718
+ <b></b>
3719
+ </th>
3720
+ <th>
3721
+ no
3722
+ </th>
3723
+ </tr>
3724
+ <tr>
3725
+ <th>
3726
+ Product image + Image gallery
3727
+ </th>
3728
+ <th>
3729
+ fifu_dev_set_image_list($post_id, $image_url_list)
3730
+ </th>
3731
+ <th>
3732
+ <b>|</b>
3733
+ </th>
3734
+ <th>
3735
+ yes
3736
+ </th>
3737
+ </tr>
3738
+ </table>
3739
+ </hgroup>
3740
  </td>
3741
  </tr>
3742
  </table>
admin/strings.php CHANGED
@@ -79,6 +79,15 @@ function fifu_get_strings_settings() {
79
  $fifu['word']['zoom'] = function() {
80
  _e("zoom", FIFU_SLUG);
81
  };
 
 
 
 
 
 
 
 
 
82
 
83
  // where
84
  $fifu['where']['page'] = function() {
@@ -422,10 +431,10 @@ function fifu_get_strings_settings() {
422
 
423
  // dev
424
  $fifu['dev']['function'] = function() {
425
- _e("Are you a WordPress developer? So now you can easily integrate your code with FIFU using the function below.", FIFU_SLUG);
426
  };
427
  $fifu['dev']['args'] = function() {
428
- _e("All you need is to inform the post id and the image url. And FIFU will set the custom fields and create the metadata.", FIFU_SLUG);
429
  };
430
 
431
  // column
@@ -671,7 +680,7 @@ function fifu_get_strings_settings() {
671
 
672
  // validation
673
  $fifu['validation']['desc'] = function() {
674
- _e("It checks images addresses and, when an image is not found, its URL is not saved. However, each validation can take some seconds. It is not integrated with Content URL or REST API features.", FIFU_SLUG);
675
  };
676
 
677
  // configuration
@@ -933,7 +942,7 @@ function fifu_get_strings_settings() {
933
 
934
  // slider
935
  $fifu['slider']['desc'] = function() {
936
- _e("This feature allows you to have a slider of images instead of a regular featured image. It's often quite useful on some types of websites, such as real states. It can run fast even with a huge amount of big images (just follow the performance tips below).", FIFU_SLUG);
937
  };
938
  $fifu['slider']['lazy'] = function() {
939
  _e("enable FIFU Settings > Performance > Lazy Load", FIFU_SLUG);
79
  $fifu['word']['zoom'] = function() {
80
  _e("zoom", FIFU_SLUG);
81
  };
82
+ $fifu['word']['function'] = function() {
83
+ _e("Function", FIFU_SLUG);
84
+ };
85
+ $fifu['word']['field'] = function() {
86
+ _e("Fields", FIFU_SLUG);
87
+ };
88
+ $fifu['word']['delimiter'] = function() {
89
+ _e("Delimiter", FIFU_SLUG);
90
+ };
91
 
92
  // where
93
  $fifu['where']['page'] = function() {
431
 
432
  // dev
433
  $fifu['dev']['function'] = function() {
434
+ _e("Are you a WordPress developer? So now you can easily integrate your code with FIFU using the functions below.", FIFU_SLUG);
435
  };
436
  $fifu['dev']['args'] = function() {
437
+ _e("All you need is to inform the post id and the image url(s). And FIFU will set the custom fields and create the metadata.", FIFU_SLUG);
438
  };
439
 
440
  // column
680
 
681
  // validation
682
  $fifu['validation']['desc'] = function() {
683
+ _e("It checks images addresses and, when an image is not found, its URL is not saved. However, each validation can take some seconds.", FIFU_SLUG);
684
  };
685
 
686
  // configuration
942
 
943
  // slider
944
  $fifu['slider']['desc'] = function() {
945
+ _e("This feature allows you to have a slider of images instead of a regular featured image. It's often quite useful on some types of websites, such as real estate. It can run fast even with a huge amount of big images (just follow the performance tips below).", FIFU_SLUG);
946
  };
947
  $fifu['slider']['lazy'] = function() {
948
  _e("enable FIFU Settings > Performance > Lazy Load", FIFU_SLUG);
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 as featured image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
- * Version: 3.4.5
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
11
- * WC tested up to: 4.7
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 as featured image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
+ * Version: 3.4.6
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
11
+ * WC tested up to: 4.8
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
@@ -148,13 +148,27 @@ function fifu_add_size($image, $size) {
148
  if (!is_array($size)) {
149
  if (function_exists('wp_get_registered_image_subsizes')) {
150
  if (isset(wp_get_registered_image_subsizes()[$size]['width']))
151
- $image[1] = wp_get_registered_image_subsizes()[$size]['width'];
152
 
153
  if (isset(wp_get_registered_image_subsizes()[$size]['height']))
154
- $image[2] = wp_get_registered_image_subsizes()[$size]['height'];
155
 
156
  if (isset(wp_get_registered_image_subsizes()[$size]['crop']))
157
- $image[3] = wp_get_registered_image_subsizes()[$size]['crop'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  }
159
  } else {
160
  $image[1] = $size[0];
148
  if (!is_array($size)) {
149
  if (function_exists('wp_get_registered_image_subsizes')) {
150
  if (isset(wp_get_registered_image_subsizes()[$size]['width']))
151
+ $width = wp_get_registered_image_subsizes()[$size]['width'];
152
 
153
  if (isset(wp_get_registered_image_subsizes()[$size]['height']))
154
+ $height = wp_get_registered_image_subsizes()[$size]['height'];
155
 
156
  if (isset(wp_get_registered_image_subsizes()[$size]['crop']))
157
+ $crop = wp_get_registered_image_subsizes()[$size]['crop'];
158
+
159
+ // skip
160
+ if ($image[1] > 1) {
161
+ // default height
162
+ if ($height == 9999)
163
+ return $image;
164
+ // aspect ratio
165
+ if ($image[2] != 0 && $height != 0 && abs($image[1] / $image[2] - $width / $height) > 0.1)
166
+ return $image;
167
+ }
168
+
169
+ $image[1] = $width;
170
+ $image[2] = $height;
171
+ $image[3] = $crop;
172
  }
173
  } else {
174
  $image[1] = $size[0];
includes/convert-url.php CHANGED
@@ -44,3 +44,21 @@ function fifu_is_old_instagram_url($url) {
44
  return strpos($url, 'https://www.instagram.com/p/') !== false;
45
  }
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  return strpos($url, 'https://www.instagram.com/p/') !== false;
45
  }
46
 
47
+ function fifu_is_new_instagram_url($url) {
48
+ return strpos($url, 'https://scontent.cdninstagram.com/v/') !== false;
49
+ }
50
+
51
+ function fifu_is_renewed_instagram_url($url) {
52
+ return strpos($url, 'fifu-create-date') !== false;
53
+ }
54
+
55
+ function fifu_instagram_expired_date($url) {
56
+ $aux = explode('fifu-create-date=', $url)[1];
57
+ return $aux ? explode('&', $aux)[0] : null;
58
+ }
59
+
60
+ function fifu_is_expired_instagram_url($url) {
61
+ $date = fifu_instagram_expired_date($url);
62
+ return $date ? strtotime(date("Y-m-d")) - strtotime($date) >= 3600 * 24 * 30 : false;
63
+ }
64
+
includes/util.php CHANGED
@@ -72,8 +72,10 @@ function fifu_get_tags($post_id) {
72
  }
73
 
74
  function fifu_check_instagram_thumb($url, $att_id, $post_id) {
75
- if (!fifu_is_old_instagram_url($url))
76
- return $url;
 
 
77
 
78
  if (!fifu_is_in_editor()) {
79
  $db_url = get_post_meta($post_id, 'fifu_image_url', true);
72
  }
73
 
74
  function fifu_check_instagram_thumb($url, $att_id, $post_id) {
75
+ if (fifu_is_new_instagram_url($url)) {
76
+ if (fifu_is_renewed_instagram_url($url) && !fifu_is_expired_instagram_url($url))
77
+ return $url;
78
+ }
79
 
80
  if (!fifu_is_in_editor()) {
81
  $db_url = get_post_meta($post_id, 'fifu_image_url', true);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, woocommerce, thumbnail
5
  Requires at least: 5.3
6
  Tested up to: 5.6
7
- Stable tag: 3.4.5
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -98,7 +98,8 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr and Publiti
98
 
99
  #### INTEGRATION FUNCTION FOR DEVELOPERS
100
 
101
- * fifu_dev_set_image($post_id, $image_url)
 
102
 
103
  #### LINKS
104
 
@@ -196,20 +197,20 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr and Publiti
196
 
197
  == Changelog ==
198
 
 
 
 
199
  = 3.4.5 =
200
  * Improvement: integration with WP-CLI (20 commands added); bug fix: Hide Featured Media should not work for WooCommerce products.
201
 
202
  = 3.4.4 =
203
  * New option: Reset Settings; deprecated: option to show the external images in the Media Library.
204
 
205
- = 3.4.3 =
206
- * Notice: FIFU Premium has now a 30-day money-back guarantee; notice: support to WooCommerce Import and WP All Import are available only in the Premium version now; improvement: integration with User Submitted Posts plugin.
207
-
208
  = others =
209
  * [more](https://fifu.app/changelog/)
210
 
211
 
212
  == Upgrade Notice ==
213
 
214
- = 3.4.5 =
215
- * Improvement: integration with WP-CLI (20 commands added); bug fix: Hide Featured Media should not work for WooCommerce products.
4
  Tags: featured, image, url, woocommerce, thumbnail
5
  Requires at least: 5.3
6
  Tested up to: 5.6
7
+ Stable tag: 3.4.6
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
98
 
99
  #### INTEGRATION FUNCTION FOR DEVELOPERS
100
 
101
+ * fifu_dev_set_image(post_id, image_url)
102
+ * **[Premium]** fifu_dev_set_image_list(post_id, image_url_list)
103
 
104
  #### LINKS
105
 
197
 
198
  == Changelog ==
199
 
200
+ = 3.4.6 =
201
+ * Improvement: 35 new WP-CLI commands added; new integration function: fifu_dev_set_image_list(); fix: conflict with AMP + Jetpack; fix: expired Instagram URLs.
202
+
203
  = 3.4.5 =
204
  * Improvement: integration with WP-CLI (20 commands added); bug fix: Hide Featured Media should not work for WooCommerce products.
205
 
206
  = 3.4.4 =
207
  * New option: Reset Settings; deprecated: option to show the external images in the Media Library.
208
 
 
 
 
209
  = others =
210
  * [more](https://fifu.app/changelog/)
211
 
212
 
213
  == Upgrade Notice ==
214
 
215
+ = 3.4.6 =
216
+ * Improvement: 35 new WP-CLI commands added; new integration function: fifu_dev_set_image_list(); fix: conflict with AMP + Jetpack; fix: expired Instagram URLs.