[wp-trac] [WordPress Trac] #29790: Widgets don't know the widget area context they're in

WordPress Trac noreply at wordpress.org
Fri Oct 3 03:30:19 UTC 2014


#29790: Widgets don't know the widget area context they're in
------------------------------+--------------------------------------------
 Reporter:  ruud@…            |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Widgets           |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:  has-patch dev-    |     Focuses:  accessibility, administration
  feedback                    |
------------------------------+--------------------------------------------

Comment (by DrewAPicture):

 Replying to [comment:10 westonruter]:
 > Replying to [comment:8 ruud@…]:
 > > I mean: should we focus on light weight code, or on ease of use, or on
 ??
 >
 > Yeah, it's a good question. I think that the logic shared above would
 make sense as a new method on the `WP_Widget` class itself. This would
 make more sense than adding it to the `$instance` I think. So the widget
 callbacks could do just do something like `$this->get_sidebar_id()`.

 +1 for the method method

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29790#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list