diff --git a/pg4wp/db.php b/pg4wp/db.php index 6f55375..798e715 100644 --- a/pg4wp/db.php +++ b/pg4wp/db.php @@ -25,11 +25,15 @@ define( 'PG4WP_LOG_ERRORS', true); define( 'PG4WP_INSECURE', false); // This defines the directory where PG4WP files are loaded from -// 2 places checked : wp-content and wp-content/plugins +// 3 places checked : wp-content, wp-content/plugins and the base directory if( file_exists( ABSPATH.'/wp-content/pg4wp')) define( 'PG4WP_ROOT', ABSPATH.'/wp-content/pg4wp'); -else +else if( file_exists( ABSPATH.'/wp-content/plugins/pg4wp')) define( 'PG4WP_ROOT', ABSPATH.'/wp-content/plugins/pg4wp'); +else if( file_exists( ABSPATH.'/pg4wp')) + define( 'PG4WP_ROOT', ABSPATH.'/pg4wp'); +else + die('PG4WP file directory not found'); // Here happens all the magic require_once( PG4WP_ROOT.'/core.php');