Opened 8 years ago
Closed 8 years ago
#2065 closed enhancement (fixed)
Add year to dates on http://central.wordcamp.org/schedule/
Reported by: | andreamiddleton | Owned by: | iandunn |
---|---|---|---|
Milestone: | Priority: | low | |
Component: | WordCamp Site & Plugins | Keywords: | good-first-bug has-patch |
Cc: |
Description
As events on the WordCamp schedule get added with more and more advance time, it might get confusing whether an event is scheduled for this or next year. It would be good to add a year to the dates displayed on http://central.wordcamp.org/schedule/, like we have on https://central.wordcamp.org/schedule/past-wordcamps/.
Attachments (2)
Change History (8)
#1
@
8 years ago
- Keywords needs-patch good-first-bug added
- Owner set to iandunn
- Priority changed from normal to low
- Status changed from new to accepted
#3
@
8 years ago
The patch looks great, thanks @frq!
I'd make two suggestions to improve it:
1) the_wordcamp_date()
is called by multiple templates, so adding the year unconditionally will create side-effects for them. One way to avoid that would be by adding a $year
parameter that defaults to 'excluded'
. If 'included'
is passed, then the year is shown.
2) Add a header for each year, similar to the Past WordCamps template. You can use group_wordcamps_by_year()
to make that easier.
#4
@
8 years ago
Hey @iandunn, thanks for the support.
I tried to do as you pointed me, hope I undestood it correctly.
1) Added a show_year
that defaults to false in the_wordcamp_date
. If true, the year is shown as in the first patch.
2) Modified template_schedule.php
to show the list of WordCamps grouped by year, as in template-past-wordcamps.php
. Thought about adding a conditional here to show or not the headings with the year, but was not sure about it.
This is the first time submitting a patch, so forgive if I am doing something wrong.
Although I doubt there will be a WordCamp with different start and end years, I left the possibility, just like there is one for months.