[wp-trac] [WordPress Trac] #50050: Community Events: Sort pinned events chronologically

WordPress Trac noreply at wordpress.org
Fri May 1 19:09:57 UTC 2020


#50050: Community Events: Sort pinned events chronologically
----------------------------+------------------------------
 Reporter:  iandunn         |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by iandunn):

 The API could sort all of the events, but that creates a situation where
 the pinned events aren't in top 3, so they wouldn't be shown in the
 widget.

 It could just sort the top 3 results, but that'd create situations where
 the local event in position !#1 would expire and be removed by
 `trim_events()`, and a new local event would be inserted at position !#3
 when it should be in position !#1, leading to the same problems that we're
 trying to fix. The event would be moved to position !#1 the next time the
 events were refreshed from the API, causing additional inconsistency.

 It seems like the best solution is for the API to remain as-is, and for
 Core to do the sorting after `trim_events()`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50050#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list