Making WordPress.org


Ignore:
Timestamp:
05/20/2022 08:12:55 PM (3 years ago)
Author:
iandunn
Message:

Events: Rename to $promo_start to avoid confusion with event start date.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/events/1.0/index.php

    r11625 r11860  
    12891289        }
    12901290
    1291         $start = $data['promo_start'];
     1291        $promo_start = $data['promo_start'];
    12921292
    12931293        /**
    12941294         * The targeted area of the regional camp promotion "zooms in" over the course of 6 weeks.
    12951295         */
    1296         if ( is_within_date_range( $current_time, $start, strtotime( '+ 2 weeks', $start ) ) ) {
    1297             // Phase 1: Show worldwide for first two weeks.
     1296        if ( is_within_date_range( $current_time, $promo_start, strtotime( '+ 2 weeks', $promo_start ) ) ) {
     1297            // Phase 1: Show worldwide for the first two weeks of the promo (8-6 weeks before the event).
    12981298            $regional_wordcamps[] = $data['event'];
    12991299
    1300         } elseif ( is_within_date_range( $current_time, strtotime( '+ 2 weeks', $start ), strtotime( '+ 4 weeks', $start ) ) ) {
    1301             // Phase 2: Show within regional countries for next two weeks.
     1300        } elseif ( is_within_date_range( $current_time, strtotime( '+ 2 weeks', $promo_start ), strtotime( '+ 4 weeks', $promo_start ) ) ) {
     1301            // Phase 2: Show within regional countries for the next two weeks (6-4 weeks before the event).
    13021302            if ( ! empty( $location['country'] ) && in_array( strtoupper( $location['country'] ), $data['regional_countries'], true ) ) {
    13031303                $regional_wordcamps[] = $data['event'];
    13041304            }
    13051305
    1306         } elseif ( is_within_date_range( $current_time, strtotime( '+ 4 weeks', $start ), strtotime( '+ 6 weeks', $start ) ) ) {
     1306        } elseif ( is_within_date_range( $current_time, strtotime( '+ 4 weeks', $promo_start ), strtotime( '+ 6 weeks', $promo_start ) ) ) {
    13071307            /*
    1308              * Phase 3: Show within the event country for the last two weeks of the promo.
     1308             * Phase 3: Show within the event country for the last two weeks of the promo (4-2 weeks before the event).
    13091309             *
    13101310             * Note: This is _in addition to_ any countries that are within the normal search radius. It mostly
     
    13171317        }
    13181318
    1319         // After the promo ends, the event will just be displayed to everyone in the normal search radius.
     1319        // After the promo ends, the event will just be displayed to everyone in the normal search radius (2 weeks
     1320        // before the event until it's over).
    13201321    }
    13211322
Note: See TracChangeset for help on using the changeset viewer.