[wp-trac] [WordPress Trac] #17150: Atom category terms and labels

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 16 22:46:37 UTC 2011


#17150: Atom category terms and labels
--------------------------+-----------------------------
 Reporter:  niallkennedy  |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Feeds         |    Version:
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 An [http://tools.ietf.org/html/rfc4287#section-4.2.2 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'

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

 After:
 <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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17150>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list