[wp-trac] Re: [WordPress Trac] #4280: Allow to constrain widgets being displayed on certain page types only

WordPress Trac wp-trac at lists.automattic.com
Sat May 2 06:26:58 GMT 2009


#4280: Allow to constrain widgets being displayed on certain page types only
-------------------------------------+--------------------------------------
 Reporter:  torbens                  |        Owner:  mufasa  
     Type:  feature request          |       Status:  reopened
 Priority:  normal                   |    Milestone:  2.9     
Component:  Widgets                  |      Version:  2.2     
 Severity:  normal                   |   Resolution:          
 Keywords:  has-patch needs-testing  |  
-------------------------------------+--------------------------------------
Changes (by draca):

 * cc: draca (added)


Comment:

 Replying to [comment:49 jairus]:
 > We've completed coding on our per-page-widget implementation, we're just
 doing some final testing now, and we should be able to put the code up
 within a week. We hit a massive issue with some 3rd party plugins, and had
 to re-write most of it from scratch to make it future-proof.
 > ...

 Is this change also addressing the ability to use a widget in multiple
 sidebars?  A theme I'm working has a few sidebars and I'd like to be able
 to re-use arbitrary widgets on multiple sidebars.  The per-page approach
 is feeling more challenging to maintain when pages are not all in a clean
 hierarchy where properties can be inherited from a parent.  As I'm
 understanding it, this strategy is imposing an organizational hierarchy
 that might not be desired by the site.

 With respect to allowing widgets to appear in sets, isn't this essentially
 what sidebars provides but maybe not to the same level of user
 customization sans coding?  Except widgets can't be put into multiple
 sidebars unless they are coded to allow it.

 There seem to be two use cases:  one widget instance with multiple
 references and multiple instances of a widget (each with one or more
 references).

 Is the widget code begin generalized such that widgets can be treated more
 like an object and references to a widget can either be new or existing
 instances?  (What if I wanted the same arbitrary text widget on a
 collection of pages?)

 > This has been written as a plugin, but we would love to see any part of
 it end up as core functionality. Is there a will to have anything like
 this end up in wordpress proper?

 I'd certainly like to see the ability to have widgets treated as re-usable
 objects make it into the base.  I expect it would reduce defects in
 widgets to move this type of support into the base and out of the custom
 widget implementation.  It would also eliminate the need for tickets like
 #4588.

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


More information about the wp-trac mailing list