Featured Image From URL - Version 3.6.0

Version Description

  • New features: for bbPress (Settings > Social > bbPress); improvement: Auto set featured image using post title and search engine (faster and unlimited now); improvement: Auto set featured image using ISBN and books API (faster and unlimited now); improvement: added FIFU fields to bbPress custom post types (Forum, Topic and Reply).
Download this release

Release Info

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

Code changes from version 3.5.9 to 3.6.0

admin/html/menu.html CHANGED
@@ -1620,6 +1620,57 @@
1620
  300, 600, 900...
1621
  </th>
1622
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1623
  <tr class="color">
1624
  <th>
1625
  <?php $fifu['tab']['woo']() ?>
@@ -3830,6 +3881,74 @@
3830
  </tr>
3831
  </table>
3832
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3833
  </div>
3834
  <div id="tabs-i">
3835
  <div class="box">
1620
  300, 600, 900...
1621
  </th>
1622
  </tr>
1623
+ <tr class="color">
1624
+ <th>
1625
+ <?php $fifu['tab']['social']() ?>
1626
+ </th>
1627
+ <th>
1628
+ <?php $fifu['title']['bbpress']() ?>
1629
+ </th>
1630
+ <th>
1631
+ <?php $fifu['bbpress']['fields']() ?>
1632
+ </th>
1633
+ <th>
1634
+ wp fifu bbpress --fields &lt;toggle&gt;
1635
+ </th>
1636
+ <th>
1637
+ on, off
1638
+ </th>
1639
+ </tr>
1640
+ <tr class="color">
1641
+ <th>
1642
+ <?php $fifu['tab']['social']() ?>
1643
+ </th>
1644
+ <th>
1645
+ <?php $fifu['title']['bbpress']() ?>
1646
+ </th>
1647
+ <th>
1648
+ <?php $fifu['bbpress']['title']() ?>
1649
+ </th>
1650
+ <th>
1651
+ wp fifu bbpress --title &lt;toggle&gt;
1652
+ </th>
1653
+ <th>
1654
+ on, off
1655
+ </th>
1656
+ </tr>
1657
+ <tr class="color">
1658
+ <th>
1659
+ <?php $fifu['tab']['social']() ?>
1660
+ </th>
1661
+ <th>
1662
+ <?php $fifu['title']['bbpress']() ?>
1663
+ </th>
1664
+ <th>
1665
+ <?php $fifu['bbpress']['avatar']() ?>
1666
+ </th>
1667
+ <th>
1668
+ wp fifu bbpress --avatar &lt;toggle&gt;
1669
+ </th>
1670
+ <th>
1671
+ on, off
1672
+ </th>
1673
+ </tr>
1674
  <tr class="color">
1675
  <th>
1676
  <?php $fifu['tab']['woo']() ?>
3881
  </tr>
3882
  </table>
3883
  </div>
3884
+ <div class="box">
3885
+ <div class="fifu-pro"><a href="https://fifu.app" target="_blank" style="color:grey">premium</a></div>
3886
+ <h2><?php $fifu['title']['bbpress']() ?></h2>
3887
+ <div class="greybox" id="grad2">
3888
+ <?php $fifu['bbpress']['desc']() ?>
3889
+ <br>
3890
+ <br>
3891
+ <center>
3892
+ <div class="polaroid">
3893
+ <img src="https://storage.googleapis.com/featuredimagefromurl/bbpress01.jpg" style="width:100%">
3894
+ </div>
3895
+ </center>
3896
+ <br>
3897
+ <center>
3898
+ <div class="polaroid">
3899
+ <img src="https://storage.googleapis.com/featuredimagefromurl/bbpress03.jpg" style="width:100%">
3900
+ </div>
3901
+ </center>
3902
+ <br>
3903
+ <center>
3904
+ <div class="polaroid">
3905
+ <img src="https://storage.googleapis.com/featuredimagefromurl/bbpress02.jpg" style="width:100%">
3906
+ </div>
3907
+ </center>
3908
+ </div>
3909
+ <br>
3910
+ <table style="text-align:left">
3911
+ <tr>
3912
+ <th>
3913
+ <input
3914
+ type="submit"
3915
+ href="javascript:void(0)"
3916
+ class="toggleoff"
3917
+ value=""
3918
+ style="display:block;border:none">
3919
+ </th>
3920
+ <th>
3921
+ <?php $fifu['bbpress']['fields']() ?>
3922
+ </th>
3923
+ </tr>
3924
+ <tr>
3925
+ <th>
3926
+ <input
3927
+ type="submit"
3928
+ href="javascript:void(0)"
3929
+ class="toggleoff"
3930
+ value=""
3931
+ style="display:block;border:none">
3932
+ </th>
3933
+ <th>
3934
+ <?php $fifu['bbpress']['title']() ?>
3935
+ </th>
3936
+ </tr>
3937
+ <tr>
3938
+ <th>
3939
+ <input
3940
+ type="submit"
3941
+ href="javascript:void(0)"
3942
+ class="toggleoff"
3943
+ value=""
3944
+ style="display:block;border:none">
3945
+ </th>
3946
+ <th>
3947
+ <?php $fifu['bbpress']['avatar']() ?>
3948
+ </th>
3949
+ </tr>
3950
+ </table>
3951
+ </div>
3952
  </div>
