Making WordPress.org


Ignore:
Timestamp:
04/01/2016 07:49:15 PM (10 years ago)
Author:
iandunn
Message:

WordCamp Post Type: Email applicants to confirm their application was received.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/applications/wordcamp.php

    r2874 r2875  
    4747
    4848        if ( isset( $_POST['submit-application'] ) ) {
    49                 create_wordcamp_post( validate_data( $_POST ) );
    50                 // todo email applicant a copy of application w/ the thank you message - just fire trigger and let organizer reminder send it? but how to attach org data? new placeholder?
     49                $application_data = validate_data( $_POST );
     50                create_wordcamp_post( $application_data );
     51                notify_applicant_application_received( $application_data['q_1079059_email'], $application_data['q_1079103_wordcamp_location'] );
    5152                $message = "Thank you for your application! We've received it, and we'll contact you once we've had a chance to review it.";
    5253
     
    200201        return true;
    201202}
     203
     204/**
     205 * Notify the applicant that we've received their application
     206 *
     207 * @param string $email_address
     208 * @param string $wordcamp_name
     209 */
     210function notify_applicant_application_received( $email_address, $wordcamp_name ) {
     211        $subject = "We've received your WordCamp application";
     212        $headers = array( 'Reply-To: support@wordcamp.org' );
     213        $message = "Thank you for applying to organize WordCamp $wordcamp_name! We'll send you a follow-up e-mail once we've had a chance to review your application.";
     214
     215        wp_mail( $email_address, $subject, $message, $headers );
     216}
Note: See TracChangeset for help on using the changeset viewer.