Featured Image From URL - Version 2.2.4

Version Description

  • Bug fix: conflict with internal image sizes.
Download this release

Release Info

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

Code changes from version 2.2.3 to 2.2.4

admin/html/menu.html CHANGED
@@ -1803,7 +1803,7 @@
1803
  <div class="box">
1804
  <h2>WP All Import</h2>
1805
  <div class="greybox">
1806
- You can use Featured Image from URL with WP All Import plugin. For that, use the custom fields below.
1807
  <br/>
1808
  <br/>
1809
 
1803
  <div class="box">
1804
  <h2>WP All Import</h2>
1805
  <div class="greybox">
1806
+ You can use Featured Image from URL with <a href="http://www.wpallimport.com/" target="_blank">WP All Import</a> plugin. For that, use the custom fields below.
1807
  <br/>
1808
  <br/>
1809
 
featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image from URL
5
  * Plugin URI: https://featuredimagefromurl.com/
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.2.3
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://featuredimagefromurl.com/
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.2.4
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/attachment.php CHANGED
@@ -48,6 +48,9 @@ function fifu_query_attachments($where) {
48
  add_filter('wp_get_attachment_image_src', 'fifu_replace_attachment_image_src', 10, 3);
49
 
50
  function fifu_replace_attachment_image_src($image, $att_id, $size) {
 
 
 
51
  $post = get_post($att_id);
52
 
53
  if (fifu_is_off('fifu_data_generation')) {
@@ -79,3 +82,7 @@ function fifu_replace_attachment_image_src($image, $att_id, $size) {
79
  return $image;
80
  }
81
 
 
 
 
 
48
  add_filter('wp_get_attachment_image_src', 'fifu_replace_attachment_image_src', 10, 3);
49
 
50
  function fifu_replace_attachment_image_src($image, $att_id, $size) {
51
+ if (fifu_is_internal_image($image))
52
+ return $image;
53
+
54
  $post = get_post($att_id);
55
 
56
  if (fifu_is_off('fifu_data_generation')) {
82
  return $image;
83
  }
84
 
85
+ function fifu_is_internal_image($image) {
86
+ return $image && $image[1] > 1 && $image[2] > 1;
87
+ }
88
+
readme.txt CHANGED
@@ -157,6 +157,9 @@ Features:
157
 
158
  == Changelog ==
159
 
 
 
 
160
  = 2.2.3 =
161
  * Improvement: URL field is added to all Custom Post Types automatically now.
162
 
@@ -496,6 +499,9 @@ was removed. To finish, a Premium version is now been presented.
496
 
497
  == Upgrade Notice ==
498
 
 
 
 
499
  = 2.2.3 =
500
  * Improvement: URL field is added to all Custom Post Types automatically now.
501
 
157
 
158
  == Changelog ==
159
 
160
+ = 2.2.4 =
161
+ * Bug fix: conflict with internal image sizes.
162
+
163
  = 2.2.3 =
164
  * Improvement: URL field is added to all Custom Post Types automatically now.
165
 
499
 
500
  == Upgrade Notice ==
501
 
502
+ = 2.2.4 =
503
+ * Bug fix: conflict with internal image sizes.
504
+
505
  = 2.2.3 =
506
  * Improvement: URL field is added to all Custom Post Types automatically now.
507