[wp-hackers] WP 2.2 Widgets Issue / Fix
Robin Adrianse
robin.adr at gmail.com
Thu May 31 12:30:48 GMT 2007
They're still enabled even if a theme is not compatible, I believe. The only
case in which the core widgets would not be enabled would be if another
widgets plugin removed its call from the plugins_loaded action (I think
that's the action).
On 5/31/07, Martin Fitzpatrick <martin.fitzpatrick at gmail.com> wrote:
>
> On 31/05/07, Knut-Olav Hoven <hovenko at linpro.no> wrote:
> > > Yeh, my bad. The problem is that from WP 2.2 that function always
> > > exists so it is not a reliable way to check whether Widgets are
> > > enabled. Is there a new method for checking?
> >
> > I believe widgets are allways enabled in WP 2.2 (since it is no longer a
> > plugin, but in the core), so there's no need to check for it.
>
> They're always enabled but not always active - e.g. if the theme is
> not compatible.
>
> Previously people tended not to enable the Widgets plugin if they're
> theme didn't support them (I think there was a warning also) meaning
> that the check for the function also indicated that they were
> supported.
>
> Previously my plugins used to do the check & if Widgets were found and
> installed it put the configuration options in the Widget (i.e. self
> contained). If Widgets weren't found it output a configuration page
> under Options ->
>
> It's actually been a bit of a support/usability nightmare so I'm
> stripping this out of all the plugins in favour of using the
> Options->Menu method regardless. Mostly I'm just asking out of
> interest: Is there a reliable way to check that Widgets are enabled
> (a.k.a. supported by the current theme).
>
> > If you need backwards compatibility, then you should keep checking for
> the
> > function "register_sidebar_widget".
>
> Going off on a tangent a little, but what is the impact on Sidebar
> Modules (found in K2). Previously that used the same calls
> (register_sidebar_widget) meaning it would die if both Modules &
> Widgets were installed. Presumably now it's impossible to install
> Modules because the widgets functions are built in?
>
> Thanks for all the info by the way - I've fixed the plugins that were
> causing the problems, now I'm just curious.
>
> Martin
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list