[wp-trac] [WordPress Trac] #26636: There Is No Filter For get_sidebar()

WordPress Trac noreply at wordpress.org
Mon Dec 16 19:57:08 UTC 2013


#26636: There Is No Filter For get_sidebar()
-------------------------+------------------------------
 Reporter:  shelob9      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Template     |     Version:  1.5
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by shelob9):

 @SergeyBiryukov I think @nacin made a really great point about #13239 " We
 may be able to add a specific, targeted hook, or introduce a function or
 argument that exposes filters. But, I do not like the idea of "generic"
 filters that will run over and over again,"  You and @johnbillion have
 referenced a bunch of attempts to add these sorts of non-specific filters.
 The patches and tickets are very helpful for me to look at, so I thank you
 for bring them to my attention.

 That said, I think creating a simple, specific filter, just to target
 sidebars makes more sense. This filter would have several uses beyond just
 creating a way to change widget areas, or wrap the sidebar in a specific
 container so a jQuery plugin could act on it. I could imagine changing out
 entire sidebar areas based on if a user is a paid member of a site or has
 registered for free. Also what about filtering which sidebar is used based
 on information from the cookie, like time since last login. Another idea
 would be to filter sidebar based on user role. For example, what about a
 sidebar that showed analytics info for the current post and the site, as
 well as editing links that was shown only to admins, while other users got
 a sidebar intended to be forward facing? That's just a few of the cool
 ideas for plugins that this filter would make possible.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26636#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list