PluginProbe
Performance Lab / 2.1.0
Performance Lab v2.1.0
trunk 1.0.0 1.0.0-beta.1 1.0.0-beta.2 1.0.0-beta.3 1.0.0-rc.1 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 1.9.0 2.0.0 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.7.0 2.8.0 All 44 releases
performance-lab / modules / database / sqlite / constants.php

constants.php in Performance Lab 2.1.0, at modules/database/sqlite/constants.php

51 lines 1.3 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 * @since 1.8.0
6 * @package performance-lab
7 */
8
9 // Temporary - This will be in wp-config.php once SQLite is merged in Core.
10 if ( ! defined( 'DATABASE_TYPE' ) ) {
11 if ( defined( 'PERFLAB_SQLITE_DB_DROPIN_VERSION' ) ) {
12 define( 'DATABASE_TYPE', 'sqlite' );
13 } else {
14 define( 'DATABASE_TYPE', 'mysql' );
15 }
16 }
17
18 /**
19 * Notice:
20 * Your scripts have the permission to create directories or files on your server.
21 * If you write in your wp-config.php like below, we take these definitions.
22 * define('DB_DIR', '/full_path_to_the_database_directory/');
23 * define('DB_FILE', 'database_file_name');
24 */
25
26 /**
27 * FQDBDIR is a directory where the sqlite database file is placed.
28 * If DB_DIR is defined, it is used as FQDBDIR.
29 */
30 if ( ! defined( 'FQDBDIR' ) ) {
31 if ( defined( 'DB_DIR' ) ) {
32 define( 'FQDBDIR', trailingslashit( DB_DIR ) );
33 } elseif ( defined( 'WP_CONTENT_DIR' ) ) {
34 define( 'FQDBDIR', WP_CONTENT_DIR . '/database/' );
35 } else {
36 define( 'FQDBDIR', ABSPATH . 'wp-content/database/' );
37 }
38 }
39
40 /**
41 * FQDB is a database file name. If DB_FILE is defined, it is used
42 * as FQDB.
43 */
44 if ( ! defined( 'FQDB' ) ) {
45 if ( defined( 'DB_FILE' ) ) {
46 define( 'FQDB', FQDBDIR . DB_FILE );
47 } else {
48 define( 'FQDB', FQDBDIR . '.ht.sqlite' );
49 }
50 }
51