Those who have upgraded to WordPress 1.5.1 have noticed that the upgrade broke a few plugins, such as Post Levels.
This was due to some changes in the WordPress architecture that allow plugin developers to replace some of the core functions in WordPress. However, this means that those functions will not be available when your plugin gets loaded. The functions are now defined in wp-includes/pluggable-functions.php, as of 1.5.1 the following functions are pluggable:
get_currentuserinfoget_userdataget_userdatabyloginwp_mailwp_loginauth_redirectwp_redirectwp_setcookiewp_clearcookiewp_notify_postauthorwp_notify_moderator
Plugins that depend on any of the above functions need to make sure all uses of the function occur after all plugins have loaded. This is only an issue for code that is executed when the plugin is initialized (as opposed to code that is hooked into an action or filter). Initialization code should be refactored to run after WordPress has initliazed, as in the sample below:
// Run setup after the pluggable functions have loaded
add_action('init', 'myplugin_setup')
function myplugin_setup()
{
// Code lives here
}
Alternatively, you can hook into plugins_loaded, which is also executed after the pluggable functions have loaded.
4 Comments
I dont understand what to do in order to fix it, my site is at underburn.com I erased my plugins and tried it again but for some reason its failing on me
underburn: The information on this page is for the developer of whatever plugins you’re using. If you know PHP, you can try to edit the plugin yourself using the instructions in this post (if you don’t, contact your plugin authors)
Does this work with 1.5.1.3?
Hi Fil!
I’m using WP 1.5.1.3 and I had your postlevel plugin running until I realized that all users apart from me, the admin, cannot view or comment the post.
Please apologize if I don’t get it right, but does this mean that I can fix the broken single post view of your postlevel plugin myself according to these instructions?
Do you plan to release a new version of it that works with WP 1.5.1 or higher?
Your plugin would be the only one which works with the newer WP versions.
I used the viewlevel plugin before, but since I’ve upgraded, it did not work any more. Now I’m using the private category plugin, but this only hides certain posts in overviews and archives. If you know the id or permalink, you can still access it. I made a quick and dirty hack and now it does not the display the content any more, but I’m not that confident with it.
Your plugin is the only one which is based on private posts you can access when you’re logged in thanks to the plugin. The other ones do it vice versa, these posts are public, but hidden by the plugin. I think your way is more secure.
I’m sure you would make a lot of people very happy for this feature is desperately needed in WP. :-))) Just private posts that can only be seen in the admin area or protected posts which need a password each time are not sufficient. I already postet a feature request at wordpress.org…
Sorry for this mass of words. ;-)
Greetings!