|
15 | 15 | * @param array $info The debug data.
|
16 | 16 | */
|
17 | 17 | function sqlite_plugin_filter_debug_data( $info ) {
|
18 |
| - $database_type = defined( 'DATABASE_TYPE' ) && 'sqlite' === DATABASE_TYPE ? 'sqlite' : 'mysql'; |
| 18 | + $db_engine = defined( 'DB_ENGINE' ) && 'sqlite' === DB_ENGINE ? 'sqlite' : 'mysql'; |
19 | 19 |
|
20 |
| - $info['wp-constants']['fields']['DATABASE_TYPE'] = array( |
21 |
| - 'label' => 'DATABASE_TYPE', |
22 |
| - 'value' => ( defined( 'DATABASE_TYPE' ) ? DATABASE_TYPE : __( 'Undefined', 'sqlite-database-integration' ) ), |
23 |
| - 'debug' => ( defined( 'DATABASE_TYPE' ) ? DATABASE_TYPE : 'undefined' ), |
| 20 | + $info['wp-constants']['fields']['DB_ENGINE'] = array( |
| 21 | + 'label' => 'DB_ENGINE', |
| 22 | + 'value' => ( defined( 'DB_ENGINE' ) ? DB_ENGINE : __( 'Undefined', 'sqlite-database-integration' ) ), |
| 23 | + 'debug' => ( defined( 'DB_ENGINE' ) ? DB_ENGINE : 'undefined' ), |
24 | 24 | );
|
25 | 25 |
|
26 |
| - $info['wp-database']['fields']['database_type'] = array( |
| 26 | + $info['wp-database']['fields']['db_engine'] = array( |
27 | 27 | 'label' => __( 'Database type', 'sqlite-database-integration' ),
|
28 |
| - 'value' => 'sqlite' === $database_type ? 'SQLite' : 'MySQL/MariaDB', |
| 28 | + 'value' => 'sqlite' === $db_engine ? 'SQLite' : 'MySQL/MariaDB', |
29 | 29 | );
|
30 | 30 |
|
31 |
| - if ( 'sqlite' === $database_type ) { |
| 31 | + if ( 'sqlite' === $db_engine ) { |
32 | 32 | $info['wp-database']['fields']['database_version'] = array(
|
33 | 33 | 'label' => __( 'SQLite version', 'sqlite-database-integration' ),
|
34 | 34 | 'value' => class_exists( 'SQLite3' ) ? SQLite3::version()['versionString'] : null,
|
@@ -70,9 +70,9 @@ function sqlite_plugin_filter_debug_data( $info ) {
|
70 | 70 | * @return array
|
71 | 71 | */
|
72 | 72 | function sqlite_plugin_filter_site_status_tests( $tests ) {
|
73 |
| - $database_type = defined( 'DATABASE_TYPE' ) && 'sqlite' === DATABASE_TYPE ? 'sqlite' : 'mysql'; |
| 73 | + $db_engine = defined( 'DB_ENGINE' ) && 'sqlite' === DB_ENGINE ? 'sqlite' : 'mysql'; |
74 | 74 |
|
75 |
| - if ( 'sqlite' === $database_type ) { |
| 75 | + if ( 'sqlite' === $db_engine ) { |
76 | 76 | unset( $tests['direct']['utf8mb4_support'] );
|
77 | 77 | unset( $tests['direct']['sql_server'] );
|
78 | 78 | }
|
|
0 commit comments