Featured Image From URL - Version 1.5.5

Version Description

  • URL field isn't hidden anymore.

=

Download this release

Release Info

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

Code changes from version 1.5.4 to 1.5.5

admin/category.php CHANGED
@@ -14,7 +14,7 @@ function fifu_cat_show_box($term) {
14
  $alt = get_term_meta($term->term_id, 'fifu_image_alt', true);
15
 
16
  if ($url)
17
- $show_url = $show_button = $show_sirv = 'display:none;';
18
  else {
19
  $show_alt = $show_image = $show_link = 'display:none;';
20
  $show_sirv = ($is_sirv_active ? '' : 'display:none;');
@@ -34,4 +34,3 @@ function fifu_cat_save_properties($term_id) {
34
  if (isset($_POST['fifu_input_alt']))
35
  update_term_meta($term_id, 'fifu_image_alt', wp_strip_all_tags($_POST['fifu_input_alt']));
36
  }
37
-
14
  $alt = get_term_meta($term->term_id, 'fifu_image_alt', true);
15
 
16
  if ($url)
17
+ $show_button = $show_sirv = 'display:none;';
18
  else {
19
  $show_alt = $show_image = $show_link = 'display:none;';
20
  $show_sirv = ($is_sirv_active ? '' : 'display:none;');
34
  if (isset($_POST['fifu_input_alt']))
35
  update_term_meta($term_id, 'fifu_image_alt', wp_strip_all_tags($_POST['fifu_input_alt']));
36
  }
 
admin/html/js/meta-box.js CHANGED
@@ -7,7 +7,6 @@ function removeImage() {
7
  jQuery("#fifu_input_alt").val("");
8
  jQuery("#fifu_input_url").val("");
9
 
10
- jQuery("#fifu_input_url").show();
11
  jQuery("#fifu_button").show();
12
 
13
  if (jQuery("#sirv-add-featured-image").attr("active"))
@@ -18,7 +17,6 @@ function previewImage() {
18
  var $url = jQuery("#fifu_input_url").val();
19
 
20
  if ($url) {
21
- jQuery("#fifu_input_url").hide();
22
  jQuery("#fifu_button").hide();
23
  jQuery("#sirv-add-featured-image").hide();
24
 
7
  jQuery("#fifu_input_alt").val("");
8
  jQuery("#fifu_input_url").val("");
9
 
 
10
  jQuery("#fifu_button").show();
11
 
12
  if (jQuery("#sirv-add-featured-image").attr("active"))
17
  var $url = jQuery("#fifu_input_url").val();
18
 
19
  if ($url) {
 
20
  jQuery("#fifu_button").hide();
21
  jQuery("#sirv-add-featured-image").hide();
22
 
admin/html/live-preview.html DELETED
@@ -1,6 +0,0 @@
1
- <style><?php include 'css/blink.css' ?></style>
2
-
3
- <a id="fifu_slider"
4
- class="blink_me"
5
- href="http://fifu.marceljm.com/"
6
- style="" >Live preview</a>
 
 
 
 
 
 
admin/html/menu.html CHANGED
@@ -120,33 +120,6 @@
120
  </form>
121
  </div>
122
 
123
- <div class="box">
124
- <h2>Social Tags</h2>
125
- <div class="greybox" style="background:#e3ffe2">
126
- Featured Image from URL provides social tags to share the external images on the social networks. Here you can enable/disable this feature.
127
- </div>
128
- <br>
129
- <form
130
- id="fifu_form_social"
131
- action="javascript:void(0)"
132
- method="post">
133
- <input
134
- type="image"
135
- href="javascript:void(0)"
136
- id="fifu_toggle_social"
137
- onclick="invert('social')"
138
- name="fifu_toggle_social"
139
- class="<?php echo $enable_social; ?>"
140
- value=" "
141
- style="display:block">
142
- <input
143
- type="hidden"
144
- id="fifu_input_social"
145
- name="fifu_input_social"
146
- value="" >
147
- </form>
148
- </div>
149
-
150
  <div class="box">
151
  <h2>Featured Image in Content</h2>
152
  <div class="greybox" style="background:#e3ffe2">
@@ -237,58 +210,245 @@
237
  </div>
238
 
239
  <div class="box">
240
- <h2>"This Plugin Doesn't Work, Man!"</h2>
241
  <div class="greybox" style="background:#e3ffe2">
242
- If the external featured images of your posts or pages aren't being shown, congratulations: you're using a nonstandard theme! But there is a last hope. Enabling the toggle below, your external featured images will be associated to a symbolic file in your Media Library. It's a desperate attempt to cheat your theme that will think that there is an internal image there. Then when the theme tries to show the image, that doesn't exist, a function will replace the symbolic file by your URL on execution time. It should allow you to use the main feature of this plugin, but secondary ones, such as "External Featured Image Slider" may not work.
243
  </div>
244
  <br>
245
  <form
246
- id="fifu_form_hope"
247
  action="javascript:void(0)"
248
  method="post">
249
  <input
250
  type="image"
251
  href="javascript:void(0)"
252
- id="fifu_toggle_hope"
253
- onclick="invert('hope')"
254
- name="fifu_toggle_hope"
255
- class="<?php echo $enable_hope; ?>"
256
- value=" "
257
- style="display:block" >
258
  <input
259
  type="hidden"
260
- id="fifu_input_hope"
261
- name="fifu_input_hope"
262
  value="" >
263
  </form>
264
  </div>
265
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  <div class="box">
267
- <h2>WooCommerce Full Integration</h2>
268
- <div class="greybox" style="background:#ffffbc">
269
- The External Featured Image box is already available on Product Editor. However the full integration is required if you want to include the External Product Gallery and use other WooCommerce resources such as Zoom and Lightbox.<br><br>
270
- <b><?php echo $compatible; ?></b>
 
271
  </div>
272
  <br>
273
- <form
274
- id="fifu_form_woocommerce"
275
- action="javascript:void(0)"
276
- method="post">
277
- <input
278
- type="image"
279
- href="javascript:void(0)"
280
- id="fifu_toggle_woocommerce"
281
- onclick="invert('woocommerce')"
282
- name="fifu_toggle_woocommerce"
283
- class="<?php echo $enable_woocommerce; ?>"
284
- value=" "
285
- style="display:block">
286
- <input
287
- type="hidden"
288
- id="fifu_input_woocommerce"
289
- name="fifu_input_woocommerce"
290
- value="" >
291
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
292
  </div>
293
 
294
  <div class="box">
@@ -481,110 +641,7 @@
481
  </div>
482
 
483
  <div class="box">
484
- <h2>Slider Settings</h2>
485
- <div class="greybox" style="background:#ffe2e2">
486
- <b>Premium feature</b><br><br>
487
- 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>
488
- <table style="text-align:left">
489
- <tr>
490
- <th>
491
- <input
492
- type="image"
493
- href="javascript:void(0)"
494
- id="fifu_toggle_slider_fade"
495
- name="fifu_toggle_slider_fade"
496
- class="toggleoff"
497
- value=" " style="display:block">
498
- </th>
499
- <th>
500
- fade effect
501
- </th>
502
- </tr>
503
- <tr>
504
- <th>
505
- <input
506
- type="image"
507
- href="javascript:void(0)"
508
- id="fifu_toggle_slider_stop"
509
- name="fifu_toggle_slider_stop"
510
- class="toggleoff"
511
- value=" " style="display:block">
512
- </th>
513
- <th>
514
- pause autoplay on hover
515
- </th>
516
- </tr>
517
- <tr>
518
- <th>
519
- <input
520
- type="image"
521
- href="javascript:void(0)"
522
- id="fifu_toggle_slider_ctrl"
523
- name="fifu_toggle_slider_ctrl"
524
- class="toggleoff"
525
- value=" " style="display:block">
526
- </th>
527
- <th>
528
- show prev/next buttons
529
- </th>
530
- </tr>
531
- <tr>
532
- <th>
533
- <input
534
- type="image"
535
- href="javascript:void(0)"
536
- id="fifu_toggle_slider_auto"
537
- name="fifu_toggle_slider_auto"
538
- class="toggleoff"
539
- value=" " style="display:block">
540
- </th>
541
- <th>
542
- start to play automatically
543
- </th>
544
- </tr>
545
- <tr>
546
- <th>
547
- <input id="fifu_input_slider_pause"
548
- name="fifu_input_slider_pause"
549
- step="500"
550
- size="4">
551
- </th>
552
- <th>
553
- time between each transition (in ms)
554
- </th>
555
- </tr>
556
- <tr>
557
- <th>
558
- <input id="fifu_input_slider_speed"
559
- name="fifu_input_slider_speed"
560
- step="500"
561
- max="2000"
562
- size="4">
563
- </th>
564
- <th>
565
- transition duration (in ms)
566
- </th>
567
- </tr>
568
- </table>
569
-
570
- <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a>
571
- </div>
572
- </div>
573
-
574
- <div class="box">
575
- <h2>CSS Style</h2>
576
- <div class="greybox" style="background:#ffe2e2">
577
- <b>Premium feature</b><br><br>
578
- Here you can define a CSS style to be applied to all external featured images. Usage example:<br><br>
579
- width: 100%; border-radius: 8px; border: 1px solid #ddd; padding: 5px;
580
- </div>
581
- <br>
582
- <input id="fifu_input_css" type="text" name="fifu_input_css" style="width:675px">
583
- <input type="submit" value="Submit" disabled>
584
- </div>
585
-
586
- <div class="box">
587
- <h2>Hover Effects</h2>
588
  <div class="greybox" style="background:#ffe2e2">
589
  <b>Premium feature</b><br><br>
590
  Choose one among 18 hover effects to be applied to all external featured images of your posts on your main page.<br><br>
@@ -659,177 +716,123 @@
659
  </div>
660
 
661
  <div class="box">
662
- <h2>External Featured Videos</h2>
663
  <div class="greybox" style="background:#ffe2e2">
664
  <b>Premium feature</b><br><br>
665
- 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>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
  <table style="text-align:left">
667
  <tr>
668
- <th>
669
- Ratio:
670
- </th>
671
  <th>
672
- <input id="fifu_input_video_width_rtio"
673
- style="border: 1px solid black;"
674
- name="fifu_input_video_width_rtio"
675
- size="4">
676
- </th>
677
- <th>
678
- <input id="fifu_input_video_height_rtio"
679
- style="border: 1px solid black;"
680
- name="fifu_input_video_height_rtio"
681
- size="4">
682
- </th>
683
- <th>
684
- <div style="font-style: italic;font-weight:normal;">e.g.: 1, 2, 3...</div>
685
  </th>
686
- </tr>
687
- <tr>
688
  <th>
689
- Archive:
690
- </th>
691
- <th>
692
- <input id="fifu_input_video_width_arch"
693
- name="fifu_input_video_width_arch"
694
- placeholder="max-width"
695
- size="4">
696
- </th>
697
- <th>
698
- <input id="fifu_input_video_height_arch"
699
- name="fifu_input_video_height_arch"
700
- placeholder="max-height"
701
- size="4">
702
- </th>
703
- <th>
704
- <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
705
  </th>
706
  </tr>
707
  <tr>
708
- <th>
709
- Category:
710
- </th>
711
  <th>
712
- <input id="fifu_input_video_width_ctgr"
713
- name="fifu_input_video_width_ctgr"
714
- placeholder="max-width"
715
- size="4">
716
- </th>
717
- <th>
718
- <input id="fifu_input_video_height_ctgr"
719
- name="fifu_input_video_height_ctgr"
720
- placeholder="max-height"
721
- size="4">
722
  </th>
723
- <th>
724
- <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
725
  </th>
726
  </tr>
727
  <tr>
728
- <th>
729
- Home:
730
- </th>
731
  <th>
732
- <input id="fifu_input_video_width_home"
733
- name="fifu_input_video_width_home"
734
- placeholder="max-width"
735
- size="4">
736
- </th>
737
- <th>
738
- <input id="fifu_input_video_height_home"
739
- name="fifu_input_video_height_home"
740
- placeholder="max-height"
741
- size="4">
742
- </th>
743
- <th>
744
- <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
745
  </th>
746
- </tr>
747
- <tr>
748
  <th>
749
- Page:
750
- </th>
751
- <th>
752
- <input id="fifu_input_video_width_page"
753
- name="fifu_input_video_width_page"
754
- placeholder="max-width"
755
- size="4">
756
- </th>
757
- <th>
758
- <input id="fifu_input_video_height_page"
759
- name="fifu_input_video_height_page"
760
- placeholder="max-height"
761
- size="4">
762
- </th>
763
- <th>
764
- <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
765
  </th>
766
  </tr>
767
  <tr>
768
- <th>
769
- Post:
770
- </th>
771
  <th>
772
- <input id="fifu_input_video_width_post"
773
- name="fifu_input_video_width_post"
774
- placeholder="max-width"
775
- size="4">
776
- </th>
777
- <th>
778
- <input id="fifu_input_video_height_post"
779
- name="fifu_input_video_height_post"
780
- placeholder="max-height"
781
- size="4">
782
  </th>
783
- <th>
784
- <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
785
  </th>
786
  </tr>
787
  <tr>
788
- <th>
789
- Product:
790
- </th>
791
  <th>
792
- <input id="fifu_input_video_width_prod"
793
- name="fifu_input_video_width_prod"
794
- placeholder="max-width"
795
- size="4">
796
- </th>
797
- <th>
798
- <input id="fifu_input_video_height_prod"
799
- name="fifu_input_video_height_prod"
800
- placeholder="max-height"
801
  size="4">
802
  </th>
803
- <th>
804
- <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
805
  </th>
806
  </tr>
807
  <tr>
808
- <th>
809
- Shop:
810
- </th>
811
  <th>
812
- <input id="fifu_input_video_width_shop"
813
- name="fifu_input_video_width_shop"
814
- placeholder="max-width"
815
- size="4">
816
- </th>
817
- <th>
818
- <input id="fifu_input_video_height_shop"
819
- name="fifu_input_video_height_shop"
820
- placeholder="max-height"
821
  size="4">
822
  </th>
823
- <th>
824
- <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
825
  </th>
826
- </tr>
827
  </table>
828
- <br>
829
  <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a>
830
  </div>
831
- <br>
832
- <input type="submit" value="Submit" disabled>
833
  </div>
834
 
835
  <div class="box">
@@ -846,41 +849,6 @@
846
  value=" " style="display:block">
847
  </div>
848
 
849
- <div class="box">
850
- <h2>Product Categories Grid</h2>
851
- <div class="greybox" style="background:#ffe2e2">
852
- <b>Premium feature</b><br><br>
853
-
854
- Allows you to use use external images/videos on Product Categories Grid.
855
-
856
- </div>
857
-
858
- <br>
859
-
860
- <form
861
- id="fifu_form_woocommerce"
862
- action="javascript:void(0)"
863
- method="post">
864
-
865
- <input
866
- type="image"
867
- href="javascript:void(0)"
868
- id="fifu_toggle_woocommerce"
869
- onclick="invert('woocommerce')"
870
- name="fifu_toggle_woocommerce"
871
- class="<?php echo $enable_woocommerce; ?>"
872
- value=" "
873
- style="display:block">
874
-
875
- <input
876
- type="hidden"
877
- id="fifu_input_woocommerce"
878
- name="fifu_input_woocommerce"
879
- value="" >
880
- </form>
881
-
882
- </div>
883
-
884
  <div class="box">
885
  <h2>Help</h2>
886
  <div class="greybox">
@@ -914,43 +882,43 @@
914
  }
915
  </style>
916
  <table style="text-align:left">
917
- <tr><th>Working as...</th><th>Blog</th><th>Shop (WooCommerce)</th></tr>
918
  <tr><th>Twenty Seventeen</th><th>yes</th><th>yes</th></tr>
919
  <tr><th>Twenty Sixteen</th><th>yes</th><th>yes</th></tr>
920
- <tr><th>Consulting</th><th>no</th><th>no</th></tr>
921
  <tr><th>Twenty Fifteen</th><th>yes</th><th>yes</th></tr>
922
  <tr><th>Hestia</th><th>yes</th><th>yes</th></tr>
923
  <tr><th>Twenty Fourteen</th><th>yes</th><th>yes</th></tr>
924
  <tr><th>Sydney</th><th>yes</th><th>yes</th></tr>
925
  <tr><th>Twenty Twelve</th><th>yes</th><th>yes</th></tr>
926
  <tr><th>Total</th><th>no</th><th>yes</th></tr>
927
- <tr><th>One Page Express</th><th>yes</th><th>no</th></tr>
928
- <tr><th>Shapely</th><th>no</th><th>no</th></tr>
929
- <tr><th>Twenty Eleven</th><th>no</th><th>yes</th></tr>
930
- <tr><th>Giga Store</th><th>no</th><th>no</th></tr>
931
  <tr><th>Twenty Thirteen</th><th>yes</th><th>yes</th></tr>
932
  <tr><th>Flash</th><th>yes</th><th>yes</th></tr>
933
  <tr><th>Zerif Lite</th><th>no</th><th>yes</th></tr>
934
- <tr><th>Activation</th><th>no</th><th>no</th></tr>
935
- <tr><th>Astra</th><th>yes</th><th>no</th></tr>
936
- <tr><th>Envo Store</th><th>no</th><th>no</th></tr>
937
  <tr><th>Kale</th><th>no</th><th>yes</th></tr>
938
- <tr><th>Eleganto</th><th>yes</th><th>no</th></tr>
939
  <tr><th>ColorMag</th><th>yes</th><th>yes</th></tr>
940
  <tr><th>OnePress</th><th>no</th><th>yes</th></tr>
941
- <tr><th>E-Shop</th><th>no</th><th>no</th></tr>
942
- <tr><th>Twenty Ten</th><th>no</th><th>yes</th></tr>
943
  <tr><th>Storefront</th><th>yes</th><th>yes</th></tr>
944
- <tr><th>Shop Isle</th><th>no</th><th>no</th></tr>
945
- <tr><th>Spacious</th><th>no</th><th>yes</th></tr>
946
- <tr><th>Anissa</th><th>yes</th><th>no</th></tr>
947
- <tr><th>Resortica Lite</th><th>no</th><th>no</th></tr>
948
  </table>
949
  <br>
950
  Other popular themes...
951
  <table style="text-align:left">
952
  <tr><th>Working as...</th><th>Blog</th><th>Shop (WooCommerce)</th></tr>
953
- <tr><th>Avada</th><th>no</th><th>no</th></tr>
954
  <tr><th>Divi</th><th>no</th><th>yes</th></tr>
955
  <tr><th>Salient</th><th>yes</th><th>yes</th></tr>
956
  <tr><th>Themify Ultra</th><th>no</th><th>yes</th></tr>
@@ -959,14 +927,14 @@
959
  And I will continue updating those lists...<br>
960
  <br>
961
  <h3>2) "And if my theme isn't listed above?"</h3>
962
- If your theme isn't listed above, I strongly recommend you to send the zip file to <a href="mailto:marceljmachado@gmail.com">marceljmachado@gmail.com</a>. Then I can test and inform you if all plugin features will work with your theme. It's really important once there is no refund for problems related to theme compatibility and, as you can see, some themes aren't flexible enough to work with external images.<br>
963
  <br>
964
  <h3>3) "How to get support?"</h3>
965
- You can inform any problem related to the Premium version (except theme issues) in the email above. It will be solved as soon as possible and without any cost.<br><br>
966
  <h3>4) "Which plugins are compatible with Premium version?"</h3>
967
  WooCommerce, WP All Import, Monarch, a3 Lazy Load, AccessPress Anonymous Post and others. If you intend to use the Premium version with a specific plugin, you can ask me if they are compatible.<br><br>
968
  <h3>5) "Can I get my money back later?"</h3>
969
- With the exception of rare situations, no way. So don't go to the Premium version if you are not sure if your theme is compatible.<br><br>
970
  <h3>6) "How to get the Premium version?"</h3>
