Repository navigation
Expand file tree
/
Copy pathconstants.php
More file actions
50 lines (46 loc) · 1.46 KB
/
Copy pathconstants.php
File metadata and controls
50 lines (46 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* Define constants for the SQLite implementation.
*/
// Temporary - This will be in wp-config.php once SQLite is merged in Core.
if ( ! defined( 'DB_ENGINE' ) ) {
if ( defined( 'SQLITE_DB_DROPIN_VERSION' ) ) {
define( 'DB_ENGINE', 'sqlite' );
} else {
define( 'DB_ENGINE', 'mysql' );
}
}
/**
* Notice:
* Your scripts have the permission to create directories or files on your server.
* If you write in your wp-config.php like below, we take these definitions.
* define('DB_DIR', '/full_path_to_the_database_directory/');
* define('DB_FILE', 'database_file_name');
*/
/**
* FQDBDIR is a directory where the sqlite database file is placed.
* If DB_DIR is defined, it is used as FQDBDIR.
*
* @deprecated 3.0.0 Define DB_DIR instead of overriding FQDBDIR.
*/
if ( ! defined( 'FQDBDIR' ) ) {
if ( defined( 'DB_DIR' ) ) {
define( 'FQDBDIR', trailingslashit( DB_DIR ) );
} elseif ( defined( 'WP_CONTENT_DIR' ) ) {
define( 'FQDBDIR', WP_CONTENT_DIR . '/database/' );
} else {
define( 'FQDBDIR', ABSPATH . 'wp-content/database/' );
}
}
/**
* FQDB is the absolute path to the SQLite database file.
*
* If DB_FILE is defined, FQDB is defined here using FQDBDIR. When SQLite is
* used without DB_FILE, managed storage defines FQDB after resolving the
* randomized database path.
*
* @deprecated 3.0.0 Define DB_DIR and DB_FILE instead of overriding FQDB.
*/
if ( ! defined( 'FQDB' ) && defined( 'DB_FILE' ) ) {
define( 'FQDB', FQDBDIR . DB_FILE );
}