WordPress.org

Ready to get started?Download WordPress

Forums

Thumbnail For Excerpts
Problem with the images name (1 post)

  1. Jorge
    Member
    Posted 1 year ago #

    Hi there,

    I've found a problem with images name. If the image you upload to a post has one or more dashes full image will be shown n excerpt instead of correctly created thumb. For example:

    myphoto.jpg --> shows thumb -OK!.
    my-photo.jpg --> shows full -wrong!

    This is because next sentence in PHP code:

    preg_match_all('~(\w*)-([0-9]*)x([0-9]*).('.$type.')~', $src, $matches);

    Here $src = my-photo-www-hhh.jpg (www=width, hhh=height).

    According to this sentence the program gets "photo" as second match, when it should be "my-photo". So the question is: does anybody know to fix this sentence so it gets ALL before the LAST dash?

    Thanks a lot.

    http://wordpress.org/extend/plugins/thumbnail-for-excerpts/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic