Making WordPress.org

Changeset 1309


Ignore:
Timestamp:
02/25/2015 12:08:40 AM (9 years ago)
Author:
iandunn
Message:

WordCamp Organizer Reminders: Add option to send to a region's camera wrangler.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders
Files:
2 edited

Legend:

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

    r1032 r1309  
    203203            absint( $wordcamp_meta['Number of Anticipated Attendees'][0] ),
    204204            empty( $wordcamp_meta['Multi-Event Sponsor Region'][0] ) ? '' : get_term( $wordcamp_meta['Multi-Event Sponsor Region'][0], MES_Sponsor::REGIONS_SLUG )->name,
     205            // todo update MES_Sponsor::REGIONS_SLUG in light of r1302
    205206
    206207            // The organizing team
     
    246247            $recipient = $multi_event_sponsors->get_sponsor_emails( $multi_event_sponsors->get_wordcamp_me_sponsors( $wordcamp_id ) );
    247248        } elseif ( 'wcor_send_sponsor_wrangler' == $send_where ) {
    248            
     249
    249250            // If the Sponsor Wrangler email is invalid, use the default email address.
    250251            if ( is_email( get_post_meta( $wordcamp_id, 'Sponsor Wrangler E-mail Address', true ) ) ) {
     
    254255            }
    255256
     257        } elseif ( 'wcor_send_camera_wrangler' == $send_where ) {
     258            $region_id = get_post_meta( $wordcamp_id, 'Multi-Event Sponsor Region', true );
     259            $recipient = MES_Region::get_camera_wranger_from_region( $region_id );
    256260        } else {
    257261            $email_address_key = wcpt_key_to_str( 'E-mail Address', 'wcpt_' );
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders/wcor-reminder.php

    r1032 r1309  
    9292        $send_days_after_pending = get_post_meta( $post->ID, 'wcor_send_days_after_pending', true );
    9393        $which_trigger           = get_post_meta( $post->ID, 'wcor_which_trigger', true );
    94        
     94
    9595        ?>
    9696
     
    112112                    <th><input id="wcor_send_mes" name="wcor_send_where" type="radio" value="wcor_send_mes" <?php checked( $send_where, 'wcor_send_mes' ); ?>></th>
    113113                    <td colspan="2"><label for="wcor_send_mes">The WordCamp's Multi-Event Sponsors</label></td>
     114                </tr>
     115
     116                <tr>
     117                    <th><input id="wcor_send_camera_wrangler" name="wcor_send_where" type="radio" value="wcor_send_camera_wrangler" <?php checked( $send_where, 'wcor_send_camera_wrangler' ); ?>></th>
     118                    <td colspan="2"><label for="wcor_send_camera_wrangler">The Region's Camera Kit Wrangler</label></td>
    114119                </tr>
    115120
     
    363368    protected function save_post_meta( $post, $new_meta ) {
    364369        if ( isset( $new_meta['wcor_send_where'] ) ) {
    365             if ( in_array( $new_meta['wcor_send_where'], array( 'wcor_send_organizers', 'wcor_send_sponsor_wrangler', 'wcor_send_mes', 'wcor_send_custom' ) ) ) {
     370            if ( in_array( $new_meta['wcor_send_where'], array( 'wcor_send_organizers', 'wcor_send_sponsor_wrangler', 'wcor_send_mes', 'wcor_send_camera_wrangler', 'wcor_send_custom' ) ) ) {
    366371                update_post_meta( $post->ID, 'wcor_send_where', $new_meta['wcor_send_where'] );
    367372            }
Note: See TracChangeset for help on using the changeset viewer.