mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-07-29 17:27:13 +02:00
Merge pull request #13 from alexander255/wordpress4-compat
Also search for `pg4wp` data files in the WordPress root directory
This commit is contained in:
@ -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');
|
||||
|
Reference in New Issue
Block a user