author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 17:39:30 +0200 | |
changeset 7 | cf61fcea0001 |
parent 5 | 5e2f62d02dcd |
child 9 | 177826044cd9 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* Defines constants and global variables that can be overridden, generally in wp-config.php. |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
*/ |
|
7 |
||
8 |
/** |
|
9 |
* Defines initial WordPress constants |
|
10 |
* |
|
11 |
* @see wp_debug_mode() |
|
12 |
* |
|
13 |
* @since 3.0.0 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
14 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
15 |
* @global int $blog_id The current site ID. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
16 |
* @global string $wp_version The WordPress version string. |
0 | 17 |
*/ |
18 |
function wp_initial_constants() { |
|
19 |
global $blog_id; |
|
20 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
21 |
/**#@+ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
22 |
* Constants for expressing human-readable data sizes in their respective number of bytes. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
23 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
24 |
* @since 4.4.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
25 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
26 |
define( 'KB_IN_BYTES', 1024 ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
27 |
define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
28 |
define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
29 |
define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
30 |
/**#@-*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
31 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
32 |
$current_limit = @ini_get( 'memory_limit' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
33 |
$current_limit_int = wp_convert_hr_to_bytes( $current_limit ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
34 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
35 |
// Define memory limits. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
36 |
if ( ! defined( 'WP_MEMORY_LIMIT' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
37 |
if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
38 |
define( 'WP_MEMORY_LIMIT', $current_limit ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
39 |
} elseif ( is_multisite() ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
40 |
define( 'WP_MEMORY_LIMIT', '64M' ); |
0 | 41 |
} else { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
42 |
define( 'WP_MEMORY_LIMIT', '40M' ); |
0 | 43 |
} |
44 |
} |
|
45 |
||
46 |
if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
47 |
if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
48 |
define( 'WP_MAX_MEMORY_LIMIT', $current_limit ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
49 |
} elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
50 |
define( 'WP_MAX_MEMORY_LIMIT', $current_limit ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
51 |
} else { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
52 |
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
53 |
} |
0 | 54 |
} |
55 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
56 |
// Set memory limits. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
57 |
$wp_limit_int = wp_convert_hr_to_bytes( WP_MEMORY_LIMIT ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
58 |
if ( -1 !== $current_limit_int && ( -1 === $wp_limit_int || $wp_limit_int > $current_limit_int ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
59 |
@ini_set( 'memory_limit', WP_MEMORY_LIMIT ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
60 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
61 |
|
0 | 62 |
if ( ! isset($blog_id) ) |
63 |
$blog_id = 1; |
|
64 |
||
65 |
if ( !defined('WP_CONTENT_DIR') ) |
|
66 |
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down |
|
67 |
||
68 |
// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development. |
|
69 |
if ( !defined('WP_DEBUG') ) |
|
70 |
define( 'WP_DEBUG', false ); |
|
71 |
||
72 |
// Add define('WP_DEBUG_DISPLAY', null); to wp-config.php use the globally configured setting for |
|
73 |
// display_errors and not force errors to be displayed. Use false to force display_errors off. |
|
74 |
if ( !defined('WP_DEBUG_DISPLAY') ) |
|
75 |
define( 'WP_DEBUG_DISPLAY', true ); |
|
76 |
||
77 |
// Add define('WP_DEBUG_LOG', true); to enable error logging to wp-content/debug.log. |
|
78 |
if ( !defined('WP_DEBUG_LOG') ) |
|
79 |
define('WP_DEBUG_LOG', false); |
|
80 |
||
81 |
if ( !defined('WP_CACHE') ) |
|
82 |
define('WP_CACHE', false); |
|
83 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
84 |
// Add define('SCRIPT_DEBUG', true); to wp-config.php to enable loading of non-minified, |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
85 |
// non-concatenated scripts and stylesheets. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
86 |
if ( ! defined( 'SCRIPT_DEBUG' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
87 |
if ( ! empty( $GLOBALS['wp_version'] ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
88 |
$develop_src = false !== strpos( $GLOBALS['wp_version'], '-src' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
89 |
} else { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
90 |
$develop_src = false; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
91 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
92 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
93 |
define( 'SCRIPT_DEBUG', $develop_src ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
94 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
95 |
|
0 | 96 |
/** |
97 |
* Private |
|
98 |
*/ |
|
99 |
if ( !defined('MEDIA_TRASH') ) |
|
100 |
define('MEDIA_TRASH', false); |
|
101 |
||
102 |
if ( !defined('SHORTINIT') ) |
|
103 |
define('SHORTINIT', false); |
|
104 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
105 |
// Constants for features added to WP that should short-circuit their plugin implementations |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
106 |
define( 'WP_FEATURE_BETTER_PASSWORDS', true ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
107 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
108 |
/**#@+ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
109 |
* Constants for expressing human-readable intervals |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
110 |
* in their respective number of seconds. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
111 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
112 |
* Please note that these values are approximate and are provided for convenience. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
113 |
* For example, MONTH_IN_SECONDS wrongly assumes every month has 30 days and |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
114 |
* YEAR_IN_SECONDS does not take leap years into account. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
115 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
116 |
* If you need more accuracy please consider using the DateTime class (https://secure.php.net/manual/en/class.datetime.php). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
117 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
118 |
* @since 3.5.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
119 |
* @since 4.4.0 Introduced `MONTH_IN_SECONDS`. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
120 |
*/ |
0 | 121 |
define( 'MINUTE_IN_SECONDS', 60 ); |
122 |
define( 'HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS ); |
|
123 |
define( 'DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS ); |
|
124 |
define( 'WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS ); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
125 |
define( 'MONTH_IN_SECONDS', 30 * DAY_IN_SECONDS ); |
0 | 126 |
define( 'YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
127 |
/**#@-*/ |
0 | 128 |
} |
129 |
||
130 |
/** |
|
131 |
* Defines plugin directory WordPress constants |
|
132 |
* |
|
133 |
* Defines must-use plugin directory constants, which may be overridden in the sunrise.php drop-in |
|
134 |
* |
|
135 |
* @since 3.0.0 |
|
136 |
*/ |
|
137 |
function wp_plugin_directory_constants() { |
|
138 |
if ( !defined('WP_CONTENT_URL') ) |
|
139 |
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up |
|
140 |
||
141 |
/** |
|
142 |
* Allows for the plugins directory to be moved from the default location. |
|
143 |
* |
|
144 |
* @since 2.6.0 |
|
145 |
*/ |
|
146 |
if ( !defined('WP_PLUGIN_DIR') ) |
|
147 |
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // full path, no trailing slash |
|
148 |
||
149 |
/** |
|
150 |
* Allows for the plugins directory to be moved from the default location. |
|
151 |
* |
|
152 |
* @since 2.6.0 |
|
153 |
*/ |
|
154 |
if ( !defined('WP_PLUGIN_URL') ) |
|
155 |
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash |
|
156 |
||
157 |
/** |
|
158 |
* Allows for the plugins directory to be moved from the default location. |
|
159 |
* |
|
160 |
* @since 2.1.0 |
|
161 |
* @deprecated |
|
162 |
*/ |
|
163 |
if ( !defined('PLUGINDIR') ) |
|
164 |
define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat. |
|
165 |
||
166 |
/** |
|
167 |
* Allows for the mu-plugins directory to be moved from the default location. |
|
168 |
* |
|
169 |
* @since 2.8.0 |
|
170 |
*/ |
|
171 |
if ( !defined('WPMU_PLUGIN_DIR') ) |
|
172 |
define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); // full path, no trailing slash |
|
173 |
||
174 |
/** |
|
175 |
* Allows for the mu-plugins directory to be moved from the default location. |
|
176 |
* |
|
177 |
* @since 2.8.0 |
|
178 |
*/ |
|
179 |
if ( !defined('WPMU_PLUGIN_URL') ) |
|
180 |
define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); // full url, no trailing slash |
|
181 |
||
182 |
/** |
|
183 |
* Allows for the mu-plugins directory to be moved from the default location. |
|
184 |
* |
|
185 |
* @since 2.8.0 |
|
186 |
* @deprecated |
|
187 |
*/ |
|
188 |
if ( !defined( 'MUPLUGINDIR' ) ) |
|
189 |
define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); // Relative to ABSPATH. For back compat. |
|
190 |
} |
|
191 |
||
192 |
/** |
|
193 |
* Defines cookie related WordPress constants |
|
194 |
* |
|
5 | 195 |
* Defines constants after multisite is loaded. |
0 | 196 |
* @since 3.0.0 |
197 |
*/ |
|
198 |
function wp_cookie_constants() { |
|
199 |
/** |
|
200 |
* Used to guarantee unique hash cookies |
|
5 | 201 |
* |
202 |
* @since 1.5.0 |
|
0 | 203 |
*/ |
204 |
if ( !defined( 'COOKIEHASH' ) ) { |
|
205 |
$siteurl = get_site_option( 'siteurl' ); |
|
206 |
if ( $siteurl ) |
|
207 |
define( 'COOKIEHASH', md5( $siteurl ) ); |
|
208 |
else |
|
209 |
define( 'COOKIEHASH', '' ); |
|
210 |
} |
|
211 |
||
212 |
/** |
|
213 |
* @since 2.0.0 |
|
214 |
*/ |
|
215 |
if ( !defined('USER_COOKIE') ) |
|
216 |
define('USER_COOKIE', 'wordpressuser_' . COOKIEHASH); |
|
217 |
||
218 |
/** |
|
219 |
* @since 2.0.0 |
|
220 |
*/ |
|
221 |
if ( !defined('PASS_COOKIE') ) |
|
222 |
define('PASS_COOKIE', 'wordpresspass_' . COOKIEHASH); |
|
223 |
||
224 |
/** |
|
225 |
* @since 2.5.0 |
|
226 |
*/ |
|
227 |
if ( !defined('AUTH_COOKIE') ) |
|
228 |
define('AUTH_COOKIE', 'wordpress_' . COOKIEHASH); |
|
229 |
||
230 |
/** |
|
231 |
* @since 2.6.0 |
|
232 |
*/ |
|
233 |
if ( !defined('SECURE_AUTH_COOKIE') ) |
|
234 |
define('SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH); |
|
235 |
||
236 |
/** |
|
237 |
* @since 2.6.0 |
|
238 |
*/ |
|
239 |
if ( !defined('LOGGED_IN_COOKIE') ) |
|
240 |
define('LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH); |
|
241 |
||
242 |
/** |
|
243 |
* @since 2.3.0 |
|
244 |
*/ |
|
245 |
if ( !defined('TEST_COOKIE') ) |
|
246 |
define('TEST_COOKIE', 'wordpress_test_cookie'); |
|
247 |
||
248 |
/** |
|
249 |
* @since 1.2.0 |
|
250 |
*/ |
|
251 |
if ( !defined('COOKIEPATH') ) |
|
252 |
define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) ); |
|
253 |
||
254 |
/** |
|
255 |
* @since 1.5.0 |
|
256 |
*/ |
|
257 |
if ( !defined('SITECOOKIEPATH') ) |
|
258 |
define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) ); |
|
259 |
||
260 |
/** |
|
261 |
* @since 2.6.0 |
|
262 |
*/ |
|
263 |
if ( !defined('ADMIN_COOKIE_PATH') ) |
|
264 |
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); |
|
265 |
||
266 |
/** |
|
267 |
* @since 2.6.0 |
|
268 |
*/ |
|
269 |
if ( !defined('PLUGINS_COOKIE_PATH') ) |
|
270 |
define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL) ); |
|
271 |
||
272 |
/** |
|
273 |
* @since 2.0.0 |
|
274 |
*/ |
|
275 |
if ( !defined('COOKIE_DOMAIN') ) |
|
276 |
define('COOKIE_DOMAIN', false); |
|
277 |
} |
|
278 |
||
279 |
/** |
|
280 |
* Defines cookie related WordPress constants |
|
281 |
* |
|
282 |
* @since 3.0.0 |
|
283 |
*/ |
|
284 |
function wp_ssl_constants() { |
|
285 |
/** |
|
286 |
* @since 2.6.0 |
|
287 |
*/ |
|
5 | 288 |
if ( !defined( 'FORCE_SSL_ADMIN' ) ) { |
289 |
if ( 'https' === parse_url( get_option( 'siteurl' ), PHP_URL_SCHEME ) ) { |
|
290 |
define( 'FORCE_SSL_ADMIN', true ); |
|
291 |
} else { |
|
292 |
define( 'FORCE_SSL_ADMIN', false ); |
|
293 |
} |
|
294 |
} |
|
295 |
force_ssl_admin( FORCE_SSL_ADMIN ); |
|
0 | 296 |
|
297 |
/** |
|
298 |
* @since 2.6.0 |
|
5 | 299 |
* @deprecated 4.0.0 |
0 | 300 |
*/ |
5 | 301 |
if ( defined( 'FORCE_SSL_LOGIN' ) && FORCE_SSL_LOGIN ) { |
302 |
force_ssl_admin( true ); |
|
303 |
} |
|
0 | 304 |
} |
305 |
||
306 |
/** |
|
307 |
* Defines functionality related WordPress constants |
|
308 |
* |
|
309 |
* @since 3.0.0 |
|
310 |
*/ |
|
311 |
function wp_functionality_constants() { |
|
312 |
/** |
|
313 |
* @since 2.5.0 |
|
314 |
*/ |
|
315 |
if ( !defined( 'AUTOSAVE_INTERVAL' ) ) |
|
316 |
define( 'AUTOSAVE_INTERVAL', 60 ); |
|
317 |
||
318 |
/** |
|
319 |
* @since 2.9.0 |
|
320 |
*/ |
|
321 |
if ( !defined( 'EMPTY_TRASH_DAYS' ) ) |
|
322 |
define( 'EMPTY_TRASH_DAYS', 30 ); |
|
323 |
||
324 |
if ( !defined('WP_POST_REVISIONS') ) |
|
325 |
define('WP_POST_REVISIONS', true); |
|
326 |
||
327 |
/** |
|
328 |
* @since 3.3.0 |
|
329 |
*/ |
|
330 |
if ( !defined( 'WP_CRON_LOCK_TIMEOUT' ) ) |
|
331 |
define('WP_CRON_LOCK_TIMEOUT', 60); // In seconds |
|
332 |
} |
|
333 |
||
334 |
/** |
|
335 |
* Defines templating related WordPress constants |
|
336 |
* |
|
337 |
* @since 3.0.0 |
|
338 |
*/ |
|
339 |
function wp_templating_constants() { |
|
340 |
/** |
|
341 |
* Filesystem path to the current active template directory |
|
342 |
* @since 1.5.0 |
|
343 |
*/ |
|
344 |
define('TEMPLATEPATH', get_template_directory()); |
|
345 |
||
346 |
/** |
|
347 |
* Filesystem path to the current active template stylesheet directory |
|
348 |
* @since 2.1.0 |
|
349 |
*/ |
|
350 |
define('STYLESHEETPATH', get_stylesheet_directory()); |
|
351 |
||
352 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
353 |
* Slug of the default theme for this installation. |
0 | 354 |
* Used as the default theme when installing new sites. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
355 |
* It will be used as the fallback if the current theme doesn't exist. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
356 |
* |
0 | 357 |
* @since 3.0.0 |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
358 |
* @see WP_Theme::get_core_default_theme() |
0 | 359 |
*/ |
360 |
if ( !defined('WP_DEFAULT_THEME') ) |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
361 |
define( 'WP_DEFAULT_THEME', 'twentyseventeen' ); |
0 | 362 |
|
363 |
} |