Featured Image From URL - Version 3.4.5

Version Description

  • Improvement: integration with WP-CLI (20 commands added); bug fix: Hide Featured Media should not work for WooCommerce products.
Download this release

Release Info

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

Code changes from version 3.4.4 to 3.4.5

admin/cli-commands.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class fifu_cli extends WP_CLI_Command {
4
+
5
+ // admin
6
+
7
+ function column($args) {
8
+ update_option('fifu_column_height', $args[0], 'no');
9
+ //WP_CLI::line($args[0]);
10
+ }
11
+
12
+ function reset() {
13
+ fifu_reset_settings();
14
+ }
15
+
16
+ // metadata
17
+
18
+ function metadata($args) {
19
+ switch ($args[0]) {
20
+ case 'on':
21
+ update_option('fifu_fake_stop', false, 'no');
22
+ fifu_enable_fake();
23
+ update_option('fifu_image_metadata_counter', fifu_db_count_urls_without_metadata(), 'no');
24
+ update_option('fifu_fake', 'toggleon', 'no'); // toggle
25
+ break;
26
+ case 'off':
27
+ update_option('fifu_fake_created', false, 'no');
28
+ update_option('fifu_fake_stop', true, 'no');
29
+ update_option('fifu_image_metadata_counter', fifu_db_count_urls_without_metadata(), 'no');
30
+ update_option('fifu_fake', 'toggleoff', 'no'); // toggle
31
+ break;
32
+ }
33
+ }
34
+
35
+ function clean() {
36
+ fifu_db_enable_clean();
37
+ update_option('fifu_data_clean', 'toggleoff', 'no');
38
+ update_option('fifu_image_metadata_counter', fifu_db_count_urls_without_metadata(), 'no');
39
+ }
40
+
41
+ function db($args) {
42
+ update_option('fifu_spinner_db', $args[0], 'no');
43
+ }
44
+
45
+ // performance
46
+
47
+ function lazy($args) {
48
+ switch ($args[0]) {
49
+ case 'on':
50
+ update_option('fifu_lazy', 'toggleon', 'no'); // toggle
51
+ break;
52
+ case 'off':
53
+ update_option('fifu_lazy', 'toggleoff', 'no'); // toggle
54
+ break;
55
+ }
56
+ }
57
+
58
+ // social
59
+
60
+ function social($args, $assoc_args) {
61
+ if (!empty($assoc_args['image-only'])) {
62
+ switch ($args[0]) {
63
+ case 'on':
64
+ update_option('fifu_social_image_only', 'toggleon', 'no'); // toggle
65
+ break;
66
+ case 'off':
67
+ update_option('fifu_social_image_only', 'toggleoff', 'no'); // toggle
68
+ break;
69
+ }
70
+ return;
71
+ }
72
+ switch ($args[0]) {
73
+ case 'on':
74
+ update_option('fifu_social', 'toggleon', 'no'); // toggle
75
+ break;
76
+ case 'off':
77
+ update_option('fifu_social', 'toggleoff', 'no'); // toggle
78
+ break;
79
+ }
80
+ }
81
+
82
+ // woocommerce
83
+
84
+ function woo($args, $assoc_args) {
85
+ if (!empty($assoc_args['lightbox'])) {
86
+ switch ($args[0]) {
87
+ case 'on':
88
+ update_option('fifu_wc_lbox', 'toggleon', 'no'); // toggle
89
+ break;
90
+ case 'off':
91
+ update_option('fifu_wc_lbox', 'toggleoff', 'no'); // toggle
92
+ break;
93
+ }
94
+ return;
95
+ }
96
+ if (!empty($assoc_args['zoom'])) {
97
+ switch ($args[0]) {
98
+ case 'on':
99
+ update_option('fifu_wc_zoom', 'toggleon', 'no'); // toggle
100
+ break;
101
+ case 'off':
102
+ update_option('fifu_wc_zoom', 'toggleoff', 'no'); // toggle
103
+ break;
104
+ }
105
+ return;
106
+ }
107
+ if (!empty($assoc_args['category-grid'])) {
108
+ switch ($args[0]) {
109
+ case 'on':
110
+ update_option('fifu_grid_category', 'toggleon', 'no'); // toggle
111
+ break;
112
+ case 'off':
113
+ update_option('fifu_grid_category', 'toggleoff', 'no'); // toggle
114
+ break;
115
+ }
116
+ return;
117
+ }
118
+ }
119
+
120
+ }
121
+
122
+ WP_CLI::add_command('fifu', 'fifu_cli');
123
+
admin/html/css/menu.css CHANGED
@@ -69,6 +69,10 @@ th {
69
  height: 25px;
70
  }
