Featured Image From URL - Version 1.7.7

Version Description

  • Removed empty() function. Not supported by PHP 5.

=

Download this release

Release Info

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

Code changes from version 1.7.6 to 1.7.7

featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image From URL
5
  * Plugin URI: http://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: 1.7.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: http://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: 1.7.7
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/thumbnail.php CHANGED
@@ -42,7 +42,7 @@ function fifu_choose($post) {
42
 
43
  $featured_image = get_post_meta($post_id, '_thumbnail_id', true);
44
 
45
- if ($image_url || !empty(get_option('fifu_default_url'))) {
46
  if (!$featured_image)
47
  update_post_meta($post_id, '_thumbnail_id', -1);
48
  }
@@ -58,7 +58,7 @@ function fifu_replace($html, $post_id) {
58
  $url = get_post_meta($post_id, 'fifu_image_url', true);
59
  $alt = get_post_meta($post_id, 'fifu_image_alt', true);
60
 
61
- return empty($url) ? $html : fifu_get_html($url, $alt);
62
  }
63
 
64
  function is_ajax_call() {
42
 
43
  $featured_image = get_post_meta($post_id, '_thumbnail_id', true);
44
 
45
+ if ($image_url || get_option('fifu_default_url')) {
46
  if (!$featured_image)
47
  update_post_meta($post_id, '_thumbnail_id', -1);
48
  }
58
  $url = get_post_meta($post_id, 'fifu_image_url', true);
59
  $alt = get_post_meta($post_id, 'fifu_image_alt', true);
60
 
61
+ return !$url ? $html : fifu_get_html($url, $alt);
62
  }
63
 
64
  function is_ajax_call() {
readme.txt CHANGED
@@ -32,6 +32,8 @@ Features:
32
 
33
  * some nonstandard image URLs, such as Instagram and Google Drive's, will work as well;
34
 
 
 
35
  * you can disable the product lightbox and zoom;
36
 
37
  * supports WP REST API (**premium feature**);
@@ -337,6 +339,9 @@ was removed. To finish, a Premium version is now been presented.
337
  = 1.7.6 =
338
  * Default external featured image.
339
 
 
 
 
340
  == Upgrade Notice ==
341
 
342
  = 1.0 =
@@ -521,4 +526,7 @@ was removed. To finish, a Premium version is now been presented.
521
  * Check compatibility between the user theme and Premium version features.
522
 
523
  = 1.7.6 =
524
- * Default external featured image.
 
 
 
32
 
33
  * some nonstandard image URLs, such as Instagram and Google Drive's, will work as well;
34
 
35
+ * you can define a default external featured image to be shown when there is no featured image;
36
+
37
  * you can disable the product lightbox and zoom;
38
 
39
  * supports WP REST API (**premium feature**);
339
  = 1.7.6 =
340
  * Default external featured image.
341
 
342
+ = 1.7.7 =
343
+ * Removed empty() function. Not supported by PHP 5.
344
+
345
  == Upgrade Notice ==
346
 
347
  = 1.0 =
526
  * Check compatibility between the user theme and Premium version features.
527
 
528
  = 1.7.6 =
529
+ * Default external featured image.
530
+
531
+ = 1.7.7 =
532
+ * Removed empty() function. Not supported by PHP 5.