2009-07-15 14:07:44 +00:00
|
|
|
<?php
|
2010-02-16 22:18:56 +00:00
|
|
|
/*
|
|
|
|
|
Plugin Name: PostgreSQL for WordPress (PG4WP)
|
|
|
|
|
Plugin URI: http://www.hawkix.net
|
|
|
|
|
Description: PG4WP is a special 'plugin' enabling WordPress to use a PostgreSQL database.
|
2014-08-21 16:53:30 +00:00
|
|
|
Version: 1.3.1+
|
2010-02-16 22:18:56 +00:00
|
|
|
Author: Hawk__
|
|
|
|
|
Author URI: http://www.hawkix.net
|
|
|
|
|
License: GPLv2 or newer.
|
|
|
|
|
*/
|
2011-08-02 23:27:36 +00:00
|
|
|
|
2010-02-16 22:25:22 +00:00
|
|
|
if( !defined('PG4WP_ROOT'))
|
|
|
|
|
{
|
2009-07-15 14:07:44 +00:00
|
|
|
// You can choose the driver to load here
|
|
|
|
|
define('DB_DRIVER', 'pgsql'); // 'pgsql' or 'mysql' are supported for now
|
|
|
|
|
|
|
|
|
|
// Set this to 'true' and check that `pg4wp` is writable if you want debug logs to be written
|
|
|
|
|
define( 'PG4WP_DEBUG', false);
|
2010-01-07 23:36:15 +00:00
|
|
|
// If you just want to log queries that generate errors, leave PG4WP_DEBUG to "false"
|
2010-04-04 22:59:10 +00:00
|
|
|
// and set this to true
|
2014-08-21 16:53:30 +00:00
|
|
|
define( 'PG4WP_LOG_ERRORS', true);
|
2010-01-07 23:36:15 +00:00
|
|
|
|
2011-08-02 23:27:36 +00:00
|
|
|
// If you want to allow insecure configuration (from the author point of view) to work with PG4WP,
|
|
|
|
|
// change this to true
|
|
|
|
|
define( 'PG4WP_INSECURE', false);
|
2011-08-01 21:43:06 +00:00
|
|
|
|
2011-08-02 23:27:36 +00:00
|
|
|
// This defines the directory where PG4WP files are loaded from
|
2018-03-16 15:40:35 +01:00
|
|
|
// 3 places checked : wp-content, wp-content/plugins and the base directory
|
2011-08-02 23:27:36 +00:00
|
|
|
if( file_exists( ABSPATH.'/wp-content/pg4wp'))
|
|
|
|
|
define( 'PG4WP_ROOT', ABSPATH.'/wp-content/pg4wp');
|
2018-03-16 15:40:35 +01:00
|
|
|
else if( file_exists( ABSPATH.'/wp-content/plugins/pg4wp'))
|
2011-08-02 23:27:36 +00:00
|
|
|
define( 'PG4WP_ROOT', ABSPATH.'/wp-content/plugins/pg4wp');
|
2018-03-16 15:40:35 +01:00
|
|
|
else if( file_exists( ABSPATH.'/pg4wp'))
|
|
|
|
|
define( 'PG4WP_ROOT', ABSPATH.'/pg4wp');
|
|
|
|
|
else
|
|
|
|
|
die('PG4WP file directory not found');
|
2011-08-01 21:43:06 +00:00
|
|
|
|
2011-08-02 23:27:36 +00:00
|
|
|
// Here happens all the magic
|
|
|
|
|
require_once( PG4WP_ROOT.'/core.php');
|
|
|
|
|
} // Protection against multiple loading
|