[wp-trac] [WordPress Trac] #53646: Use `wp_sidebar_description` for sidebar description in the REST API
WordPress Trac
noreply at wordpress.org
Mon Jul 12 19:03:07 UTC 2021
#53646: Use `wp_sidebar_description` for sidebar description in the REST API
------------------------------+-----------------------
Reporter: desrosj | Owner: desrosj
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.8
Component: Widgets | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses: rest-api
------------------------------+-----------------------
Changes (by desrosj):
* owner: (none) => desrosj
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"51408" 51408]:
{{{
#!CommitTicketReference repository="" revision="51408"
Widgets: Use `wp_sidebar_description()` to retrieve a sidebar’s
`description`.
This switches `WP_REST_Sidebars_Controller` to use
`wp_sidebar_description()` for retrieving the `description` of a given
sidebar instead of referencing the value in the `$wp_registered_sidebars`
global variable directly.
`wp_sidebar_description()` uses `wp_kses()` to only allow the default list
of `$allowed_tags` to be present in a sidebar’s `description`.
Props timothyblynjacobs, desrosj.
Fixes #53646.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53646#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list