private function wp_connect( $db_host, $db_name, $db_user, $db_pass, $db_prefix ) { // Connect to the database or return false try { $wpdb = DB::connect( "mysql:host={$db_host};dbname={$db_name}", $db_user, $db_pass ); return $wpdb; } catch( Exception $e ) { return false; } }