php - PHP 警告:回调,未找到函数“register_shortcodes”或无效函数>名称/Wordpress
问题描述
我想将 wordpress 站点迁移到新服务器。当我将网站克隆到本地环境并尝试进行一些测试时,我收到以下警告消息:
警告:call_user_func_array() 期望参数 1 是有效的回调,在第 286 行的 /Applications/XAMPP/xamppfiles/htdocs/mySite/wp-includes/class-wp-hook.php 中找不到函数“register_shortcodes”或无效函数名
这是 class-wp-hook.php 的代码:
// Avoid the array_slice if possible.
if ( $the_['accepted_args'] == 0 ) {
$value = call_user_func_array( $the_['function'], array() );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args ); //LINE 286
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
}
我找不到任何方法来删除这个警告,有人可以帮我吗?
解决方案
推荐阅读
- javascript - 绝对定位不滚动
- docker - Docker 共享常用的 bins 和 libs?
- javascript - Slack oauth.access API 返回 bad_redirect_uri 而不请求 redirect_uri
- python - 如何扩展损失函数 Pytorch
- javascript - ionic v4 angular-router,如何在视图导航之间隐藏恢复谷歌地图
- python - 如何从使用 python 解析的 yaml 文件中调用和迭代值?
- c - Linux 内核模块:printk 消息不在我期望的缓冲区日志中
- java - 多次调用的 MediatorLiveData 观察者错误
- android - 如何在混合 React-native 应用程序中传递初始属性
- regex - Nginx 删除 '?' 扩展前的符号