Featured Image From URL - Version 1.5.2

Version Description

  • Hide external featured media.

=

Download this release

Release Info

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

Code changes from version 1.5.1 to 1.5.2

admin/column.php CHANGED
@@ -20,7 +20,7 @@ function fifu_cat_column_content($internal_image, $column, $term_id) {
20
  if ($column == 'featured_image') {
21
  $url = get_term_meta($term_id, 'fifu_image_url', true);
22
  if ($url != '')
23
- echo sprintf('<img src="%s" width="100"/>', $url);
24
  } else
25
  echo $internal_image;
26
  }
@@ -30,6 +30,6 @@ function fifu_column_content($column, $post_id) {
30
  $url = get_post_meta($post_id, 'fifu_image_url', true);
31
  if ($url == '')
32
  $url = wp_get_attachment_url(get_post_thumbnail_id());
33
- echo sprintf('<img src="%s" width="100"/>', $url);
34
  }
35
  }
20
  if ($column == 'featured_image') {
21
  $url = get_term_meta($term_id, 'fifu_image_url', true);
22
  if ($url != '')
23
+ echo sprintf('<img src="%s" width="32"/>', $url);
24
  } else
25
  echo $internal_image;
26
  }
30
  $url = get_post_meta($post_id, 'fifu_image_url', true);
31
  if ($url == '')
32
  $url = wp_get_attachment_url(get_post_thumbnail_id());
33
+ echo sprintf('<img src="%s" width="32"/>', $url);
34
  }
35
  }
