Making WordPress.org


Ignore:
Timestamp:
03/31/2020 05:55:59 PM (6 years ago)
Author:
ryelle
Message:

Official WordPress Events: Sync all non-scheduled WordCamp events even if they don't have a date

Events that have been moved back to pre-planning have also had dates removed, which bypasses the syncing feature. This fix gets around that by only checking for Start Date if the event is scheduled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php

    r9657 r9658  
    329329                        case 'Start Date (YYYY-mm-dd)':
    330330                            $value = absint( $value );
    331                             if ( empty( $value ) || $value < strtotime( '-1 day' ) ) {
     331                            // If scheduled, but either in the past or undated, don't sync.
     332                            if ( ( 'wcpt-scheduled' === $wordcamp->status ) &&
     333                                ( empty( $value ) || $value < strtotime( '-1 day' ) )
     334                            ) {
    332335                                continue 3;
    333                             } else {
    334                                 $event['start_timestamp'] = $value;
    335336                            }
     337                            $event['start_timestamp'] = $value;
    336338                            break;
    337339
Note: See TracChangeset for help on using the changeset viewer.