Php ';用户名u存在';函数在Wordpress插件中不工作

Php ';用户名u存在';函数在Wordpress插件中不工作,php,wordpress,Php,Wordpress,我想在我自己的插件中使用“username\u 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): 用户名_存在('admin')#1 E:\xampp\htdoc

我想在我自己的插件中使用“username\u 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): 用户名_存在('admin')#1 E:\xampp\htdocs\wordpress\wp settings.php(255): 包括一次(E:\xampp\htdocs…)#2 E:\xampp\htdocs\wordpress\wp config.php(89): 需要一次(E:\xampp\htdocs…)#3 E:\xampp\htdocs\wordpress\wp load.php(37): 需要一次(E:\xampp\htdocs…)#4 E:\xampp\htdocs\wordpress\wp blog header.php(13): 需要一次(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行


如何修复它?

我在插件中加入了“pluggable.php”并修复了问题

include_once(ABSPATH . 'wp-includes/pluggable.php');

这个函数是可湿性粉剂还是自定义的?这是一个可湿性粉剂函数()。你会调用你的插件,对吗?我认为这个功能不包括你的插件。但我不知道我的插件中包含了什么内容