Featured Image From URL - Version 2.6.7

Version Description

  • Bug fixes: conflict between internal featured image and Default External Featured Image; Social Tags wasn't creating an image tag for the Default External Featured Image. Improvement: description social tag will use post_excerpt instead of post_content.
Download this release

Release Info

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

Code changes from version 2.6.6 to 2.6.7

admin/db.php CHANGED
@@ -685,8 +685,12 @@ class FifuDb {
685
  if (fifu_get_default_url())
686
  set_post_thumbnail($post_id, get_option('fifu_default_attach_id'));
687
  } else {
688
- if (fifu_get_default_url())
689
- set_post_thumbnail($post_id, get_option('fifu_default_attach_id'));
 
 
 
 
690
  }
691
  } else {
692
  // update
685
  if (fifu_get_default_url())
686
  set_post_thumbnail($post_id, get_option('fifu_default_attach_id'));
687
  } else {
688
+ if (fifu_get_default_url()) {
689
+ $post_thumbnail_id = get_post_thumbnail_id($post_id);
690
+ $hasInternal = $post_thumbnail_id && get_post_field('post_author', $post_thumbnail_id) != $this->author;
691
+ if (!$hasInternal)
692
+ set_post_thumbnail($post_id, get_option('fifu_default_attach_id'));
693
+ }
694
  }
695
  } else {
696
  // update
admin/html/menu.html CHANGED
@@ -2650,6 +2650,22 @@
2650
  From <b>September 2019</b>, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
2651
  </div>
2652
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2653
  <div class="box">
2654
  <table>
2655
  <tr>
2650
  From <b>September 2019</b>, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
2651
  </div>
2652
  </div>
2653
+ <div class="box">
2654
+ <table>
2655
+ <tr>
2656
+ <td style="border-bottom:none">2019-10-02</td>
2657
+ <td style="border-bottom:none"><h3>WPML Multilingual CMS + Translation Management</h3></td>
2658
+ <td style="border-bottom:none">plugin</td>
2659
+ </tr>
2660
+ </table>
2661
+ <div class="greybox" style="position: relative; top: -10px">
2662
+ Copying the external featured image to the translation:<br>
2663
+ 1) access "WPML > Settings > Custom Fields Translation";<br>
2664
+ 2) search for "fifu_image_url", choose "Copy" and save;<br>
2665
+ 3) if you use FIFU Premium, enable "Admin Area > Schedule Metadata Generation". That's all;<br>
2666
+ 4) but if you use the free version, after the translation post is created, access the post editor and click on "Update" button.<br>
2667
+ </div>
2668
+ </div>
2669
  <div class="box">
2670
  <table>
2671
  <tr>
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.6.6
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.7
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/thumbnail.php CHANGED
@@ -17,7 +17,7 @@ function fifu_add_social_tags() {
17
  $post_id = get_the_ID();
18
  $url = fifu_main_image_url($post_id);
19
  $title = get_the_title($post_id);
20
- $description = wp_strip_all_tags(get_post_field('post_content', $post_id));
21
 
22
  if ($url && fifu_is_on('fifu_social'))
23
  include 'html/social.html';
@@ -121,7 +121,7 @@ function fifu_should_hide() {
121
  function fifu_main_image_url($post_id) {
122
  $url = get_post_meta($post_id, 'fifu_image_url', true);
123
 
124
- if (!$url && fifu_no_internal_image($post_id) && !fifu_is_on('fifu_fake2') && (get_option('fifu_default_url') && fifu_is_on('fifu_enable_default_url')))
125
  $url = get_option('fifu_default_url');
126
 
127
  return $url;
17
  $post_id = get_the_ID();
18
  $url = fifu_main_image_url($post_id);
19
  $title = get_the_title($post_id);
20
+ $description = wp_strip_all_tags(get_post_field('post_excerpt', $post_id));
21
 
22
  if ($url && fifu_is_on('fifu_social'))
23
  include 'html/social.html';
121
  function fifu_main_image_url($post_id) {
122
  $url = get_post_meta($post_id, 'fifu_image_url', true);
123
 
124
+ if (!$url && fifu_no_internal_image($post_id) && (get_option('fifu_default_url') && fifu_is_on('fifu_enable_default_url')))
125
  $url = get_option('fifu_default_url');
126
 
127
  return $url;
readme.txt CHANGED
@@ -159,6 +159,9 @@ Features:
159
 
160
  == Changelog ==
161
 
 
 
 
162
  = 2.6.6 =
163
  * Bug fixes: title/logo disappeared in some themes; menu broken due instability on jquery.com (replaced by Cloudflare).
164
 
@@ -627,6 +630,9 @@ was removed. To finish, a Premium version is now been presented.
627
 
628
  == Upgrade Notice ==
629
 
 
 
 
630
  = 2.6.6 =
631
  * Bug fixes: title/logo disappeared in some themes; menu broken due instability on jquery.com (replaced by Cloudflare).
632
 
159
 
160
  == Changelog ==
161
 
162
+ = 2.6.7 =
163
+ * Bug fixes: conflict between internal featured image and Default External Featured Image; Social Tags wasn't creating an image tag for the Default External Featured Image. Improvement: description social tag will use post_excerpt instead of post_content.
164
+
165
  = 2.6.6 =
166
  * Bug fixes: title/logo disappeared in some themes; menu broken due instability on jquery.com (replaced by Cloudflare).
167
 
630
 
631
  == Upgrade Notice ==
632
 
633
+ = 2.6.7 =
634
+ * Bug fixes: conflict between internal featured image and Default External Featured Image; Social Tags wasn't creating an image tag for the Default External Featured Image. Improvement: description social tag will use post_excerpt instead of post_content.
635
+
636
  = 2.6.6 =
637
  * Bug fixes: title/logo disappeared in some themes; menu broken due instability on jquery.com (replaced by Cloudflare).
638