WordPress.org

Making WordPress.org

Changeset 2156


Ignore:
Timestamp:
12/03/2015 04:46:32 PM (5 years ago)
Author:
kovshenin
Message:

WordCamp: Fix reminder shortcode values and make sure e-mails are actually sent.

See: #1370-meta and r2152-meta

File:
1 edited

Legend:

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

    r2152 r2156  
    249249            $wordcamp_meta['Budget Wrangler Name'][0],
    250250            $wordcamp_meta['Budget Wrangler E-mail Address'][0],
     251            $wordcamp_meta['Venue Wrangler Name'][0],
     252            $wordcamp_meta['Venue Wrangler E-mail Address'][0],
     253            $wordcamp_meta['Speaker Wrangler Name'][0],
     254            $wordcamp_meta['Speaker Wrangler E-mail Address'][0],
     255            $wordcamp_meta['Food/Beverage Wrangler Name'][0],
     256            $wordcamp_meta['Food/Beverage Wrangler E-mail Address'][0],
     257            $wordcamp_meta['Swag Wrangler Name'][0],
     258            $wordcamp_meta['Swag Wrangler E-mail Address'][0],
     259            $wordcamp_meta['Volunteer Wrangler Name'][0],
     260            $wordcamp_meta['Volunteer Wrangler E-mail Address'][0],
     261            $wordcamp_meta['Printing Wrangler Name'][0],
     262            $wordcamp_meta['Printing Wrangler E-mail Address'][0],
     263            $wordcamp_meta['Design Wrangler Name'][0],
     264            $wordcamp_meta['Design Wrangler E-mail Address'][0],
     265            $wordcamp_meta['Website Wrangler Name'][0],
     266            $wordcamp_meta['Website Wrangler E-mail Address'][0],
     267            $wordcamp_meta['Social Media/Publicity Wrangler Name'][0],
     268            $wordcamp_meta['Social Media/Publicity Wrangler E-mail Address'][0],
     269            $wordcamp_meta['A/V Wrangler Name'][0],
     270            $wordcamp_meta['A/V Wrangler E-mail Address'][0],
     271            $wordcamp_meta['Party Wrangler Name'][0],
     272            $wordcamp_meta['Party Wrangler E-mail Address'][0],
     273            $wordcamp_meta['Travel Wrangler Name'][0],
     274            $wordcamp_meta['Travel Wrangler E-mail Address'][0],
     275            $wordcamp_meta['Safety Wrangler Name'][0],
     276            $wordcamp_meta['Safety Wrangler E-mail Address'][0],
    251277
    252278            // Venue
     
    341367                $recipients[] = get_post_meta( $wordcamp_id, 'Email Address', true );
    342368            }
     369        }
     370
     371        // A bunch of other wranglers could be recipients.
     372        $other_wranglers = array(
     373            'wcor_send_budget_wrangler' => 'Budget Wrangler E-mail Address',
     374            'wcor_send_venue_wrangler' => 'Venue Wrangler E-mail Address',
     375            'wcor_send_speaker_wrangler' => 'Speaker Wrangler E-mail Address',
     376            'wcor_send_food_wrangler' => 'Food/Beverage Wrangler E-mail Address',
     377            'wcor_send_swag_wrangler' => 'Swag Wrangler E-mail Address',
     378            'wcor_send_volunteer_wrangler' => 'Volunteer Wrangler E-mail Address',
     379            'wcor_send_printing_wrangler' => 'Printing Wrangler E-mail Address',
     380            'wcor_send_design_wrangler' => 'Design Wrangler E-mail Address',
     381            'wcor_send_website_wrangler' => 'Website Wrangler E-mail Address',
     382            'wcor_send_social_wrangler' => 'Social Media/Publicity Wrangler E-mail Address',
     383            'wcor_send_a_v_wrangler' => 'A/V Wrangler E-mail Address',
     384            'wcor_send_party_wrangler' => 'Party Wrangler E-mail Address',
     385            'wcor_send_travel_wrangler' => 'Travel Wrangler E-mail Address',
     386            'wcor_send_safety_wrangler' => 'Safety Wrangler E-mail Address',
     387        );
     388
     389        foreach( array_intersect( array_keys( $other_wranglers ), $send_where ) as $key ) {
     390            $dest = get_post_meta( $wordcamp_id, $other_wranglers[ $key ], true );
     391
     392            // Default to the organizer e-mail.
     393            if ( ! is_email( $dest ) ) {
     394                $dest = get_post_meta( $wordcamp_id, 'Email Address', true );;
     395            }
     396
     397            $recipients[] = $dest;
    343398        }
    344399
     
    362417        }
    363418
     419        $recipients = array_unique( $recipients );
    364420        return $recipients;
    365421    }
Note: See TracChangeset for help on using the changeset viewer.