Featured Image From URL - Version 2.8.6

Version Description

  • Bug fix: conflict with Multisite Post Duplicator plugin; Improvement: public front-end script should run a little faster now; Improvement: plugin version added to CSS to avoid cache style issues.
Download this release

Release Info

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

Code changes from version 2.8.5 to 2.8.6

admin/html/menu.html CHANGED
@@ -135,7 +135,7 @@
135
  <div class="box">
136
  <h2>Database</h2>
137
  <div class="greybox">
138
- Limit of rows to UPDATE, INSERT or DELETE by query. Higher this number, faster the features "URL from Post Content" (Apply to All) and "Metadata" (Fake Internal Featured Image and Clean). However, if you have limited resources, don't increase this value too much, otherwise your database can bring down.<br><br>
139
  <form
140
  id="fifu_form_db"
141
  action="javascript:void(0)"
@@ -1197,7 +1197,7 @@
1197
  </div>
1198
  <div id="tabs-j">
1199
  <div class="box">
1200
- <h2>Fake Internal Featured Image</h2>
1201
  <div class="greybox">
1202
  Most themes/plugins are not able to show the external featured image if there is no internal featured image associated to your post/page/product. Enabling the toggle below, a symbolic <b>empty</b> file will be added to your Media Library to overcome this limitation.
1203
  </div>
@@ -1226,11 +1226,11 @@
1226
 
1227
  <div class="box">
1228
 
1229
- <h2>Clean metadata</h2>
1230
 
1231
  <div class="greybox">
1232
 
1233
- This option might be necessary if you intend to deactivate the plugin and use only internal featured images again. It will clean the fake internal featured images generated by FIFU, but not the URLs.
1234
 
1235
  </div>
1236
 
@@ -2642,7 +2642,7 @@
2642
  You were probably using a deprecated feature. Just do it:
2643
  1) access Metadata tab;
2644
  2) enable Clean Metadata (it will be automatically disabled when finished);
2645
- 3) enable Fake Internal Featured Image.
2646
  </td>
2647
  <td style="vertical-align: top;">
2648
  Just send me an email. If you are available to discuss the details and the plugin is free and has more than 100,000 active installs, I should provide an integration very soon.
@@ -2705,6 +2705,29 @@
2705
  From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
2706
  </div>
2707
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2708
  <div class="box">
2709
  <table>
2710
  <tr>
@@ -2811,22 +2834,6 @@
2811
  1) enable "FIFU settings > Admin Area > jQuery".<br>
2812
  </div>
2813
  </div>
2814
- <div class="box">
2815
- <table>
2816
- <tr>
2817
- <td style="border-bottom:none">2019-11-17</td>
2818
- <td style="border-bottom:none"><h3>WP All Import</h3></td>
2819
- <td style="border-bottom:none">plugin</td>
2820
- </tr>
2821
- </table>
2822
- <div class="greybox" style="position: relative; top: -10px">
2823
- Avoiding updates on unchanged image data:<br>
2824
- 1) access "WP All Import > Import Settings";<br>
2825
- 2) select "Update existing posts/products with changed data in your file > Choose which data to update";<br>
2826
- 3) uncheck "Images" (otherwise WP All Import will delete the image metadata and FIFU will need to create that again);<br>
2827
- 4) select "Custom Fields > Update only these Custom Fields, leave the rest alone".<br>
2828
- </div>
2829
- </div>
2830
  <div class="box">
2831
  <table>
2832
  <tr>
@@ -2852,8 +2859,8 @@
2852
  <div class="greybox" style="position: relative; top: -10px">
2853
  Replacing http URLs by https:<br>
2854
  1) run this SQL command: UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'http://', 'https://') WHERE meta_key = 'fifu_image_url' AND meta_value LIKE '%site.com%';<br>
2855
- 2) enable "FIFU settings > Metadata > Clean metadata" toggle (it will be automatically disabled after a few minutes);<br>
2856
- 3) enable "Fake Internal Featured Image".<br>
2857
  * replace site.com by the domain of the URLs you want to update
2858
  </div>
2859
  </div>
@@ -2900,8 +2907,8 @@
2900
  0) make a backup (you might want to revert the changes later);<br>
2901
  1) deactivate Nelio;<br>
2902
  2) run this SQL command: INSERT INTO wp_postmeta (post_id, meta_key, meta_value) SELECT * FROM (SELECT post_id, 'fifu_image_url' AS meta_key, SUBSTRING_INDEX(SUBSTRING_INDEX(meta_value, '"', 2), '"', -1) AS meta_value FROM wp_postmeta WHERE meta_key = '_nelioefi_first_image') pm WHERE meta_value <> '';<br>
2903
- 3) enable "FIFU settings > Metadata > Clean metadata" toggle (it will be automatically disabled after a few minutes);<br>
2904
- 4) enable "Fake Internal Featured Image".<br>
2905
  </div>
2906
  </div>
2907
  <div class="box">
135
  <div class="box">
136
  <h2>Database</h2>
137
  <div class="greybox">
138
+ Limit of rows to UPDATE, INSERT or DELETE by query. Higher this number, faster the features "URL from Post Content" (Apply to All) and "Metadata". However, if you have limited resources, don't increase this value too much, otherwise your database can bring down.<br><br>
139
  <form
140
  id="fifu_form_db"
141
  action="javascript:void(0)"
1197
  </div>
1198
  <div id="tabs-j">
1199
  <div class="box">
1200
+ <h2>Image Metadata</h2>
1201
  <div class="greybox">
1202
  Most themes/plugins are not able to show the external featured image if there is no internal featured image associated to your post/page/product. Enabling the toggle below, a symbolic <b>empty</b> file will be added to your Media Library to overcome this limitation.
1203
  </div>
1226
 
1227
  <div class="box">
1228
 
1229
+ <h2>Clean Metadata</h2>
1230
 
1231
  <div class="greybox">
1232
 
1233
+ This option might be necessary if you intend to deactivate the plugin and use only internal featured images again. It will clean the image metadata generated by FIFU, but not the URLs.
1234
 
1235
  </div>
1236
 
2642
  You were probably using a deprecated feature. Just do it:
2643
  1) access Metadata tab;
2644
  2) enable Clean Metadata (it will be automatically disabled when finished);
2645
+ 3) enable Image Metadata.
2646
  </td>
2647
  <td style="vertical-align: top;">
2648
  Just send me an email. If you are available to discuss the details and the plugin is free and has more than 100,000 active installs, I should provide an integration very soon.
2705
  From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
2706
  </div>
2707
  </div>
2708
+ <div class="box">
2709
+ <table>
2710
+ <tr>
2711
+ <td style="border-bottom:none">2020-01-19</td>
2712
+ <td style="border-bottom:none"><h3>WP All Import</h3></td>
2713
+ <td style="border-bottom:none">plugin</td>
2714
+ </tr>
2715
+ </table>
2716
+ <div class="greybox" style="position: relative; top: -10px">
2717
+ Importing Variable Products to WooCommerce:<br>
2718
+ 1) you should choose one of these options during the import:<br>
2719
+ - "All my variable products have SKUs or some other unique identifier. Each variation is linked to its parent with its parent's SKU or other unique identifier.";<br>
2720
+ - "All variations for a particular product have the same title as the parent product."<br>
2721
+ Options where the parent is created automatically won't work well.
2722
+ </div>
2723
+ <div class="greybox" style="position: relative; top: -10px">
2724
+ Avoiding updates on unchanged image data:<br>
2725
+ 1) access "WP All Import > Import Settings";<br>
2726
+ 2) select "Update existing posts/products with changed data in your file > Choose which data to update";<br>
2727
+ 3) uncheck "Images" (otherwise WP All Import will delete the image metadata and FIFU will need to create that again);<br>
2728
+ 4) select "Custom Fields > Update only these Custom Fields, leave the rest alone".<br>
2729
+ </div>
2730
+ </div>
2731
  <div class="box">
2732
  <table>
2733
  <tr>
