【发布时间】:2016-08-22 06:20:41
【问题描述】:
我想在我自己的插件中使用“username_exists”,但是当我使用这个函数时,我得到了这个错误:
致命错误:未捕获错误:调用未定义函数 get_user_by() 在 E:\xampp\htdocs\wordpress\wp-includes\user.php:1271 堆栈跟踪:#0 E:\xampp\htdocs\wordpress\wp-content\plugins\register-plus\index.php(86): username_exists('admin') #1 E:\xampp\htdocs\wordpress\wp-settings.php(255): include_once('E:\xampp\htdocs...') #2 E:\xampp\htdocs\wordpress\wp-config.php(89): require_once('E:\xampp\htdocs...') #3 E:\xampp\htdocs\wordpress\wp-load.php(37): require_once('E:\xampp\htdocs...') #4 E:\xampp\htdocs\wordpress\wp-blog-header.php(13): require_once('E:\xampp\htdocs...') #5 E:\xampp\htdocs\wordpress\index.php(17): require('E:\xampp\htdocs...') #6 {main} 抛出 E:\xampp\htdocs\wordpress\wp-includes\user.php 在第 1271 行
我该如何解决?
【问题讨论】:
-
这个功能是WP还是自定义?
-
好的。你会打电话给你的插件吗?我认为您的插件不包含该功能
-
我也觉得。但我不知道我的插件中包含的内容和方式