Featured Image From URL - Version 1.2.3

Version Description

  • Bug fixed in WooCommerce Product Category.

=

Download this release

Release Info

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

Code changes from version 1.2.2 to 1.2.3

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.2.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.2.3
7
  * Author: Marcel Jacques Machado
8
  * Author URI: https://marceljm.com/wordpress/featured-image-from-url-premium/
9
  */
includes/thumbnail-category.php CHANGED
@@ -16,9 +16,11 @@ add_filter('wp_head', 'fifu_cat_add_social_tags');
16
 
17
  function fifu_cat_add_social_tags() {
18
  $url = fifu_get_image_url();
19
- $term_id = fifu_get_term_id();
20
  $title = single_cat_title('', false);
21
- $description = wp_strip_all_tags(category_description($term_id));
 
 
 
22
 
23
  if ($url)
24
  include 'html/social.html';
@@ -36,7 +38,11 @@ function fifu_get_image_alt() {
36
 
37
  function fifu_get_term_id() {
38
  global $wp_query;
39
- return $wp_query->queried_object->term_id;
 
 
 
 
40
  }
41
 
42
  function fifu_category_get_html($image_url, $image_alt) {
16
 
17
  function fifu_cat_add_social_tags() {
18
  $url = fifu_get_image_url();
 
19
  $title = single_cat_title('', false);
20
+
21
+ $term_id = fifu_get_term_id();
22
+ if ($term_id)
23
+ $description = wp_strip_all_tags(category_description($term_id));
24
 
25
  if ($url)
26
  include 'html/social.html';
38
 
39
  function fifu_get_term_id() {
40
  global $wp_query;
41
+
42
+ if ($wp_query->queried_object)
43
+ return $wp_query->queried_object->term_id;
44
+ else
45
+ return null;
46
  }
47
 
48
  function fifu_category_get_html($image_url, $image_alt) {
readme.txt CHANGED
@@ -184,6 +184,9 @@ was removed. To finish, a Premium version is now been presented.
184
  = 1.2.2 =
185
  * Bug fixed.
186
 
 
 
 
187
  == Upgrade Notice ==
188
 
189
  = 1.0 =
@@ -222,3 +225,7 @@ was removed. To finish, a Premium version is now been presented.
222
 
223
  = 1.2.2 =
224
  * Bug fixed.
 
 
 
 
184
  = 1.2.2 =
185
  * Bug fixed.
186
 
187
+ = 1.2.3 =
188
+ * Bug fixed in WooCommerce Product Category.
189
+
190
  == Upgrade Notice ==
191
 
192
  = 1.0 =
225
 
226
  = 1.2.2 =
227
  * Bug fixed.
228
+
229
+ = 1.2.3 =
230
+ * Bug fixed in WooCommerce Product Category.
231
+