Plugin Directory

Changeset 2055656


Ignore:
Timestamp:
03/22/2019 09:13:06 PM (7 years ago)
Author:
danillonunes
Message:

Add support to display date

File:
1 edited

Legend:

Unmodified
Added
Removed
  • makemydonation-imo/trunk/template.php

    r2052717 r2055656  
    193193}
    194194
    195 function get_the_mmdimo_donations_list( $post = 0, $content = NULL, $display_amount = FALSE, $display_charity = TRUE, $display_donor_name = TRUE, $display_destination = TRUE, $display_honoree = FALSE, $display_deceased = FALSE, $display_total_amount = FALSE ) {
     195function get_the_mmdimo_donations_list( $post = 0, $content = NULL, $display_amount = FALSE, $display_charity = TRUE, $display_donor_name = TRUE, $display_destination = TRUE, $display_honoree = FALSE, $display_deceased = FALSE, $display_total_amount = FALSE, $display_date = FALSE ) {
    196196  $post = get_post( $post );
    197197  $id = isset( $post->ID ) ? $post->ID : 0;
     
    208208
    209209      $item .= '<dl>';
     210
     211      if ( $display_date ) {
     212        $item .= '<dt class="mmdimo-donations-list-date">' . __('Date:', 'mmdimo') . '</dt>';
     213        $item .= '<dd class="mmdimo-donations-list-date"><span class="mmdimo-donations-list-date">' . date(get_option( 'date_format' ), $donation->created) . '</span></dd>';
     214      }
    210215
    211216      if ( $display_amount ) {
Note: See TracChangeset for help on using the changeset viewer.