Making WordPress.org

Changeset 5155


Ignore:
Timestamp:
03/21/2017 05:11:07 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Site Cloner: Remove start date clause so schedule camps are included

That WHERE clause was intentionally excluding camps that hadn't been finished for at least a month, under the assumption that they wouldn't have finished designs. That's a flawed assumption, though, because designs are typically finished by the time the site launches publicly, which is often ~6 months before the camps starts.

Additionally, get_filtered_wordcamp_sites() is already filtering out sites that have the Coming Soon plugin enabled, which achieves that goal in a much more accurate way.

See https://wordpress.slack.com/archives/meta-wordcamp/p1490051905939589

File:
1 edited

Legend:

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

    r4577 r5155  
    194194
    195195        // Keep the cache longer than needed, just to be sure that it doesn't expire before the cron job runs again
     196        // todo This shouldn't be a transient, it should just be a regular option.
     197        //      Transients aren't guaranteed to exist until they expire, so it could expire before the next cron runs
    196198        set_site_transient( WORDCAMP_SITES_TRANSIENT_KEY, get_wordcamp_sites(), DAY_IN_SECONDS * 2 );
    197199}
     
    229231                'orderby'        => 'meta_value_num',
    230232                'order'          => 'DESC',
    231 
    232                 'meta_query' => array(
    233                         array(
    234                                 // New sites won't have finished designs, so ignore them
    235                                 'key'     => 'Start Date (YYYY-mm-dd)',
    236                                 'value'   => strtotime( 'now - 1 month' ),
    237                                 'compare' => '<'
    238                         )
    239                 ),
    240233        ) );
    241234
Note: See TracChangeset for help on using the changeset viewer.