PluginProbe
SQLite Database Integration / 3.0.0
SQLite Database Integration v3.0.0
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 2.2.4 All 31 releases
sqlite-database-integration / constants.php

constants.php in SQLite Database Integration 3.0.0, at constants.php

52 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Define constants for the SQLite implementation.
4 */
5
6 // Temporary - This will be in wp-config.php once SQLite is merged in Core.
7 if ( ! defined( 'DB_ENGINE' ) ) {
8 if ( defined( 'SQLITE_DB_DROPIN_VERSION' ) ) {
9 define( 'DB_ENGINE', 'sqlite' );
10 } else {
11 define( 'DB_ENGINE', 'mysql' );
12 }
13 }
14
15 /**
16 * Notice:
17 * Your scripts have the permission to create directories or files on your server.
18 * If you write in your wp-config.php like below, we take these definitions.
19 * define('DB_DIR', '/full_path_to_the_database_directory/');
20 * define('DB_FILE', 'database_file_name');
21 */
22
23 /**
24 * FQDBDIR is a directory where the sqlite database file is placed.
25 * If DB_DIR is defined, it is used as FQDBDIR.
26 *
27 * @deprecated 3.0.0 Define DB_DIR instead of overriding FQDBDIR.
28 */
29 if ( ! defined( 'FQDBDIR' ) ) {
30 if ( defined( 'DB_DIR' ) ) {
31 define( 'FQDBDIR', trailingslashit( DB_DIR ) );
32 } elseif ( defined( 'WP_CONTENT_DIR' ) ) {
33 define( 'FQDBDIR', WP_CONTENT_DIR . '/database/' );
34 } else {
35 define( 'FQDBDIR', ABSPATH . 'wp-content/database/' );
36 }
37 }
38
39 /**
40 * FQDB is a database file name. If DB_FILE is defined, it is used
41 * as FQDB.
42 *
43 * @deprecated 3.0.0 Define DB_DIR and DB_FILE instead of overriding FQDB.
44 */
45 if ( ! defined( 'FQDB' ) ) {
46 if ( defined( 'DB_FILE' ) ) {
47 define( 'FQDB', FQDBDIR . DB_FILE );
48 } else {
49 define( 'FQDB', FQDBDIR . '.ht.sqlite' );
50 }
51 }
52