Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • I found the error, both if statements are redundant (I believe I had changed that before and my client copied an old version from a backup).

    Anyway, this works:

    // Thumbnail Caption
    function monahans_thumbnail_caption($html, $post_id, $post_thumbnail_id, $size, $attr)
    {
      $attachment =& get_post($post_thumbnail_id);
    
      // post_title => image title
      // post_excerpt => image caption
      // post_content => image description
    
        $html .= '<p class="thumbcaption">';
        $html .= "&copy;".wptexturize(get_post_meta(get_post_thumbnail_id($post->ID),'credit-tracker-source',true))."/".wptexturize(get_post_meta(get_post_thumbnail_id($post->ID),'credit-tracker-author',true)).'</p>';
    
    	return $html;
    }
    
    add_action('post_thumbnail_html', 'monahans_thumbnail_caption', null, 5);

    Hi Labs64,

    I used the above information to retrieve the credit tracker author and source. But after I upgraded the plugin to the latest version, it doesn’t work anymore.

    I used this code in the functions.php – has there been any changes?

    Regards

    // Thumbnail Caption
    function monahans_thumbnail_caption($html, $post_id, $post_thumbnail_id, $size, $attr)
    {
      $attachment =& get_post($post_thumbnail_id);
    
      // post_title => image title
      // post_excerpt => image caption
      // post_content => image description
    
      if ($attachment->post_excerpt || $attachment->post_content) {
        $html .= '<p class="thumbcaption">';
        if ($attachment->post_excerpt) {
          $html .= '<span class="captitle">'.wptexturize(get_post_meta(get_post_thumbnail_id($post->ID),'credit-tracker-author',true)).'</span> ';
        }
        $html .= "©".wptexturize(get_post_meta(get_post_thumbnail_id($post->ID),'credit-tracker-source',true))."/".wptexturize(get_post_meta(get_post_thumbnail_id($post->ID),'credit-tracker-author',true)).'</p>';
      }
    
    	return $html;
    }
    
    add_action('post_thumbnail_html', 'monahans_thumbnail_caption', null, 5);
    metapha

    (@metapha)

    Thanks for the quick bug fix and for providing such a useful plugin for free 🙂

    metapha

    (@metapha)

    my IP address was blocked.

    I managed to get back in by renaming the directory, logging in, reactivating the plugin and adding my IP address to the white list. My IP address is not listed for spam, I checked on http://www.stopforumspam.com

    metapha

    (@metapha)

    you can simply rename the folder / directory of the plugin on your server to deactivate it:
    for example:
    wp-content/plugins/stop-spammer-registrations-plugin
    to
    wp-content/plugins/stop-spammer-registrations-plugin_old

    metapha

    (@metapha)

    Same here. I renamed the folder / directory of the plugin. Hope that the bug will soon be fixed!

Viewing 6 replies - 1 through 6 (of 6 total)