971
  <div style="display:inline-block;">
972
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
120
  </form>
121
  </div>
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  <div class="box">
124
  <h2>Featured Image in Content</h2>
125
  <div class="greybox" style="background:#e3ffe2">
210
  </div>
211
 
212
  <div class="box">
213
+ <h2>Social Tags</h2>
214
  <div class="greybox" style="background:#e3ffe2">
215
+ Featured Image from URL provides social tags to share the external images on the social networks. Here you can enable/disable this feature.
216
  </div>
217
  <br>
218
  <form
219
+ id="fifu_form_social"
220
  action="javascript:void(0)"
221
  method="post">
222
  <input
223
  type="image"
224
  href="javascript:void(0)"
225
+ id="fifu_toggle_social"
226
+ onclick="invert('social')"
227
+ name="fifu_toggle_social"
228
+ class="<?php echo $enable_social; ?>"
229
+ value=" "
230
+ style="display:block">
231
  <input
232
  type="hidden"
233
+ id="fifu_input_social"
234
+ name="fifu_input_social"
235
  value="" >
236
  </form>
237
  </div>
238
 
239
+ <div style="<?php echo show_woocommerce_box() ?>">
240
+ <div class="box">
241
+ <h2>WooCommerce Full Integration</h2>
242
+ <div class="greybox" style="background:#e3ffe2">
243
+ The External Featured Image box is already available on Product Editor. However the full integration is required if you want to include the External Product Gallery and use other WooCommerce resources, such as Lightbox. This free version supports WooCommerce 2.4/2.5 and the Premium version supports WooCommerce 3.
244
+ </div>
245
+ <br>
246
+ <form
247
+ id="fifu_form_woocommerce"
248
+ action="javascript:void(0)"
249
+ method="post">
250
+ <input
251
+ type="image"
252
+ href="javascript:void(0)"
253
+ id="fifu_toggle_woocommerce"
254
+ onclick="invert('woocommerce')"
255
+ name="fifu_toggle_woocommerce"
256
+ class="<?php echo $enable_woocommerce; ?>"
257
+ value=" "
258
+ style="display:block">
259
+ <input
260
+ type="hidden"
261
+ id="fifu_input_woocommerce"
262
+ name="fifu_input_woocommerce"
263
+ value="" >
264
+ </form>
265
+ </div>
266
+ </div>
267
+
268
  <div class="box">
269
+ <h2>CSS Style</h2>
270
+ <div class="greybox" style="background:#ffe2e2">
271
+ <b>Premium feature</b><br><br>
272
+ Here you can define a CSS style to be applied to all external featured images. Usage example:<br><br>
273
+ width: 100%; border-radius: 8px; border: 1px solid #ddd; padding: 5px;
274
  </div>
275
  <br>
276
+ <input id="fifu_input_css" type="text" name="fifu_input_css" style="width:675px">
277
+ <input type="submit" value="Submit" disabled>
278
+ </div>
279
+
280
+ <div class="box">
281
+ <h2>External Featured Videos</h2>
282
+ <div class="greybox" style="background:#ffe2e2">
283
+ <b>Premium feature</b><br><br>
284
+ 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>
285
+ <table style="text-align:left">
286
+ <tr>
287
+ <th>
288
+ Ratio:
289
+ </th>
290
+ <th>
291
+ <input id="fifu_input_video_width_rtio"
292
+ style="border: 1px solid black;"
293
+ name="fifu_input_video_width_rtio"
294
+ size="4">
295
+ </th>
296
+ <th>
297
+ <input id="fifu_input_video_height_rtio"
298
+ style="border: 1px solid black;"
299
+ name="fifu_input_video_height_rtio"
300
+ size="4">
301
+ </th>
302
+ <th>
303
+ <div style="font-style: italic;font-weight:normal;">e.g.: 1, 2, 3...</div>
304
+ </th>
305
+ </tr>
306
+ <tr>
307
+ <th>
308
+ Archive:
309
+ </th>
310
+ <th>
311
+ <input id="fifu_input_video_width_arch"
312
+ name="fifu_input_video_width_arch"
313
+ placeholder="max-width"
314
+ size="4">
315
+ </th>
316
+ <th>
317
+ <input id="fifu_input_video_height_arch"
318
+ name="fifu_input_video_height_arch"
319
+ placeholder="max-height"
320
+ size="4">
321
+ </th>
322
+ <th>
323
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
324
+ </th>
325
+ </tr>
326
+ <tr>
327
+ <th>
328
+ Category:
329
+ </th>
330
+ <th>
331
+ <input id="fifu_input_video_width_ctgr"
332
+ name="fifu_input_video_width_ctgr"
333
+ placeholder="max-width"
334
+ size="4">
335
+ </th>
336
+ <th>
337
+ <input id="fifu_input_video_height_ctgr"
338
+ name="fifu_input_video_height_ctgr"
339
+ placeholder="max-height"
340
+ size="4">
341
+ </th>
342
+ <th>
343
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
344
+ </th>
345
+ </tr>
346
+ <tr>
347
+ <th>
348
+ Home:
349
+ </th>
350
+ <th>
351
+ <input id="fifu_input_video_width_home"
352
+ name="fifu_input_video_width_home"
353
+ placeholder="max-width"
354
+ size="4">
355
+ </th>
356
+ <th>
357
+ <input id="fifu_input_video_height_home"
358
+ name="fifu_input_video_height_home"
359
+ placeholder="max-height"
360
+ size="4">
361
+ </th>
362
+ <th>
363
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
364
+ </th>
365
+ </tr>
366
+ <tr>
367
+ <th>
368
+ Page:
369
+ </th>
370
+ <th>
371
+ <input id="fifu_input_video_width_page"
372
+ name="fifu_input_video_width_page"
373
+ placeholder="max-width"
374
+ size="4">
375
+ </th>
376
+ <th>
377
+ <input id="fifu_input_video_height_page"
378
+ name="fifu_input_video_height_page"
379
+ placeholder="max-height"
380
+ size="4">
381
+ </th>
382
+ <th>
383
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
384
+ </th>
385
+ </tr>
386
+ <tr>
387
+ <th>
388
+ Post:
389
+ </th>
390
+ <th>
391
+ <input id="fifu_input_video_width_post"
392
+ name="fifu_input_video_width_post"
393
+ placeholder="max-width"
394
+ size="4">
395
+ </th>
396
+ <th>
397
+ <input id="fifu_input_video_height_post"
398
+ name="fifu_input_video_height_post"
399
+ placeholder="max-height"
400
+ size="4">
401
+ </th>
402
+ <th>
403
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
404
+ </th>
405
+ </tr>
406
+ <tr>
407
+ <th>
408
+ Product:
409
+ </th>
410
+ <th>
411
+ <input id="fifu_input_video_width_prod"
412
+ name="fifu_input_video_width_prod"
413
+ placeholder="max-width"
414
+ size="4">
415
+ </th>
416
+ <th>
417
+ <input id="fifu_input_video_height_prod"
418
+ name="fifu_input_video_height_prod"
419
+ placeholder="max-height"
420
+ size="4">
421
+ </th>
422
+ <th>
423
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
424
+ </th>
425
+ </tr>
426
+ <tr>
427
+ <th>
428
+ Shop:
429
+ </th>
430
+ <th>
431
+ <input id="fifu_input_video_width_shop"
432
+ name="fifu_input_video_width_shop"
433
+ placeholder="max-width"
434
+ size="4">
435
+ </th>
436
+ <th>
437
+ <input id="fifu_input_video_height_shop"
438
+ name="fifu_input_video_height_shop"
439
+ placeholder="max-height"
440
+ size="4">
441
+ </th>
442
+ <th>
443
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
444
+ </th>
445
+ </tr>
446
+ </table>
447
+ <br>
448
+ <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a>
449
+ </div>
450
+ <br>
451
+ <input type="submit" value="Submit" disabled>
452
  </div>
