Definition:
function require_wp_db() {}
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.
Source code
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' ); }
2737
No comments yet... Be the first to leave a reply!