Featured Image From URL - Version 2.6.0

Version Description

  • Bug fix: Auto Set First Image will ignore base64 images now.
Download this release

Release Info

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

Code changes from version 2.5.9 to 2.6.0

admin/html/menu.html CHANGED
@@ -40,7 +40,6 @@
40
  <div>
41
  Pay <strike>US$ 50,00</strike> <b>US$ 39,90</b> and receive your license key and the download link by email within 12 hours.
42
  Moreover, <b>you will have lifetime automatic updates</b>.<br><br>
43
- <i>* price valid for August 2019</i>
44
  </div>
45
  </td>
46
  <td style="width:20%">
40
  <div>
41
  Pay <strike>US$ 50,00</strike> <b>US$ 39,90</b> and receive your license key and the download link by email within 12 hours.
42
  Moreover, <b>you will have lifetime automatic updates</b>.<br><br>
 
43
  </div>
44
  </td>
45
  <td style="width:20%">
admin/html/meta-box.html CHANGED
@@ -60,10 +60,10 @@
60
  background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Please report any problem to <b>marcel@featuredimagefromurl.com</b></p>
61
  <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid orange; border-top: 2px solid orange; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
62
  background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Product Gallery, Video and Slider fields are only available in <a href="admin.php?page=featured-image-from-url#tabs-a"><b>premium</b></a> version</p>
63
- <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #34ba1c; border-top: 2px solid #34ba1c; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
64
- background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: "Add Class" feature</p>
65
- <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #538dd3; border-top: 2px solid #538dd3; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
66
- background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: "Save Image Dimensions > Follow Redirects" option</p>
67
- <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #7e600e ; border-top: 2px solid #7e600e ; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
68
- background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: "Premium > Donate" replaced by regular PayPal payment button</p>
69
  </div>
60
  background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Please report any problem to <b>marcel@featuredimagefromurl.com</b></p>
61
  <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid orange; border-top: 2px solid orange; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
62
  background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Product Gallery, Video and Slider fields are only available in <a href="admin.php?page=featured-image-from-url#tabs-a"><b>premium</b></a> version</p>
63
+ <!--p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #34ba1c; border-top: 2px solid #34ba1c; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
64
+ background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: "Add Class" feature</p-->
65
+ <!--p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #538dd3; border-top: 2px solid #538dd3; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
66
+ background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: "Save Image Dimensions > Follow Redirects" option</p-->
67
+ <!--p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #7e600e ; border-top: 2px solid #7e600e ; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
68
+ background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: "Premium > Donate" replaced by regular PayPal payment button</p-->
69
  </div>
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.5.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://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.6.0
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/external-post.php CHANGED
@@ -72,22 +72,32 @@ function fifu_first_url_in_content($post_id) {
72
  if (!$matches[0])
73
  return;
74
 
 
 
 
 
 
 
 
 
 
 
75
  $aux2 = null;
76
 
77
  //double quotes
78
- $aux1 = explode('src="', $matches[0][0]);
79
  if ($aux1 && count($aux1) > 1) {
80
  $aux2 = explode('"', $aux1[1]);
81
  }
82
 
83
  //single quotes
84
  if (!$aux2 || !$aux2[0]) {
85
- $aux1 = explode("src='", $matches[0][0]);
86
  if ($aux1 && count($aux1) > 1)
87
  $aux2 = explode("'", $aux1[1]);
88
  }
89
 
90
- return $matches && $matches[0] ? $aux2[0] : null;
91
  }
92
 
93
  function fifu_update_fake_attach_id($post_id) {
72
  if (!$matches[0])
73
  return;
74
 
75
+ $tag = null;
76
+ foreach ($matches[0] as $tag) {
77
+ if ($tag && strpos($tag, 'data:image/jpeg') !== false)
78
+ continue;
79
+ break;
80
+ }
81
+
82
+ if (!$tag)
83
+ return;
84
+
85
  $aux2 = null;
86
 
87
  //double quotes
88
+ $aux1 = explode('src="', $tag);
89
  if ($aux1 && count($aux1) > 1) {
90
  $aux2 = explode('"', $aux1[1]);
91
  }
92
 
93
  //single quotes
94
  if (!$aux2 || !$aux2[0]) {
95
+ $aux1 = explode("src='", $tag);
96
  if ($aux1 && count($aux1) > 1)
97
  $aux2 = explode("'", $aux1[1]);
98
  }
99
 
100
+ return $tag ? $aux2[0] : null;
101
  }
102
 
103
  function fifu_update_fake_attach_id($post_id) {
readme.txt CHANGED
@@ -159,6 +159,9 @@ Features:
159
 
160
  == Changelog ==
161
 
 
 
 
162
  = 2.5.9 =
163
  * New features: Add Class and Save Image Dimensions > Follow Redirects.
164
 
@@ -606,6 +609,9 @@ was removed. To finish, a Premium version is now been presented.
606
 
607
  == Upgrade Notice ==
608
 
 
 
 
609
  = 2.5.9 =
610
  * New features: Add Class and Save Image Dimensions > Follow Redirects.
611
 
159
 
160
  == Changelog ==
161
 
162
+ = 2.6.0 =
163
+ * Bug fix: Auto Set First Image will ignore base64 images now.
164
+
165
  = 2.5.9 =
166
  * New features: Add Class and Save Image Dimensions > Follow Redirects.
167
 
609
 
610
  == Upgrade Notice ==
611
 
612
+ = 2.6.0 =
613
+ * Bug fix: Auto Set First Image will ignore base64 images now.
614
+
615
  = 2.5.9 =
616
  * New features: Add Class and Save Image Dimensions > Follow Redirects.
617