[wp-trac] [WordPress Trac] #29790: Widgets don't know the widget area context there in
WordPress Trac
noreply at wordpress.org
Tue Sep 30 11:35:58 UTC 2014
#29790: Widgets don't know the widget area context there 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 ruud@…):
Replying to [comment:4 westonruter]:
> I think it would be better to add the widget ID to the `$args` passed
into the callback instead of adding it to the `$instance` which is
supposed to reflect the stored database value.
Hi Weston, thanks for commenting on this ticket.
I too was contemplating if $instance is the proper place for storing this
data. Another choice is to use the widget Object itself ($this). Neither
place seemed fitting so I opted for the $instance. The thing being that
its current sidebar location does say something about this particular
instance..
As far as I know those are the two places you I would look for this sort
of data if I want to use it from the widget display view and admin view.
What do you mean with adding the widget ID to the $args?
How does that help the widget determine in which sidebar the widget is
currently in?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29790#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list