Featured Image From URL - Version 3.4.7

Version Description

  • Fix: undefined variables.
Download this release

Release Info

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

Code changes from version 3.4.6 to 3.4.7

featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image as featured image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
- * Version: 3.4.6
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image as featured image of a post or WooCommerce product. Includes Image Search, Video, Social Tags, SEO, Lazy Load, Gallery, Automation etc.
7
+ * Version: 3.4.7
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
includes/attachment.php CHANGED
@@ -147,6 +147,10 @@ function fifu_add_size($image, $size) {
147
 
148
  if (!is_array($size)) {
149
  if (function_exists('wp_get_registered_image_subsizes')) {
 
 
 
 
150
  if (isset(wp_get_registered_image_subsizes()[$size]['width']))
151
  $width = wp_get_registered_image_subsizes()[$size]['width'];
152
 
@@ -156,6 +160,9 @@ function fifu_add_size($image, $size) {
156
  if (isset(wp_get_registered_image_subsizes()[$size]['crop']))
157
  $crop = wp_get_registered_image_subsizes()[$size]['crop'];
158
 
 
 
 
159
  // skip
160
  if ($image[1] > 1) {
161
  // default height
147
 
148
  if (!is_array($size)) {
149
  if (function_exists('wp_get_registered_image_subsizes')) {
150
+ $width = null;
151
+ $height = null;
152
+ $crop = null;
153
+
154
  if (isset(wp_get_registered_image_subsizes()[$size]['width']))
155
  $width = wp_get_registered_image_subsizes()[$size]['width'];
156
 
160
  if (isset(wp_get_registered_image_subsizes()[$size]['crop']))
161
  $crop = wp_get_registered_image_subsizes()[$size]['crop'];
162
 
163
+ if (!$width || !$height)
164
+ return $image;
165
+
166
  // skip
167
  if ($image[1] > 1) {
168
  // default height
includes/util.php CHANGED
@@ -72,6 +72,9 @@ function fifu_get_tags($post_id) {
72
  }
73
 
74
  function fifu_check_instagram_thumb($url, $att_id, $post_id) {
 
 
 
75
  if (fifu_is_new_instagram_url($url)) {
76
  if (fifu_is_renewed_instagram_url($url) && !fifu_is_expired_instagram_url($url))
77
  return $url;
72
  }
73
 
74
  function fifu_check_instagram_thumb($url, $att_id, $post_id) {
75
+ if (!fifu_is_old_instagram_url($url) && !fifu_is_new_instagram_url($url))
76
+ return $url;
77
+
78
  if (fifu_is_new_instagram_url($url)) {
79
  if (fifu_is_renewed_instagram_url($url) && !fifu_is_expired_instagram_url($url))
80
  return $url;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, woocommerce, thumbnail
5
  Requires at least: 5.3
6
  Tested up to: 5.6
7
- Stable tag: 3.4.6
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -197,20 +197,20 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr and Publiti
197
 
198
  == Changelog ==
199
 
 
 
 
200
  = 3.4.6 =
201
  * Improvement: 35 new WP-CLI commands added; new integration function: fifu_dev_set_image_list(); fix: conflict with AMP + Jetpack; fix: expired Instagram URLs.
202
 
203
  = 3.4.5 =
204
  * Improvement: integration with WP-CLI (20 commands added); bug fix: Hide Featured Media should not work for WooCommerce products.
205
 
206
- = 3.4.4 =
207
- * New option: Reset Settings; deprecated: option to show the external images in the Media Library.
208
-
209
  = others =
210
  * [more](https://fifu.app/changelog/)
211
 
212
 
213
  == Upgrade Notice ==
214
 
215
- = 3.4.6 =
216
- * Improvement: 35 new WP-CLI commands added; new integration function: fifu_dev_set_image_list(); fix: conflict with AMP + Jetpack; fix: expired Instagram URLs.
4
  Tags: featured, image, url, woocommerce, thumbnail
5
  Requires at least: 5.3
6
  Tested up to: 5.6
7
+ Stable tag: 3.4.7
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
197
 
198
  == Changelog ==
199
 
200
+ = 3.4.7 =
201
+ * Fix: undefined variables.
202
+
203
  = 3.4.6 =
204
  * Improvement: 35 new WP-CLI commands added; new integration function: fifu_dev_set_image_list(); fix: conflict with AMP + Jetpack; fix: expired Instagram URLs.
205
 
206
  = 3.4.5 =
207
  * Improvement: integration with WP-CLI (20 commands added); bug fix: Hide Featured Media should not work for WooCommerce products.
208
 
 
 
 
209
  = others =
210
  * [more](https://fifu.app/changelog/)
211
 
212
 
213
  == Upgrade Notice ==
214
 
215
+ = 3.4.7 =
216
+ * Fix: undefined variables.