WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Photo Fetcher
[resolved] Empty photo title on hover. (2 posts)

  1. Roy
    Member
    Posted 1 year ago #

    When FB pictures are uploaded without a caption, FB fetcher assigns the picture an empty title='' which can look awkward when a user hovers.

    In order to fix this I've modified the following line:
    $link = '<a rel="' . htmlspecialchars($album->link) . '" class="fbPhoto" href="'.$photo->source . '" title="'.$caption_with_br.' " ><img src="' . $photo->source . '" alt="" /></a>';

    To the following:

    if ($caption_with_br != '')
                $link = '<a rel="' . htmlspecialchars($album->link) . '" class="fbPhoto" href="'.$photo->source . '" title="'.$caption_with_br.' " ><img src="' . $photo->source . '" alt="" /></a>';
    else
                $link = '<a rel="' . htmlspecialchars($album->link) . '" class="fbPhoto" href="'.$photo->source . '"><img src="' . $photo->source . '" alt="" /></a>';

    I figured someone else might find it useful so I've put it here.
    Cheers.

    PS
    Great plugin!

    http://wordpress.org/extend/plugins/facebook-photo-fetcher/

  2. justin_k
    Member
    Plugin Author

    Posted 1 year ago #

    Cool, good call, thanks :) Will be in the next update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic