Changeset 11861
- Timestamp:
- 05/20/2022 08:13:02 PM (2 years ago)
- Location:
- sites/trunk/api.wordpress.org/public_html/events/1.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
r11860 r11861 1199 1199 ); 1200 1200 1201 // `promo_start` should be 2 months before the Event's start date. See `maybe_add_regional_wordcamps()`.1202 foreach ( $events as & $event ) {1203 $event['promo_start'] = strtotime( $event['event']['date'] . ' - 2 months' );1204 }1205 1206 1201 return $events; 1207 1202 } … … 1285 1280 1286 1281 foreach ( $region_data as $region => $data ) { 1287 if ( empty( $data['promo_start'] ) ) { 1288 continue; 1289 } 1290 1291 $promo_start = $data['promo_start']; 1292 1293 /** 1294 * The targeted area of the regional camp promotion "zooms in" over the course of 6 weeks. 1295 */ 1282 $promo_start = strtotime( $data['event']['date'] . ' - 2 months' ); 1283 1284 // The targeted area of the regional camp promotion "zooms in" over the course of 6 weeks. 1296 1285 if ( is_within_date_range( $current_time, $promo_start, strtotime( '+ 2 weeks', $promo_start ) ) ) { 1297 1286 // Phase 1: Show worldwide for the first two weeks of the promo (8-6 weeks before the event). -
sites/trunk/api.wordpress.org/public_html/events/1.0/tests/test-index.php
r11624 r11861 176 176 $region_data = array( 177 177 'us' => array( 178 'promo_start' => strtotime( '2019-08-16 00:00:00' ),179 180 178 'regional_countries' => array_merge( 181 179 get_iso_3166_2_country_codes( 'south america' ),
Note: See TracChangeset
for help on using the changeset viewer.