453
 
454
  <div class="box">
641
  </div>
642
 
643
  <div class="box">
644
+ <h2>Hover Effects</h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
645
  <div class="greybox" style="background:#ffe2e2">
646
  <b>Premium feature</b><br><br>
647
  Choose one among 18 hover effects to be applied to all external featured images of your posts on your main page.<br><br>
716
  </div>
717
 
718
  <div class="box">
719
+ <h2>Product Categories Grid</h2>
720
  <div class="greybox" style="background:#ffe2e2">
721
  <b>Premium feature</b><br><br>
722
+ Allows you to use use external images/videos on Product Categories Grid.
723
+ </div>
724
+ <br>
725
+ <form
726
+ id="fifu_form_woocommerce"
727
+ action="javascript:void(0)"
728
+ method="post">
729
+ <input
730
+ type="image"
731
+ href="javascript:void(0)"
732
+ id="fifu_toggle_woocommerce"
733
+ onclick="invert('woocommerce')"
734
+ name="fifu_toggle_woocommerce"
735
+ class="<?php echo $enable_woocommerce; ?>"
736
+ value=" "
737
+ style="display:block">
738
+
739
+ <input
740
+ type="hidden"
741
+ id="fifu_input_woocommerce"
742
+ name="fifu_input_woocommerce"
743
+ value="" >
744
+ </form>
745
+ </div>
746
+
747
+ <div class="box">
748
+ <h2>Slider Settings</h2>
749
+ <div class="greybox" style="background:#ffe2e2">
750
+ <b>Premium feature</b><br><br>
751
+ 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>
752
  <table style="text-align:left">
