Featured Image From URL - Version 1.3.3

Version Description

  • Bug fixes.

=

Download this release

Release Info

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

Code changes from version 1.3.2 to 1.3.3

Files changed (3) hide show
  1. admin/meta-box.php +2 -2
  2. featured-image-from-url.php +1 -1
  3. readme.txt +6 -0
admin/meta-box.php CHANGED
@@ -108,7 +108,7 @@ function fifu_save_image_properties($post_id) {
108
  if (isset($_POST['fifu_input_url'])) {
109
  update_post_meta($post_id, 'fifu_image_url', esc_url($_POST['fifu_input_url']));
110
 
111
- if (!get_post_thumbnail_id($post_id))
112
  set_post_thumbnail($post_id, get_option('fifu_attachment_id'));
113
  }
114
 
@@ -122,7 +122,7 @@ function fifu_save_image_properties($post_id) {
122
  if ($_POST['fifu_input_url_' . $i] != '' && $_POST['fifu_input_alt_' . $i] != '') {
123
  update_post_meta($post_id, 'fifu_image_url_' . $i, esc_url($_POST['fifu_input_url_' . $i]));
124
  update_post_meta($post_id, 'fifu_image_alt_' . $i, wp_strip_all_tags($_POST['fifu_input_alt_' . $i]));
125
- if (!get_post_thumbnail_id($post_id))
126
  set_post_thumbnail($post_id, get_option('fifu_attachment_id'));
127
  } else {
128
  delete_post_meta($post_id, 'fifu_image_url_' . $i);
108
  if (isset($_POST['fifu_input_url'])) {
109
  update_post_meta($post_id, 'fifu_image_url', esc_url($_POST['fifu_input_url']));
110
 
111
+ if (!get_post_thumbnail_id($post_id) && esc_url($_POST['fifu_input_url']))
112
  set_post_thumbnail($post_id, get_option('fifu_attachment_id'));
113
  }
114
 
122
  if ($_POST['fifu_input_url_' . $i] != '' && $_POST['fifu_input_alt_' . $i] != '') {
123
  update_post_meta($post_id, 'fifu_image_url_' . $i, esc_url($_POST['fifu_input_url_' . $i]));
124
  update_post_meta($post_id, 'fifu_image_alt_' . $i, wp_strip_all_tags($_POST['fifu_input_alt_' . $i]));
125
+ if (!get_post_thumbnail_id($post_id) && esc_url($_POST['fifu_input_url_' . $i]))
126
  set_post_thumbnail($post_id, get_option('fifu_attachment_id'));
127
  } else {
128
  delete_post_meta($post_id, 'fifu_image_url_' . $i);
featured-image-from-url.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * Description: Allows to use an external image as Featured Image of your post, page or Custom Post Type, such as WooCommerce Product (supports Product Gallery also).
6
- * Version: 1.3.2
7
  * Author: Marcel Jacques Machado
8
  * Author URI: https://marceljm.com/wordpress/featured-image-from-url-premium/
9
  */
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * Description: Allows to use an external image as Featured Image of your post, page or Custom Post Type, such as WooCommerce Product (supports Product Gallery also).
6
+ * Version: 1.3.3
7
  * Author: Marcel Jacques Machado
8
  * Author URI: https://marceljm.com/wordpress/featured-image-from-url-premium/
9
  */
readme.txt CHANGED
@@ -202,6 +202,9 @@ was removed. To finish, a Premium version is now been presented.
202
  = 1.3.2 =
203
  * Bug fixes.
204
 
 
 
 
205
  == Upgrade Notice ==
206
 
207
  = 1.0 =
@@ -258,3 +261,6 @@ was removed. To finish, a Premium version is now been presented.
258
 
259
  = 1.3.2 =
260
  * Bug fixes.
 
 
 
202
  = 1.3.2 =
203
  * Bug fixes.
204
 
205
+ = 1.3.3 =
206
+ * Bug fixes.
207
+
208
  == Upgrade Notice ==
209
 
210
  = 1.0 =
261
 
262
  = 1.3.2 =
263
  * Bug fixes.
264
+
265
+ = 1.3.3 =
266
+ * Bug fixes.