Skip to content

Commit

Permalink
Include from plugins for localdev
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidWells committed Sep 4, 2014
1 parent 27fc769 commit 6704ff4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion inbound-pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ private function load_core() {
}
/* Load Inbound core files */
$core_files = array('cta', 'leads', 'landing-pages');


/* todo add filter to this array */
if(is_array($core_files) && is_array($core_files)) {

Expand All @@ -173,7 +175,14 @@ private function load_core() {
//echo "load: " . INBOUND_NOW_PATH . '/core/'.$value.'/'.$file_name.'.php <br>';
if(file_exists( INBOUND_NOW_PATH . '/core/'.$folder_name.'/'.$file_name.'.php')) {
// include each toggled on
include_once( INBOUND_NOW_PATH .'/core/'.$folder_name.'/'.$file_name.'.php');
if(in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) {
/* include from normal plugins for DEV */
include_once( WP_PLUGIN_DIR .'/'. $folder_name .'/'.$file_name.'.php');
} else {
/* include from inbound pro */
include_once( INBOUND_NOW_PATH .'/core/'.$folder_name.'/'.$file_name.'.php');
}

}

}
Expand Down

0 comments on commit 6704ff4

Please sign in to comment.