753
  <tr>
 
 
 
754
  <th>
755
+ <input
756
+ type="image"
757
+ href="javascript:void(0)"
758
+ id="fifu_toggle_slider_fade"
759
+ name="fifu_toggle_slider_fade"
760
+ class="toggleoff"
761
+ value=" " style="display:block">
 
 
 
 
 
 
762
  </th>
 
 
763
  <th>
764
+ fade effect
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
765
  </th>
766
  </tr>
767
  <tr>
 
 
 
768
  <th>
769
+ <input
770
+ type="image"
771
+ href="javascript:void(0)"
772
+ id="fifu_toggle_slider_stop"
773
+ name="fifu_toggle_slider_stop"
774
+ class="toggleoff"
775
+ value=" " style="display:block">
 
 
 
776
  </th>
777
+ <th>
778
+ pause autoplay on hover
779
  </th>
780
  </tr>
781
  <tr>
 
 
 
782
  <th>
783
+ <input
784
+ type="image"
785
+ href="javascript:void(0)"
786
+ id="fifu_toggle_slider_ctrl"
787
+ name="fifu_toggle_slider_ctrl"
788
+ class="toggleoff"
789
+ value=" " style="display:block">
 
 
 
 
 
 
790
  </th>
 
 
791
  <th>
792
+ show prev/next buttons
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
793
  </th>
794
  </tr>
795
  <tr>
 
 
 
796
  <th>
797
+ <input
798
+ type="image"
799
+ href="javascript:void(0)"
800
+ id="fifu_toggle_slider_auto"
801
+ name="fifu_toggle_slider_auto"
802
+ class="toggleoff"
803
+ value=" " style="display:block">
 
 
 
804
  </th>
805
+ <th>
806
+ start to play automatically
807
  </th>
808
  </tr>
809
  <tr>
 
 
 
810
  <th>
811
+ <input id="fifu_input_slider_pause"
812
+ name="fifu_input_slider_pause"
813
+ step="500"
 
 
 
 
 
 
814
  size="4">
815
  </th>
816
+ <th>
817
+ time between each transition (in ms)
818
  </th>
819
  </tr>
820
  <tr>
 
 
 
821
  <th>
822
+ <input id="fifu_input_slider_speed"
823
+ name="fifu_input_slider_speed"
824
+ step="500"
825
+ max="2000"
 
 
 
 
 
826
  size="4">
827
  </th>
828
+ <th>
829
+ transition duration (in ms)
830
  </th>
831
+ </tr>
832
  </table>
833
+
834
  <a href="http://fifu.marceljm.com/" targe="_blank">Live preview</a>
835
  </div>
 
 
836
  </div>
837
 
838
  <div class="box">
849
  value=" " style="display:block">
850
  </div>
851
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852
  <div class="box">
853
  <h2>Help</h2>
854
  <div class="greybox">
882
  }
883
  </style>
884
  <table style="text-align:left">
885
+ <tr><th>Working as...</th><th>Blog (70%)</th><th>WooCommerce Shop (100%)</th></tr>
886
  <tr><th>Twenty Seventeen</th><th>yes</th><th>yes</th></tr>
887
  <tr><th>Twenty Sixteen</th><th>yes</th><th>yes</th></tr>
888
+ <tr><th>Consulting</th><th>no</th><th>yes</th></tr>
889
  <tr><th>Twenty Fifteen</th><th>yes</th><th>yes</th></tr>
890
  <tr><th>Hestia</th><th>yes</th><th>yes</th></tr>
891
  <tr><th>Twenty Fourteen</th><th>yes</th><th>yes</th></tr>
892
  <tr><th>Sydney</th><th>yes</th><th>yes</th></tr>
893
  <tr><th>Twenty Twelve</th><th>yes</th><th>yes</th></tr>
894
  <tr><th>Total</th><th>no</th><th>yes</th></tr>
895
+ <tr><th>One Page Express</th><th>yes</th><th>yes</th></tr>
896
+ <tr><th>Shapely</th><th>no</th><th>yes</th></tr>
897
+ <tr><th>Twenty Eleven</th><th>yes</th><th>yes</th></tr>
898
+ <tr><th>Giga Store</th><th>-</th><th>yes</th></tr>
899
  <tr><th>Twenty Thirteen</th><th>yes</th><th>yes</th></tr>
900
  <tr><th>Flash</th><th>yes</th><th>yes</th></tr>
901
  <tr><th>Zerif Lite</th><th>no</th><th>yes</th></tr>
902
+ <tr><th>Activation</th><th>yes</th><th>yes</th></tr>
903
+ <tr><th>Astra</th><th>yes</th><th>yes</th></tr>
904
+ <tr><th>Envo Store</th><th>no</th><th>yes</th></tr>
905
  <tr><th>Kale</th><th>no</th><th>yes</th></tr>
906
+ <tr><th>Eleganto</th><th>yes</th><th>yes</th></tr>
907
  <tr><th>ColorMag</th><th>yes</th><th>yes</th></tr>
908
  <tr><th>OnePress</th><th>no</th><th>yes</th></tr>
909
+ <tr><th>E-Shop</th><th>-</th><th>yes</th></tr>
910
+ <tr><th>Twenty Ten</th><th>yes</th><th>yes</th></tr>
911
  <tr><th>Storefront</th><th>yes</th><th>yes</th></tr>
912
+ <tr><th>Shop Isle</th><th>yes</th><th>yes</th></tr>
913
+ <tr><th>Spacious</th><th>yes</th><th>yes</th></tr>
914
+ <tr><th>Anissa</th><th>yes</th><th>yes</th></tr>
915
+ <tr><th>Resortica Lite</th><th>no</th><th>yes</th></tr>
916
  </table>
917
  <br>
918
  Other popular themes...
919
  <table style="text-align:left">
920
  <tr><th>Working as...</th><th>Blog</th><th>Shop (WooCommerce)</th></tr>
921
+ <tr><th>Avada</th><th>no</th><th>yes</th></tr>
922
  <tr><th>Divi</th><th>no</th><th>yes</th></tr>
923
  <tr><th>Salient</th><th>yes</th><th>yes</th></tr>
924
  <tr><th>Themify Ultra</th><th>no</th><th>yes</th></tr>
927
  And I will continue updating those lists...<br>
928
  <br>
929
  <h3>2) "And if my theme isn't listed above?"</h3>
930
+ All themes tested worked fine as a WooCommerce Shop. But when tested as a Blog, 30% of themes had some problem to show Video/Slider features. So if you intend to use the plugin in a Blog, I strongly recommend you to send the zip file to <a href="mailto:marceljmachado@gmail.com">marceljmachado@gmail.com</a>. Then I can test and inform you if all plugin features will work with your theme.<br>
931
  <br>
932
  <h3>3) "How to get support?"</h3>
933
+ You can inform any problem related to the Premium version in the email above. It will be solved as soon as possible and without any cost (except theme issues).<br><br>
934
  <h3>4) "Which plugins are compatible with Premium version?"</h3>
935
  WooCommerce, WP All Import, Monarch, a3 Lazy Load, AccessPress Anonymous Post and others. If you intend to use the Premium version with a specific plugin, you can ask me if they are compatible.<br><br>