3953
  <div id="tabs-i">
3954
  <div class="box">
admin/html/meta-box.html CHANGED
@@ -104,9 +104,11 @@
104
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Woocommerce video gallery" class="dashicons dashicons-format-video" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
105
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured slider" class="dashicons dashicons-images-alt2" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
106
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured shortcode" class="dashicons dashicons-shortcode" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
 
107
  <td style="padding: 0px 0px" class="fifu-hover"><span title="ISBN (Auto set featured image using ISBN and books API)" class="dashicons dashicons-book-alt" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
108
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Screenshot (Auto set screenshot as featured image)" class="dashicons dashicons-cover-image" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
109
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Image finder (Auto set featured image using web page address)" class="dashicons dashicons-code-standards" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
 
110
  </tr>
111
  </table>
112
  </div>
104
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Woocommerce video gallery" class="dashicons dashicons-format-video" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
105
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured slider" class="dashicons dashicons-images-alt2" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
106
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured shortcode" class="dashicons dashicons-shortcode" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
107
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Title (Auto set featured image using post title and search engine)" class="dashicons dashicons-google" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
108
  <td style="padding: 0px 0px" class="fifu-hover"><span title="ISBN (Auto set featured image using ISBN and books API)" class="dashicons dashicons-book-alt" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
109
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Screenshot (Auto set screenshot as featured image)" class="dashicons dashicons-cover-image" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
110
  <td style="padding: 0px 0px" class="fifu-hover"><span title="Image finder (Auto set featured image using web page address)" class="dashicons dashicons-code-standards" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
111
+ <td style="padding: 0px 0px" class="fifu-hover"><span title="Featured image/video (for bbPress forms)" class="dashicons dashicons-buddicons-bbpress-logo" style="font-size:13px; display: unset; vertical-align:sub;"></span></td>
112
  </tr>
113
  </table>
114
  </div>
