Make WordPress Core

Changeset 60776


Ignore:
Timestamp:
09/17/2025 01:35:25 PM (8 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r60703 r60776  
    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
Note: See TracChangeset for help on using the changeset viewer.