mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-07-30 17:57:13 +02:00
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:
@ -29,6 +29,8 @@ $replaces = array(
|
|||||||
'<?php' => '',
|
'<?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')));
|
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
|
// Create wpdb object if not already done
|
||||||
|
Reference in New Issue
Block a user