Making WordPress.org

Changeset 655


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

WordCamp Post Type: Return early if WordCamp isn't assigned to a region.

We can't notify the Multi-Event Sponsors of the corresponding region if the WordCamp isn't assigned to a region, so return early. Otherwise the code does some unnecessary work and throws notices.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php

    r654 r655  
    479479        }
    480480
    481         $wordcamp_region                 = (int) get_post_meta( $wordcamp->ID, 'Multi-Event Sponsor Region', true );
     481        $wordcamp_region = (int) get_post_meta( $wordcamp->ID, 'Multi-Event Sponsor Region', true );
     482
     483        if ( ! $wordcamp_region ) {
     484            return;
     485        }
     486
    482487        $wordcamp_sponsor_wrangler_email = get_post_meta( $wordcamp->ID, 'Sponsor Wrangler E-mail Address', true );
    483488        $wordcamp_lead_organizer_email   = get_post_meta( $wordcamp->ID, 'Email Address', true );
Note: See TracChangeset for help on using the changeset viewer.