Opened 5 years ago
Last modified 5 years ago
#48816 new enhancement
Use get_bloginfo in the REST API index
Reported by: | TimothyBlynJacobs | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | REST API | Keywords: | 2nd-opinion has-patch |
Focuses: | Cc: |
Description
The REST API provides data in the site "index" when making a request to https://example.org/wp-json
. This describes the site and the APIs available. In particular it returns the name of the website, and the tagline. These values are retrieved using get_option
directly instead of get_bloginfo
.
Because this data would be used presentationally, it seems like it'd be more useful if it returned the "presentation" version of these strings.
As far as I could tell, the index has more or less worked the same since the GSOC version of the REST API, so I wasn't able to find any description of why it was built that way.
I opened this because of a Gutenberg PR which would display the site title.
Attachments (3)
Change History (7)
Note: See
TracTickets for help on using
tickets.
Thanks for the patch @dkarfa! To clarify, I didn't make this super clear, I meant using
get_bloginfo()
with the$filter
parameter set todisplay
so the filters are applied. I'm not 100% sure its a good idea yet :)