2017-11-13 9 views
0

PHP에 관해서 아무 것도 모르므로 코드에 오류가 있는지 또는 업데이트 문제인지는 알 수 없습니다. 새 Wordpress에서 테마를 활성화하면 다음과 같은 오류 메시지가 표시됩니다.wordpress 테마의 functions.php 파일에서 오류가 발생했습니다.

enter image description here.

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; 
    } 

어떤 아이디어 오류가 어디에서 올 수 다음 functions.php 파일에서

, 코드의 오류 관련 라인은 다음 (내가 믿는)입니까?

답변

2

저는 add_plugin_content() 함수가 프레임 워크와 호환되도록 4 개의 매개 변수로 선언해야한다고 생각합니다. 당신은 단지 2 개의 매개 변수로 그것을 선언했지만, 아래에 쓴 것처럼 그것을 선언해야합니다.

function addPluginContent($filename, $links, $file, $config_url) { 
     // insert your code here 
} 
+0

감사합니다. 사실 아주 간단했습니다. addPluginSubMenu와 동일하게 했습니까? – Seb

+0

단순하면 문제가 무엇인지 알 수 있습니다. :) –