[Resolved] Why does calling current_user_can() crash WP 2.9.2?
I don’t think I’m doing anything wrong, but I came up to this tonight:
0) Did a clean install of WordPress 2.9.2
1) Started writing a new plugin
2) Put this single line of code in it:
3) WordPress 2.9.2 (admin and front end) crashed with the following error:
Fatal error: Call to undefined function wp_get_current_user() in /Users/trevor/Sites/playground/clean/wp-includes/capabilities.php on line 969
WARNING: If you try this, be sure you have root privileges to rm -r this plugin:
wp-content/plugins/asdf, place a file called
asdf.phpwith this in it:
Plugin Name: Asdf
Plugin URI: http://asdf.com/
Description: Asdf asdf asdf
Author: Top Quark Productions
Activating the plugin gives me the above error message (front-end and wp-admin):
What? How else would I find out if I can put something for the author on the front-end?
(Note: the header text is copied direct from Akismet, with the names changed to protect the mighty)
Top Quark Productions
My first published plugin went live at 0.5.0 recently.
topCollage arranges photos from the gallery in css-based collages.
Lots of shortcode options and I’d like to add the ability to jQuery manipulation of those options on the front end. Thus, the call to current_user_can() that’s stumping me right now.
- The topic ‘[Resolved] Why does calling current_user_can() crash WP 2.9.2?’ is closed to new replies.