File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,14 +81,25 @@ public static function load_plugin() {
8181 define ( 'SQLITE_DB_DROPIN_VERSION ' , $ sqlite_plugin_version ); // phpcs:ignore
8282 }
8383
84- $ new_driver_enabled = defined ( 'WP_SQLITE_AST_DRIVER ' ) && WP_SQLITE_AST_DRIVER ;
85- $ old_structure = file_exists ( $ plugin_directory . '/php-polyfills.php ' );
84+ $ old_structure = file_exists ( $ plugin_directory . '/php-polyfills.php ' );
8685
8786 if ( $ old_structure ) {
8887 require_once $ plugin_directory . '/php-polyfills.php ' ;
8988 }
9089 require_once $ plugin_directory . '/constants.php ' ;
9190
91+ if ( file_exists ( $ plugin_directory . '/class-wp-mysql-on-sqlite.php ' ) ) {
92+ require_once $ plugin_directory . '/class-wp-mysql-on-sqlite.php ' ;
93+ return ;
94+ }
95+
96+ $ new_driver_file = $ plugin_directory . '/wp-includes/database/sqlite/class-wp-mysql-on-sqlite.php ' ;
97+ if ( file_exists ( $ new_driver_file ) ) {
98+ require_once $ plugin_directory . '/wp-includes/database/load.php ' ;
99+ return ;
100+ }
101+
102+ $ new_driver_enabled = defined ( 'WP_SQLITE_AST_DRIVER ' ) && WP_SQLITE_AST_DRIVER ;
92103 if ( $ new_driver_enabled && file_exists ( $ plugin_directory . '/wp-pdo-mysql-on-sqlite.php ' ) ) {
93104 require_once $ plugin_directory . '/wp-pdo-mysql-on-sqlite.php ' ;
94105 } elseif ( $ new_driver_enabled && file_exists ( $ plugin_directory . '/wp-includes/database/load.php ' ) ) {
You can’t perform that action at this time.
0 commit comments