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

Thumbnail sizes are missing (including patch code)

$
0
0

Replies: 0

Dear Themeisle and odeinwp,

Thank you for developing the great plugin.
I’m making a function for ‘feedzy_thumb_output’ filter.
It rewrites $contentThumb, then it displays the thumbnail by img tag in my functions.php.
The functions needs width/height property for img tag, but original $contentThumb doesn’t include them as style.
The version 2.8 had them as style, but 3.0.7 doesn’t have.
Could you restore the style at the next version?

Here is a sample patch code.

--- feedzy-rss-feeds-3.0.7/includes/abstract/feedzy-rss-feeds-admin-abstract.php	2017-01-27 10:37:28.000000000 +0900
+++ feedzy-rss-feeds/includes/abstract/feedzy-rss-feeds-admin-abstract.php	2017-02-04 10:15:28.405339299 +0900
@@ -504,10 +504,10 @@
 			if ( ( ! empty( $theThumbnail ) && $sc['thumb'] == 'auto' ) || $sc['thumb'] == 'yes' ) {
 				if ( ! empty( $theThumbnail ) ) {
 					$theThumbnail = $this->feedzy_image_encode( $theThumbnail );
-					$contentThumb .= '<span class="fetched" style="background-image:  url(' . $theThumbnail . ');" alt="' . $item->get_title() . '"></span>';
+					$contentThumb .= '<span class="fetched" style="width:' . $sizes['width'] . 'px; height:' . $sizes['height'] . 'px; background-image:  url(' . $theThumbnail . ');" alt="' . $item->get_title() . '"></span>';
 				}
 				if ( $sc['thumb'] == 'yes' ) {
-					$contentThumb .= '<span class="default" style="background-image:url(' . $sc['default'] . ');" alt="' . $item->get_title() . '"></span>';
+					$contentThumb .= '<span class="default" style="width:' . $sizes['width'] . 'px; height:' . $sizes['height'] . 'px; background-image:url(' . $sc['default'] . ');" alt="' . $item->get_title() . '"></span>';
 				}
 			}

Could check it?

Kind Regards,
Oichinokata


Viewing all articles
Browse latest Browse all 82367

Trending Articles