Make WordPress Core

Opened 11 years ago

Closed 8 years ago

#17150 closed enhancement (wontfix)

Atom category terms and labels

Reported by: niallkennedy Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Feeds Keywords:
Focuses: Cc:


An Atom category supports both machine-facing and human-facing text through its 'term' and 'label' attributes respectively. WordPress Atom template currently outputs category or tag name as the 'term' attribute. I would like to output the category or tag's slug as 'term' and its name as 'label'

<category scheme="http://wordpress.org/" term="Open Source" />

<category scheme="http://wordpress.org/" term="open-source" label="Open Source" />

Attached is a patch for get_the_category_rss() inside wp-includes/feed.php. I constructed an associative array with slug as the key and name as the value. The slug column is a unique key on the terms table and can also be used to enforce uniqueness in the array.

A possible downside: it's possible two entry categories or tags might have the same name, which would produce two identical outputted lines in RSS 2.0 and RDF feeds while correcting the previous lossy behavior in the Atom feed.

Attachments (1)

atom-author.diff (632 bytes) - added by niallkennedy 11 years ago.
Include proper Atom terms. Move category name to label attribute.

Download all attachments as: .zip

Change History (2)

11 years ago

Include proper Atom terms. Move category name to label attribute.

#1 @johnbillion
8 years ago

  • Keywords has-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This has backwards compatibility concerns. If something that is parsing this attribute is expecting the term name rather than the term slug it could cause a problem.

Closing as wontfix. Re-open if you feel strongly about it or if we can do it in a backwards-compatible way.

Also: the patch uploaded to this ticket is incorrect and unrelated to the issue.

Note: See TracTickets for help on using tickets.