[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:06:07 UTC 2021
#53646: Use `wp_sidebar_description` for sidebar description in the REST API
-------------------------------------------------+-------------------------
Reporter: desrosj | Owner: desrosj
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.8
Component: Widgets | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch commit dev-feedback | Focuses: rest-api
fixed-major |
-------------------------------------------------+-------------------------
Comment (by desrosj):
Just a note for the future, I was tempted to simplify further and remove
the entire `isset()` check in favor of `wp_sidebar_description()`. But
because `wp_sidebar_description()` can return `void` if the sidebar `$id`
is non-scalar, that can't be done currently.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53646#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list