Featured Image From URL - Version 3.9.9

Version Description

  • Fix: URLs with apostrophe character not working; fix: Lazy Load (conflict with Flickr Album Gallery plugin); deprecated: Giphy Search.
Download this release

Release Info

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

Code changes from version 3.9.8 to 3.9.9

admin/html/js/convert-url.js CHANGED
@@ -2,6 +2,9 @@ function fifu_convert($url) {
2
  if (fifu_from_google_drive($url))
3
  return fifu_google_drive_url($url);
4
 
 
 
 
5
  return $url;
6
  }
7
 
@@ -18,3 +21,13 @@ function fifu_google_drive_id($url) {
18
  function fifu_google_drive_url($url) {
19
  return 'https://drive.google.com/uc?id=' + fifu_google_drive_id($url);
20
  }
 
 
 
 
 
 
 
 
 
 
2
  if (fifu_from_google_drive($url))
3
  return fifu_google_drive_url($url);
4
 
5
+ if (fifu_has_special_char($url))
6
+ return fifu_escape_special_char($url);
7
+
8
  return $url;
9
  }
10
 
21
  function fifu_google_drive_url($url) {
22
  return 'https://drive.google.com/uc?id=' + fifu_google_drive_id($url);
23
  }
24
+
25
+ //Special char
26
+
27
+ function fifu_has_special_char($url) {
28
+ return $url.includes("'");
29
+ }
30
+
31
+ function fifu_escape_special_char($url) {
32
+ return $url.replace("'", "%27");
33
+ }
admin/html/js/meta-box.js CHANGED
@@ -10,7 +10,6 @@ function removeImage() {
10
 
11
  jQuery("#fifu_button").show();
12
  jQuery("#fifu_help").show();
13
- jQuery("#fifu_giphy").show();
14
 
15
  if (fifuMetaBoxVars.is_sirv_active)
16
  jQuery("#fifu_sirv_button").show();
10
 
11
  jQuery("#fifu_button").show();
12
  jQuery("#fifu_help").show();
 
13
 
14
  if (fifuMetaBoxVars.is_sirv_active)
15
  jQuery("#fifu_sirv_button").show();
admin/html/menu.html CHANGED
@@ -1028,21 +1028,6 @@
1028
  #id, .class, ...
1029
  </th>
1030
  </tr>
1031
- <tr class="color">
1032
- <th>
1033
- <?php $fifu['tab']['image']() ?>
1034
- </th>
1035
- <th>
1036
- <?php $fifu['title']['giphy']() ?>
1037
- </th>
1038
- <th></th>
1039
- <th>
1040
- wp fifu image --giphy &lt;toggle&gt;
1041
- </th>
1042
- <th>
1043
- on, off
1044
- </th>
1045
- </tr>
1046
  <tr class="color">
1047
  <th>
1048
  <?php $fifu['tab']['image']() ?>
@@ -3559,27 +3544,6 @@
3559
  <input type="submit" value="<?php $fifu['button']['submit']() ?>" disabled>
3560
  </div>
3561
 
3562
- <div class="box">
3563
- <div class="fifu-pro"><div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div></div>
3564
- <h2><?php $fifu['title']['giphy']() ?></h2>
3565
- <div class="greybox" id="grad2">
3566
- <?php $fifu['giphy']['desc']() ?>
3567
- </div>
3568
- <br>
3569
- <table style="text-align:left">
3570
- <tr>
3571
- <th>
3572
- <input
3573
- type="submit"
3574
- href="javascript:void(0)"
3575
- class="toggleoff"
3576
- value=""
3577
- style="display:block;border:none">
3578
- </th>
3579
- </tr>
3580
- </table>
3581
- </div>
3582
-
3583
  <div class="box">
3584
  <div class="fifu-pro"><div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div></div>
3585
  <h2><?php $fifu['title']['validation']() ?></h2>
1028
  #id, .class, ...
1029
  </th>
1030
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1031
  <tr class="color">
1032
  <th>
1033
  <?php $fifu['tab']['image']() ?>
3544
  <input type="submit" value="<?php $fifu['button']['submit']() ?>" disabled>
3545
  </div>
3546
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3547
  <div class="box">
3548
  <div class="fifu-pro"><div class="fifu-pro-out"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="Unlock all features"><h4 class="fifu-pro-text"><span class="dashicons dashicons-lock fifu-pro-icon"></span>PRO</h4></a></div></div>
3549
  <h2><?php $fifu['title']['validation']() ?></h2>
admin/html/troubleshooting.html CHANGED
@@ -9,6 +9,20 @@
9
  <div id="tabs-top" style="float:left">
10
  <ul>
11
  <div id="tabs-t" style="padding:1em 1.4em; position: relative; top: -25px;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  <div class="box">
13
  <table>
14
  <tr>
9
  <div id="tabs-top" style="float:left">
10
  <ul>
11
  <div id="tabs-t" style="padding:1em 1.4em; position: relative; top: -25px;">
12
+ <div class="box">
13
+ <table>
14
+ <tr>
15
+ <td style="border-bottom:none">2022-06-15</td>
16
+ <td style="border-bottom:none"><h3>Bacola Core</h3></td>
17
+ <td style="border-bottom:none">plugin</td>
18
+ </tr>
19
+ </table>
20
+ <div class="greybox" style="position: relative; top: -10px">
21
+ External images not displayed:<br>
22
+ 1) open "bacola-core/inc/aq_resizer.php"<br>
23
+ 2) add "return $url;" immediately before the line "Check if $img_url is local"<br>
24
+ </div>
25
+ </div>
26
  <div class="box">
