Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

twitter:image is not writter by yost when the featured image is not fifu

$
0
0

Replies: 0

Hi,

FIFU and social tags works great for images that are specified by URL.

However if the image is a classic media library image the head tags <twitter:image> is missing.

I believe this patch fixes the problem.

Index: wp-content/plugins/featured-image-from-url/includes/thumbnail.php
===================================================================
--- wp-content/plugins/featured-image-from-url/includes/thumbnail.php   (revision 21129)
+++ wp-content/plugins/featured-image-from-url/includes/thumbnail.php   (working copy)
@@ -40,7 +40,9 @@
     ]);
 }
 
-function fifu_add_social_tag_yoast() {
+function fifu_add_social_tag_yoast($img) {
+    if ($img)
+      return $img;
     return fifu_main_image_url(get_the_ID());
 }
 

Thanks


Viewing all articles
Browse latest Browse all 59525

Trending Articles