[wp-trac] [WordPress Trac] #21872: RSS Widget, and all of fetch_feed() I believe, forces its own feed order of Post Date DESC

WordPress Trac noreply at wordpress.org
Wed Sep 16 17:25:12 UTC 2020


#21872: RSS Widget, and all of fetch_feed() I believe, forces its own feed order of
Post Date DESC
--------------------------------+----------------------
 Reporter:  madtownlems         |       Owner:  (none)
     Type:  defect (bug)        |      Status:  closed
 Priority:  normal              |   Milestone:
Component:  External Libraries  |     Version:
 Severity:  normal              |  Resolution:  wontfix
 Keywords:                      |     Focuses:
--------------------------------+----------------------
Changes (by desrosj):

 * keywords:  needs-patch needs-unit-tests =>
 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Hi @madtownlems,

 Sorry that this ticket fell through the cracks for so long.

 > modify the order and orderby of the event's feed to be Ascending based
 on a the event's start date

 Based on this, it seems that you are altering the post order in feeds
 using a post meta field's value.
 [https://github.com/simplepie/simplepie/blob/ae49e2201b6da9c808e5dac437aca356a11831b4/library/SimplePie/Item.php#L732
 SimplePie will always sort by the appropriate date field based on the feed
 format] unless ordering by date is disabled as mentioned above, (but that
 leads to the issues you described).

 You could use a filter to change the publish date to the event start date
 in your event feeds. But this is [https://www.rssboard.org/rss-
 specification#ltpubdategtSubelementOfLtitemgt documented in the RSS
 specification] as potentially problematic, as aggregators may choose to
 not display items with a date in the future.

 As far as I know, there's nothing that can be done here to reliably
 control the ordering of posts externally. If the RSS/Atom specs are
 amended to include a property that could be used for events, the SimplePie
 library would most likely need to be updated, and adding this property to
 feed items is probably plugin territory anyway. For those reason I am
 going to close this out.

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


More information about the wp-trac mailing list