[wp-trac] [WordPress Trac] #18187: Inconsistent behaviour for register_sidebar and is_active_sidebar
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 20 18:45:25 UTC 2011
#18187: Inconsistent behaviour for register_sidebar and is_active_sidebar
------------------------------+-----------------------------
Reporter: nikolay.yordanov | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.2.1
Severity: normal | Keywords: has-patch
------------------------------+-----------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18187>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list