Featured Image From URL - Version 3.0.0

Version Description

  • Improvement (Premium): supports videos from Publitio now; New: donation campaign removed ($ 142.90 raised); New: Premium version has now 5 different annual plans.
Download this release

Release Info

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

Code changes from version 2.9.9 to 3.0.0

admin/html/js/menu.js CHANGED
@@ -1,6 +1,7 @@
1
  jQuery(document).ready(function () {
2
  jQuery('div.wrap div.header-box div.notice').hide();
3
  jQuery('div.wrap div.header-box div#message').hide();
 
4
  window.scrollTo(0, 0);
5
  jQuery('.wrap').css('opacity', 1);
6
  });
1
  jQuery(document).ready(function () {
2
  jQuery('div.wrap div.header-box div.notice').hide();
3
  jQuery('div.wrap div.header-box div#message').hide();
4
+ jQuery('div.wrap div.header-box div.updated').remove();
5
  window.scrollTo(0, 0);
6
  jQuery('.wrap').css('opacity', 1);
7
  });
admin/html/menu.html CHANGED
@@ -1,7 +1,7 @@
1
  <div class="wrap" style="opacity:0">
2
 
3
  <div class="header-box">
4
- <h1 style="color:white;padding-left:20px"><span class="dashicons dashicons-camera" style="font-size:30px"></span><span style="padding-left:20px">featured image from url 2</span></h1>
5
  <a href="https://chrome.google.com/webstore/detail/fifu-scraper/pccimcccbkdeeadhejdmnffmllpicola" target="_blank"><img class="chrome" src="https://storage.googleapis.com/featuredimagefromurl/chrome-web-store2.png" title="Chrome Extension Available"/></a>
6
  </div>
7
 
@@ -22,7 +22,7 @@
22
  <li><a href="#tabs-o"><i class="fas fa-shopping-cart"></i> WooCommerce</a></li>
23
  <li><a href="#tabs-p"><i class="fas fa-redo"></i> WP All Import</a></li>
24
  <li><a href="#tabs-t"><i class="fas fa-info-circle"></i> Troubleshooting</a></li>
25
- <li><a href="#tabs-a"><i class="fas fa-star"></i> Premium <b style="border-radius:2px;padding:3px;background-color:#32373c;color:white">$ 39.90 Lifetime Updates</b></a></li>
26
  <br>
27
  <br>
28
  <div id="tabs-a">
@@ -1460,7 +1460,7 @@
1460
  <div class="greybox" id="grad2">
1461
  <b>Premium feature</b><br><br>
1462
 
1463
- FIFU supports videos from YouTube, Vimeo, Facebook, Instagram, Imgur, 9GAG, Cloudinary and Tumblr. You can enable the video meta box here.
1464
 
1465
  </div>
1466
 
@@ -2652,7 +2652,7 @@
2652
  <div class="box">
2653
  <h2>Fast Support</h2>
2654
  <div class="greybox">
2655
- If you need any help, you can refer to <a href="https://wordpress.org/plugins/featured-image-from-url/screenshots/" target="_blank">screenshots</a> or send an email to <b>marcel@featuredimagefromurl.com</b> (send me this <a href="admin.php?page=fifu-support-data"><button id="opener" onclick="jQuery('#tabs-top').block({message: 'Please wait some seconds...', css: {backgroundColor: 'none', border: 'none', color: 'white'}});">data</button></a>, please).
2656
  <br>
2657
  <br>
2658
  <table style="background-color: #fff; border-radius: 13px;">
@@ -2686,7 +2686,7 @@
2686
  3) enable Image Metadata.
2687
  </td>
2688
  <td style="vertical-align: top;">
2689
- 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.
2690
  </td>
2691
  <td>
2692
  You can set external featured images using custom fields. The main one is <b>fifu_image_url</b>. However the REST API is only supported by FIFU Premium. For nonstandard automation, just enable Schedule Metadata Generation, at Admin tab (no additional code required).