2834
  1) enable "FIFU settings > Admin Area > jQuery".<br>
2835
  </div>
2836
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2837
  <div class="box">
2838
  <table>
2839
  <tr>
2859
  <div class="greybox" style="position: relative; top: -10px">
2860
  Replacing http URLs by https:<br>
2861
  1) run this SQL command: UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'http://', 'https://') WHERE meta_key = 'fifu_image_url' AND meta_value LIKE '%site.com%';<br>
2862
+ 2) enable "FIFU settings > Metadata > Clean Metadata" toggle (it will be automatically disabled after a few minutes);<br>
2863
+ 3) enable "Image Metadata".<br>
2864
  * replace site.com by the domain of the URLs you want to update
2865
  </div>
2866
  </div>
2907
  0) make a backup (you might want to revert the changes later);<br>
2908
  1) deactivate Nelio;<br>
2909
  2) run this SQL command: INSERT INTO wp_postmeta (post_id, meta_key, meta_value) SELECT * FROM (SELECT post_id, 'fifu_image_url' AS meta_key, SUBSTRING_INDEX(SUBSTRING_INDEX(meta_value, '"', 2), '"', -1) AS meta_value FROM wp_postmeta WHERE meta_key = '_nelioefi_first_image') pm WHERE meta_value <> '';<br>
2910
+ 3) enable "FIFU settings > Metadata > Clean Metadata" toggle (it will be automatically disabled after a few minutes);<br>
2911
+ 4) enable "Image Metadata".<br>
2912
  </div>
2913
  </div>
2914
  <div class="box">
