Making WordPress.org

Changeset 2458


Ignore:
Timestamp:
02/03/2016 10:59:12 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Post Types: Add a 'Select a Country' option.

Without this, saving the post without selecting a country would result in Abkhazia being saved as the sponsor's country, leading to invalid stats.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/views/sponsors/metabox-sponsor-info.php

    r2398 r2458  
    179179
    180180        <select id="_wcpt_sponsor_country" name="_wcpt_sponsor_country">
     181            <option value="null" <?php selected( $country, 'null' ); ?>>
     182                <?php _e( '-- Select a Country --', 'wordcamporg' ); ?>
     183            </option>
     184
    181185            <?php foreach ( $available_countries as $available_country ) : ?>
    182186                <option value="<?php echo esc_attr( $available_country ); ?>" <?php selected( $available_country, $country ); ?>>
Note: See TracChangeset for help on using the changeset viewer.