Define WP_USE_EXT_MYSQL for Wordpress 4 compatibility

Wordpress 4 defaults to using mysqli_* functions in preference to
mysql_*.  Since pg4wp only provides replacements for mysql_ functions,
we need to ensure that the mysql_* functions are called.  Do this by
defining WP_USE_EXT_MYSQL to true.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
This commit is contained in:
Kevin Locke
2015-06-03 00:38:31 -06:00
parent eff2d4e634
commit 3c98f08453

View File

@ -29,6 +29,8 @@ $replaces = array(
'<?php' => '',
'?>' => '',
);
// Ensure class uses the replaced mysql_ functions rather than mysqli_
define( 'WP_USE_EXT_MYSQL', true);
eval( str_replace( array_keys($replaces), array_values($replaces), file_get_contents(ABSPATH.'/wp-includes/wp-db.php')));
// Create wpdb object if not already done