Index: /sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-event.php
===================================================================
--- /sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-event.php (revision 6813)
+++ /sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-event.php (revision 6814)
@@ -9,5 +9,5 @@
*/
class Official_WordPress_Event {
- public $id, $type, $source_id, $title, $url, $description, $num_attendees, $meetup_name, $meetup_url,
+ public $id, $type, $source_id, $status, $title, $url, $description, $num_attendees, $meetup_name, $meetup_url,
$start_timestamp, $end_timestamp, $location, $country_code, $latitude, $longitude;
Index: /sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php
===================================================================
--- /sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php (revision 6813)
+++ /sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php (revision 6814)
@@ -22,5 +22,4 @@
* Look at meetup-stats.php and see if any differences are relevant, or if there's anything else that'd be helpful in general
* Check non-latin characters, accents etc to make sure stored properly in db
- * Add admin_notice to wordcamp post type to warn when coordinates missing. Also back-fill current ones that are missing.
* Store wordcamp dates in UTC, and also store timezone? Would need to start collecting timezone for wordcamps and then back-fill old records
*
@@ -71,4 +70,5 @@
'type' => $event->type,
'source_id' => $event->source_id,
+ 'status' => $event->status,
'title' => $event->title,
'url' => $event->url,
@@ -147,5 +147,7 @@
SELECT *
FROM `%s`
- WHERE date_utc >= SUBDATE( CURRENT_DATE(), 1 )
+ WHERE
+ date_utc >= SUBDATE( CURRENT_DATE(), 1 ) AND
+ status = 'scheduled'
ORDER BY date_utc ASC
LIMIT 300",
@@ -213,5 +215,5 @@
protected function get_wordcamp_events() {
$request_params = array(
- 'status' => 'wcpt-scheduled',
+ 'status' => array( 'wcpt-scheduled', 'wcpt-cancelled' ),
'per_page' => 100,
// Note: With the number of WordCamps per year growing fast, we may need to batch requests in the near future, like we do for meetups
@@ -242,4 +244,5 @@
$event = array(
'source_id' => $wordcamp->id,
+ 'status' => 'wcpt-scheduled' === $wordcamp->status ? 'scheduled' : 'cancelled',
'type' => 'wordcamp',
'title' => $wordcamp->title->rendered,
@@ -319,5 +322,5 @@
foreach ( $groups as $group_batch ) {
$request_url = sprintf(
- '%s2/events?group_id=%s&time=0,3m&page=%d&key=%s',
+ '%s2/events?group_id=%s&time=0,3m&page=%d&key=%s&status=upcoming,cancelled',
self::MEETUP_API_BASE_URL,
implode( ',', $group_batch ),
@@ -365,4 +368,5 @@
'type' => 'meetup',
'source_id' => $meetup->id,
+ 'status' => 'upcoming' === $meetup->status ? 'scheduled' : 'cancelled',
'title' => $meetup->name,
'url' => $meetup->event_url,