[wp-trac] [WordPress Trac] #39863: HTML description property of term in WP_REST_Terms_Controller lacks display filters

WordPress Trac noreply at wordpress.org
Mon Feb 13 17:13:50 UTC 2017


#39863: HTML description property of term in WP_REST_Terms_Controller lacks display
filters
--------------------------+-----------------------------
 Reporter:  davecpage     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Working with the REST API i've noticed that with terms, either from custom
 taxonomies or default categories and tags, their descriptions are
 different within REST requests compared to outputting within a theme
 template.

 Tracking it down and I've noticed that within themes these term
 descriptions are having `term_description` filters applied, whereas within
 WP_REST_Terms_Controller the term description is used as is from the
 database.

 At its most basic example a user can add HTML to a term description
 (either manually or via a plugin that adds a visual editor), and
 paragraphs will be applied for a theme, but not for the REST requests.

 But the schema for Terms says that it's the `HTML description of the
 term`, which IMO is slightly wrong without all the term description
 filters.

 Comparing to the WP_REST_Posts_Controller it further raises the question,
 should the Term controller be providing a `raw` and `rendered` version of
 the term description to match Post content? Or should the filters simply
 be added as it's a smaller change?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39863>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list