PluginProbe
SQLite Database Integration / 2.2.0
SQLite Database Integration v2.2.0
3.0.2 3.0.1 trunk 2.1.13 2.1.14 2.1.15 2.1.16 2.2.0 2.2.1 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.2.18 2.2.19 2.2.2 2.2.20 2.2.21 2.2.22 2.2.23 2.2.3 All 32 releases
← All changes | db.copy +6 -12 trunk2.2.0 View file →
@@ -1,13 +1,15 @@
1 1 <?php
2 2 /**
3 3 * Plugin Name: SQLite integration (Drop-in)
4 - * Version: 1.8.0
4 + * Version: 1.0.0
5 5 * Author: WordPress Performance Team
6 6 * Author URI: https://make.wordpress.org/performance/
7 7 *
8 8 * This file is auto-generated and copied from the sqlite plugin.
9 9 * Please don't edit this file directly.
10 + *
11 + * @package wp-sqlite-integration
10 12 */
11 13
12 14 define( 'SQLITE_DB_DROPIN_VERSION', '1.8.0' );
13 15
@@ -21,17 +23,12 @@
21 23 if ( ! $sqlite_plugin_implementation_folder_path || ! file_exists( $sqlite_plugin_implementation_folder_path . '/wp-includes/sqlite/db.php' ) ) {
22 24 return;
23 25 }
24 26
25 -/**
26 - * Legacy database type marker.
27 - *
28 - * @deprecated 3.0.0 Use DB_ENGINE instead.
29 - */
27 +// Constant for backward compatibility.
30 28 if ( ! defined( 'DATABASE_TYPE' ) ) {
31 29 define( 'DATABASE_TYPE', 'sqlite' );
32 30 }
33 -
34 31 // Define SQLite constant.
35 32 if ( ! defined( 'DB_ENGINE' ) ) {
36 33 define( 'DB_ENGINE', 'sqlite' );
37 34 }
@@ -38,9 +35,9 @@
38 35
39 36 // Require the implementation from the plugin.
40 37 require_once $sqlite_plugin_implementation_folder_path . '/wp-includes/sqlite/db.php';
41 38
42 -// Activate the SQLite Database Integration plugin if it is not already activated.
39 +// Activate the performance-lab plugin if it is not already activated.
43 40 add_action(
44 41 'admin_footer',
45 42 function() {
46 43 if ( defined( 'SQLITE_MAIN_FILE' ) ) {
@@ -48,12 +45,9 @@
48 45 }
49 46 if ( ! function_exists( 'activate_plugin' ) ) {
50 47 require_once ABSPATH . 'wp-admin/includes/plugin.php';
51 48 }
52 -
53 - $plugin_path = WP_PLUGIN_DIR . '/' . '{SQLITE_PLUGIN}';
54 -
55 - if ( file_exists( $plugin_path ) && is_plugin_inactive( '{SQLITE_PLUGIN}' ) ) {
49 + if ( is_plugin_inactive( '{SQLITE_PLUGIN}' ) ) {
56 50 // If `activate_plugin()` returns a value other than null (like WP_Error),
57 51 // the plugin could not be found. Try with a hardcoded string,
58 52 // because that probably means the file was directly copy-pasted.
59 53 if ( null !== activate_plugin( '{SQLITE_PLUGIN}', '', false, true ) ) {