Fundraising Recent Donations needs more info (easy quick fix)!

Right now the "Recent Donations" widget only gives the following to work with on each line:

<li>Syahiirah Z – $10</li>

Please make it like:

<li><span class="rd_ago">32m ago </span> <span class="rd_name">Syahiirah Z</span> – $10</li>

Then I could do a custom CSS to hide the names, but how long ago the donation was gives a good "live ticker" please add.

  • Panos

    Hi us-Sunnah ,

    Unfortunately there is no hook which you can use for this. Only available option right now is to edit core file
    wp-content/plugins/fundraising/lib/template-functions.php
    and change line ~156 from:
    $content .= '<li>'.$donation->trans['first_name'].' '.substr($donation->trans['last_name'], 0, 1).' - '.$wdf->format_currency('',$donation->trans['gross']).'</li>';
    to

    $made_ago = human_time_diff( get_the_time( 'U', $donation->ID ), current_time('timestamp') );
    				$content .= '<li><span class="rd_ago">'. $made_ago .' ago</span> <span class="rd_name">'.$donation->trans['first_name'].' '.substr($donation->trans['last_name'], 0, 1).'</span> <span class="rd_sep">-</span> <span class="rd_amount">'.$wdf->format_currency('',$donation->trans['gross']).'</span></li>';

    Hope this helps!

    Cheers!