admin/menu.php CHANGED
@@ -24,7 +24,7 @@ function fifu_insert_menu() {
24
 
25
  function fifu_support_data() {
26
  // css
27
- wp_enqueue_style('fifu-menu-css', plugins_url('/html/css/menu.css', __FILE__));
28
  wp_enqueue_script('fifu-rest-route-js', plugins_url('/html/js/rest-route.js', __FILE__));
29
 
30
  // register custom variables for the AJAX script
@@ -88,7 +88,7 @@ function fifu_get_menu_html() {
88
  flush();
89
 
90
  // css and js
91
- wp_enqueue_style('fifu-menu-css', plugins_url('/html/css/menu.css', __FILE__));
92
  wp_enqueue_script('fifu-menu-js', plugins_url('/html/js/menu.js', __FILE__));
93
 
94
  // register custom variables for the AJAX script
24
 
25
  function fifu_support_data() {
26
  // css
27
+ wp_enqueue_style('fifu-menu-css', plugins_url('/html/css/menu.css?' . fifu_version(), __FILE__));
28
  wp_enqueue_script('fifu-rest-route-js', plugins_url('/html/js/rest-route.js', __FILE__));
29
 
30
  // register custom variables for the AJAX script
88
  flush();
89
 
90
  // css and js
91
+ wp_enqueue_style('fifu-menu-css', plugins_url('/html/css/menu.css?' . fifu_version(), __FILE__));
92
  wp_enqueue_script('fifu-menu-js', plugins_url('/html/js/menu.js', __FILE__));
93
 
94
  // register custom variables for the AJAX script
featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image from URL
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
7
- * Version: 2.8.5
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
4
  * Plugin Name: Featured Image from URL
5
  * Plugin URI: https://fifu.app/
6
  * 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.
7
+ * Version: 2.8.6
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/attachment.php CHANGED
@@ -21,7 +21,7 @@ function fifu_replace_attachment_url($att_url, $att_id) {
21
  else {
22
  if (get_post($att_id)) {
23
  $url = get_post($att_id)->guid;
24
- if ($url && strpos($url, 'http') === 0)
25
  return $url;
26
  }
27
  }
@@ -126,7 +126,7 @@ function fifu_get_width_height($dimension) {
126
  return array('width' => $width, 'height' => $height);
127
  }
128
 
129
- // accelerated-mobile-pages plugin
130
 
131
  function fifu_amp_url($url, $width, $height) {
132
  $size = get_post_meta(get_the_ID(), 'fifu_image_dimension');
@@ -138,3 +138,9 @@ function fifu_amp_url($url, $width, $height) {
138
  return array(0 => $url, 1 => $width, 2 => $height);
139
  }
140
 
 
 
 
 
 
 
21
  else {
22
  if (get_post($att_id)) {
23
  $url = get_post($att_id)->guid;
24
+ if ($url && strpos($url, 'http') === 0 && !fifu_is_mpd_active())
25
  return $url;
26
  }
27
  }
126
  return array('width' => $width, 'height' => $height);
127
  }
128
 
129
+ // plugin: accelerated-mobile-pages
130
 
131
  function fifu_amp_url($url, $width, $height) {
132
  $size = get_post_meta(get_the_ID(), 'fifu_image_dimension');
138
  return array(0 => $url, 1 => $width, 2 => $height);
139
  }
140
 
141
+ // plugin: multisite-post-duplicator
142
+
143
+ function fifu_is_mpd_active() {
144
+ return is_plugin_active('multisite-post-duplicator/mpd.php');
145
+ }
146
+
includes/html/css/woo.css CHANGED
@@ -1,7 +1,3 @@
1
  .woocommerce .products ul, .woocommerce ul.products {
2
  margin: 0 0 0em;
3
- }
4
-
5
- img.zoomImg {
6
- display:<?php echo fifu_woo_zoom(); ?> !important;
7
- }
1
  .woocommerce .products ul, .woocommerce ul.products {
2
  margin: 0 0 0em;
3
+ }
 
 
 
 
includes/html/jquery.html DELETED
@@ -1 +0,0 @@
1
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
 
includes/html/js/image.js CHANGED
@@ -1,6 +1,6 @@
1
  jQuery(document).ready(function ($) {
2
  // lazy load
3
- if ('<?php echo fifu_is_on("fifu_lazy"); ?>') {
4
  jQuery.extend(jQuery.lazyLoadXT, {
5
  srcAttr: 'data-src',
6
  visibleOnly: false,
@@ -19,7 +19,7 @@ jQuery(document).ready(function ($) {
19
  });
20
 
21
  jQuery(window).on('ajaxComplete', function () {
22
- if ('<?php echo fifu_is_on("fifu_lazy"); ?>') {
23
  setTimeout(function () {
24
  jQuery(window).lazyLoadXT();
25
  }, 300);
@@ -50,7 +50,7 @@ function resizeImg($) {
50
  }
51
 
52
  function disableClick($) {
53
- if ('<?php echo !fifu_woo_lbox(); ?>') {
54
  jQuery('.woocommerce-product-gallery__image').each(function (index) {
55
  jQuery(this).children().click(function () {
56
  return false;
1
  jQuery(document).ready(function ($) {
2
  // lazy load
3
+ if (fifuImageVars.fifu_lazy == 'on') {
4
  jQuery.extend(jQuery.lazyLoadXT, {
5
  srcAttr: 'data-src',
6
  visibleOnly: false,
19
  });
20
 
21
  jQuery(window).on('ajaxComplete', function () {
22
+ if (fifuImageVars.fifu_lazy == 'on') {
23
  setTimeout(function () {
24
  jQuery(window).lazyLoadXT();
25
  }, 300);
50
  }
51
 
52
  function disableClick($) {
53
+ if (fifuImageVars.fifu_woo_lbox == 'off') {
54
  jQuery('.woocommerce-product-gallery__image').each(function (index) {
55
  jQuery(this).children().click(function () {
56
  return false;
includes/html/script.html DELETED
@@ -1,3 +0,0 @@
1
- <style><?php include 'css/woo.css' ?></style>
2
-
3
- <script><?php include 'js/image.js' ?></script>
 
 
 
includes/thumbnail.php CHANGED
@@ -19,7 +19,19 @@ function fifu_add_js() {
19
  wp_enqueue_script('lazyload-srcset', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyloadxt/1.1.0/jquery.lazyloadxt.srcset.min.js');
20
  wp_enqueue_style('lazyload-spinner', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyloadxt/1.1.0/jquery.lazyloadxt.spinner.min.css');
21
  }
22
- include 'html/script.html';
 
 
 
 
 
 
 
 
 
 
 
 
23
  }
24
 
25
  function fifu_add_social_tags() {
@@ -34,7 +46,7 @@ function fifu_add_social_tags() {
34
 
35
  function fifu_add_jquery() {
36
  if (fifu_is_on('fifu_jquery'))
37
- include 'html/jquery.html';
38
  }
39
 
40
  function fifu_apply_css() {
19
  wp_enqueue_script('lazyload-srcset', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyloadxt/1.1.0/jquery.lazyloadxt.srcset.min.js');
20
  wp_enqueue_style('lazyload-spinner', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyloadxt/1.1.0/jquery.lazyloadxt.spinner.min.css');
21
  }
22
+
23
+ // css
24
+ wp_register_style('fifu-woo-css', plugins_url('/html/css/woo.css', __FILE__));
25
+ wp_enqueue_style('fifu-woo-css');
26
+ wp_add_inline_style('fifu-woo-css', 'img.zoomImg {display:' . fifu_woo_zoom() . ' !important}');
27
+
28
+ // js
29
+ wp_enqueue_script('fifu-image-js', plugins_url('/html/js/image.js', __FILE__));
30
+ wp_localize_script('fifu-image-js', 'fifuImageVars', [
31
+ 'fifu_lazy' => fifu_is_on("fifu_lazy") ? 'on' : 'off',
32
+ 'fifu_woo_lbox' => fifu_woo_lbox() ? 'on' : 'off',
33
+ 'fifu_woo_zoom' => fifu_woo_zoom(),
34
+ ]);
35
  }
36
 
37
  function fifu_add_social_tags() {
46
 
47
  function fifu_add_jquery() {
48
  if (fifu_is_on('fifu_jquery'))
49
+ wp_enqueue_script('fifu-jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');
50
  }
51
 
52
  function fifu_apply_css() {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
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, vimeo, featured video, hover, effects, hover effects, sirv, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, instagram, validation, jetpack, visual composer, play, pause, crop, resize, zoom, enable, disable, default, automatic, auto set, cloudinary, schedule, event, cron, seo, variable, tumblr, variation, product variation, shortcode, facebook, instagram, imgur, 9gag, wcfm, add-on
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
- Stable tag: 2.8.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -159,6 +159,9 @@ Features:
159
 
160
  == Changelog ==
161
 
 
 
 
162
  = 2.8.5 =
163
  * Bug fix: conflict betweem internal and external featured image fields on post editor.
164
 
@@ -684,6 +687,9 @@ was removed. To finish, a Premium version is now been presented.
684
 
685
  == Upgrade Notice ==
686
 
 
 
 
687
  = 2.8.5 =
688
  * Bug fix: conflict betweem internal and external featured image fields on post editor.
689
 
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, vimeo, featured video, hover, effects, hover effects, sirv, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, instagram, validation, jetpack, visual composer, play, pause, crop, resize, zoom, enable, disable, default, automatic, auto set, cloudinary, schedule, event, cron, seo, variable, tumblr, variation, product variation, shortcode, facebook, instagram, imgur, 9gag, wcfm, add-on
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
+ Stable tag: 2.8.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
159
 
160
  == Changelog ==
161
 
162
+ = 2.8.6 =
163
+ * Bug fix: conflict with Multisite Post Duplicator plugin; Improvement: public front-end script should run a little faster now; Improvement: plugin version added to CSS to avoid cache style issues.
164
+
165
  = 2.8.5 =
166
  * Bug fix: conflict betweem internal and external featured image fields on post editor.
167
 
687
 
688
  == Upgrade Notice ==
689
 
690
+ = 2.8.6 =
691
+ * Bug fix: conflict with Multisite Post Duplicator plugin; Improvement: public front-end script should run a little faster now; Improvement: plugin version added to CSS to avoid cache style issues.
692
+
693
  = 2.8.5 =
694
  * Bug fix: conflict betweem internal and external featured image fields on post editor.
695