admin/strings.php CHANGED
@@ -283,6 +283,9 @@ function fifu_get_strings_settings() {
283
  $fifu['title']['social'] = function() {
284
  _e("Social Tags", FIFU_SLUG);
285
  };
 
 
 
286
  $fifu['title']['rss'] = function() {
287
  _e("Media RSS Tags", FIFU_SLUG);
288
  };
@@ -592,7 +595,7 @@ function fifu_get_strings_settings() {
592
 
593
  // auto set
594
  $fifu['auto']['desc'] = function() {
595
- _e("Set featured images automatically. FIFU will check every minute if there are post types without featured images and will perform web searches based on post titles to get the image URLs. The image searches happen in a FIFU cloud service connected to a search engine and, due the costs involved, for now it's limited to 2,500 posts a day, one search at a time, and available only for license keys purchased/renewed from a year ago.", FIFU_SLUG);
596
  };
597
  $fifu['auto']['tab']['auto'] = function() {
598
  _e("Auto set", FIFU_SLUG);
@@ -615,7 +618,7 @@ function fifu_get_strings_settings() {
615
 
616
  // isbn
617
  $fifu['isbn']['desc'] = function() {
618
- _e("Set featured images automatically. FIFU will check every minute if there are post types without featured images and will perform web searches based on ISBN to get the image URLs. The image searches happen in a FIFU cloud service connected to a books API and, due the costs involved, for now it's limited to 2,500 posts a day, one search at a time, and available only for license keys purchased/renewed from a year ago.", FIFU_SLUG);
619
  };
620
 
621
  // screenshot
@@ -1072,6 +1075,20 @@ function fifu_get_strings_settings() {
1072
  _e("Add media RSS tags in the RSS feed. This way, services that make use of RSS, such as Google News, can show the featured images.", FIFU_SLUG);
1073
  };
1074
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1075
  // title
1076
  $fifu['title']['desc'] = function() {
1077
  _e("Set the title of a featured image with the post title.", FIFU_SLUG);
283
  $fifu['title']['social'] = function() {
284
  _e("Social Tags", FIFU_SLUG);
285
  };
286
+ $fifu['title']['bbpress'] = function() {
287
+ _e("bbPress", FIFU_SLUG);
288
+ };
289
  $fifu['title']['rss'] = function() {
290
  _e("Media RSS Tags", FIFU_SLUG);
291
  };
595
 
596
  // auto set
597
  $fifu['auto']['desc'] = function() {
598
+ _e("Set featured images automatically. FIFU will check every minute if there are post types without featured images and will perform web searches based on post titles to get the image URLs (~10/min).", FIFU_SLUG);
599
  };
600
  $fifu['auto']['tab']['auto'] = function() {
601
  _e("Auto set", FIFU_SLUG);
618
 
619
  // isbn
620
  $fifu['isbn']['desc'] = function() {
621
+ _e("Set featured images automatically. FIFU will check every minute if there are post types without featured images and will perform web searches based on ISBN to get the image URLs.", FIFU_SLUG);
622
  };
623
 
624
  // screenshot
1075
  _e("Add media RSS tags in the RSS feed. This way, services that make use of RSS, such as Google News, can show the featured images.", FIFU_SLUG);
1076
  };
1077
 
1078
+ // bbpress
1079
+ $fifu['bbpress']['desc'] = function() {
1080
+ _e("Allows you to add featured images/videos to bbPress forums and topics.", FIFU_SLUG);
1081
+ };
1082
+ $fifu['bbpress']['fields'] = function() {
1083
+ _e("add featured image/video fields to bbPress forms", FIFU_SLUG);
1084
+ };
1085
+ $fifu['bbpress']['title'] = function() {
1086
+ _e("display featured image before forum/topic title", FIFU_SLUG);
1087
+ };
1088
+ $fifu['bbpress']['avatar'] = function() {
1089
+ _e("replace profile picture by featured image", FIFU_SLUG);
1090
+ };
1091
+
1092
  // title
1093
  $fifu['title']['desc'] = function() {
1094
  _e("Set the title of a featured image with the post title.", FIFU_SLUG);
featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image as featured image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
- * Version: 3.5.9
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image as featured image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
+ * Version: 3.6.0
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
includes/attachment.php CHANGED
@@ -25,11 +25,11 @@ function fifu_process_url($att_url, $att_id) {
25
 
26
  fifu_fix_legacy($url, $att_id);
27
 
28
- return fifu_process_external_url($url, $att_id);
29
  }
30
 
31
- function fifu_process_external_url($url, $att_id) {
32
- return fifu_add_url_parameters($url, $att_id);
33
  }
34
 
35
  function fifu_fix_legacy($url, $att_id) {
@@ -200,7 +200,7 @@ function fifu_get_photon_url($image, $size, $att_id) {
200
  define('IS_WPCOM', true);
201
 
202
  $image[0] = jetpack_photon_url($image[0], $args, null);
203
- $image[0] = fifu_process_external_url($image[0], $att_id);
204
 
205
  return $image;
206
  }
@@ -310,7 +310,7 @@ function fifu_filter_wp_get_attachment_metadata($data, $att_id) {
310
  return $data;
311
  }
312
 
313
- function fifu_add_url_parameters($url, $att_id) {
314
  $post_id = get_post($att_id)->post_parent;
315
 
316
  if (!$post_id)
25
 
26
  fifu_fix_legacy($url, $att_id);
27
 
28
+ return fifu_process_external_url($url, $att_id, null);
29
  }
30
 
31
+ function fifu_process_external_url($url, $att_id, $size) {
32
+ return fifu_add_url_parameters($url, $att_id, $size);
33
  }
34
 
35
  function fifu_fix_legacy($url, $att_id) {
200
  define('IS_WPCOM', true);
201
 
202
  $image[0] = jetpack_photon_url($image[0], $args, null);
203
+ $image[0] = fifu_process_external_url($image[0], $att_id, $size);
204
 
205
  return $image;
206
  }
310
  return $data;
311
  }
312
 
313
+ function fifu_add_url_parameters($url, $att_id, $size) {
314
  $post_id = get_post($att_id)->post_parent;
315
 
316
  if (!$post_id)
includes/html/js/lazySizesConfig.js CHANGED
@@ -64,8 +64,8 @@ document.addEventListener('lazybeforeunveil', function (e) {
64
  }
65
 
66
  // width & height
67
- jQuery(e.target).attr('fifu-width', e.srcElement.clientWidth);
68
- jQuery(e.target).attr('fifu-height', e.srcElement.clientHeight);
69
  });
70
 
71
  document.addEventListener('lazyunveilread', function (e) {
64
  }
65
 
66
  // width & height
67
+ // jQuery(e.target).attr('fifu-width', e.srcElement.clientWidth);
68
+ // jQuery(e.target).attr('fifu-height', e.srcElement.clientHeight);
69
  });
70
 
71
  document.addEventListener('lazyunveilread', function (e) {
includes/jetpack.php CHANGED
@@ -5,7 +5,7 @@ function fifu_debug_jetpack() {
5
  }
6
 
7
  function fifu_jetpack_blocked($url) {
8
- $blocklist = array('amazon-adsystem.com');
9
  foreach ($blocklist as $domain) {
10
  if (strpos($url, $domain) !== false)
11
  return true;
5
  }
6
 
7
  function fifu_jetpack_blocked($url) {
8
+ $blocklist = array('amazon-adsystem.com', 'sapo.io');
9
  foreach ($blocklist as $domain) {
10
  if (strpos($url, $domain) !== false)
11
  return true;
includes/thumbnail.php CHANGED
@@ -25,9 +25,9 @@ function fifu_add_js() {
25
  if (fifu_is_on('fifu_lazy')) {
26
  wp_enqueue_style('lazyload-spinner', plugins_url('/html/css/lazyload.css', __FILE__), array(), fifu_version_number());
27
  wp_enqueue_script('lazysizes-config', plugins_url('/html/js/lazySizesConfig.js', __FILE__), array('jquery'), fifu_version_number());
28
- wp_enqueue_script('unveilhooks', 'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.2/plugins/unveilhooks/ls.unveilhooks.min.js');
29
- wp_enqueue_script('bgset', 'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.2/plugins/bgset/ls.bgset.min.js');
30
- wp_enqueue_script('lazysizes', 'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.2/lazysizes.min.js');
31
  }
32
 
33
  if (class_exists('WooCommerce')) {
25
  if (fifu_is_on('fifu_lazy')) {
26
  wp_enqueue_style('lazyload-spinner', plugins_url('/html/css/lazyload.css', __FILE__), array(), fifu_version_number());
27
  wp_enqueue_script('lazysizes-config', plugins_url('/html/js/lazySizesConfig.js', __FILE__), array('jquery'), fifu_version_number());
28
+ wp_enqueue_script('unveilhooks', 'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.3.2/plugins/unveilhooks/ls.unveilhooks.min.js');
29
+ wp_enqueue_script('bgset', 'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.3.2/plugins/bgset/ls.bgset.min.js');
30
+ wp_enqueue_script('lazysizes', 'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.3.2/lazysizes.min.js');
31
  }
32
 
33
  if (class_exists('WooCommerce')) {
includes/util.php CHANGED
@@ -38,6 +38,8 @@ function fifu_get_post_types() {
38
  if (post_type_supports($post_type, 'thumbnail'))
39
  array_push($arr, $post_type);
40
  }
 
 
41
  return $arr;
42
  }
43
 
@@ -122,6 +124,10 @@ function fifu_is_jetpack_active() {
122
  return false;
123
  }
124
 
 
 
 
 
125
  // active themes
126
 
127
  function fifu_is_flatsome_active() {
38
  if (post_type_supports($post_type, 'thumbnail'))
39
  array_push($arr, $post_type);
40
  }
41
+ if (fifu_is_bbpress_active())
42
+ array_push($arr, 'forum', 'topic', 'reply');
43
  return $arr;
44
  }
45
 
124
  return false;
125
  }
126
 
127
+ function fifu_is_bbpress_active() {
128
+ return is_plugin_active('bbpress/bbpress.php');
129
+ }
130
+
131
  // active themes
132
 
133
  function fifu_is_flatsome_active() {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, woocommerce, thumbnail
5
  Requires at least: 5.3
6
  Tested up to: 5.7
7
- Stable tag: 3.5.9
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -56,6 +56,7 @@ Use an external image as featured image of your post, page or custom post type.
56
 
57
  * Social tags
58
  * **[Premium]** Media RSS tags
 
59
 
60
  #### AUTOMATION
61
 
@@ -202,20 +203,20 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio,
202
 
203
  == Changelog ==
204
 
 
 
 
205
  = 3.5.9 =
206
  * New option: Featured slider > display images in the same height; new file: attached XML example for WP All Import plugin (Variations As Child XML Elements); new site: https://featuredimagefromurl.com/.
207
 
208
  = 3.5.8 =
209
  * New feature: Auto set featured image using web page address; new feature: Auto set screenshot as featured image.
210
 
211
- = 3.5.7 =
212
- * Improvement: added support to videos from JW Player, Sprout and WordPress.com (Jetpack Video Hosting); improvement: license key activation is more flexible (unlimited sites from the same domain); improvement: custom Prev/Next buttons for Featured Slider and FIFU Product Gallery.
213
-
214
  = others =
215
  * [more](https://fifu.app/changelog)
216
 
217
 
218
  == Upgrade Notice ==
219
 
220
- = 3.5.9 =
221
- * New option: Featured slider > display images in the same height; new file: attached XML example for WP All Import plugin (Variations As Child XML Elements); new site: https://featuredimagefromurl.com/.
4
  Tags: featured, image, url, woocommerce, thumbnail
5
  Requires at least: 5.3
6
  Tested up to: 5.7
7
+ Stable tag: 3.6.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
56
 
57
  * Social tags
58
  * **[Premium]** Media RSS tags
59
+ * **[Premium]** bbPress features
60
 
61
  #### AUTOMATION
62
 
203
 
204
  == Changelog ==
205
 
206
+ = 3.6.0 =
207
+ * New features: for bbPress (Settings > Social > bbPress); improvement: Auto set featured image using post title and search engine (faster and unlimited now); improvement: Auto set featured image using ISBN and books API (faster and unlimited now); improvement: added FIFU fields to bbPress custom post types (Forum, Topic and Reply).
208
+
209
  = 3.5.9 =
210
  * New option: Featured slider > display images in the same height; new file: attached XML example for WP All Import plugin (Variations As Child XML Elements); new site: https://featuredimagefromurl.com/.
211
 
212
  = 3.5.8 =
213
  * New feature: Auto set featured image using web page address; new feature: Auto set screenshot as featured image.
214
 
 
 
 
215
  = others =
216
  * [more](https://fifu.app/changelog)
217
 
218
 
219
  == Upgrade Notice ==
220
 
221
+ = 3.6.0 =
222
+ * New features: for bbPress (Settings > Social > bbPress); improvement: Auto set featured image using post title and search engine (faster and unlimited now); improvement: Auto set featured image using ISBN and books API (faster and unlimited now); improvement: added FIFU fields to bbPress custom post types (Forum, Topic and Reply).