WordPress.org

Making WordPress.org

Changeset 5509


Ignore:
Timestamp:
05/24/2017 06:25:21 PM (3 years ago)
Author:
coreymckrill
Message:

WordCamp: Add Twitter Handle field to Sponsor CPT

This commit adds the field to the Sponsor CPT on individual WC sites.
A corresponding field in the multi-event-sponsors plugin still needs
to be added.

Refs #2383
Props chandrapatel

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types
Files:
2 edited

Legend:

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

    r3601 r5509  
    106106
    107107        <?php $this->render_form_field_required_indicator(); ?>
     108    </li>
     109
     110    <li>
     111        <label for="_wcpt_sponsor_twitter_handle">
     112            <?php esc_html_e( 'Twitter Handle:', 'wordcamporg' ); ?>
     113        </label>
     114
     115        <input
     116            type="text"
     117            class="regular-text"
     118            id="_wcpt_sponsor_twitter_handle"
     119            name="_wcpt_sponsor_twitter_handle"
     120            value="<?php echo esc_attr( $twitter_handle ); ?>"
     121        />
    108122    </li>
    109123
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php

    r5222 r5509  
    17031703        $phone_number      = get_post_meta( $sponsor->ID, '_wcpt_sponsor_phone_number',      true );
    17041704        $vat_number        = get_post_meta( $sponsor->ID, '_wcpt_sponsor_vat_number',        true );
     1705        $twitter_handle    = get_post_meta( $sponsor->ID, '_wcpt_sponsor_twitter_handle',    true );
    17051706
    17061707        $street_address1 = get_post_meta( $sponsor->ID, '_wcpt_sponsor_street_address1',   true );
     
    19051906        if ( isset( $_POST['wcpt-meta-sponsor-info'] ) && wp_verify_nonce( $_POST['wcpt-meta-sponsor-info'], 'edit-sponsor-info' ) ) {
    19061907            $text_values = array(
    1907                 'company_name', 'first_name', 'last_name', 'email_address', 'phone_number', 'vat_number',
     1908                'company_name', 'first_name', 'last_name', 'email_address', 'phone_number', 'vat_number', 'twitter_handle',
    19081909                'street_address1', 'street_address2', 'city', 'state', 'zip_code', 'country'
    19091910            );
Note: See TracChangeset for help on using the changeset viewer.