PLugin激活错误。自定义插件开发

时间:2017-01-14 12:44:35

标签: wordpress plugins

我正在开发自己的插件。但是面临一个问题是,我想在我的插件中包含2个文件,但插件会抛出通知致命错误。

  

无法激活插件,因为它触发了致命错误。

<?php
 /*
 Plugin Name: The Foody Core
 Plugin URI: ------------------
 Description: ------------------
 Version: 1.0
 Author: muaz
 Author URI: ------------------------
 License: GPL2
*/


// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) )
    exit;

    $dirname = plugin_dir_path(__FILE__);
    define('THE_FOODY_PLUGIN_PATH', $dirname);

include( THE_FOODY_PLUGIN_PATH . 'shortcodes/shortcodes.php' );
include( THE_FOODY_PLUGIN_PATH . 'config-thefoody/includes.php' );

0 个答案:

没有答案