capabilities.php does not include pluggable.php
|Reported by:||BlaenkDenum||Owned by:|
I have a plugin that calls is_super_admin as defined in capabilities.php. In multi-site installations, when I enable the plugin, and call is_super_admin to see if the user is a network admin, I get "Call to undefined function wp_get_current_user" in capabilities.php on line 1208. After searching around and trying to fix my plugin, I found a solution which is to add "require_once('pluggable.php')" to the top of capabilities.php.
Is this a bug with WordPress? If so, can it be fixed? This fatal error requires people to have to rename/delete the plugin directory which isn't all that user-friendly.
Change History (4)
- Keywords reporter-feedback close added
- Severity changed from critical to normal