[wp-hackers] Getting user info as early as possible.

Jamie Talbot wphackers at jamietalbot.com
Fri Mar 17 06:30:28 GMT 2006


Hi,

Having get_currentuserinfo() as pluggable is nice, but what if I actually want to get the current
user info during plugin setup, without redefining it myself?  The existing function is good for
my purpose, but I need to get current user info before the 'locale' filter is applied for the first
time.  This can potentially occur in another plugin's call load_plugin_textdomain, for example in a
constructor, before pluggable_functions.php is included.

I could alternatively add the locale filter in later, and set it to a really low priority so it runs
last, but get_locale only runs filtered once, after which time it just returns the existing
locale...  I put up a ticket for this a while ago[1], thinking it was only a small issue, but it has
since become pretty important to me.

[1] http://trac.wordpress.org/ticket/2383

Cheers,

Jamie.

--
http://jamietalbot.com


More information about the wp-hackers mailing list