Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.3.1 #122

Merged
merged 9 commits into from
May 27, 2015
Next Next commit
Update wp-tevko-responsive-images.php
fixed: first char gets stripped from file name if there's no slash
  • Loading branch information
side777 committed May 18, 2015
commit 60c262716c6ee996b64c2a795df8064ef10fb546
5 changes: 4 additions & 1 deletion wp-tevko-responsive-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,11 @@ function tevkori_get_srcset_array( $id, $size = 'thumbnail' ) {
$img_sizes['full'] = array(
'width' => $img_meta['width'],
'height' => $img_meta['height'],
'file' => substr( $img_meta['file'], strrpos( $img_meta['file'], '/' ) + 1 )
'file' => $img_meta['file']
);
if ( strrpos( $img_meta['file'], '/' ) !== false ) {
$img_sizes['full']['file'] = substr( $img_meta['file'], strrpos( $img_meta['file'], '/' ) + 1 );
}

// Get the image base url.
$img_base_url = substr( $img_url, 0, strrpos( $img_url, '/' ) + 1 );
Expand Down