@@ -2696,10 +2696,10 @@
2696
  </div>
2697
  </div>
2698
  <div class="box">
2699
- <h2><a class="dbox-donation-button" style="background: #2d81c5;color: #fff;text-decoration: none;display: inline-block;font-size: 16px;padding: 2px 17px;-webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;box-shadow: 0px 0px 0px 0px #1f5a89;text-shadow: 0 1px rgba(0, 0, 0, 0.3);" href="https://donorbox.org/fifu" target="_blank">Donate </a> $ 1 / year to take this project to the next level <span class="dashicons dashicons-info" style="font-size: 25px;" title="Donate with a Card, Apple Pay, Google Pay, Stripe, PayPal and more. No account required."></span></h2>
2700
  <div class="greybox">
2701
  <a href="https://www.linkedin.com/in/marceljm/" target="_blank"><img src="https://avatars0.githubusercontent.com/u/10578419?s=460&v=4" style="border-radius:100%;width:8.5%;float:left"></a>
2702
- <div style="position:relative;left:10px">Hi, I'm Marcel, Software Engineer and Featured Image from URL author, a project 100% developed in my free time. During the last 4 years I did my best to develop all requested features, integrations, improvements and bug fixes. And thanks to FIFU you keep saving money on storage, processing and copyright. However, with so many users (100,000+ active installs in 2020), it's becoming increasingly difficult to help everyone. <b>Extraordinary performance and automation features aren't done yet</b> while frequent updates are required to keep this plugin working with the most current WordPress components. So please become a sponsor and help me to take FIFU to the next level!</div>
2703
  </div>
2704
  </div>
2705
  <div class="box">
@@ -2746,6 +2746,38 @@
2746
  From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
2747
  </div>
2748
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2749
  <div class="box">
2750
  <table>
2751
  <tr>
1
  <div class="wrap" style="opacity:0">
2
 
3
  <div class="header-box">
4
+ <h1 style="color:white;padding-left:20px"><span class="dashicons dashicons-camera" style="font-size:30px"></span><span style="padding-left:20px">featured image from url 3</span></h1>
5
  <a href="https://chrome.google.com/webstore/detail/fifu-scraper/pccimcccbkdeeadhejdmnffmllpicola" target="_blank"><img class="chrome" src="https://storage.googleapis.com/featuredimagefromurl/chrome-web-store2.png" title="Chrome Extension Available"/></a>
6
  </div>
7
 
22
  <li><a href="#tabs-o"><i class="fas fa-shopping-cart"></i> WooCommerce</a></li>
23
  <li><a href="#tabs-p"><i class="fas fa-redo"></i> WP All Import</a></li>
24
  <li><a href="#tabs-t"><i class="fas fa-info-circle"></i> Troubleshooting</a></li>
25
+ <li><a href="#tabs-a"><i class="fas fa-star"></i> Premium <b style="border-radius:2px;padding:3px;background-color:#32373c;color:white">$ 39.90</b></a></li>
26
  <br>
27
  <br>
28
  <div id="tabs-a">
1460
  <div class="greybox" id="grad2">
1461
  <b>Premium feature</b><br><br>
1462
 
1463
+ FIFU supports videos from YouTube, Vimeo, Facebook, Instagram, Imgur, 9GAG, Cloudinary, Tumblr and Publitio. You can enable the video meta box here.
1464
 
1465
  </div>
1466
 
2652
  <div class="box">
2653
  <h2>Fast Support</h2>
2654
  <div class="greybox">
2655
+ If you need help, you can refer to <a href="https://wordpress.org/plugins/featured-image-from-url/screenshots/" target="_blank">screenshots</a>, <a href="admin.php?page=featured-image-from-url#tabs-t" target="_blank">troubleshooting</a> or send an email to <b>marcel@featuredimagefromurl.com</b> (send me this <a href="admin.php?page=fifu-support-data"><button id="opener" onclick="jQuery('#tabs-top').block({message: 'Please wait some seconds...', css: {backgroundColor: 'none', border: 'none', color: 'white'}});">data</button></a>, please).
2656
  <br>
