• Resolved wp_kc

    (@wp_kc)


    $url is set to an empty string at the top of the foreach loop, but is never given a value inside the if ( $thsource == ‘custom-field’ ) { … } section of code…

        foreach ( $posts as $post ) {
            $image = '';
            $url   = '';
            $alt   = '';
            if ( $thsource == 'custom-field' ) {
              if ( is_array( $url ) ) {
                  $debug .= 'No custom field specifield, using default thumbnail image;';
                  $url = $this->default_image;
              } else {
                  $debug .= 'Using custom field;';
                  $theme_resize_url = get_option( 'relpoststh_theme_resize_url', '' );
                  
                  if ( strpos( $url, '/wp-content' ) !== false ) {
                    $url = substr( $url, strpos( $url, '/wp-content' ) );
                  }
                  
                  if ( !empty( $theme_resize_url ) ) {
                    $url = $theme_resize_url . '?src=' . $url . '&w=' . $width . '&h=' . $height . '&zc=1&q=90';
                  }
              }
            } else {
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Field thumbnails broken…’ is closed to new replies.