Changeset 22105 for trunk/wp-admin/includes/file.php
- Timestamp:
- 10/03/2012 06:49:37 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r21350 r22105 2 2 /** 3 3 * Functions for reading, writing, modifying, and deleting files on the file system. 4 * Includes functionality for theme-specific files as well as operations for uploading, 4 * Includes functionality for theme-specific files as well as operations for uploading, 5 5 * archiving, and rendering output when necessary. 6 6 * … … 228 228 * @param array $file Reference to a single element of $_FILES. Call the function once for each uploaded file. 229 229 * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ). 230 * @param string $time Optional. Time formatted in 'yyyy/mm'. 230 231 * @return array On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ). 231 232 */ … … 360 361 * @param array $file an array similar to that of a PHP $_FILES POST array 361 362 * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ). 363 * @param string $time Optional. Time formatted in 'yyyy/mm'. 362 364 * @return array On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ). 363 365 */ 364 function wp_handle_sideload( &$file, $overrides = false ) {366 function wp_handle_sideload( &$file, $overrides = false, $time = null ) { 365 367 // The default error handler. 366 368 if (! function_exists( 'wp_handle_upload_error' ) ) { … … 439 441 440 442 // A writable uploads dir will pass this test. Again, there's no point overriding this one. 441 if ( ! ( ( $uploads = wp_upload_dir( ) ) && false === $uploads['error'] ) )443 if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) 442 444 return $upload_error_handler( $file, $uploads['error'] ); 443 445
Note: See TracChangeset
for help on using the changeset viewer.