admin/html/js/menu.js CHANGED
@@ -11,76 +11,31 @@ function invert(id) {
11
  jQuery(function () {
12
  var url = window.location.href;
13
 
14
- jQuery("#fifu_form_woocommerce").submit(function () {
15
-
16
- var frm = jQuery("#fifu_form_woocommerce");
17
-
18
- jQuery.ajax({
19
- type: frm.attr('method'),
20
- url: url,
21
- data: frm.serialize(),
22
- success: function (data) {
23
- //alert('saved');
24
- }
25
- });
26
- });
27
-
28
- jQuery("#fifu_form_social").submit(function () {
29
-
30
- var frm = jQuery("#fifu_form_social");
31
-
32
- jQuery.ajax({
33
- type: frm.attr('method'),
34
- url: url,
35
- data: frm.serialize(),
36
- success: function (data) {
37
- //alert('saved');
38
- }
39
- });
40
- });
41
-
42
- jQuery("#fifu_form_content").submit(function () {
43
-
44
- var frm = jQuery("#fifu_form_content");
45
-
46
- jQuery.ajax({
47
- type: frm.attr('method'),
48
- url: url,
49
- data: frm.serialize(),
50
- success: function (data) {
51
- //alert('saved');
52
- }
53
- });
54
- });
55
-
56
- jQuery("#fifu_form_cpt").submit(function () {
57
-
58
- var frm = jQuery("#fifu_form_cpt");
59
-
60
- jQuery.ajax({
61
- type: frm.attr('method'),
62
- url: url,
63
- data: frm.serialize(),
64
- success: function (data) {
65
- //alert('saved');
66
- }
67
- });
68
- });
69
-
70
- jQuery("#fifu_form_hope").submit(function () {
71
-
72
- var frm = jQuery("#fifu_form_hope");
73
-
74
- jQuery.ajax({
75
- type: frm.attr('method'),
76
- url: url,
77
- data: frm.serialize(),
78
- success: function (data) {
79
- //alert('saved');
80
- }
81
  });
82
  });
83
 
84
  jQuery("#accordion").accordion();
85
  jQuery("#tabs").tabs();
 
 
 
 
 
86
  });
 
 
 
 
 
 
 
 
 
 
 
 
11
  jQuery(function () {
12
  var url = window.location.href;
13
 
14
+ //forms with id started by...
15
+ jQuery("form[id^=fifu_form]").each(function (i, el) {
16
+ //onsubmit
17
+ jQuery(this).submit(function () {
18
+ save(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  });
20
  });
21
 
22
  jQuery("#accordion").accordion();
23
  jQuery("#tabs").tabs();
24
+ jQuery("#fifu_input_spinner_image").spinner({min: 0});
25
+ jQuery("#fifu_input_spinner_video").spinner({min: 0});
26
+ jQuery("#fifu_input_spinner_slider").spinner({min: 0});
27
+ jQuery("#fifu_input_slider_speed").spinner({min: 0});
28
+ jQuery("#fifu_input_slider_pause").spinner({min: 0});
29
  });
30
+
31
+ function save(formName, url) {
32
+ var frm = jQuery(formName);
33
+ jQuery.ajax({
34
+ type: frm.attr('method'),
35
+ url: url,
36
+ data: frm.serialize(),
37
+ success: function (data) {
38
+ //alert('saved');
39
+ }
40
+ });
41
+ }
admin/html/menu.html CHANGED
@@ -3,12 +3,14 @@
3
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css">
4
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
5
  <div class="wrap">
 
6
  <div class="box">
7
  <h1>Featured Image From URL</h1>
8
  <div class="fifubox" style="background:#e3ffe2">Free feature</div>
9
  <div class="fifubox" style="background:#ffe2e2">Premium feature</div>
10
  <div class="fifubox" style="background:#ffffbc">Depends on WooCommerce Version</div>
11
  </div>
 
12
  <div class="box">
13
  <h2>Custom Post Types</h2>
14
  <div class="greybox" style="background:#e3ffe2">
@@ -29,6 +31,7 @@
29
  <input type="submit" value="Submit" >
30
  </form>
31
  </div>
 
32
  <div class="box">
33
  <h2>Social Tags</h2>
34
  <div class="greybox" style="background:#e3ffe2">
@@ -55,7 +58,8 @@
55
  name="fifu_input_social"
56
  value="" >
57
  </form>
58
- </div>
 
59
  <div class="box">
60
  <h2>Featured Image in Content</h2>
61
  <div class="greybox" style="background:#e3ffe2">
@@ -83,6 +87,70 @@
83
  value="" >
84
  </form>
85
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  <div class="box">
87
  <h2>"This Plugin Doesn't Work, Man!"</h2>
88
  <div class="greybox" style="background:#e3ffe2">
@@ -110,6 +178,7 @@
110
  value="" >
111
  </form>
112
  </div>
 
113
  <div class="box">
114
  <h2>WooCommerce Full Integration</h2>
115
  <div class="greybox" style="background:#ffffbc">
@@ -150,8 +219,9 @@
150
  value="" >
151
  </form>
152
  </div>
 
153
  <div class="box">
154
- <h2><a href="https://www.flickr.com/"><font color="#007ee5">flick</font><font color="#ff0084">r</font></a> Integration (External Thumbnails): Your Website Faster Than Ever</h2>
155
  <div class="greybox" style="background:#ffe2e2">
156
  <b>Premium feature</b><br><br>
157
  <div id="accordion">
@@ -181,6 +251,23 @@
181
  </div>
182
  <h3>Choose the maximum image size for each screen</h3>
183
  <table style="text-align:left">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  <tr>
185
  <th>Cart:&nbsp;</th>
186
  <th>
@@ -321,22 +408,98 @@
321
  <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a> (site loaded 93% faster due external thumbnails feature)
322
  </div>
323
  </div>
 
324
  <div class="box">
325
- <h2>External Featured Videos</h2>
326
- <div class="greybox" style="background:#ffe2e2">
327
- <b>Premium feature</b><br><br>
328
- Allows you to use an external video from YouTube instead of a featured image.<br><br>
329
- <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a>
330
- </div>
331
- </div>
332
- <div class="box">
333
- <h2>Slider</h2>
334
  <div class="greybox" style="background:#ffe2e2">
335
  <b>Premium feature</b><br><br>
336
- You can use a slider of external images as featured image.<br><br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a>
338
  </div>
339
  </div>
 
340
  <div class="box">
341
  <h2>CSS Style</h2>
342
  <div class="greybox" style="background:#ffe2e2">
@@ -348,6 +511,7 @@
348
  <input id="fifu_input_css" type="text" name="fifu_input_css" style="width:675px">
349
  <input type="submit" value="Submit" disabled>
350
  </div>
 
351
  <div class="box">
352
  <h2>Hover Effects</h2>
353
  <div class="greybox" style="background:#ffe2e2">
@@ -379,24 +543,261 @@
379
  </select>
380
  <input type="submit" value="Submit" disabled>
381
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  <div class="box">
383
  <h2>Help</h2>
384
  <div class="greybox">
385
  Featured Image From URL plugin allows you to use an external image (from anywhere) as Featured Image of your Post, Page or Custom Post Type, such as WooCommerce Product. For WooCommerce users, it's also possible to use external images in the Product Category and Product Gallery. All included content still has social tags to facilitate sharing on social networks. And it's compatible with WP All Import, a3 Lazy Load and Sirv plugins. For more information, refer to <a href="https://wordpress.org/plugins/featured-image-from-url/faq/" target="_blank">FAQ</a> and <a href="https://wordpress.org/plugins/featured-image-from-url/screenshots/" target="_blank">screenshots</a>.
386
  </div>
387
  </div>
 
388
  <div class="box">
389
  <h2>Give This Plugin a 5-Star Rating</h2>
390
  <div class="greybox">
391
  Do you really love Featured Image From URL? So give this plugin a 5-star <a href="https://wordpress.org/support/view/plugin-reviews/featured-image-from-url?filter=5" target="_blank">rating</a>.
392
  </div>
393
  </div>
 
394
  <div class="box">
395
  <h2>Report a Bug or Suggest an Improvement</h2>
396
  <div class="greybox">
397
  Bug reports and suggestions for improvement are always welcome. Just send an email to <a href="mailto:marceljmachado@gmail.com">marceljmachado@gmail.com</a> and your request can be available in the next release.
398
  </div>
399
  </div>
 
400
  <div class="box">
401
  <h2>About Premium Version</h2>
402
  <div class="greybox">
@@ -484,6 +885,7 @@
484
  </div>
485
  </div>
486
  </div>
 
487
  <div class="box">
488
  <h2>About The Author</h2>
489
  <div class="greybox">
3
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css">
4
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
5
  <div class="wrap">
6
+
7
  <div class="box">
8
  <h1>Featured Image From URL</h1>
9
  <div class="fifubox" style="background:#e3ffe2">Free feature</div>
10
  <div class="fifubox" style="background:#ffe2e2">Premium feature</div>
11
  <div class="fifubox" style="background:#ffffbc">Depends on WooCommerce Version</div>
12
  </div>
13
+
14
  <div class="box">
15
  <h2>Custom Post Types</h2>
16
  <div class="greybox" style="background:#e3ffe2">
31
  <input type="submit" value="Submit" >
32
  </form>
33
  </div>
34
+
35
  <div class="box">
36
  <h2>Social Tags</h2>
37
  <div class="greybox" style="background:#e3ffe2">
58
  name="fifu_input_social"
59
  value="" >
60
  </form>
61
+ </div>
62
+
63
  <div class="box">
64
  <h2>Featured Image in Content</h2>
65
  <div class="greybox" style="background:#e3ffe2">
87
  value="" >
88
  </form>
89
  </div>
90
+
91
+ <div class="box">
92
+ <h2>Hide Featured Media</h2>
93
+ <div class="greybox" style="background:#e3ffe2">
94
+ <b>Free feature</b><br><br>
95
+ Enable the toggle if you want to hide the external featured image/video/slider on posts/pages but keeping its visibility on home.
96
+ </div>
97
+ <br>
98
+ <table style="text-align:left">
99
+ <tr>
100
+ <th>
101
+ <form
102
+ id="fifu_form_hide_page"
103
+ action="javascript:void(0)"
104
+ method="post">
105
+ <input
106
+ type="image"
107
+ href="javascript:void(0)"
108
+ id="fifu_toggle_hide_page"
109
+ onclick="invert('hide_page')"
110
+ name="fifu_toggle_hide_page"
111
+ class="<?php echo $enable_hide_page; ?>"
112
+ value=" ">
113
+
114
+ <input
115
+ type="hidden"
116
+ id="fifu_input_hide_page"
117
+ name="fifu_input_hide_page"
118
+ value="" >
119
+ </form>
120
+ </th>
121
+ <th>
122
+ page
123
+ </th>
124
+ </tr>
125
+ <tr>
126
+ <th>
127
+ <form
128
+ id="fifu_form_hide_post"
129
+ action="javascript:void(0)"
130
+ method="post">
131
+ <input
132
+ type="image"
133
+ href="javascript:void(0)"
134
+ id="fifu_toggle_hide_post"
135
+ onclick="invert('hide_post')"
136
+ name="fifu_toggle_hide_post"
137
+ class="<?php echo $enable_hide_post; ?>"
138
+ value=" ">
139
+
140
+ <input
141
+ type="hidden"
142
+ id="fifu_input_hide_post"
143
+ name="fifu_input_hide_post"
144
+ value="" >
145
+ </form>
146
+ </th>
147
+ <th>
148
+ post
149
+ </th>
150
+ </tr>
151
+ </table>
152
+ </div>
153
+
154
  <div class="box">
155
  <h2>"This Plugin Doesn't Work, Man!"</h2>
156
  <div class="greybox" style="background:#e3ffe2">
178
  value="" >
179
  </form>
180
  </div>
181
+
182
  <div class="box">
183
  <h2>WooCommerce Full Integration</h2>
184
  <div class="greybox" style="background:#ffffbc">
219
  value="" >
220
  </form>
221
  </div>
222
+
223
  <div class="box">
224
+ <h2><a href="https://www.flickr.com/">Flickr</a> Integration (External Thumbnails): Your Website Faster Than Ever</h2>
225
  <div class="greybox" style="background:#ffe2e2">
226
  <b>Premium feature</b><br><br>
227
  <div id="accordion">
251
  </div>
252
  <h3>Choose the maximum image size for each screen</h3>
253
  <table style="text-align:left">
254
+ <tr>
255
+ <th>Archive:&nbsp;</th>
256
+ <th>
257
+ <select id="select_flickr_arch" style="font-family:courier;font-size:12px">
258
+ <option value=""></option>
259
+ <option value="s">&nbsp; 75 x 75</option>
260
+ <option value="q">&nbsp;150 x 150</option>
261
+ <option value="t">&nbsp;100&nbsp;on longest side</option>
262
+ <option value="m">&nbsp;240&nbsp;on longest side</option>
263
+ <option value="n">&nbsp;320&nbsp;on longest side</option>
264
+ <option value="-">&nbsp;500&nbsp;on longest side</option>
265
+ <option value="z">&nbsp;640&nbsp;on longest side</option>
266
+ <option value="c">&nbsp;800&nbsp;on longest side</option>
267
+ <option value="b">1024&nbsp;on longest side</option>
268
+ </select>
269
+ </th>
270
+ </tr>
271
  <tr>
272
  <th>Cart:&nbsp;</th>
273
  <th>
408
  <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a> (site loaded 93% faster due external thumbnails feature)
409
  </div>
410
  </div>
411
+
412
  <div class="box">
413
+ <h2>Slider Settings</h2>
 
 
 
 
 
 
 
 
414
  <div class="greybox" style="background:#ffe2e2">
415
  <b>Premium feature</b><br><br>
416
+ Once you have added the first external image on a post/page/product, the slider meta box will show up. Adding more external images, you have a slider and you can define its settings here.<br><br>
417
+ <table style="text-align:left">
418
+ <tr>
419
+ <th>
420
+ <input
421
+ type="image"
422
+ href="javascript:void(0)"
423
+ id="fifu_toggle_slider_fade"
424
+ name="fifu_toggle_slider_fade"
425
+ class="toggleoff"
426
+ value=" ">
427
+ </th>
428
+ <th>
429
+ fade effect
430
+ </th>
431
+ </tr>
432
+ <tr>
433
+ <th>
434
+ <input
435
+ type="image"
436
+ href="javascript:void(0)"
437
+ id="fifu_toggle_slider_stop"
438
+ name="fifu_toggle_slider_stop"
439
+ class="toggleoff"
440
+ value=" ">
441
+ </th>
442
+ <th>
443
+ pause autoplay on hover
444
+ </th>
445
+ </tr>
446
+ <tr>
447
+ <th>
448
+ <input
449
+ type="image"
450
+ href="javascript:void(0)"
451
+ id="fifu_toggle_slider_ctrl"
452
+ name="fifu_toggle_slider_ctrl"
453
+ class="toggleoff"
454
+ value=" ">
455
+ </th>
456
+ <th>
457
+ show prev/next buttons
458
+ </th>
459
+ </tr>
460
+ <tr>
461
+ <th>
462
+ <input
463
+ type="image"
464
+ href="javascript:void(0)"
465
+ id="fifu_toggle_slider_auto"
466
+ name="fifu_toggle_slider_auto"
467
+ class="toggleoff"
468
+ value=" ">
469
+ </th>
470
+ <th>
471
+ start to play automatically
472
+ </th>
473
+ </tr>
474
+ <tr>
475
+ <th>
476
+ <input id="fifu_input_slider_pause"
477
+ name="fifu_input_slider_pause"
478
+ step="500"
479
+ size="4">
480
+ </th>
481
+ <th>
482
+ time between each transition (in ms)
483
+ </th>
484
+ </tr>
485
+ <tr>
486
+ <th>
487
+ <input id="fifu_input_slider_speed"
488
+ name="fifu_input_slider_speed"
489
+ step="500"
490
+ max="2000"
491
+ size="4">
492
+ </th>
493
+ <th>
494
+ transition duration (in ms)
495
+ </th>
496
+ </tr>
497
+ </table>
498
+
499
  <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a>
500
  </div>
501
  </div>
502
+
503
  <div class="box">
504
  <h2>CSS Style</h2>
505
  <div class="greybox" style="background:#ffe2e2">
511
  <input id="fifu_input_css" type="text" name="fifu_input_css" style="width:675px">
512
  <input type="submit" value="Submit" disabled>
513
  </div>
514
+
515
  <div class="box">
516
  <h2>Hover Effects</h2>
517
  <div class="greybox" style="background:#ffe2e2">
543
  </select>
544
  <input type="submit" value="Submit" disabled>
545
  </div>
546
+
547
+ <div class="box">
548
+ <h2>Meta boxes: External Galleries and Slider</h2>
549
+ <div class="greybox" style="background:#ffe2e2">
550
+ <b>Premium feature</b><br><br>
551
+ Here you can define the number of fields you will have on the editor for galleries and slider. A huge amount of fields can interfere in the save action time.<br><br>
552
+ <table style="text-align:left">
553
+ <tr>
554
+ <th>
555
+ <label for="fifu_input_spinner_image"
556
+ placehold>External Image Gallery:</label>
557
+ </th>
558
+ <th>
559
+ <input id="fifu_input_spinner_image"
560
+ name="fifu_input_spinner_image"
561
+ size="4">
562
+ </th>
563
+ </tr>
564
+ <tr>
565
+ <th>
566
+ <label for="fifu_input_spinner_video">External Video Gallery:</label>
567
+ </th>
568
+ <th>
569
+ <input id="fifu_input_spinner_video"
570
+ name="fifu_input_spinner_video"
571
+ size="4">
572
+ </th>
573
+ </tr>
574
+ <tr>
575
+ <th>
576
+ <label for="fifu_input_spinner_slider">Slider:</label>
577
+ </th>
578
+ <th>
579
+ <input id="fifu_input_spinner_slider"
580
+ name="fifu_input_spinner_slider"
581
+ size="4">
582
+ </th>
583
+ </tr>
584
+ </table>
585
+ </div>
586
+ <br>
587
+ <input type="submit" value="Submit" disabled>
588
+ </div>
589
+
590
+ <div class="box">
591
+ <h2>External Featured Videos</h2>
592
+ <div class="greybox" style="background:#ffe2e2">
593
+ <b>Premium feature</b><br><br>
594
+ The default value applied to the videos is "100%" and it usually works fine. However, here you can define the max size (px, cm etc) of the featured videos at different screens and the ratio for these videos as well.<br><br>
595
+ <table style="text-align:left">
596
+ <tr>
597
+ <th>
598
+ Ratio:
599
+ </th>
600
+ <th>
601
+ <input id="fifu_input_video_width_rtio"
602
+ style="border: 1px solid black;"
603
+ name="fifu_input_video_width_rtio"
604
+ size="4">
605
+ </th>
606
+ <th>
607
+ <input id="fifu_input_video_height_rtio"
608
+ style="border: 1px solid black;"
609
+ name="fifu_input_video_height_rtio"
610
+ size="4">
611
+ </th>
612
+ <th>
613
+ <div style="font-style: italic;font-weight:normal;">e.g.: 1, 2, 3...</div>
614
+ </th>
615
+ </tr>
616
+ <tr>
617
+ <th>
618
+ Archive:
619
+ </th>
620
+ <th>
621
+ <input id="fifu_input_video_width_arch"
622
+ name="fifu_input_video_width_arch"
623
+ placeholder="max-width"
624
+ size="4">
625
+ </th>
626
+ <th>
627
+ <input id="fifu_input_video_height_arch"
628
+ name="fifu_input_video_height_arch"
629
+ placeholder="max-height"
630
+ size="4">
631
+ </th>
632
+ <th>
633
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
634
+ </th>
635
+ </tr>
636
+ <tr>
637
+ <th>
638
+ Category:
639
+ </th>
640
+ <th>
641
+ <input id="fifu_input_video_width_ctgr"
642
+ name="fifu_input_video_width_ctgr"
643
+ placeholder="max-width"
644
+ size="4">
645
+ </th>
646
+ <th>
647
+ <input id="fifu_input_video_height_ctgr"
648
+ name="fifu_input_video_height_ctgr"
649
+ placeholder="max-height"
650
+ size="4">
651
+ </th>
652
+ <th>
653
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
654
+ </th>
655
+ </tr>
656
+ <tr>
657
+ <th>
658
+ Home:
659
+ </th>
660
+ <th>
661
+ <input id="fifu_input_video_width_home"
662
+ name="fifu_input_video_width_home"
663
+ placeholder="max-width"
664
+ size="4">
665
+ </th>
666
+ <th>
667
+ <input id="fifu_input_video_height_home"
668
+ name="fifu_input_video_height_home"
669
+ placeholder="max-height"
670
+ size="4">
671
+ </th>
672
+ <th>
673
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
674
+ </th>
675
+ </tr>
676
+ <tr>
677
+ <th>
678
+ Page:
679
+ </th>
680
+ <th>
681
+ <input id="fifu_input_video_width_page"
682
+ name="fifu_input_video_width_page"
683
+ placeholder="max-width"
684
+ size="4">
685
+ </th>
686
+ <th>
687
+ <input id="fifu_input_video_height_page"
688
+ name="fifu_input_video_height_page"
689
+ placeholder="max-height"
690
+ size="4">
691
+ </th>
692
+ <th>
693
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
694
+ </th>
695
+ </tr>
696
+ <tr>
697
+ <th>
698
+ Post:
699
+ </th>
700
+ <th>
701
+ <input id="fifu_input_video_width_post"
702
+ name="fifu_input_video_width_post"
703
+ placeholder="max-width"
704
+ size="4">
705
+ </th>
706
+ <th>
707
+ <input id="fifu_input_video_height_post"
708
+ name="fifu_input_video_height_post"
709
+ placeholder="max-height"
710
+ size="4">
711
+ </th>
712
+ <th>
713
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
714
+ </th>
715
+ </tr>
716
+ <tr>
717
+ <th>
718
+ Product:
719
+ </th>
720
+ <th>
721
+ <input id="fifu_input_video_width_prod"
722
+ name="fifu_input_video_width_prod"
723
+ placeholder="max-width"
724
+ size="4">
725
+ </th>
726
+ <th>
727
+ <input id="fifu_input_video_height_prod"
728
+ name="fifu_input_video_height_prod"
729
+ placeholder="max-height"
730
+ size="4">
731
+ </th>
732
+ <th>
733
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
734
+ </th>
735
+ </tr>
736
+ <tr>
737
+ <th>
738
+ Shop:
739
+ </th>
740
+ <th>
741
+ <input id="fifu_input_video_width_shop"
742
+ name="fifu_input_video_width_shop"
743
+ placeholder="max-width"
744
+ size="4">
745
+ </th>
746
+ <th>
747
+ <input id="fifu_input_video_height_shop"
748
+ name="fifu_input_video_height_shop"
749
+ placeholder="max-height"
750
+ size="4">
751
+ </th>
752
+ <th>
753
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
754
+ </th>
755
+ </tr>
756
+ </table>
757
+ <br>
758
+ <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a>
759
+ </div>
760
+ <br>
761
+ <input type="submit" value="Submit" disabled>
762
+ </div>
763
+
764
+ <div class="box">
765
+ <h2>WooCommerce Lightbox</h2>
766
+ <div class="greybox" style="background:#ffe2e2">
767
+ <b>Premium feature</b><br><br>
768
+ You can enable/disable the WooCommerce lightbox here.<br><br>
769
+ </div>
770
+ <br>
771
+ <input
772
+ type="image"
773
+ href="javascript:void(0)"
774
+ id="fifu_toggle_wc_lbox"
775
+ name="fifu_toggle_wc_lbox"
776
+ class="toggleoff"
777
+ value=" ">
778
+ </div>
779
+
780
  <div class="box">
781
  <h2>Help</h2>
782
  <div class="greybox">
783
  Featured Image From URL plugin allows you to use an external image (from anywhere) as Featured Image of your Post, Page or Custom Post Type, such as WooCommerce Product. For WooCommerce users, it's also possible to use external images in the Product Category and Product Gallery. All included content still has social tags to facilitate sharing on social networks. And it's compatible with WP All Import, a3 Lazy Load and Sirv plugins. For more information, refer to <a href="https://wordpress.org/plugins/featured-image-from-url/faq/" target="_blank">FAQ</a> and <a href="https://wordpress.org/plugins/featured-image-from-url/screenshots/" target="_blank">screenshots</a>.
784
  </div>
785
  </div>
786
+
787
  <div class="box">
788
  <h2>Give This Plugin a 5-Star Rating</h2>
789
  <div class="greybox">
790
  Do you really love Featured Image From URL? So give this plugin a 5-star <a href="https://wordpress.org/support/view/plugin-reviews/featured-image-from-url?filter=5" target="_blank">rating</a>.
791
  </div>
792
  </div>
793
+
794
  <div class="box">
795
  <h2>Report a Bug or Suggest an Improvement</h2>
796
  <div class="greybox">
797
  Bug reports and suggestions for improvement are always welcome. Just send an email to <a href="mailto:marceljmachado@gmail.com">marceljmachado@gmail.com</a> and your request can be available in the next release.
798
  </div>
799
  </div>
800
+
801
  <div class="box">
802
  <h2>About Premium Version</h2>
803
  <div class="greybox">
885
  </div>
886
  </div>
887
  </div>
888
+
889
  <div class="box">
890
  <h2>About The Author</h2>
891
  <div class="greybox">
admin/html/meta-box.html CHANGED
@@ -45,4 +45,25 @@
45
  style="<?php echo $show_sirv?>">Choose Sirv image</a>
46
 
47
  <hr>
48
- <p style="border: 1px solid red; padding: 25px;"><b><a href="http://fifu.marceljm.com/" targe="_blank">Featured Image From URL Premium</a></b> supports <b>WooCommerce 3.0.X</b> now.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  style="<?php echo $show_sirv?>">Choose Sirv image</a>
46
 
47
  <hr>
48
+
49
+ <p style="border: 1px solid green; padding: 5px;">New Features 06/2017</p>
50
+ <table style="text-align:left; font-weight: normal; font-size: 10px">
51
+ <tr>
52
+ <th>-Free: Hide featured media on page/post</th>
53
+ </th>
54
+ <tr>
55
+ <th>-Premium: Video ratio/resize</th>
56
+ </th>
57
+ <tr>
58
+ <th>-Premium: Slider settings</th>
59
+ </th>
60
+ <tr>
61
+ <th>-Premium: Unlimited galleries/slider</th>
62
+ </th>
63
+ <tr>
64
+ <th>-Premium: WooCommerce 3 compatibility</th>
65
+ </th>
66
+ <tr>
67
+ <th>-Premium: Disable WooCommerce Lightbox</th>
68
+ </th>
69
+ </table>
admin/menu.php CHANGED
@@ -17,6 +17,8 @@ function fifu_get_menu_html() {
17
  $enable_social = get_option('fifu_social');
18
  $enable_content = get_option('fifu_content');
19
  $enable_hope = get_option('fifu_hope');
 
 
20
 
21
  $array_cpt = array();
22
  for ($x = 0; $x <= 4; $x++)
@@ -55,6 +57,8 @@ function fifu_get_menu_settings() {
55
  fifu_get_setting('fifu_social');
56
  fifu_get_setting('fifu_content');
57
  fifu_get_setting('fifu_hope');
 
 
58
 
59
  for ($x = 0; $x <= 4; $x++)
60
  fifu_get_setting('fifu_cpt' . $x);
@@ -76,6 +80,8 @@ function fifu_update_menu_options() {
76
  fifu_update_option('fifu_input_social', 'fifu_social');
77
  fifu_update_option('fifu_input_content', 'fifu_content');
78
  fifu_update_option('fifu_input_hope', 'fifu_hope');
 
 
79
 
80
  for ($x = 0; $x <= 4; $x++)
81
  fifu_update_option('fifu_input_cpt' . $x, 'fifu_cpt' . $x);
17
  $enable_social = get_option('fifu_social');
18
  $enable_content = get_option('fifu_content');
19
  $enable_hope = get_option('fifu_hope');
20
+ $enable_hide_page = get_option('fifu_hide_page');
21
+ $enable_hide_post = get_option('fifu_hide_post');
22
 
23
  $array_cpt = array();
24
  for ($x = 0; $x <= 4; $x++)
57
  fifu_get_setting('fifu_social');
58
  fifu_get_setting('fifu_content');
59
  fifu_get_setting('fifu_hope');
60
+ fifu_get_setting('fifu_hide_page');
61
+ fifu_get_setting('fifu_hide_post');
62
 
63
  for ($x = 0; $x <= 4; $x++)
64
  fifu_get_setting('fifu_cpt' . $x);
80
  fifu_update_option('fifu_input_social', 'fifu_social');
81
  fifu_update_option('fifu_input_content', 'fifu_content');
82
  fifu_update_option('fifu_input_hope', 'fifu_hope');
83
+ fifu_update_option('fifu_input_hide_page', 'fifu_hide_page');
84
+ fifu_update_option('fifu_input_hide_post', 'fifu_hide_post');
85
 
86
  for ($x = 0; $x <= 4; $x++)
87
  fifu_update_option('fifu_input_cpt' . $x, 'fifu_cpt' . $x);
featured-image-from-url.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * Description: Allows to use an external image as Featured Image of your post, page or Custom Post Type, such as WooCommerce Product (supports Product Gallery also).
6
- * Version: 1.5.1
7
  * Author: Marcel Jacques Machado
8
  * Author URI: http://marceljm.com/wordpress/featured-image-from-url-premium/
9
  */
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * Description: Allows to use an external image as Featured Image of your post, page or Custom Post Type, such as WooCommerce Product (supports Product Gallery also).
6
+ * Version: 1.5.2
7
  * Author: Marcel Jacques Machado
8
  * Author URI: http://marceljm.com/wordpress/featured-image-from-url-premium/
9
  */
includes/thumbnail.php CHANGED
@@ -54,9 +54,9 @@ function fifu_replace($html, $post_id) {
54
  function fifu_get_html($url, $alt) {
55
  include_once(ABSPATH . 'wp-admin/includes/plugin.php');
56
  if (is_plugin_active('sirv/sirv.php') && strpos($url, "sirv.com") !== false)
57
- return sprintf('<!-- Featured Image From URL plugin --> <img class="Sirv" data-src="%s"></img>', $url);
58
 
59
- return sprintf('<!-- Featured Image From URL plugin --> <img src="%s" alt="%s"></img>', $url, $alt);
60
  }
61
 
62
  add_filter('the_content', 'fifu_add_to_content');
@@ -72,9 +72,7 @@ add_filter('wp_get_attachment_url', 'fifu_replace_attachment_url', 10, 2);
72
 
73
  function fifu_replace_attachment_url($att_url, $att_id) {
74
  if (get_option('fifu_attachment_id') == $att_id) {
75
- if (is_admin())
76
- $att_url = '/wp-content/plugins/featured-image-from-url/admin/images/fifu-text.jpg';
77
- else {
78
  $url = get_post_meta(get_the_ID(), 'fifu_image_url', true);
79
  if ($url)
80
  $att_url = $url;
@@ -99,3 +97,7 @@ function fifu_replace_attachment_image_src($image, $attachment_id) {
99
  }
100
  return $image;
101
  }
 
 
 
 
54
  function fifu_get_html($url, $alt) {
55
  include_once(ABSPATH . 'wp-admin/includes/plugin.php');
56
  if (is_plugin_active('sirv/sirv.php') && strpos($url, "sirv.com") !== false)
57
+ return sprintf('<!-- Featured Image From URL plugin --> <img class="Sirv" data-src="%s">', $url);
58
 
59
+ return sprintf('<!-- Featured Image From URL plugin --> <img src="%s" alt="%s" style="%s">', $url, $alt, fifu_should_hide() ? 'display:none' : '');
60
  }
61
 
62
  add_filter('the_content', 'fifu_add_to_content');
72
 
73
  function fifu_replace_attachment_url($att_url, $att_id) {
74
  if (get_option('fifu_attachment_id') == $att_id) {
75
+ if (!is_admin()) {
 
 
76
  $url = get_post_meta(get_the_ID(), 'fifu_image_url', true);
77
  if ($url)
78
  $att_url = $url;
97
  }
98
  return $image;
99
  }
100
+
101
+ function fifu_should_hide() {
102
+ return ((is_singular('post') && get_option('fifu_hide_post') == 'toggleon') || (is_singular('page') && get_option('fifu_hide_page') == 'toggleon'));
103
+ }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: marceljm
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8BLDLZ3HDBGQG
4
  Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, 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, featured video, hover, effects, hover effects, sirv, wp all import, css, style, slider, thumbnail, social, network, wp all import
5
  Requires at least: 4.0
6
- Tested up to: 4.7.5
7
- Stable tag: 4.7.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -284,6 +284,9 @@ was removed. To finish, a Premium version is now been presented.
284
  = 1.5.1 =
285
  * Genesis Framework integration, external JS minification and WooCommerce 3 note.
286
 
 
 
 
287
  == Upgrade Notice ==
288
 
289
  = 1.0 =
@@ -393,4 +396,7 @@ was removed. To finish, a Premium version is now been presented.
393
  * Social tags toggle.
394
 
395
  = 1.5.1 =
396
- * Genesis Framework integration, external JS minification and WooCommerce 3 note.
 
 
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8BLDLZ3HDBGQG
4
  Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, 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, featured video, hover, effects, hover effects, sirv, wp all import, css, style, slider, thumbnail, social, network, wp all import
5
  Requires at least: 4.0
6
+ Tested up to: 4.8
7
+ Stable tag: 4.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
284
  = 1.5.1 =
285
  * Genesis Framework integration, external JS minification and WooCommerce 3 note.
286
 
287
+ = 1.5.2 =
288
+ * Hide external featured media.
289
+
290
  == Upgrade Notice ==
291
 
292
  = 1.0 =
396
  * Social tags toggle.
397
 
398
  = 1.5.1 =
399
+ * Genesis Framework integration, external JS minification and WooCommerce 3 note.
400
+
401
+ = 1.5.2 =
402
+ * Hide external featured media.