71
 
 
 
 
 
72
  .ui-widget-header {
73
  background: #f9f9f9 !important;
74
  border: none !important;
69
  height: 25px;
70
  }
71
 
72
+ tr.color:nth-child(even) {
73
+ background-color: #efefef !important;
74
+ }
75
+
76
  .ui-widget-header {
77
  background: #f9f9f9 !important;
78
  border: none !important;
admin/html/js/menu.js CHANGED
@@ -51,6 +51,7 @@ jQuery(function () {
51
  jQuery("#tabsSlider").tabs();
52
  jQuery("#tabsContent").tabs();
53
  jQuery("#tabsContentAll").tabs();
 
54
 
55
  // show settings
56
  window.scrollTo(0, 0);
51
  jQuery("#tabsSlider").tabs();
52
  jQuery("#tabsContent").tabs();
53
  jQuery("#tabsContentAll").tabs();
54
+ jQuery("#tabsCli").tabs();
55
 
56
  // show settings
57
  window.scrollTo(0, 0);
admin/html/menu.html CHANGED
@@ -77,6 +77,396 @@
77
  </table>
78
  </form>
79
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  </div>
81
  <div id="tabs-b">
82
  <div class="box">
@@ -570,7 +960,7 @@
570
  </form>
571
  </th>
572
  <th>
573
- <?php $fifu['where']['cpt']() ?>
574
  </th>
575
  </tr>
576
  </table>
@@ -1782,6 +2172,21 @@
1782
  <?php $fifu['slider']['thumb']() ?>
1783
  </th>
1784
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1785
  <tr>
1786
  <th>
1787
  <input id="fifu_input_spinner_slider"
@@ -2738,6 +3143,22 @@
2738
  </div>
2739
  </div>
2740
  <div id="tabs-t">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2741
  <div class="box">
2742
  <table>
2743
  <tr>
77
  </table>
78
  </form>
79
  </div>
80
+
81
+ <div class="box">
82
+
83
+ <h2><?php $fifu['title']['cli']() ?></h2>
84
+
85
+ <div class="greybox">
86
+
87
+ <?php $fifu['cli']['desc']() ?>
88
+
89
+ <br><br>
90
+
91
+ <div id="tabsCli">
92
+ <ul>
93
+ <li><a href="#tabs-1"><?php $fifu['cli']['tab']['commands']() ?></a></li>
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>
104
+ </th>
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>
120
+ <?php $fifu['tab']['admin']() ?>
121
+ </th>
122
+ <th>
123
+ <?php $fifu['title']['column']() ?>
124
+ </th>
125
+ <th></th>
126
+ <th>
127
+ wp fifu column &lt;integer&gt;
128
+ </th>
129
+ <th>
130
+ 32, 64, 128...
131
+ </th>
132
+ <th></th>
133
+ </tr>
134
+ <tr class="color">
135
+ <th>
136
+ <?php $fifu['tab']['admin']() ?>
137
+ </th>
138
+ <th>
139
+ <?php $fifu['title']['reset']() ?>
140
+ </th>
141
+ <th></th>
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']() ?>
151
+ </th>
152
+ <th>
153
+ <?php $fifu['title']['metadata']() ?>
154
+ </th>
155
+ <th></th>
156
+ <th>
157
+ wp fifu metadata &lt;toggle&gt;
158
+ </th>
159
+ <th>
160
+ on, off
161
+ </th>
162
+ <th></th>
163
+ </tr>
164
+ <tr class="color">
165
+ <th>
166
+ <?php $fifu['tab']['metadata']() ?>
167
+ </th>
168
+ <th>
169
+ <?php $fifu['title']['clean']() ?>
170
+ </th>
171
+ <th></th>
172
+ <th>
173
+ wp fifu clean
174
+ </th>
175
+ <th></th>
176
+ <th></th>
177
+ </tr>
178
+ <tr class="color">
179
+ <th>
180
+ <?php $fifu['tab']['metadata']() ?>
181
+ </th>
182
+ <th>
183
+ <?php $fifu['title']['schedule']() ?>
184
+ </th>
185
+ <th></th>
186
+ <th>
187
+ wp fifu schedule &lt;toggle&gt;
188
+ </th>
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>
196
+ <?php $fifu['tab']['metadata']() ?>
197
+ </th>
198
+ <th>
199
+ <?php $fifu['title']['schedule']() ?>
200
+ </th>
201
+ <th>
202
+ <?php $fifu['schedule']['interval']() ?>
203
+ </th>
204
+ <th>
205
+ wp fifu schedule --interval &lt;integer&gt;
206
+ </th>
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>
214
+ <?php $fifu['tab']['metadata']() ?>
215
+ </th>
216
+ <th>
217
+ <?php $fifu['title']['database']() ?>
218
+ </th>
219
+ <th></th>
220
+ <th>
221
+ wp fifu db &lt;integer&gt;
222
+ </th>
223
+ <th>
224
+ 100, 1000, 5000...
225
+ </th>
226
+ <th></th>
227
+ </tr>
228
+ <tr class="color">
229
+ <th>
230
+ <?php $fifu['tab']['performance']() ?>
231
+ </th>
232
+ <th>
233
+ <?php $fifu['title']['lazy']() ?>
234
+ </th>
235
+ <th></th>
236
+ <th>
237
+ wp fifu lazy &lt;toggle&gt;
238
+ </th>
239
+ <th>
240
+ on, off
241
+ </th>
242
+ <th></th>
243
+ </tr>
244
+ <tr class="color">
245
+ <th>
246
+ <?php $fifu['tab']['performance']() ?>
247
+ </th>
248
+ <th>
249
+ <?php $fifu['title']['flickr']() ?>
250
+ </th>
251
+ <th></th>
252
+ <th>
253
+ wp fifu flickr &lt;toggle&gt;
254
+ </th>
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>
262
+ <?php $fifu['tab']['social']() ?>
263
+ </th>
264
+ <th>
265
+ <?php $fifu['title']['social']() ?>
266
+ </th>
267
+ <th>
268
+ <?php $fifu['social']['add']() ?>
269
+ </th>
270
+ <th>
271
+ wp fifu social &lt;toggle&gt;
272
+ </th>
273
+ <th>
274
+ on, off
275
+ </th>
276
+ <th></th>
277
+ </tr>
278
+ <tr class="color">
279
+ <th>
280
+ <?php $fifu['tab']['social']() ?>
281
+ </th>
282
+ <th>
283
+ <?php $fifu['title']['social']() ?>
284
+ </th>
285
+ <th>
286
+ <?php $fifu['social']['only']() ?>
287
+ </th>
288
+ <th>
289
+ wp fifu social --image-only &lt;toggle&gt;
290
+ </th>
291
+ <th>
292
+ on, off
293
+ </th>
294
+ <th></th>
295
+ </tr>
296
+ <tr class="color">
297
+ <th>
298
+ <?php $fifu['tab']['social']() ?>
299
+ </th>
300
+ <th>
301
+ <?php $fifu['title']['rss']() ?>
302
+ </th>
303
+ <th></th>
304
+ <th>
305
+ wp fifu rss &lt;toggle&gt;
306
+ </th>
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>
314
+ <?php $fifu['tab']['social']() ?>
315
+ </th>
316
+ <th>
317
+ <?php $fifu['title']['rss']() ?>
318
+ </th>
319
+ <th>
320
+ <?php $fifu['word']['width']() ?>
321
+ </th>
322
+ <th>
323
+ wp fifu rss --width &lt;integer&gt;
324
+ </th>
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>
332
+ <?php $fifu['tab']['woo']() ?>
333
+ </th>
334
+ <th>
335
+ <?php $fifu['title']['zoom']() ?>
336
+ </th>
337
+ <th>
338
+ <?php $fifu['word']['lightbox']() ?>
339
+ </th>
340
+ <th>
341
+ wp fifu woo --lightbox &lt;toggle&gt;
342
+ </th>
343
+ <th>
344
+ on, off
345
+ </th>
346
+ <th></th>
347
+ </tr>
348
+ <tr class="color">
349
+ <th>
350
+ <?php $fifu['tab']['woo']() ?>
351
+ </th>
352
+ <th>
353
+ <?php $fifu['title']['zoom']() ?>
354
+ </th>
355
+ <th>
356
+ <?php $fifu['word']['zoom']() ?>
357
+ </th>
358
+ <th>
359
+ wp fifu woo --zoom &lt;toggle&gt;
360
+ </th>
361
+ <th>
362
+ on, off
363
+ </th>
364
+ <th></th>
365
+ </tr>
366
+ <tr class="color">
367
+ <th>
368
+ <?php $fifu['tab']['woo']() ?>
369
+ </th>
370
+ <th>
371
+ <?php $fifu['title']['grid']() ?>
372
+ </th>
373
+ <th></th>
374
+ <th>
375
+ wp fifu woo --category-grid &lt;toggle&gt;
376
+ </th>
377
+ <th>
378
+ on, off
379
+ </th>
380
+ <th></th>
381
+ </tr>
382
+ <tr class="color">
383
+ <th>
384
+ <?php $fifu['tab']['woo']() ?>
385
+ </th>
386
+ <th>
387
+ <?php $fifu['title']['fields']() ?>
388
+ </th>
389
+ <th>
390
+ <?php $fifu['fields']['image']() ?>
391
+ </th>
392
+ <th>
393
+ wp fifu woo --images &lt;integer&gt;
394
+ </th>
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>
402
+ <?php $fifu['tab']['woo']() ?>
403
+ </th>
404
+ <th>
405
+ <?php $fifu['title']['fields']() ?>
406
+ </th>
407
+ <th>
408
+ <?php $fifu['fields']['video']() ?>
409
+ </th>
410
+ <th>
411
+ wp fifu woo --videos &lt;integer&gt;
412
+ </th>
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>
420
+ <?php $fifu['tab']['woo']() ?>
421
+ </th>
422
+ <th>
423
+ <?php $fifu['title']['category']() ?>
424
+ </th>
425
+ <th></th>
426
+ <th>
427
+ wp fifu woo --category-auto &lt;toggle&gt;
428
+ </th>
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>
436
+ <?php $fifu['tab']['woo']() ?>
437
+ </th>
438
+ <th>
439
+ <?php $fifu['title']['variable']() ?>
440
+ </th>
441
+ <th></th>
442
+ <th>
443
+ wp fifu woo --variable &lt;toggle&gt;
444
+ </th>
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>
452
+ <div id="tabs-2">
453
+ <table style="text-align:left">
454
+ <tr>
455
+ <th>
456
+ 1)
457
+ </th>
458
+ <th>
459
+ <a href="https://wp-cli.org/" target="_blank"><?php $fifu['cli']['documentation']['site']() ?></a>
460
+ </th>
461
+ </tr>
462
+ </table>
463
+ </div>
464
+ </div>
465
+
466
+ </div>
467
+
468
+ <br>
469
+ </div>
470
  </div>
471
  <div id="tabs-b">
472
  <div class="box">
960
  </form>
961
  </th>
962
  <th>
963
+ <?php $fifu['where']['cpt']() ?> <?php $fifu['hide']['exception']() ?>
964
  </th>
965
  </tr>
966
  </table>
2172
  <?php $fifu['slider']['thumb']() ?>
2173
  </th>
2174
  </tr>
2175
+ <tr>
2176
+ <th>
2177
+ <input
2178
+ type="submit"
2179
+ href="javascript:void(0)"
2180
+ id="fifu_toggle_slider_counter"
2181
+ name="fifu_toggle_slider_counter"
2182
+ class="toggleoff"
2183
+ value=""
2184
+ style="display:block;border:none">
2185
+ </th>
2186
+ <th>
2187
+ <?php $fifu['slider']['counter']() ?>
2188
+ </th>
2189
+ </tr>
2190
  <tr>
2191
  <th>
2192
  <input id="fifu_input_spinner_slider"
3143
  </div>
3144
  </div>
3145
  <div id="tabs-t">
3146
+ <div class="box">
3147
+ <table>
3148
+ <tr>
3149
+ <td style="border-bottom:none">2020-12-03</td>
3150
+ <td style="border-bottom:none"><h3> Rehub</h3></td>
3151
+ <td style="border-bottom:none">theme</td>
3152
+ </tr>
3153
+ </table>
3154
+ <div class="greybox" style="position: relative; top: -10px">
3155
+ Featured slider is too big for Rehub sticky bar:<br>
3156
+ 1) access "Appearance > Rehub > Customize > Additional CSS";<br>
3157
+ 2) add:<br>
3158
+ &nbsp;&nbsp;&nbsp;&nbsp;div.float-panel-woo-image > div.fifu-slider {max-width: 100px;}<br>
3159
+ 3) publish.<br>
3160
+ </div>
3161
+ </div>
3162
  <div class="box">
