Permalink
Browse files

Fix: errors in multisite. Use FDM_PLUGIN_DIR with require_once() calls

  • Loading branch information...
NateWr committed Apr 1, 2014
1 parent d3ad3cb commit 60364bdb75c5b8382803edbeddca634cb02cdc1b
Showing with 11 additions and 11 deletions.
  1. +5 −5 food-and-drink-menu.php
  2. +1 −1 functions.php
  3. +5 −5 views/Base.class.php
View
@@ -33,18 +33,18 @@ public function __construct() {
define( 'FDM_MENUITEM_POST_TYPE', 'fdm-menu-item' );
// Load template functions
require_once( 'functions.php' );
require_once( FDM_PLUGIN_DIR . '/functions.php' );
// Call when plugin is initialized on every page load
add_action( 'init', array( $this, 'load_config' ) );
add_action( 'init', array( $this, 'load_textdomain' ) );
// Load custom post types
require_once( 'cpts.php' );
require_once( FDM_PLUGIN_DIR . '/cpts.php' );
$this->cpts = new fdmCustomPostTypes();
// Load settings
require_once( 'settings.php' );
require_once( FDM_PLUGIN_DIR . '/settings.php' );
$this->settings = new fdmSettings();
// Call when the plugin is activated
@@ -138,9 +138,9 @@ public function load_textdomain() {
* @since 1.1
*/
public function register_widgets() {
require_once( 'widgets/WidgetMenu.class.php' );
require_once( FDM_PLUGIN_DIR . '/widgets/WidgetMenu.class.php' );
register_widget( 'fdmWidgetMenu' );
require_once( 'widgets/WidgetMenuItem.class.php' );
require_once( FDM_PLUGIN_DIR . '/widgets/WidgetMenuItem.class.php' );
register_widget( 'fdmWidgetMenuItem' );
}
View
@@ -67,7 +67,7 @@ function fdm_menu_item_shortcode( $atts ) {
function fdm_load_view_files() {
$files = array(
'views/Base.class.php' // This will load all default classes
FDM_PLUGIN_DIR . '/views/Base.class.php' // This will load all default classes
);
$files = apply_filters( 'fdm_load_view_files', $files );
View
@@ -7,11 +7,11 @@
*/
// Load library classes
require_once( 'Style.class.php' );
require_once( 'View.class.php' );
require_once( 'View.Item.class.php' );
require_once( 'View.Menu.class.php' );
require_once( 'View.Section.class.php' );
require_once( FDM_PLUGIN_DIR . '/views/Style.class.php' );
require_once( FDM_PLUGIN_DIR . '/views/View.class.php' );
require_once( FDM_PLUGIN_DIR . '/views/View.Item.class.php' );
require_once( FDM_PLUGIN_DIR . '/views/View.Menu.class.php' );
require_once( FDM_PLUGIN_DIR . '/views/View.Section.class.php' );
class fdmBase {

0 comments on commit 60364bd

Please sign in to comment.