Skip to content

Commit a8e4f05

Browse files
Docs: Clarify the description for get_temp_dir().
Includes a note that `sys_get_temp_dir()` honors the `TMPDIR` environment variable. Follow-up to [17555], [22008], [28936]. Props TimoTijhof, SergeyBiryukov. See #63711. git-svn-id: https://develop.svn.wordpress.org/trunk@60776 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 57f02ce commit a8e4f05

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/wp-includes/functions.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,12 +2209,14 @@ function wp_normalize_path( $path ) {
22092209
/**
22102210
* Determines a writable directory for temporary files.
22112211
*
2212-
* Function's preference is the return value of sys_get_temp_dir(),
2213-
* followed by your PHP temporary upload directory, followed by WP_CONTENT_DIR,
2214-
* before finally defaulting to /tmp/
2212+
* Function's preference is the return value of `sys_get_temp_dir()`,
2213+
* followed by the `upload_tmp_dir` value from `php.ini`, followed by `WP_CONTENT_DIR`,
2214+
* before finally defaulting to `/tmp/`.
2215+
*
2216+
* Note that `sys_get_temp_dir()` honors the `TMPDIR` environment variable.
22152217
*
22162218
* In the event that this function does not find a writable location,
2217-
* It may be overridden by the WP_TEMP_DIR constant in your wp-config.php file.
2219+
* it may be overridden by the `WP_TEMP_DIR` constant in your `wp-config.php` file.
22182220
*
22192221
* @since 2.5.0
22202222
*

0 commit comments

Comments
 (0)