/**
  * Returns the date the donation was made.
  *
  * @param   string $value
  * @param   mixed[] $args
  * @return  string
  * @access  public
  * @since   1.3.0
  */
 public function get_donation_date($value, $args)
 {
     if (!$this->has_valid_donation()) {
         return '';
     }
     $format = isset($args['format']) ? $args['format'] : get_option('date_format');
     return $this->donation->get_date($format);
 }
Example #2
0
<?php 
if (count($donations)) {
    ?>
    <div class="recent-donations">
        <table>
            <caption><h3><?php 
    _e('Recent Donations', 'charitable');
    ?>
</h3></caption>
            <?php 
    foreach ($donations as $post) {
        $donation = new Charitable_Donation($post);
        ?>
            <tr>
                <td class="donation-date"><?php 
        echo $donation->get_date();
        ?>
</td>
                <td class="donation-id">#<?php 
        echo $donation->get_number();
        ?>
</td>
                <td class="donation-status"><?php 
        echo $donation->get_status(true);
        ?>
</td>
                <td class="donation-total"><?php 
        echo charitable_format_money($donation->get_total_donation_amount());
        ?>
</td>
            </tr>