[wp-hackers] Plugin or theme hack help needed...
Dion Hulse (dd32)
wordpress at dd32.id.au
Thu Feb 25 07:01:14 UTC 2010
That'll be caused by the plugin running code when included.
The main plugin file should NOT include anything such as :
if ( current_user_can(...) )
add_action...
Instead, that should be within a function hooked to an appropriate
location in the WordPress loading. Eg:
add_action('init', 'my_plugin_init');
function my_plugin_init() {
if ( current_user_can(...) )
add_action...
}
On Thu, 25 Feb 2010 11:57:27 +1100, MarvinC <marvinc at gmail.com> wrote:
> This cross-post may be titled wrong but I'm hoping I can get some help
> with
> a theme who's plugin doesn't work under WPMU. When activated the
> following
> error appears:
>
> Fatal error: Call to undefined function wp_get_current_user() in
> /home/content/k/g/m/haiti/html/wp-includes/capabilities.php on line 969
>
> I've tried replacing the capabilities.php file but it didn't work and
> I've
> also tried de-activating the plugin and customizing the template using
> just
> the stylesheet. So as a last straw, and abvious show of desperation, I've
> posted this error on the author's blog, the WP & wpmu forums, and now
> here.
>
> Any responses appreciated.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
Dion Hulse / dd32
Contact:
e: contact at dd32.id.au
msn: msn at d32.id.au
skype: theonly_dd32
Web: http://dd32.id.au/
More information about the wp-hackers
mailing list