[wp-hackers] User Capabilities
Jason Bainbridge
jbainbridge at gmail.com
Wed Jul 13 19:44:31 GMT 2005
On 7/13/05, Ryan Boren <ryan at boren.nu> wrote:
> On Wed, 2005-07-13 at 14:07 -0500, Jason Bainbridge wrote:
> > On 7/13/05, Michael D Adams <mikea at turbonet.com> wrote:
> > > On Jul 12, 2005, at 8:55 AM, Ryan Boren wrote:
> > > > Let the quibbling begin.
> > >
> > > Currently $wp_roles is set essentially at the end of wp-
> > > settings.php. This can cause problems for plugins using hooks that
> > > have already been called by that point:
> > >
> > > 'option_*' filters
> > > 'core_files_loaded' action
> > > anything in wp_cache_postload()
> > > 'plugins_loaded' action
> > > 'template' filter
> > > 'theme_root' filter
> > > 'template_directory' filter
> > > 'locale' filter
> > > (and anything in my-hacks.php)
> > >
> > > And any others I missed (I just gave things a quick glance).
> > >
> > > For example, Ryan's Preview Theme plugin calls get_currentuserinfo()
> > > during the 'template' filter, and get_currentuserinfo() needs global
> > > $wp_roles around when creating the new $current_user object.
> >
> > Ah so that was what was happening on my site! I have Ryan's Preview
> > Theme plugin enabled, which was causing $wp_roles to not get populated
> > due to the above so I moved the setting of $wp_roles to the suggested
> > location and now everything is working fine.
>
> http://trac.wordpress.org/changeset/2706
>
> I rearranged the load order a bit. That should patch things over for
> now.
Seems to do the trick. :)
However I noticed that some of the plugin menu item entries like Spam
Karma 2 under Options and Polaroidonizer under Dashboard no longer
display after going from changeset 2702 to 2706, but TextControl
Config & WP Plugin Mgr still appear under Options. Any ideas off the
top of your head on what would case that? If not I'll have a dig and
familiarise myself with more of the WP internals.
Cheers,
--
Jason Bainbridge
http://kde.org - webmaster at kde.org
Personal Site - http://jasonbainbridge.com
More information about the wp-hackers
mailing list