mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 20:58:55 +00:00
Always include wp-db.php. Prevents a conditional include and allows db dropins to cleanly extend the wpdb class. Move require_wp_db() to load.php for consistency with bootloader helpers. fixes #14508.
git-svn-id: https://develop.svn.wordpress.org/trunk@15638 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3100,24 +3100,6 @@ function wp_ob_end_flush_all() {
|
||||
ob_end_flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the correct database class file.
|
||||
*
|
||||
* This function is used to load the database class file either at runtime or by
|
||||
* wp-admin/setup-config.php We must globalise $wpdb to ensure that it is
|
||||
* defined globally by the inline code in wp-db.php.
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @global $wpdb WordPress Database Object
|
||||
*/
|
||||
function require_wp_db() {
|
||||
global $wpdb;
|
||||
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) )
|
||||
require_once( WP_CONTENT_DIR . '/db.php' );
|
||||
else
|
||||
require_once( ABSPATH . WPINC . '/wp-db.php' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Load custom DB error or display WordPress DB error.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user