3163
  <table>
3164
  <tr>
admin/meta-box.php CHANGED
@@ -99,6 +99,14 @@ function fifu_remove_first_image($data, $postarr) {
99
  return str_replace($img, fifu_hide_media($img), $data);
100
  }
101
 
 
 
 
 
 
 
 
 
102
  add_action('save_post', 'fifu_save_properties');
103
 
104
  function fifu_save_properties($post_id) {
@@ -108,6 +116,9 @@ function fifu_save_properties($post_id) {
108
  if (isset($_POST['action']) && $_POST['action'] == 'woocommerce_do_ajax_product_import')
109
  return;
110
 
 
 
 
111
  $ignore = false;
112
  if (isset($_POST['fifu_ignore_auto_set']))
113
  $ignore = $_POST['fifu_ignore_auto_set'] == 'on';
99
  return str_replace($img, fifu_hide_media($img), $data);
100
  }
101
 
102
+ function fifu_has_properties() {
103
+ foreach ($_POST as $key => $value) {
104
+ if (strpos($key, 'fifu') !== false)
105
+ return true;
106
+ }
107
+ return false;
108
+ }
109
+
110
  add_action('save_post', 'fifu_save_properties');
111
 
112
  function fifu_save_properties($post_id) {
116
  if (isset($_POST['action']) && $_POST['action'] == 'woocommerce_do_ajax_product_import')
117
  return;
118
 
119
+ if (!fifu_has_properties())
120
+ return;
121
+
122
  $ignore = false;
123
  if (isset($_POST['fifu_ignore_auto_set']))
124
  $ignore = $_POST['fifu_ignore_auto_set'] == 'on';
admin/strings.php CHANGED
@@ -178,6 +178,9 @@ function fifu_get_strings_settings() {
178
  $fifu['title']['reset'] = function() {
179
  _e("Reset Settings", FIFU_SLUG);
180
  };
 
 
 
181
  $fifu['title']['height'] = function() {
182
  _e("Same Height", FIFU_SLUG);
183
  };
@@ -430,6 +433,38 @@ function fifu_get_strings_settings() {
430
  _e("The plugin adds a new column to your post list. Below you can choose the height (px) of the image in the column. To disable that, just uncheck \"FIFU\" in the Screen Options.", FIFU_SLUG);
431
  };
432
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  // fields
434
  $fifu['fields']['desc'] = function() {
435
  _e("Choose the number of fields in the product editor.", FIFU_SLUG);
@@ -568,6 +603,9 @@ function fifu_get_strings_settings() {
568
  $fifu['hide']['desc'] = function() {
569
  _e("Hide the featured media (image, video or slider) on posts but keeping its visibility on home.", FIFU_SLUG);
570
  };
 
 
 
571
 
572
  // hover
573
  $fifu['hover']['desc'] = function() {
@@ -927,6 +965,9 @@ function fifu_get_strings_settings() {
927
  $fifu['slider']['thumb'] = function() {
928
  _e("show thumbnails gallery", FIFU_SLUG);
929
  };
 
 
 
930
  $fifu['slider']['time'] = function() {
931
  _e("time between each transition (in ms)", FIFU_SLUG);
932
  };
178
  $fifu['title']['reset'] = function() {
179
  _e("Reset Settings", FIFU_SLUG);
180
  };
181
+ $fifu['title']['cli'] = function() {
182
+ _e("WP-CLI", FIFU_SLUG);
183
+ };
184
  $fifu['title']['height'] = function() {
185
  _e("Same Height", FIFU_SLUG);
186
  };
433
  _e("The plugin adds a new column to your post list. Below you can choose the height (px) of the image in the column. To disable that, just uncheck \"FIFU\" in the Screen Options.", FIFU_SLUG);
434
  };
435
 
436
+ // cli
437
+ $fifu['cli']['desc'] = function() {
438
+ _e("Configure FIFU via command line. More commands coming soon...", FIFU_SLUG);
439
+ };
440
+ $fifu['cli']['tab']['commands'] = function() {
441
+ _e("Commands", FIFU_SLUG);
442
+ };
443
+ $fifu['cli']['tab']['documentation'] = function() {
444
+ _e("Documentation", FIFU_SLUG);
445
+ };
446
+ $fifu['cli']['documentation']['site'] = function() {
447
+ _e("WP-CLI", FIFU_SLUG);
448
+ };
449
+ $fifu['cli']['column']['tab'] = function() {
450
+ _e("Tab", FIFU_SLUG);
451
+ };
452
+ $fifu['cli']['column']['section'] = function() {
453
+ _e("Section", FIFU_SLUG);
454
+ };
455
+ $fifu['cli']['column']['feature'] = function() {
456
+ _e("Feature", FIFU_SLUG);
457
+ };
458
+ $fifu['cli']['column']['option'] = function() {
459
+ _e("Option", FIFU_SLUG);
460
+ };
461
+ $fifu['cli']['column']['command'] = function() {
462
+ _e("Command", FIFU_SLUG);
463
+ };
464
+ $fifu['cli']['column']['eg'] = function() {
465
+ _e("e.g. (args)", FIFU_SLUG);
466
+ };
467
+
468
  // fields
469
  $fifu['fields']['desc'] = function() {
470
  _e("Choose the number of fields in the product editor.", FIFU_SLUG);
603
  $fifu['hide']['desc'] = function() {
604
  _e("Hide the featured media (image, video or slider) on posts but keeping its visibility on home.", FIFU_SLUG);
605
  };
606
+ $fifu['hide']['exception'] = function() {
607
+ _e("(except WooCommerce products)", FIFU_SLUG);
608
+ };
609
 
610
  // hover
611
  $fifu['hover']['desc'] = function() {
965
  $fifu['slider']['thumb'] = function() {
966
  _e("show thumbnails gallery", FIFU_SLUG);
967
  };
968
+ $fifu['slider']['counter'] = function() {
969
+ _e("show counter", FIFU_SLUG);
970
+ };
971
  $fifu['slider']['time'] = function() {
972
  _e("time between each transition (in ms)", FIFU_SLUG);
973
  };
featured-image-from-url.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
 
3
  /*
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.4
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
@@ -40,6 +40,9 @@ require_once (FIFU_ADMIN_DIR . '/strings.php');
40
 
41
  require_once (FIFU_ELEMENTOR_DIR . '/elementor-fifu-extension.php');
42
 
 
 
 
43
  register_activation_hook(__FILE__, 'fifu_activate');
44
 
45
  function fifu_activate($network_wide) {
1
  <?php
2
 
3
  /*
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
40
 
41
  require_once (FIFU_ELEMENTOR_DIR . '/elementor-fifu-extension.php');
42
 
43
+ if (defined('WP_CLI') && WP_CLI)
44
+ require_once (FIFU_ADMIN_DIR . '/cli-commands.php');
45
+
46
  register_activation_hook(__FILE__, 'fifu_activate');
47
 
48
  function fifu_activate($network_wide) {
includes/thumbnail.php CHANGED
@@ -159,6 +159,9 @@ function fifu_add_to_content($content) {
159
  }
160
 
161
  function fifu_should_hide() {
 
 
 
162
  return !is_front_page() && ((is_singular('post') && fifu_is_on('fifu_hide_post')) || (is_singular('page') && fifu_is_on('fifu_hide_page')) || (is_singular(get_post_type(get_the_ID())) && fifu_is_cpt() && fifu_is_on('fifu_hide_cpt')));
163
  }
164
 
159
  }
160
 
161
  function fifu_should_hide() {
162
+ if (class_exists('WooCommerce') && is_product())
163
+ return false;
164
+
165
  return !is_front_page() && ((is_singular('post') && fifu_is_on('fifu_hide_post')) || (is_singular('page') && fifu_is_on('fifu_hide_page')) || (is_singular(get_post_type(get_the_ID())) && fifu_is_cpt() && fifu_is_on('fifu_hide_cpt')));
166
  }
167
 
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.4
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -56,6 +56,7 @@ Use an external image as featured image of your post, page or custom post type.
56
 
57
  #### AUTOMATION
58
 
 
59
  * **[Premium]** WP All Import add-on
60
  * **[Premium]** WooCommerce import
61
  * **[Premium]** WP REST API
@@ -195,20 +196,20 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr and Publiti
195
 
196
  == Changelog ==
197
 
 
 
 
198
  = 3.4.4 =
199
  * New option: Reset Settings; deprecated: option to show the external images in the Media Library.
200
 
201
  = 3.4.3 =
202
  * 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.
203
 
204
- = 3.4.2 =
205
- * Fix: conflict with Yoast SEO plugin (FIFU will not add social tags when Yoast have a Facebook/Twitter image on post editor); fix: conflict with Jetpack plugin (FIFU was getting CDN images even when Jetpack performance settings were disabled).
206
-
207
  = others =
208
  * [more](https://fifu.app/changelog/)
209
 
210
 
211
  == Upgrade Notice ==
212
 
213
- = 3.4.4 =
214
- * New option: Reset Settings; deprecated: option to show the external images in the Media Library.
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
 
56
 
57
  #### AUTOMATION
58
 
59
+ * WP-CLI integration
60
  * **[Premium]** WP All Import add-on
61
  * **[Premium]** WooCommerce import
62
  * **[Premium]** WP REST API
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.