Changeset 16025 for trunk/wp-includes/functions.php
- Timestamp:
- 10/27/2010 10:27:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r15938 r16025 2199 2199 * unique. 2200 2200 * 2201 * The callback must accept two parameters, the first one is the directory and2202 * the second is the filename. The callback must be a function.2201 * The callback is passed three parameters, the first one is the directory, the 2202 * second is the filename, and the third is the extension. 2203 2203 * 2204 2204 * @since 2.5 … … 2206 2206 * @param string $dir 2207 2207 * @param string $filename 2208 * @param string $unique_filename_callback Function name, must be a function.2208 * @param mixed $unique_filename_callback Callback. 2209 2209 * @return string New filename, if given wasn't unique. 2210 2210 */ … … 2222 2222 $name = ''; 2223 2223 2224 // Increment the file number until we have a unique file to save in $dir. Use $override['unique_filename_callback']if supplied.2224 // Increment the file number until we have a unique file to save in $dir. Use callback if supplied. 2225 2225 if ( $unique_filename_callback && is_callable( $unique_filename_callback ) ) { 2226 $filename = $unique_filename_callback( $dir, $name);2226 $filename = call_user_func( $unique_filename_callback, $dir, $name, $ext ); 2227 2227 } else { 2228 2228 $number = '';
Note: See TracChangeset
for help on using the changeset viewer.