2657
  <br>
2658
  <table style="background-color: #fff; border-radius: 13px;">
2686
  3) enable Image Metadata.
2687
  </td>
2688
  <td style="vertical-align: top;">
2689
+ Just send me an email. If you are available to discuss the details and the plugin is free and has more than 50,000 active installs, I should provide an integration very soon.
2690
  </td>
2691
  <td>
2692
  You can set external featured images using custom fields. The main one is <b>fifu_image_url</b>. However the REST API is only supported by FIFU Premium. For nonstandard automation, just enable Schedule Metadata Generation, at Admin tab (no additional code required).
2696
  </div>
2697
  </div>
2698
  <div class="box">
2699
+ <h2><a class="dbox-donation-button" style="background: #2d81c5;color: #fff;text-decoration: none;display: inline-block;font-size: 16px;padding: 2px 17px;-webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;box-shadow: 0px 0px 0px 0px #1f5a89;text-shadow: 0 1px rgba(0, 0, 0, 0.3);" href="https://fifu.app/#price" target="_blank">Buy Premium</a> and help me to take this project to the next level <span class="dashicons dashicons-info" style="font-size: 25px;" title="Pay with a Card, Apple Pay, Google Pay, Stripe, PayPal and more. No account required."></span></h2>
2700
  <div class="greybox">
2701
  <a href="https://www.linkedin.com/in/marceljm/" target="_blank"><img src="https://avatars0.githubusercontent.com/u/10578419?s=460&v=4" style="border-radius:100%;width:8.5%;float:left"></a>
2702
+ <div style="position:relative;left:10px">Hi, I'm Marcel, Software Engineer and Featured Image from URL author. <br>During the last 4 years I did my best to develop all requested features, integrations, improvements and bug fixes. And thanks to FIFU you keep saving money on storage, processing and copyright. However, with so many users (100,000+ active installs), it's becoming increasingly difficult to help everyone. <b>Extraordinary performance and automation features aren't done yet</b> while updates are required to keep this plugin working with the most current WordPress components. So please become a Premium user and help me to take FIFU to the next level!</div>
2703
  </div>
2704
  </div>
2705
  <div class="box">
2746
  From September 2019, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
2747
  </div>
2748
  </div>
2749
+ <div class="box">
2750
+ <table>
2751
+ <tr>
2752
+ <td style="border-bottom:none">2020-04-03</td>
2753
+ <td style="border-bottom:none"><h3> Elementor</h3></td>
2754
+ <td style="border-bottom:none">plugin</td>
2755
+ </tr>
2756
+ </table>
2757
+ <div class="greybox" style="position: relative; top: -10px">
2758
+ Showing an external featured image/video:<br>
2759
+ 1) open the default WordPress editor;<br>
2760
+ 2) add the image URL into "Featured Image from URL" field (or the video URL into "Featured Video from URL");<br>
2761
+ 3) click on "Edit with Elementor" button;<br>
2762
+ 4) search for the "Featured Image" widget;<br>
2763
+ 5) just drag the widget (no edition required).<br>
2764
+ </div>
2765
+ </div>
2766
+ <div class="box">
2767
+ <table>
2768
+ <tr>
2769
+ <td style="border-bottom:none">2020-04-02</td>
2770
+ <td style="border-bottom:none"><h3> WordPress</h3></td>
2771
+ <td style="border-bottom:none"></td>
2772
+ </tr>
2773
+ </table>
2774
+ <div class="greybox" style="position: relative; top: -10px">
2775
+ Removing the references to the internal featured images for all posts that have an external featured image as well:<br>
2776
+ 1) run this SQL command: DELETE FROM wp_postmeta WHERE meta_key = '_thumbnail_id' AND post_id IN (SELECT post_id FROM (SELECT post_id FROM wp_postmeta WHERE meta_key = 'fifu_image_url') AS x);<br>
2777
+ 2) enable "FIFU settings > Metadata > Clean Metadata";<br>
2778
+ 3) enable "Image Metadata".<br>
2779
+ </div>
2780
+ </div>
2781
  <div class="box">
