Related Posts Thumbnails Plugin for WordPress - Version 1.8.1

Version Description

  • Please upgrade immediately - Fix thumbnails are not showing up.

=

Download this release

Release Info

Developer hiddenpearls
Plugin Icon 128x128 Related Posts Thumbnails Plugin for WordPress
Version 1.8.1
Comparing to
See all releases

Code changes from version 1.8.0 to 1.8.1

Files changed (2) hide show
  1. readme.txt +6 -3
  2. related-posts-thumbnails.php +11 -12
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpbrigade.com/
4
  Tags: easy related posts, Related Posts thumbnails, Free Related Posts, related posts, similar related posts
5
  Requires at least: 3.6
6
  Tested up to: 5.2
7
- Stable tag: 1.8.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -71,11 +71,14 @@ If there are no images of the specified size in the post, or file does not exist
71
 
72
  == Upgrade Notice ==
73
 
74
- = 1.8.0 =
75
- * Please upgrade immediately - Added AMP Support, fix for post sorting and custom field option.
76
 
77
  == Changelog ==
78
 
 
 
 
79
  = 1.8.0 - 2019-06-25 =
80
  * New Feature : Added AMP support.
81
  * New Feature : Filter to disable related posts on AMP.
4
  Tags: easy related posts, Related Posts thumbnails, Free Related Posts, related posts, similar related posts
5
  Requires at least: 3.6
6
  Tested up to: 5.2
7
+ Stable tag: 1.8.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
71
 
72
  == Upgrade Notice ==
73
 
74
+ = 1.8.1 =
75
+ * Please upgrade immediately - Fix thumbnails are not showing up.
76
 
77
  == Changelog ==
78
 
79
+ = 1.8.1 - 2019-06-25 =
80
+ * Bug Fix : Thumbnails are not showing when post thumbnail source is selected.
81
+
82
  = 1.8.0 - 2019-06-25 =
83
  * New Feature : Added AMP support.
84
  * New Feature : Filter to disable related posts on AMP.
related-posts-thumbnails.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WordPress Related Posts Thumbnails
4
  * Plugin URI: https://wpbrigade.com/wordpress/plugins/related-posts/?utm_source=related-posts-lite&utm_medium=plugin-uri&utm_campaign=pro-upgrade-rp
5
  * Description: Showing related posts thumbnails under the posts.
6
- * Version: 1.8.0
7
  * Author: WPBrigade
8
  * Author URI: https://WPBrigade.com/?utm_source=related-posts-lite&utm_medium=author-link&utm_campaign=pro-upgrade-rp
9
  */
@@ -642,13 +642,13 @@ class RelatedPostsThumbnails {
642
 
643
  if ( empty( $custom_field ) ) {
644
  $debug .= 'No custom field specifield, using default thumbnail image;';
645
- $url = $basic_url = $this->default_image;
646
  } elseif ( empty( $custom_field_meta ) ) {
647
  $debug .= 'Custom field meta is empty, using default thumbnail image;';
648
- $url = $basic_url = $this->default_image;
649
  } else {
650
  $debug .= 'Using custom field;';
651
- $url = $basic_url = $custom_field_meta;
652
  $theme_resize_url = get_option( 'relpoststh_theme_resize_url', '' );
653
 
654
  if ( strpos( $url, '/wp-content' ) !== false ) {
@@ -711,17 +711,16 @@ class RelatedPostsThumbnails {
711
  } else {
712
  $debug .= 'Found wrong formatted image: ' . $image . ';';
713
  }
714
- $basic_url = $url;
715
- }
716
- }
717
-
718
  if ( strpos( $url, '/' ) === 0 ) {
719
- $url = $basic_url = get_bloginfo( 'url' ) . $url;
720
  $debug .= 'Relative url: ' . $url . ';';
721
- }
722
 
723
- if ( empty( $basic_url ) ) { // parsed URL is empty or no file if can check
724
- $debug .= 'Image URL: ' . $url . ';';
725
  $debug .= 'Image is empty or no file. Using default image;';
726
  $url = get_option( 'relpoststh_default_image', $this->default_image );
727
  }
3
  * Plugin Name: WordPress Related Posts Thumbnails
4
  * Plugin URI: https://wpbrigade.com/wordpress/plugins/related-posts/?utm_source=related-posts-lite&utm_medium=plugin-uri&utm_campaign=pro-upgrade-rp
5
  * Description: Showing related posts thumbnails under the posts.
6
+ * Version: 1.8.1
7
  * Author: WPBrigade
8
  * Author URI: https://WPBrigade.com/?utm_source=related-posts-lite&utm_medium=author-link&utm_campaign=pro-upgrade-rp
9
  */
642
 
643
  if ( empty( $custom_field ) ) {
644
  $debug .= 'No custom field specifield, using default thumbnail image;';
645
+ $url = $this->default_image;
646
  } elseif ( empty( $custom_field_meta ) ) {
647
  $debug .= 'Custom field meta is empty, using default thumbnail image;';
648
+ $url = $this->default_image;
649
  } else {
650
  $debug .= 'Using custom field;';
651
+ $url = $custom_field_meta;
652
  $theme_resize_url = get_option( 'relpoststh_theme_resize_url', '' );
653
 
654
  if ( strpos( $url, '/wp-content' ) !== false ) {
711
  } else {
712
  $debug .= 'Found wrong formatted image: ' . $image . ';';
713
  }
714
+ }
715
+ }
716
+
 
717
  if ( strpos( $url, '/' ) === 0 ) {
718
+ $url = get_bloginfo( 'url' ) . $url;
719
  $debug .= 'Relative url: ' . $url . ';';
720
+ }
721
 
722
+ if ( empty( $url ) ) { // parsed URL is empty or no file if can check
723
+ $debug .= 'Image URL: ' . $url . ';';
724
  $debug .= 'Image is empty or no file. Using default image;';
725
  $url = get_option( 'relpoststh_default_image', $this->default_image );
726
  }