936
  <h3>5) "Can I get my money back later?"</h3>
937
+ With the exception of rare situations, no way. But don't worry about that. You will still have the best support and if, after your complete cooperation, I'm not able to solve your issue, I may refund you.<br><br>
938
  <h3>6) "How to get the Premium version?"</h3>
939
  <div style="display:inline-block;">
940
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
admin/html/meta-box-advertisement.html DELETED
@@ -1,3 +0,0 @@
1
- <iframe src="https://www.youtube.com/embed/LuynS-Y-fZs" width="100%" allowfullscreen="" frameborder="0"></iframe>
2
-
3
- <a href="http://marceljm.com/wordpress/featured-image-from-url-premium/">Enable this functionality</a>
 
 
 
admin/html/meta-box.html CHANGED
@@ -15,6 +15,13 @@
15
  background-size:cover;" >
16
  </div>
17
 
 
 
 
 
 
 
 
18
  <p/>
19
 
20
  <a id="fifu_link"
@@ -22,14 +29,7 @@
22
  onClick="removeImage();"
23
  style="<?php echo $show_link ?>" >Remove external featured image</a>
24
 
25
- <!-- show URL field and preview button if URL was not provided yet -->
26
-
27
- <input id="fifu_input_url"
28
- type="text"
29
- name="fifu_input_url"
30
- placeholder="URL"
31
- value="<?php echo $url; ?>"
32
- style="<?php echo $width, $margin, $show_url ?>" />
33
 
34
  <a id="fifu_button"
35
  class="button"
@@ -46,36 +46,45 @@
46
 
47
  <hr>
48
 
49
- <p style="border: 1px solid blue; padding: 5px;">New Features 06/2017</p>
 
50
  <table style="text-align:left; font-weight: normal; font-size: 10px">
51
  <tr>
52
- <th>-Free: Use the first image as featured image</th>
 
 
 
 
 
 
 
 
53
  </th>
54
  <tr>
55
  <tr>
56
- <th>-Free: Hide featured media on page/post</th>
57
  </th>
58
  <tr>
59
  <tr>
60
- <th>-Premium: WooCommerce integration (any server)</th>
61
  </th>
62
  <tr>
63
  <tr>
64
- <th>-Premium: Product Categories Grid</th>
65
  </th>
66
  <tr>
67
- <th>-Premium: Video ratio/resize</th>
68
  </th>
69
  <tr>
70
- <th>-Premium: Slider settings</th>
71
  </th>
72
  <tr>
73
- <th>-Premium: Unlimited galleries/slider</th>
74
  </th>
75
  <tr>
76
- <th>-Premium: WooCommerce 3 compatibility</th>
77
  </th>
78
  <tr>
79
- <th>-Premium: Disable WooCommerce Lightbox</th>
80
  </th>
81
  </table>
15
  background-size:cover;" >
16
  </div>
17
 
18
+ <input id="fifu_input_url"
19
+ type="text"
20
+ name="fifu_input_url"
21
+ placeholder="URL"
22
+ value="<?php echo $url; ?>"
23
+ style="<?php echo $width, $margin ?>" />
24
+
25
  <p/>
26
 
27
  <a id="fifu_link"
29
  onClick="removeImage();"
30
  style="<?php echo $show_link ?>" >Remove external featured image</a>
31
 
32
+ <!-- show preview button if URL was not provided yet -->
 
 
 
 
 
 
 
33
 
34
  <a id="fifu_button"
35
  class="button"
46
 
47
  <hr>
48
 
49
+ <p style="padding: 5px; border-left: 6px solid red;
50
+ background-color: lightgrey;">New Features 06/2017</p>
51
  <table style="text-align:left; font-weight: normal; font-size: 10px">
52
  <tr>
53
+ <th>Free: URL field isn't hidden anymore</th>
54
+ </th>
55
+ <tr>
56
+ <tr>
57
+ <th>Free: less annoying advertisements</th>
58
+ </th>
59
+ <tr>
60
+ <tr>
61
+ <th>Free: Use the first image as featured image</th>
62
  </th>
63
  <tr>
64
  <tr>
65
+ <th>Free: Hide featured media on page/post</th>
66
  </th>
67
  <tr>
68
  <tr>
69
+ <th>Premium: WooCommerce integration (any server)</th>
70
  </th>
71
  <tr>
72
  <tr>
73
+ <th>Premium: Product Categories Grid</th>
74
  </th>
75
  <tr>
76
+ <th>Premium: Video ratio/resize</th>
77
  </th>
78
  <tr>
79
+ <th>Premium: Slider settings</th>
80
  </th>
81
  <tr>
82
+ <th>Premium: Unlimited galleries/slider</th>
83
  </th>
84
  <tr>
85
+ <th>Premium: WooCommerce 3 compatibility</th>
86
  </th>
87
  <tr>
88
+ <th>Premium: Disable WooCommerce Lightbox</th>
89
  </th>
90
  </table>