2782
  <table>
2783
  <tr>
admin/html/support-data.html CHANGED
@@ -1,7 +1,7 @@
1
  <div class="wrap">
2
 
3
  <div class="header-box">
4
- <h1 style="color:white;padding-left:20px"><span class="dashicons dashicons-camera" style="font-size:30px"></span><span style="padding-left:20px">featured image from url 2</span></h1>
5
  </div>
6
 
7
  <div id="tabs-top" style="float:left">
1
  <div class="wrap">
2
 
3
  <div class="header-box">
4
+ <h1 style="color:white;padding-left:20px"><span class="dashicons dashicons-camera" style="font-size:30px"></span><span style="padding-left:20px">featured image from url 3</span></h1>
5
  </div>
6
 
7
  <div id="tabs-top" style="float:left">
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?' . 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
@@ -90,7 +90,7 @@ function fifu_get_menu_html() {
90
  flush();
91
 
92
  // css and js
93
- wp_enqueue_style('fifu-menu-css', plugins_url('/html/css/menu.css?' . fifu_version(), __FILE__));
94
  wp_enqueue_script('fifu-menu-js', plugins_url('/html/js/menu.js', __FILE__));
95
 
96
  // register custom variables for the AJAX script
@@ -289,6 +289,10 @@ function fifu_version() {
289
  return $plugin_data ? $plugin_data['Name'] . ':' . $plugin_data['Version'] : '';
290
  }
291
 
 
 
 
 
292
  function fifu_get_last($meta_key) {
293
  $list = '';
294
  foreach (fifu_db_get_last($meta_key) as $key => $row) {
24
 
25
  function fifu_support_data() {
26
  // css
27
+ wp_enqueue_style('fifu-menu-css', plugins_url('/html/css/menu.css?' . fifu_version_number(), __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
90
  flush();
91
 
92
  // css and js
93
+ wp_enqueue_style('fifu-menu-css', plugins_url('/html/css/menu.css?' . fifu_version_number(), __FILE__));
94
  wp_enqueue_script('fifu-menu-js', plugins_url('/html/js/menu.js', __FILE__));
95
 
96
  // register custom variables for the AJAX script
289
  return $plugin_data ? $plugin_data['Name'] . ':' . $plugin_data['Version'] : '';
290
  }
291
 
292
+ function fifu_version_number() {
293
+ return get_plugin_data(FIFU_PLUGIN_DIR . 'featured-image-from-url.php')['Version'];
294
+ }
295
+
296
  function fifu_get_last($meta_key) {
297
  $list = '';
298
  foreach (fifu_db_get_last($meta_key) as $key => $row) {
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 a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
- * Version: 2.9.9
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 a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
+ * Version: 3.0.0
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/attachment.php CHANGED
@@ -77,10 +77,25 @@ function fifu_replace_attachment_image_src($image, $att_id, $size) {
77
  }
78
  $dimension = $post ? get_post_meta($post, 'fifu_image_dimension') : null;
79
  $arrFIFU = fifu_get_width_height($dimension);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  return array(
81
  fifu_has_internal_image_path($image[0]) ? get_post($att_id)->guid : $image[0],
82
- $arrFIFU['width'] == null || (!$dimension && isset($image_size['width']) && $image_size['width'] < $arrFIFU['width']) ? $image_size['width'] : $arrFIFU['width'],
83
- $arrFIFU['height'] == null || (!$dimension && isset($image_size['height']) && $image_size['height'] < $arrFIFU['height']) ? $image_size['height'] : $arrFIFU['height'],
84
  isset($image_size['crop']) ? $image_size['crop'] : '',
85
  );
86
  }
77
  }
78
  $dimension = $post ? get_post_meta($post, 'fifu_image_dimension') : null;
79
  $arrFIFU = fifu_get_width_height($dimension);
80
+
81
+ $width = $arrFIFU['width'];
82
+ if (isset($image_size['width'])) {
83
+ $is = $image_size['width'];
84
+ if (!$width || (!$dimension && $is < $width))
85
+ $width = $is;
86
+ }
87
+
88
+ $height = $arrFIFU['height'];
89
+ if (isset($image_size['height'])) {
90
+ $is = $image_size['height'];
91
+ if (!$height || (!$dimension && $is < $height))
92
+ $height = $is;
93
+ }
94
+
95
  return array(
96
  fifu_has_internal_image_path($image[0]) ? get_post($att_id)->guid : $image[0],
97
+ $width,
98
+ $height,
99
  isset($image_size['crop']) ? $image_size['crop'] : '',
100
  );
101
  }
includes/thumbnail.php CHANGED
@@ -26,7 +26,7 @@ function fifu_add_js() {
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?' . fifu_version(), __FILE__));
30
  wp_localize_script('fifu-image-js', 'fifuImageVars', [
31
  'fifu_lazy' => fifu_is_on("fifu_lazy") ? 'on' : 'off',
32
  'fifu_woo_lbox_enabled' => fifu_woo_lbox(),
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?' . fifu_version_number(), __FILE__));
30
  wp_localize_script('fifu-image-js', 'fifuImageVars', [
31
  'fifu_lazy' => fifu_is_on("fifu_lazy") ? 'on' : 'off',
32
  'fifu_woo_lbox_enabled' => fifu_woo_lbox(),
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Plugin Name ===
2
  Contributors: marceljm
3
  Donate link: https://donorbox.org/fifu
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, 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, scraper, 特色圖片, 图片, 网址, 外部, unsplash, keyword, random, acf
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
- Stable tag: 2.9.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -162,6 +162,9 @@ Features:
162
 
163
  == Changelog ==
164
 
 
 
 
165
  = 2.9.9 =
166
  * Improvement (Premium): play button on video image thumbnail can be disabled/enabled now; Bug fix: conflict between WooCommerce lightbox toggle and some themes.
167
 
@@ -729,6 +732,9 @@ was removed. To finish, a Premium version is now been presented.
729
 
730
  == Upgrade Notice ==
731
 
 
 
 
732
  = 2.9.9 =
733
  * Improvement (Premium): play button on video image thumbnail can be disabled/enabled now; Bug fix: conflict between WooCommerce lightbox toggle and some themes.
734
 
1
  === Plugin Name ===
2
  Contributors: marceljm
3
  Donate link: https://donorbox.org/fifu
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, 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, publitio, 9gag, wcfm, add-on, scraper, 特色圖片, 图片, 网址, 外部, unsplash, keyword, random, acf
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
+ Stable tag: 3.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
162
 
163
  == Changelog ==
164
 
165
+ = 3.0.0 =
166
+ * Improvement (Premium): supports videos from Publitio now; New: donation campaign removed ($ 142.90 raised); New: Premium version has now 5 different annual plans.
167
+
168
  = 2.9.9 =
169
  * Improvement (Premium): play button on video image thumbnail can be disabled/enabled now; Bug fix: conflict between WooCommerce lightbox toggle and some themes.
170
 
732
 
733
  == Upgrade Notice ==
734
 
735
+ = 3.0.0 =
736
+ * Improvement (Premium): supports videos from Publitio now; New: donation campaign removed ($ 142.90 raised); New: Premium version has now 5 different annual plans.
737
+
738
  = 2.9.9 =
739
  * Improvement (Premium): play button on video image thumbnail can be disabled/enabled now; Bug fix: conflict between WooCommerce lightbox toggle and some themes.
740