Making WordPress.org


Ignore:
Timestamp:
07/18/2018 07:39:47 PM (8 years ago)
Author:
vedjain
Message:

Adds meta fields for contributor days.

Fixes https://meta.trac.wordpress.org/ticket/1183
WordCamps that are organizing contributor days can now be marked as such, allowing this information to be pulled and used to determine when contributor days are happening
.

props hlashbrooke

File:
1 edited

Legend:

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

    r7260 r7475  
    8888                        __( 'Venue Information', 'wcpt' ),
    8989                        'wcpt_venue_metabox',
     90                        WCPT_POST_TYPE_ID,
     91                        'advanced',
     92                        'high'
     93                );
     94
     95                add_meta_box(
     96                        'wcpt_contributor_info',
     97                        __( 'Contributor Day Information', 'wcpt' ),
     98                        'wcpt_contributor_metabox',
    9099                        WCPT_POST_TYPE_ID,
    91100                        'advanced',
     
    442451                                break;
    443452
     453                        case 'contributor':
     454                                // These fields names need to be unique, hence the 'Contributor' prefix on each one
     455                                $retval = array (
     456                                        'Contributor Day'                   => 'checkbox',
     457                                        'Contributor Day Date (YYYY-mm-dd)' => 'date',
     458                                        'Contributor Venue Name'            => 'text',
     459                                        'Contributor Venue Address'         => 'textarea',
     460                                        'Contributor Venue Capacity'        => 'text',
     461                                        'Contributor Venue Website URL'     => 'text',
     462                                        'Contributor Venue Contact Info'    => 'textarea',
     463                                );
     464                                break;
     465
    444466                        case 'wordcamp':
    445467                                $retval = array (
     
    522544                                        'Contact Information'             => 'textarea',
    523545                                        'Exhibition Space Available'      => 'checkbox',
     546
     547                                        'Contributor Day'                   => 'checkbox',
     548                                        'Contributor Day Date (YYYY-mm-dd)' => 'date',
     549                                        'Contributor Venue Name'            => 'text',
     550                                        'Contributor Venue Address'         => 'textarea',
     551                                        'Contributor Venue Capacity'        => 'text',
     552                                        'Contributor Venue Website URL'     => 'text',
     553                                        'Contributor Venue Contact Info'    => 'textarea',
    524554                                );
    525555                                break;
     
    11551185function wcpt_venue_metabox() {
    11561186        $meta_keys = $GLOBALS['wordcamp_admin']->meta_keys( 'venue' );
     1187        wcpt_metabox( $meta_keys );
     1188}
     1189
     1190function wcpt_contributor_metabox() {
     1191        $meta_keys = $GLOBALS['wordcamp_admin']->meta_keys( 'contributor' );
    11571192        wcpt_metabox( $meta_keys );
    11581193}
Note: See TracChangeset for help on using the changeset viewer.