Tech from Hel
Helene's ramblings on Wordpress, jQuery and other web technologies.
rss
twitter
  • About
  • Projects

Posts Tagged ‘get_currentuserinfo’

A Fine Fix for “get_currentuserinfo undefined”

no comments
Posted on Mar 24 2010 by helene

If you write a Wordpress plugin that calls the function “get_currentuserinfo()”, you should be aware that this could trigger the fatal error, “get_currentuserinfo undefined’, in some Wordpress configurations. Depending on what your plugin does, this error could impact a Wordpress site’s display, so it is important to prevent it from ever happening.

One fix (as published by several WP bloggers) is to edit your plugin to add the code, include "/wp-includes/pluggable.php", manually before you call “get_currentuserinfo()” (or other Wordpress user functions). This methods works in most cases, but it runs the risk of causing an irreconcilable conflict with any membership or user management plugins that may be installed on the same site.

A better fix is to include a priority argument with your plugin hook function… Read more.


Read More

  Tags: fatal error, get_currentuserinfo, wordpress Category: Blogging, Plugins

Categories

  • Blogging
  • javascript
  • Miscellaneous
  • Multimedia
  • MySQL
  • Plugins

Recent Posts

  • WassUp Works Well with WP Widget Cache
  • CTRL+Z Undo: The Keyboard Shortcut You Can’t Do Without
  • A Fine Fix for “get_currentuserinfo undefined”
  • Optimize with MySQL Procedure Analyse
  • Sleeping with Javascript

Popular Posts

  • Horizontal Submenus for Wordpress Admin Plugins
  • Flv Videos in a Thickbox
  • YouTube Videos in a Thickbox
  • Sleeping with Javascript
  • Installing a More Secure Wordpress

Archives

Ads


  • About
  • Projects
Powered by Wordpress  |  Designed by WebTreats