Opened 14 years ago
Closed 14 years ago
#18187 closed defect (bug) (duplicate)
Inconsistent behaviour for register_sidebar and is_active_sidebar
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7 |
Component: | Widgets | Keywords: | has-patch |
Focuses: | Cc: |
Description
Part of the sidebar-related functions use sanitize_title() for the sidebar id, while others don't. For example, if I try to register a sidebar with an id like "Not The Very Best Sidebar ID" everything is fine and register_sidebar stores it under $wp_registered_sidebars['Not The Very Best Sidebar ID']
. But when I use is_active_sidebar with the same id, it first passes the id through sanitize_title() and looks for the sidebar data in $wp_registered_sidebars['not-the-very-best-sidebar-id']
My patch adds sanitize_title() to the following functions: register_sidebar, unregister_sidebar and wp_sidebar_description.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
This is on the list for enhancements in 3.3 in somewhat expanded form. Also a duplicate of #11160.