Changeset 8796 for trunk/wp-admin/includes/image.php
- Timestamp:
- 09/02/2008 10:55:39 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/image.php
r8744 r8796 94 94 list($uwidth, $uheight) = wp_shrink_dimensions($metadata['width'], $metadata['height']); 95 95 $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'"; 96 // Make the file path relative to the upload dir 97 if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) { // Get upload directory 98 if ( 0 === strpos($file, $uploads['basedir']) ) {// Check that the upload base exists in the file path 99 $file = str_replace($uploads['basedir'], '', $file); // Remove upload dir from the file path 100 $file = ltrim($file, '/'); 101 } 102 } 96 103 $metadata['file'] = $file; 97 104
Note: See TracChangeset
for help on using the changeset viewer.