[Plugin: Maintenance] Breaks Ajax Pages
-
This may seem like an obscure issue, but it keeps me from using your otherwise beautiful plugin.
I have a php document in a custom theme that is used to handle ajax requests. As is typical for such files, in order to have access to WordPress functions, I start the file with:
define('WP_USE_THEMES', FALSE); require($_SERVER['DOCUMENT_ROOT'] . '/wp-blog-header.php');When your pluggin is enabled, this breaks and I get the error:
Fatal error: Call to undefined function get_userdata() in [...]/wp-includes/user.php on line 1402This occurs because when your plugin is loaded in
wp-settings.phpline 198, you call theget_userdata()function. But theget_userdata()function is not defined untilwp-includes/pluggable.phpis included on line 202 ofwp-settings.
The topic ‘[Plugin: Maintenance] Breaks Ajax Pages’ is closed to new replies.