WordPress Call To Undefined Function get_currentuserinfo() PHP Error WordPress Call To Undefined Функция get_currentuserinfo () PHP Error

After uploading, installing and activation some plugins for WordPress blog publishing system, the plug-ins may cause the following PHP error message, logged by Apache web server error_log file or been displayed on web pages which looks like the following line: След качването, инсталирането и активирането на някои плъгини за WordPress блог система за публикуване на плъгини може да доведе до следното съобщение за грешка, PHP, записани от уеб сървъра Apache error_log файл, или са били показани на уеб-страниците, който прилича на следния ред:

Fatal error: Call to undefined function: get_currentuserinfo() in /wordpress/wp-content/plugins/plugin.php Фатална грешка: Викам към недефинирани функции: get_currentuserinfo () в / WordPress / WP-съдържание / плъгини / plugin.php


To make matter worse, these plugins are working fine previously, and suddenly broken down or throwing out the error. За да направите въпрос по-лошо, тези плъгини работят добре преди това, и изведнъж разбити или изхвърляне на грешка. The cause of the issue is due to the reason that get_currentuserinfo() function is defined within pluggable.php of WordPress core. Причината за този проблем, поради причината, че get_currentuserinfo () функцията е дефинирана в pluggable.php на основните WordPress. The problem is that pluggable.php is only been loaded after all the plugins has been loaded. Проблемът е, че pluggable.php е бил натоварен само след като всички плъгини е бил натоварен. It means that get_currentuserinfo() is not yet available when plugins are triggering and needing the function. Това означава, че get_currentuserinfo (не) е все още на разположение, когато се задейства и плъгини които се нуждаят от функция.

To resolve the fix the “call to undefined get_currentuser() function error, just call pluggable.php prior to calling function the requires it. За да разрешите определя "Призив за неопределен get_currentuser () функцията за грешка, просто разговор pluggable.php преди призовава функция го изисква. A little PHP programming skill is required, but for novice, it's not hard to re-code the plugin source code to get the error solved. Малко по програмиране PHP умение е задължително, но за начинаещ, това не е трудно да се ре-код на приставката сорс кода за да получите грешка решен.

Search for the get_currentuser in the PHP file which the error indicates having problem. Търсене на get_currentuser във файла PHP който показва грешка като проблем. Then copy and paste the following lines before (on top of) the line of get_current_user(). След това копирайте и поставете следните редове преди (в горната част) на линията на get_current_user ().

require(ABSPATH . WPINC . '/pluggable.php'); изискват (ABSPATH. WPINC. '/ pluggable.php');

Tip: It's also possible substitute require with requice_once so that pluggable.php is unloaded once the get_currentuser() function is executed. Съвет: Това е също така да бъде заменена с requice_once изискват, така че pluggable.php се разтоварва, след като get_currentuser () функцията е изпълнена.

For example, Така например,

require (ABSPATH . WPINC . '/pluggable.php');
get_currentuserinfo();

IMPORTANT : The page is machine translated and provided "as is" without warranty. ВАЖНО: Страницата е машина за превод и при условие че "както е" без гаранция. Machine translation may be difficult to understand. Машинен превод може да бъде трудно да се разбере. Please refer to Моля, консултирайте се с original English article оригиналния английски статия whenever possible. когато е възможно.


One Response to “WordPress Call To Undefined Function get_currentuserinfo() PHP Error” Един Отговор към "WordPress Call To Undefined Функция get_currentuserinfo () PHP Error"

  1. Call to Undefined Function get_currentuserinfo() Error in WordPress » Tip and Trick Викам към Undefined Функция get_currentuserinfo () Грешка в WordPress »Крайчец и Хитрост
    October 28th, 2009 22:23 28-ми октомври 2009 22:23
    1 1

    [...] Above trick does not work in new WordPress version, try the fix undefined function get_currentuserinfo() fatal error guide [...] [...] Преди трик не работят в нова версия WordPress, опитайте определят get_currentuserinfo недефинирана функция () фатална грешка ръководство [...]

Leave a Reply Вашият коментар

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Можете да използвате тези тагове: <a href="" title=""> заглавие=""> title=""> буквата title=""> <b> <blockquote викам <cite> <code> <дел DateTime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Абонирайте се за коментарите функцията е била изключена. To receive notification of latest comments posted, subscribe to За да получавате известия за най-новите коментари, публикувани, за да се абонирате My Digital Life Comments RSS feed My Еднозначно число Живот Коментар RSS Feed or или register to receive регистрирайте, за да получат new comments in daily email digest. нови коментари в дневния имейл бюлетини.
Custom Search

New Articles Нови членове

Incoming Search Terms for the Article Постъпващ Търся Срок за определителен член Предмет