Ticket #14928: 14928.docs-only.patch
| File 14928.docs-only.patch, 1.5 KB (added by hakre, 3 years ago) |
|---|
-
wp-includes/functions.php
2015 2015 } 2016 2016 2017 2017 /** 2018 * Make Directories. 2019 * 2018 2020 * Recursive directory creation based on full path. 2021 * Attempts to set permissions on newly created folders. 2019 2022 * 2020 * Will attempt to set permissions on folders. 2023 * As php mkdir() (PHP < 5.0.0) does not support recursive paths, this function mimics 2024 * the *nix `mkdir -p` / `mkdir --parent` command. 2021 2025 * 2026 * In difference to mkdir, the permissions set on newly created folders 2027 * is based on the parent folder permissions - not umask. 2028 * 2029 * @link http://www.gnu.org/software/coreutils/manual/coreutils.html#mkdir-invocation 2030 * @link http://php.net/mkdir 2022 2031 * @since 2.0.1 2023 2032 * 2024 * @param string $target Full path to attemptto create.2025 * @return bool Whether the path was created. True if path already exists.2033 * @param string $target Path of a directory to create. 2034 * @return bool Whether the target path exists (already or just created does not make a difference). 2026 2035 */ 2027 2036 function wp_mkdir_p( $target ) { 2028 // fromphp.net/mkdir user contributed notes2037 // undocumented, from a removed php.net/mkdir user contributed notes 2029 2038 $target = str_replace( '//', '/', $target ); 2030 2039 2031 2040 // safe mode fails with a trailing slash under certain PHP versions. … … 2033 2042 if ( empty($target) ) 2034 2043 $target = '/'; 2035 2044 2045 // Handle existing target. 2036 2046 if ( file_exists( $target ) ) 2037 2047 return @is_dir( $target ); 2038 2048