27
  <table>
28
  <tr>
admin/strings.php CHANGED
@@ -237,9 +237,6 @@ function fifu_get_strings_settings() {
237
  $fifu['title']['block'] = function() {
238
  _e("Disable right-click", FIFU_SLUG);
239
  };
240
- $fifu['title']['giphy'] = function() {
241
- _e("Giphy Search", FIFU_SLUG);
242
- };
243
  $fifu['title']['unsplash'] = function() {
244
  _e("Unsplash Image Size", FIFU_SLUG);
245
  };
@@ -780,11 +777,6 @@ function fifu_get_strings_settings() {
780
  _e("Adds a new meta box in the post editor where you can specify a forwarding URL. Then, when accessing a post and clicking on the featured image, the user will be redirected to the specified address.", FIFU_SLUG);
781
  };
782
 
783
- // giphy
784
- $fifu['giphy']['desc'] = function() {
785
- _e("Enable keyword gif search at featured image box.", FIFU_SLUG);
786
- };
787
-
788
  // unsplash
789
  $fifu['unsplash']['desc'] = function() {
790
  _e("Choose the size of the Unsplash images (loaded randomly or via keywords/tags search). Examples of valid sizes: 500x500, 300x400, 1920x1080... Or leave this field empty to get the original size.", FIFU_SLUG);
@@ -1603,9 +1595,6 @@ function fifu_get_strings_meta_box() {
1603
  $fifu['image']['ignore'] = function() {
1604
  _e("don't get URL from post content", FIFU_SLUG);
1605
  };
1606
- $fifu['image']['giphy'] = function() {
1607
- _e("Giphy search", FIFU_SLUG);
1608
- };
1609
  $fifu['image']['height'] = function() {
1610
  _e("You've enabled Same Height feature, that works by cropping the image. Here you can define which part of the image should be shown.", FIFU_SLUG);
1611
  };
237
  $fifu['title']['block'] = function() {
238
  _e("Disable right-click", FIFU_SLUG);
239
  };
 
 
 
240
  $fifu['title']['unsplash'] = function() {
241
  _e("Unsplash Image Size", FIFU_SLUG);
242
  };
777
  _e("Adds a new meta box in the post editor where you can specify a forwarding URL. Then, when accessing a post and clicking on the featured image, the user will be redirected to the specified address.", FIFU_SLUG);
778
  };
779
 
 
 
 
 
 
780
  // unsplash
781
  $fifu['unsplash']['desc'] = function() {
782
  _e("Choose the size of the Unsplash images (loaded randomly or via keywords/tags search). Examples of valid sizes: 500x500, 300x400, 1920x1080... Or leave this field empty to get the original size.", FIFU_SLUG);
1595
  $fifu['image']['ignore'] = function() {
1596
  _e("don't get URL from post content", FIFU_SLUG);
1597
  };
 
 
 
1598
  $fifu['image']['height'] = function() {
1599
  _e("You've enabled Same Height feature, that works by cropping the image. Here you can define which part of the image should be shown.", FIFU_SLUG);
1600
  };
featured-image-from-url.php CHANGED
@@ -4,11 +4,11 @@
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image/video as featured image/video of a post or WooCommerce product.
7
- * Version: 3.9.8
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
11
- * WC tested up to: 6.5.1
12
  * Text Domain: featured-image-from-url
13
  * License: GPLv3
14
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image/video as featured image/video of a post or WooCommerce product.
7
+ * Version: 3.9.9
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
11
+ * WC tested up to: 6.6.0
12
  * Text Domain: featured-image-from-url
13
  * License: GPLv3
14
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
includes/convert-url.php CHANGED
@@ -4,6 +4,9 @@ function fifu_convert($url) {
4
  if (fifu_from_google_drive($url))
5
  return fifu_google_drive_url($url);
6
 
 
 
 
7
  return $url;
8
  }
9
 
@@ -22,3 +25,13 @@ function fifu_google_drive_url($url) {
22
  return 'https://drive.google.com/uc?id=' . fifu_google_drive_id($url);
23
  }
24
 
 
 
 
 
 
 
 
 
 
 
4
  if (fifu_from_google_drive($url))
5
  return fifu_google_drive_url($url);
6
 
7
+ if (fifu_has_special_char($url))
8
+ return fifu_escape_special_char($url);
9
+
10
  return $url;
11
  }
12
 
25
  return 'https://drive.google.com/uc?id=' . fifu_google_drive_id($url);
26
  }
27
 
28
+ //Special char
29
+
30
+ function fifu_has_special_char($url) {
31
+ return strpos($url, "'") !== false;
32
+ }
33
+
34
+ function fifu_escape_special_char($url) {
35
+ return str_replace("'", "%27", $url);
36
+ }
37
+
includes/html/js/lazySizesConfig.js CHANGED
@@ -109,6 +109,11 @@ function fifu_lazy_ajax(selector = 'img') {
109
  jQuery(selector).each(function () {
110
  if (jQuery(this).hasClass('lazyload') || jQuery(this).hasClass('lazyloaded') || jQuery(this).hasClass('lazyloading'))
111
  return;
 
 
 
 
 
112
  jQuery(this).attr('data-src', jQuery(this).attr('src'));
113
  jQuery(this).removeAttr('src');
114
  });
109
  jQuery(selector).each(function () {
110
  if (jQuery(this).hasClass('lazyload') || jQuery(this).hasClass('lazyloaded') || jQuery(this).hasClass('lazyloading'))
111
  return;
112
+
113
+ // Flickr Album Gallery plugin
114
+ if (jQuery(this).hasClass('flickr-img-responsive') || jQuery(this).hasClass('gall-img-responsive'))
115
+ return;
116
+
117
  jQuery(this).attr('data-src', jQuery(this).attr('src'));
118
  jQuery(this).removeAttr('src');
119
  });
includes/thumbnail.php CHANGED
@@ -240,7 +240,7 @@ function fifu_main_image_url($post_id, $front = false) {
240
 
241
  $url = htmlspecialchars_decode($url);
242
 
243
- return str_replace("'", "", $url);
244
  }
245
 
246
  function fifu_no_internal_image($post_id) {
240
 
241
  $url = htmlspecialchars_decode($url);
242
 
243
+ return str_replace("'", "%27", $url);
244
  }
245
 
246
  function fifu_no_internal_image($post_id) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
  Tested up to: 6.0
7
- Stable tag: 3.9.8
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -32,7 +32,6 @@ Use an external image as featured image of your post, page or custom post type.
32
  * Featured image column
33
  * **[PRO]** Disable right-click
34
  * **[PRO]** Save in the media library
35
- * **[PRO]** Giphy image search
36
  * **[PRO]** Unsplash image size
37
  * **[PRO]** Same height
38
  * **[PRO]** Hover effects
@@ -227,20 +226,20 @@ Featured Image, Figurë e Zgjedhur, Image mise en avant, Uitgelichte afbeelding,
227
 
228
  == Changelog ==
229
 
 
 
 
230
  = 3.9.8 =
231
  * New option: Featured Slider > vertical mode; enhancement: Save in the Media Library > proxy (supports username and password now); fix: Automatic Updates (DB operation making the process slow); deprecated: Flickr Thumbnails (by CDN + Optimized Thumbnails).
232
 
233
  = 3.9.7 =
234
  * Enhancements: FIFU widget for Elementor (sets the image as featured image now and does not require Elementor PRO); new Elementor widget: Featured Video.
235
 
236
- = 3.9.6 =
237
- * Enhancement: CDN + Optimized Thumbnails (more precision).
238
-
239
  = others =
240
  * [more](https://fifu.app/changelog)
241
 
242
 
243
  == Upgrade Notice ==
244
 
245
- = 3.9.8 =
246
- * New option: Featured Slider > vertical mode; enhancement: Save in the Media Library > proxy (supports username and password now); fix: Automatic Updates (DB operation making the process slow); deprecated: Flickr Thumbnails (by CDN + Optimized Thumbnails).
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
  Tested up to: 6.0
7
+ Stable tag: 3.9.9
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
32
  * Featured image column
33
  * **[PRO]** Disable right-click
34
  * **[PRO]** Save in the media library
 
35
  * **[PRO]** Unsplash image size
36
  * **[PRO]** Same height
37
  * **[PRO]** Hover effects
226
 
227
  == Changelog ==
228
 
229
+ = 3.9.9 =
230
+ * Fix: URLs with apostrophe character not working; fix: Lazy Load (conflict with Flickr Album Gallery plugin); deprecated: Giphy Search.
231
+
232
  = 3.9.8 =
233
  * New option: Featured Slider > vertical mode; enhancement: Save in the Media Library > proxy (supports username and password now); fix: Automatic Updates (DB operation making the process slow); deprecated: Flickr Thumbnails (by CDN + Optimized Thumbnails).
234
 
235
  = 3.9.7 =
236
  * Enhancements: FIFU widget for Elementor (sets the image as featured image now and does not require Elementor PRO); new Elementor widget: Featured Video.
237
 
 
 
 
238
  = others =
239
  * [more](https://fifu.app/changelog)
240
 
241
 
242
  == Upgrade Notice ==
243
 
244
+ = 3.9.9 =
245
+ * Fix: URLs with apostrophe character not working; fix: Lazy Load (conflict with Flickr Album Gallery plugin); deprecated: Giphy Search.