Making WordPress.org


Ignore:
Timestamp:
02/20/2015 07:57:12 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Post Type: Insert automation triggers into Call for Speakers form.

Props nvwd
Fixes #567

File:
1 edited

Legend:

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

    r1120 r1288  
    99    public function __construct() {
    1010        $this->new_site_id = false;
    11        
     11
    1212        add_action( 'wcpt_metabox_value', array( $this, 'render_site_url_field' ), 10, 3 );
    1313        add_action( 'wcpt_metabox_save',  array( $this, 'save_site_url_field' ), 10, 3 );
     
    210210
    211211            if ( $page_id ) {
     212                // Save post meta
     213                if ( ! empty( $page['meta'] ) ) {
     214                    foreach ( $page['meta'] as $key => $value ) {
     215                        update_post_meta( $page_id, $key, $value );
     216                    }
     217                }
     218
    212219                // Set featured image
    213220                if ( isset( $page['featured_image'] ) ) {
     
    448455                'title'   => __( 'Call for Speakers', 'wordcamporg' ),
    449456                'content' =>
    450                     '<p>' . __( '<em>Organizers note:</em> Make sure you update the "to" address and other fields before publishing this page!', 'wordcamporg' ) . '</p> ' .   
    451                     '<p>' . __( 'Blurb with information for potential speakers.', 'wordcamporg' ) . '</p> ' .
     457                    '<p>' . __( '<em>Organizers note:</em> Submissions to this form will automatically create draft posts for the Speaker and Session post types. Feel free to customize the form, but deleting or renaming the following fields will break the automation: Name, Email, WordPress.org Username, Your Bio, Session Title, Session Description.', 'wordcamporg' ) . '</p>' .
     458                    '<p>' . __( "If you'd like to propose multiple topics, please submit the form multiple times, once for each topic. [Other speaker instructions/info goes here.]", 'wordcamporg' ) . '</p>' .
    452459                    '<p>' .
    453460                        sprintf( '
    454                             [contact-form to="enter-your-address-here@example.net" subject="%s"]
     461                            [contact-form subject="%s"]
     462                                [contact-field label="%s" type="name"     required="1" /]
     463                                [contact-field label="%s" type="email"    required="1" /]
    455464                                [contact-field label="%s" type="text"     required="1" /]
    456                                 [contact-field label="%s" type="email"    required="1" /]
     465                                [contact-field label="%s" type="textarea" required="1" /]
     466                                [contact-field label="%s" type="text"     required="1" /]
    457467                                [contact-field label="%s" type="textarea" required="1" /]
    458468                                [contact-field label="%s" type="text"     required="1" /]
     
    461471                            __( 'WordCamp Speaker Request', 'wordcamporg' ),
    462472                            __( 'Name', 'wordcamporg' ),
    463                             __( 'Email', 'wordcamporg' ),
    464                             __( 'Topic(s) You would Like to Present On', 'wordcamporg' ),
     473                            __( 'Email Address', 'wordcamporg' ),
     474                            __( 'WordPress.org Username', 'wordcamporg' ),
     475                            __( 'Your Bio', 'wordcamporg' ),
     476                            __( 'Topic Title', 'wordcamporg' ),
     477                            __( 'Topic Description', 'wordcamporg' ),
    465478                            __( 'Intended Audience', 'wordcamporg' ),
    466479                            __( 'Past Speaking Experience (not necessary to apply)', 'wordcamporg' )
     
    469482                'status'  => 'draft',
    470483                'type'    => 'post',
     484                'meta'    => array(
     485                    'wcfd-key' => 'call-for-speakers',
     486                ),
    471487            ),
    472488
Note: See TracChangeset for help on using the changeset viewer.