admin/html/slider-meta-box.html DELETED
@@ -1,14 +0,0 @@
1
- <!-- show URL field and preview button if URL was not provided yet -->
2
-
3
- <input disabled id="fifu_slider_input_url_<?php echo $i; ?>"
4
- type="text"
5
- name="fifu_slider_input_url_<?php echo $i; ?>"
6
- placeholder="URL"
7
- value=""
8
- style="<?php echo $width, $margin ?>" />
9
-
10
- <a disabled id="fifu_slider_button_<?php echo $i; ?>"
11
- class="button"
12
- onClick="sliderPreviewImage(<?php echo $i; ?>);"
13
- style="<?php echo $align, $margin ?>" >Preview</a>
14
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/menu.php CHANGED
@@ -16,7 +16,6 @@ function fifu_get_menu_html() {
16
  $enable_woocommerce = get_option('fifu_woocommerce');
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
  $enable_get_first = get_option('fifu_get_first');
@@ -27,30 +26,17 @@ function fifu_get_menu_html() {
27
  for ($x = 0; $x <= 4; $x++)
28
  $array_cpt[$x] = get_option('fifu_cpt' . $x);
29
 
30
- if (function_exists('WC')) {
31
- $woo_version = WC()->version;
32
- if ($woo_version >= 3)
33
- $compatible = 'Warning: you are using WooCommerce ' . $woo_version . ' and it requires the PREMIUM version of Featured Image From URL. This free version supports WooCommerce 2.4 and 2.5.';
34
- } else
35
- $compatible = "Warning: WooCommerce isn't activated/installed.";
36
-
37
  include 'html/menu.html';
38
 
39
  fifu_update_menu_options();
40
 
41
  fifu_script_woocommerce();
42
-
43
- if (get_option('fifu_hope') == 'toggleon')
44
- fifu_enable_nonstandard_compatibility();
45
- else
46
- fifu_disable_nonstandard_compatibility();
47
  }
48
 
49
  function fifu_get_menu_settings() {
50
  fifu_get_setting('fifu_woocommerce');
51
  fifu_get_setting('fifu_social');
52
  fifu_get_setting('fifu_content');
53
- fifu_get_setting('fifu_hope');
54
  fifu_get_setting('fifu_hide_page');
55
  fifu_get_setting('fifu_hide_post');
56
  fifu_get_setting('fifu_get_first');
@@ -76,7 +62,6 @@ function fifu_update_menu_options() {
76
  fifu_update_option('fifu_input_woocommerce', 'fifu_woocommerce');
77
  fifu_update_option('fifu_input_social', 'fifu_social');
78
  fifu_update_option('fifu_input_content', 'fifu_content');
79
- fifu_update_option('fifu_input_hope', 'fifu_hope');
80
  fifu_update_option('fifu_input_hide_page', 'fifu_hide_page');
81
  fifu_update_option('fifu_input_hide_post', 'fifu_hide_post');
82
  fifu_update_option('fifu_input_get_first', 'fifu_get_first');
@@ -110,82 +95,6 @@ function fifu_script_woocommerce() {
110
  shell_exec($command2);
111
  }
112
 
113
- function fifu_enable_nonstandard_compatibility() {
114
- if (get_option('fifu_attachment_id'))
115
- return;
116
-
117
- global $wpdb;
118
- $old_attach_id = get_option('fifu_attachment_id');
119
-
120
- // create attachment
121
- $filename = 'Featured Image From URL';
122
- $parent_post_id = null;
123
- $filetype = wp_check_filetype('fifu.png', null);
124
- $attachment = array(
125
- 'guid' => basename($filename),
126
- 'post_mime_type' => $filetype['type'],
127
- 'post_title' => '',
128
- 'post_excerpt' => '',
129
- 'post_content' => 'Please don\'t remove that. It\'s just a symbolic file that keeps the field filled. ' .
130
- 'Some themes depend on having an attached file to work. But you are free to use any image you want instead of this file.',
131
- 'post_status' => 'inherit'
132
- );
133
- $attach_id = wp_insert_attachment($attachment, $filename, $parent_post_id);
134
- require_once( ABSPATH . 'wp-admin/includes/image.php' );
135
- $attach_data = wp_generate_attachment_metadata($attach_id, $filename);
136
- wp_update_attachment_metadata($attach_id, $attach_data);
137
- update_option('fifu_attachment_id', $attach_id);
138
-
139
- // insert _thumbnail_id
140
- $table = $wpdb->prefix . 'postmeta';
141
- $query = "
142
- SELECT DISTINCT post_id
143
- FROM " . $table . " a
144
- WHERE a.post_id in (
145
- SELECT post_id
146
- FROM " . $table . " b
147
- WHERE b.meta_key = 'fifu_image_url'
148
- AND b.meta_value IS NOT NULL
149
- AND b.meta_value <> ''
150
- )
151
- AND NOT EXISTS (
152
- SELECT 1
153
- FROM " . $table . " c
154
- WHERE a.post_id = c.post_id
155
- AND c.meta_key = '_thumbnail_id'
156
- )";
157
- $result = $wpdb->get_results($query);
158
- foreach ($result as $i) {
159
- $data = array('post_id' => $i->post_id, 'meta_key' => '_thumbnail_id', 'meta_value' => $attach_id);
160
- $wpdb->insert($table, $data);
161
- }
162
-
163
- // update _thumbnail_id
164
- $data = array('meta_value' => $attach_id);
165
- $where = array('meta_key' => '_thumbnail_id', 'meta_value' => $old_attach_id);
166
- $wpdb->update($table, $data, $where, null, null);
167
-
168
- // update _thumbnail_id
169
- $query = "
170
- SELECT post_id
171
- FROM " . $table . " a
172
- WHERE a.meta_key = 'fifu_image_url'
173
- AND a.meta_value IS NOT NULL
174
- AND a.meta_value <> ''";
175
- $result = $wpdb->get_results($query);
176
- foreach ($result as $i) {
177
- $data = array('meta_value' => $attach_id);
178
- $where = array('post_id' => $i->post_id, 'meta_key' => '_thumbnail_id', 'meta_value' => -1);
179
- $wpdb->update($table, $data, $where, null, null);
180
- }
181
- }
182
-
183
- function fifu_disable_nonstandard_compatibility() {
184
- global $wpdb;
185
- $table = $wpdb->prefix . 'postmeta';
186
- $where = array('meta_key' => '_thumbnail_id', 'meta_value' => get_option('fifu_attachment_id'));
187
- $wpdb->delete($table, $where);
188
-
189
- wp_delete_attachment(get_option('fifu_attachment_id'));
190
- delete_option('fifu_attachment_id');
191
  }
16
  $enable_woocommerce = get_option('fifu_woocommerce');
17
  $enable_social = get_option('fifu_social');
18
  $enable_content = get_option('fifu_content');
 
19
  $enable_hide_page = get_option('fifu_hide_page');
20
  $enable_hide_post = get_option('fifu_hide_post');
21
  $enable_get_first = get_option('fifu_get_first');
26
  for ($x = 0; $x <= 4; $x++)
27
  $array_cpt[$x] = get_option('fifu_cpt' . $x);
28
 
 
 
 
 
 
 
 
29
  include 'html/menu.html';
30
 
31
  fifu_update_menu_options();
32
 
33
  fifu_script_woocommerce();
 
 
 
 
 
34
  }
35
 
36
  function fifu_get_menu_settings() {
37
  fifu_get_setting('fifu_woocommerce');
38
  fifu_get_setting('fifu_social');
39
  fifu_get_setting('fifu_content');
 
40
  fifu_get_setting('fifu_hide_page');
41
  fifu_get_setting('fifu_hide_post');
42
  fifu_get_setting('fifu_get_first');
62
  fifu_update_option('fifu_input_woocommerce', 'fifu_woocommerce');
63
  fifu_update_option('fifu_input_social', 'fifu_social');
64
  fifu_update_option('fifu_input_content', 'fifu_content');
 
65
  fifu_update_option('fifu_input_hide_page', 'fifu_hide_page');
66
  fifu_update_option('fifu_input_hide_post', 'fifu_hide_post');
67
  fifu_update_option('fifu_input_get_first', 'fifu_get_first');
95
  shell_exec($command2);
96
  }
97
 
98
+ function show_woocommerce_box() {
99
+ return function_exists('WC') && WC()->version < 2.6 ? 'display:inline' : 'display:none';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  }
admin/meta-box.php CHANGED
@@ -8,35 +8,26 @@ function fifu_insert_meta_box() {
8
  foreach ($post_types as $post_type) {
9
  if ($post_type == 'product') {
10
  add_meta_box(
11
- 'urlMetaBox', 'External Product Image', 'fifu_show_elements', $post_type, 'side', 'low'
12
  );
13
  if (get_option('fifu_woocommerce') == 'toggleon') {
14
  add_meta_box(
15
- 'wooCommerceGalleryMetaBox', 'External Product Gallery', 'fifu_wc_show_elements', $post_type, 'side', 'low'
16
  );
17
  }
18
  } else {
19
  if ($post_type)
20
  add_meta_box(
21
- 'imageUrlMetaBox', 'External Featured Image', 'fifu_show_elements', $post_type, 'side', 'low'
22
  );
23
  }
24
-
25
- if ($post_type) {
26
- add_meta_box(
27
- 'sliderImageUrlMetaBox', 'External Featured Image Slider', 'fifu_slider_show_elements', $post_type, 'side', 'low'
28
- );
29
- add_meta_box(
30
- 'videoUrlMetaBox', 'External Featured Video', 'fifu_show_advertisement', $post_type, 'side', 'low'
31
- );
32
- }
33
  }
34
  }
35
 
36
  function fifu_show_elements($post) {
37
  $margin = 'margin-top:10px;';
38
  $width = 'width:100%;';
39
- $height = 'height:266px;';
40
  $align = 'text-align:left;';
41
  $is_sirv_active = is_plugin_active('sirv/sirv.php');
42
 
@@ -44,26 +35,17 @@ function fifu_show_elements($post) {
44
  $alt = get_post_meta($post->ID, 'fifu_image_alt', true);
45
 
46
  if ($url) {
47
- $show_url = $show_button = $show_sirv = 'display:none;';
48
  $show_alt = $show_image = $show_link = '';
49
  } else {
50
  $show_alt = $show_image = $show_link = 'display:none;';
51
- $show_url = $show_button = '';
52
  $show_sirv = ($is_sirv_active ? '' : 'display:none;');
53
  }
54
 
55
  include 'html/meta-box.html';
56
  }
57
 
58
- function fifu_show_advertisement($post) {
59
- $margin = 'margin-top:10px;';
60
- $width = 'width:100%;';
61
- $height = 'height:266px;';
62
- $align = 'text-align:left;';
63
-
64
- include 'html/meta-box-advertisement.html';
65
- }
66
-
67
  function fifu_wc_show_elements($post) {
68
  $margin = 'margin-top:1px;';
69
  $width = 'width:70%;';
@@ -87,18 +69,6 @@ function fifu_wc_show_elements($post) {
87
  }
88
  }
89
 
90
- function fifu_slider_show_elements($post) {
91
- $margin = 'margin-top:1px;';
92
- $width = 'width:70%;';
93
- $height = 'height:266px;';
94
- $align = 'text-align:left;';
95
- $altWidth = 'width:86%;';
96
-
97
- for ($i = 1; $i < 5; $i++)
98
- include 'html/slider-meta-box.html';
99
- include 'html/live-preview.html';
100
- }
101
-
102
  add_filter('wp_insert_post_data', 'fifu_remove_fist_image', 10, 2);
103
 
104
  function fifu_remove_fist_image($data, $postarr) {
8
  foreach ($post_types as $post_type) {
9
  if ($post_type == 'product') {
10
  add_meta_box(
11
+ 'urlMetaBox', 'Product Image from URL', 'fifu_show_elements', $post_type, 'side', 'low'
12
  );
13
  if (get_option('fifu_woocommerce') == 'toggleon') {
14
  add_meta_box(
15
+ 'wooCommerceGalleryMetaBox', 'Product Gallery from URL', 'fifu_wc_show_elements', $post_type, 'side', 'low'
16
  );
17
  }
18
  } else {
19
  if ($post_type)
20
  add_meta_box(
21
+ 'imageUrlMetaBox', 'Featured Image from URL', 'fifu_show_elements', $post_type, 'side', 'low'
22
  );
23
  }
 
 
 
 
 
 
 
 
 
24
  }
25
  }
26
 
27
  function fifu_show_elements($post) {
28
  $margin = 'margin-top:10px;';
29
  $width = 'width:100%;';
30
+ $height = 'height:200px;';
31
  $align = 'text-align:left;';
32
  $is_sirv_active = is_plugin_active('sirv/sirv.php');
33
 
35
  $alt = get_post_meta($post->ID, 'fifu_image_alt', true);
36
 
37
  if ($url) {
38
+ $show_button = $show_sirv = 'display:none;';
39
  $show_alt = $show_image = $show_link = '';
40
  } else {
41
  $show_alt = $show_image = $show_link = 'display:none;';
42
+ $show_button = '';
43
  $show_sirv = ($is_sirv_active ? '' : 'display:none;');
44
  }
45
 
46
  include 'html/meta-box.html';
47
  }
48
 
 
 
 
 
 
 
 
 
 
49
  function fifu_wc_show_elements($post) {
50
  $margin = 'margin-top:1px;';
51
  $width = 'width:70%;';
69
  }
70
  }
71
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  add_filter('wp_insert_post_data', 'fifu_remove_fist_image', 10, 2);
73
 
74
  function fifu_remove_fist_image($data, $postarr) {
featured-image-from-url.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
6
- * Version: 1.5.4
7
  * Author: Marcel Jacques Machado
8
  * Author URI: http://marceljm.com/wordpress/featured-image-from-url-premium/
9
  */
@@ -27,8 +27,5 @@ register_deactivation_hook(__FILE__, 'fifu_deactivate');
27
 
28
  function fifu_deactivate() {
29
  update_option('fifu_woocommerce', 'toggleoff');
30
- update_option('fifu_hope', 'toggleoff');
31
  shell_exec('sh ../wp-content/plugins/featured-image-from-url/scripts/disableWoocommerce.sh');
32
- fifu_disable_nonstandard_compatibility();
33
  }
34
-
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
6
+ * Version: 1.5.5
7
  * Author: Marcel Jacques Machado
8
  * Author URI: http://marceljm.com/wordpress/featured-image-from-url-premium/
9
  */
27
 
28
  function fifu_deactivate() {
29
  update_option('fifu_woocommerce', 'toggleoff');
 
30
  shell_exec('sh ../wp-content/plugins/featured-image-from-url/scripts/disableWoocommerce.sh');
 
31
  }
 
includes/thumbnail.php CHANGED
@@ -101,3 +101,9 @@ function fifu_replace_attachment_image_src($image, $attachment_id) {
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
  }
 
 
 
 
 
 
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
  }
104
+
105
+ add_filter('genesis_get_image', 'fifu_genesis_image', 10, 4);
106
+
107
+ function fifu_genesis_image($args, $var1, $var2, $src) {
108
+ return $src ? fifu_replace($args, get_the_ID()) : $args;
109
+ }
readme.txt CHANGED
@@ -14,7 +14,7 @@ Use an external image as Featured Image of your post/page/product (WooCommerce).
14
 
15
  Features:
16
 
17
- * allows you to use an external image (from Flickr, Picasa, Amazon S3, anywhere) as Featured Image of your post, page and Custom Post Type, such as WooCommerce Product;
18
 
19
  * perfect for external posts, the plugin is able to use the first image as Featured Image;
20
 
@@ -299,6 +299,9 @@ was removed. To finish, a Premium version is now been presented.
299
  = 1.5.4 =
300
  * Bug fix: compatibility with old PHP versions.
301
 
 
 
 
302
  == Upgrade Notice ==
303
 
304
  = 1.0 =
@@ -417,4 +420,7 @@ was removed. To finish, a Premium version is now been presented.
417
  * Auto set featured image.
418
 
419
  = 1.5.4 =
420
- * Bug fix: compatibility with old PHP versions.
 
 
 
14
 
15
  Features:
16
 
17
+ * Featured Image from URL plugin allows you to use an external image (from Flickr, Picasa, Amazon S3, anywhere) as Featured Image of your post, page and Custom Post Type, such as WooCommerce Product;
18
 
19
  * perfect for external posts, the plugin is able to use the first image as Featured Image;
20
 
299
  = 1.5.4 =
300
  * Bug fix: compatibility with old PHP versions.
301
 
302
+ = 1.5.5 =
303
+ * URL field isn't hidden anymore.
304
+
305
  == Upgrade Notice ==
306
 
307
  = 1.0 =
420
  * Auto set featured image.
421
 
422
  = 1.5.4 =
423
+ * Bug fix: compatibility with old PHP versions.
424
+
425
+ = 1.5.5 =
426
+ * URL field isn't hidden anymore.