Call to Undefined Function get_currentuserinfo() Error in WordPress电话未定义功能get_currentuserinfo ( )在WordPress的错误
In WordPress在WordPress的 blog publishing博客出版 system, there may be error been logged in Apache web server error_log file or been displayed on web pages which looks like the following line:系统中,有可能是错误被记录在Apache Web服务器错误信息的文件或已显示的网页上看上去像下面一行:
Fatal error: Call to undefined function: get_currentuserinfo() in /wordpress/wp-content/plugins/plugin.php致命错误:呼叫功能,以界定: get_currentuserinfo ( )在/ WordPress的/可湿性粉剂内容/插件/ plugin.php
The undefined get_currentuserinfo function error normally happens in a poorly coded plugin.未定义get_currentuserinfo的功能错误通常发生在一个糟糕编码插件。 If the user deactivate the plug-in that causes the error, the issue will be fixed, resolved and go away.如果用户停用插件造成的错误,这个问题将是固定的,解决和消失。 The error happens because $userdata or $user_id global variables become null, not defined or of empty value after the plugin is initiated, included, hooked and loaded.错误发生,因为用户数据或$ $ user_id全局变量成为无效,不界定或空值后,插件启动,包括连接和加载。
The User ID and User Data (which User ID is part of) is globally-available var when in the WordPress admin pages.用户ID和用户数据(其中用户名是一部分)是全球无功时可在WordPress的管理网页。 To resolve and fix the undefined get_currentuserinfo() function error, reset and scope the variable to global in the plugin before the beginning of the function which calling get_currenctuserinfo().要解决和修复未定义get_currentuserinfo ( )函数错误,重置和范围的可变全球在插件开始之前功能要求get_currenctuserinfo ( ) 。
To set $userdata or $user_id vars to global scope, add in one of the following line into the beginning of the plugin PHP file:要设置用户数据或$ $ user_id瓦尔全球范围,增加以下行到年初的插件的PHP文件:
$userdata = $GLOBALS['userdata']; $用户数据= $全局[ '用户数据' ] ;
or,或,
global $userdata;全球$用户数据;
For user id, use “global $user_id;” instead.对于用户名,使用“全球$ user_id ; ”代替。
IMPORTANT : You're reading a machine translated page which is provided "as is" without warranty. 重要:您正在阅读的机器翻译网页这是“原样”提供,无保修。 Unlike human translation, machine translation does not understand the grammar, semantics, syntax, idioms of natural language, thus often produce inaccurate and low quality text which is misleading and incomprehensible.不同人的翻译,机器翻译不明白的语法,语义,句法,成语自然语言,因此,往往产生不准确,低质量的文字这是误导和费解。 Thus, please refer to因此,请参阅 original English article英文原文的文章 when in doubt.当怀疑。
Related Articles相关文章
- Call to Undefined Function: wp_constrain_dimensions() When Uploading Images or image_downsize() in Gallery/Media Library in WordPress 2.5呼吁未定义功能: wp_constrain_dimensions ( )当上传图片或image_downsize ( )在画廊/传媒图书馆在WordPress的2.5
- Call To Undefined Function: ctype_digit() in WordPress 2.5呼吁未定义功能: ctype_digit ( )在WordPress的2.5
- WordPress 2.5.1 Released for Download WordPress的2.5.1发布下载
- PHP Fatal Error on Call to Add_Query_Var in Taxonomy.php After Upgrading to WordPress 2.5 RC2 PHP的致命错误就请Add_Query_Var在Taxonomy.php后升级到WordPress的2.5 RC2中
- Fix WordPress 2.5 Image or Media Flash Uploader Not Working Issue in IE7修正2.5 WordPress的图像或媒体闪光灯上传不工作的问题在IE7
- Disable WordPress 2.5 Flash Image/Video/Media Uploader with Plugin禁用WordPress的2.5闪光图片/视频/媒体上传与插件
- How to SEO Optimize WordPress 2.5 Blog Web Page Title Without Optimal Title Plugin如何优化搜索引擎优化WordPress的2.5博客网页标题无标题的优化插件
- WordPress 2.5 RC2 Released for Download WordPress的2.5 RC2测试版发布下载
- Workaround to Override WordPress Shortcode and Display the [] Brackets Tags解决办法,以覆盖WordPress的短,并显示方括号[ ]标签
- Media Buttons Disabler Plugin to Remove “Add Media” Icons in WordPress 2.5媒体按钮Disabler插件删除“添加媒体”图标在WordPress的2.5
































