WordPress.org

Making WordPress.org

Changeset 2882


Ignore:
Timestamp:
04/03/2016 11:50:51 AM (5 years ago)
Author:
kovshenin
Message:

WordCamp Post Type: Add an new Cancelled status and extend transitions.

The new Cancelled status (as well as More Info Requested) can now
be transitioned to from any other status. Additionally, users can
transition to any other status from Cancelled/More Info Requested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-loader.php

    r2877 r2882  
    131131            'wcpt-interview-sched' => _x( 'Interview/Orientation Scheduled',             'wordcamp status', 'wordcamporg' ),
    132132            'wcpt-rejected'        => _x( 'Rejected',                                    'wordcamp status', 'wordcamporg' ),
     133            'wcpt-cancelled'       => _x( 'Cancelled', 'wordcamp status', 'wordcamporg' ),
    133134            'wcpt-approved-pre-pl' => _x( 'Approved for Pre-Planning Pending Agreement', 'wordcamp status', 'wordcamporg' ),
    134135            'wcpt-needs-email'     => _x( 'Needs E-mail Address',                        'wordcamp status', 'wordcamporg' ),
     
    199200            'wcpt-interview-sched' => 'Interview scheduled',
    200201            'wcpt-rejected'        => 'Sent rejection email',
     202            'wcpt-cancelled'       => 'WordCamp cancelled',
    201203            'wcpt-approved-pre-pl' => 'Orientation/interview held',
    202204            'wcpt-needs-email'     => 'Organizer agreement signed',
     
    231233            'wcpt-needs-vetting'   => array( 'wcpt-needs-orientati', 'wcpt-more-info-reque', 'wcpt-needs-rejection' ),
    232234            'wcpt-needs-orientati' => array( 'wcpt-needs-vetting', 'wcpt-interview-sched' ),
    233             'wcpt-more-info-reque' => array( 'wcpt-needs-vetting', 'wcpt-needs-orientati', 'wcpt-needs-rejection' ),
     235            'wcpt-more-info-reque' => array(),
    234236            'wcpt-needs-rejection' => array( 'wcpt-needs-vetting', 'wcpt-rejected' ),
    235237            'wcpt-interview-sched' => array( 'wcpt-needs-orientati', 'wcpt-approved-pre-pl' ),
    236238            'wcpt-rejected'        => array( 'wcpt-needs-rejection' ),
     239            'wcpt-cancelled'       => array(),
    237240            'wcpt-approved-pre-pl' => array( 'wcpt-interview-sched', 'wcpt-needs-email' ),
    238241            'wcpt-needs-email'     => array( 'wcpt-approved-pre-pl', 'wcpt-needs-site' ),
     
    253256        );
    254257
     258        // Cancelled and More Info Requested can be switched to from any status.
     259        foreach ( array_keys( $transitions ) as $key ) {
     260            $transitions[ $key ][] = 'wcpt-more-info-reque';
     261            $transitions[ $key ][] = 'wcpt-cancelled';
     262        }
     263
     264        // Any status can be switched to from More Info Requested and Cancelled.
     265        foreach ( array( 'wcpt-more-info-reque', 'wcpt-cancelled' ) as $key ) {
     266            $transitions[ $key ] = array_keys( $transitions );
     267        }
     268
    255269        if ( empty( $transitions[ $status ] ) )
    256270            return array( 'wcpt-needs-vetting' );
Note: See TracChangeset for help on using the changeset viewer.