Opened 2 years ago
Atom category terms and labels
|Reported by:||niallkennedy||Owned by:|
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.