我不知道有关php的任何信息,所以我无法确定错误是否在代码中,或者是否是更新问题。当我在我的新Wordpress上激活一个主题时,我会收到以下错误消息:

。
在functions.php文件中,与错误相关的代码行(我相信)如下:
if (!class_exists('mijnpress_plugin_framework')) {
include('find_replace/mijnpress_plugin_framework.php');
}
class plugin_findreplace extends mijnpress_plugin_framework {
function __construct() {
$this->showcredits = true;
$this->showcredits_fordevelopers = true;
$this->plugin_title = 'Find and replace';
$this->plugin_class = 'plugin_findreplace';
$this->plugin_filename = 'find-replace/plugins/find_replace.php';
$this->plugin_config_url = 'plugins.php?page=' . $this->plugin_filename;
}
function plugin_findreplace() {
$args = func_get_args();
call_user_func_array(array(
&$this,
'__construct'
), $args);
}
function addPluginSubMenu() {
$plugin = new plugin_findreplace();
add_submenu_page('optionsframework', 'documentation', 'Documentation', 'manage_options', 'documentation', 'documentations_callback');
add_submenu_page('optionsframework', 'Find & Replace', 'Find & Replace', 'manage_options', 'fine_and_replace', 'findreplace_callback');
}
/**
* Additional links on the plugin page
*/
function addPluginContent($links, $file) {
$plugin = new plugin_findreplace();
$links = parent::addPluginContent($plugin->plugin_filename, $links, $file, $plugin->plugin_config_url);
return $links;
}有什么错误可能来自哪里吗?
发布于 2017-11-13 04:08:03
我认为问题可能在于,函数add_plugin_content()要求使用与框架兼容的4个参数来声明它。您只使用两个参数声明了它,但是应该像我在下面所写的那样声明它。
function addPluginContent($filename, $links, $file, $config_url) {
// insert your code here
}https://stackoverflow.com/questions/47255522
复制相似问题