Making WordPress.org


Ignore:
Timestamp:
06/06/2014 01:10:40 AM (12 years ago)
Author:
iandunn
Message:

WordCamp Organizer Reminders: Add button for manually sending an e-mail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders/wcor-mailer.php

    r679 r680  
    171171            // The WordCamp
    172172            $wordcamp->post_title,
    173             date( 'l, F jS, Y', $wordcamp_meta['Start Date (YYYY-mm-dd)'][0] ),
     173            empty( $wordcamp_meta['Start Date (YYYY-mm-dd)'][0] ) ? '' : date( 'l, F jS, Y', $wordcamp_meta['Start Date (YYYY-mm-dd)'][0] ),
    174174            $wordcamp_meta['Location'][0],
    175175            esc_url( $wordcamp_meta['URL'][0] ),
     
    179179            esc_url( 'https://twitter.com/hashtag/' . $wordcamp_meta['WordCamp Hashtag'][0] ),
    180180            absint( $wordcamp_meta['Number of Anticipated Attendees'][0] ),
    181             get_term( $wordcamp_meta['Multi-Event Sponsor Region'][0], MES_Sponsor::REGIONS_SLUG )->name,
     181            empty( $wordcamp_meta['Multi-Event Sponsor Region'][0] ) ? '' : get_term( $wordcamp_meta['Multi-Event Sponsor Region'][0], MES_Sponsor::REGIONS_SLUG )->name,
    182182
    183183            // The organizing team
     
    246246    }
    247247
     248    /**
     249
     250     *
     251     * @param WP_Post $email
     252     * @param WP_Post $wordcamp
     253     * @return bool
     254     */
     255    public function send_manual_email( $email, $wordcamp ) {
     256        $recipient = $this->get_recipient( $wordcamp->ID, $email->ID );
     257
     258        return $this->mail( $recipient, $email->post_title, $email->post_content, array(), $email, $wordcamp );
     259    }
     260   
    248261    /**
    249262     * Send e-mails that are scheduled to go out at a specific time (e.g., 3 days before the camp)
Note: See TracChangeset for help on using the changeset viewer.