#5404 closed defect (bug) (fixed)
Canceled Regional WordCamps are being shown in Dashboard Events widget
Reported by: | RMarks | Owned by: | coreymckrill |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Events API | Keywords: | |
Cc: |
Description
WordCamp US, a regional WordCamp which was canceled in July, is showing in the WordPress Dashboard Events widget now that we're within two months of the event.
The code should look to see if the status = 'scheduled' before adding it to dashboards.
Reported in Slack in two places:
Attachments (1)
Change History (6)
#4
@
4 years ago
@coreymckrill what are your thoughts on automating these three regional WordCamps and how the get_regional_wordcamp_data
function works.
Suggestion:
- Build an array of regional wordcamp names (asia, europe, us).
- For each of these, query for the next WordCamp's info (title, url, date, end_date, location, country, latitude, longitude) where status is
scheduled
, date is in the future, and url contains the wordcamp's name. - Populate the $events array to produce the same data in place today
For the third where clause condition (url contains the wordcamp's name), is there column in the wporg_events table that is indexed to support this?
#5
@
4 years ago
@RMarks I think we considered something like this a while back. Finding the right WordCamp post via the URL slug is the tricky part. There were some other considerations too, but I'm not remembering right now. Ultimately we decided that when there are only two or three regional camps that get pinned, it's not much effort to go in and update the hard coded data as needed. If we end up with a significantly larger number of these events, it will probably make sense to automate it.
It looks like each of the regional WordCamps are hard coded. Here is the code I found for WCUS.
api.wordpress.org/public_html/events/1.0/index.php Line 1037